-
Notifications
You must be signed in to change notification settings - Fork 0
/
DSelector_2eMissingProton.h
350 lines (280 loc) · 9.62 KB
/
DSelector_2eMissingProton.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
#ifndef DSelector_2eMissingProton_h
#define DSelector_2eMissingProton_h
#include <iostream>
#include "DSelector/DSelector.h"
#include "DSelector/DHistogramActions.h"
#include "DSelector/DCutActions.h"
#include "TH1I.h"
#include "TH2I.h"
#include "TH1D.h"
#include "TH2D.h"
class DSelector_2eMissingProton : public DSelector
{
public:
DSelector_2eMissingProton(TTree* locTree = NULL) : DSelector(locTree){}
virtual ~DSelector_2eMissingProton(){}
void Init(TTree *tree);
Bool_t Process(Long64_t entry);
private:
void Get_ComboWrappers(void);
void Finalize(void);
// BEAM POLARIZATION INFORMATION
UInt_t dPreviousRunNumber;
bool dIsPolarizedFlag; //else is AMO
bool dIsPARAFlag; //else is PERP or AMO
// ANALYZE CUT ACTIONS
// // Automatically makes mass histograms where one cut is missing
DHistogramAction_AnalyzeCutActions* dAnalyzeCutActions;
//CREATE REACTION-SPECIFIC PARTICLE ARRAYS
//Step 0
DParticleComboStep* dStep0Wrapper;
DBeamParticle* dComboBeamWrapper;
DChargedTrackHypothesis* dPositronWrapper;
DChargedTrackHypothesis* dElectronWrapper;
DKinematicData* dMissingProtonWrapper;
// DEFINE YOUR HISTOGRAMS HERE
// EXAMPLES:
TH1I* dHist_BeamEnergy;
TH1I* dHist_MyCuts;
TH1I* dHist_TaggerAccidentals;
TH1D* dHist_KinFitChiSq;
TH1D* dHist_KinFitCL;
TH1D* dHist_KinFitCLlogx;
TH1D* dHist_MissingMassSquared;
TH1D* dHist_MissingMassSquared_Measured;
TH1D* dHist_MissingMassSquared_Thrown;
TH1D* dHist_MissingMassSquaredTK;
TH1D* dHist_MissingMassSquaredMK;
TH1D* dHist_MissingMassSquaredTM;
TH1D* dHist_MissingMass;
TH1D* dHist_MissingMass_Measured;
TH1D* dHist_MissingMass_Thrown;
TH1D* dHist_MissingMass_TK;
TH1D* dHist_MissingMass_TM;
TH1D* dHist_MissingMass_MK;
TH1D* dHist_MissingEnergy;
TH1D* dHist_MissingEnergy_Thrown;
TH1D* dHist_MissingEnergy_Measured;
TH1D* dHist_MissingEnergyTK;
TH1D* dHist_MissingEnergyTM;
TH1D* dHist_MissingEnergyMK;
//Histograms about 2pi system
TH1D* dHist_M2ekin;
TH1D* dHist_M2ekin_b4BCALyP3;
TH1D* dHist_M2ekin_b4P3;
TH1D* dHist_M2egen;
TH1D* dHist_M2e_Measured;
TH1D* dHist_M2eTK;
TH1D* dHist_M2eTM;
TH1D* dHist_M2eMK;
TH2D* dHist_M2eTK_vs_M2egen;
//diff is kin - gen or TK
TH1D* dHist_t_transverse;
TH1D* dHist_tkin;
TH1D* dHist_tgen;
TH1D* dHist_t_measured;
TH1D* dHist_tTK;
TH1D* dHist_tmeas;
TH1D* dHist_tTM;
TH2D* dHist_tkin_tmeasured;
TH2D* dHist_tgen_tmeasured;
TH2D* dHist_tgen_vs_tresTM;
TH2D* dHist_tgen_vs_tresTK;
TH2D* dHist_tgen_vs_tresTMoT;
TH1D* dHist_Energy_FCAL;
TH1D* dHist_Energy_FCALbyPeak;
TH1D* dHist_FCAL_Elasticity_b4BCALyP3;
TH1D* dHist_FCAL_Elasticity_b4P3;
TH2D* dHist_Energy_FCALbyPeak_vs_EoverP_electron;
TH2D* dHist_Energy_FCALbyPeak_vs_electronP;
TH1D* dHist_EoverP_Positron;
TH1D* dHist_EoverP_Electron;
TH1D* dHist_PoverE_Electron;
TH1D* dHist_PoverE_Positron;
TH1D* dHist_eplusMomentum;
TH1D* dHist_eminusMomentum;
TH2D* dHist_epMomentum_VS_theta;
TH1D* dHist_Theta1;
TH1D* dHist_Theta2;
TH2D* dHist_Theta1TK_vs_Theta1T;
TH2D* dHist_Theta2TK_vs_Theta2T;
TH1D* dHist_ep_phi;
TH1D* dHist_em_phi;
TH1D* dHist_E2e;
TH1D* dHist_E2e_Measured;
TH1D* dHist_E2e_Thrown;
TH1D* dHist_E2e_TM;
TH1D* dHist_E2e_TK;
TH1D* dHist_Jphi;
TH1D* dHist_Jphi_Thrown;
TH1D* dHist_phi;
TH2D* dHist_Jphi_VS_phi;
TH2D* dHist_JphiTK_vs_JphiThrown;
TH1D* dHist_Energy_UnusedShowers;
TH2D* dHist_EUnSh_VS_Elas;
TH2D* dHist_EUnSh_VS_W;
TH2D* dHist_EUnSh_VS_Elas_NZb4P3;
TH2D* dHist_EUnSh_VS_W_NZb4P3;
TH2D* dHist_M2ekin_VS_NumUnusedTracks;
TH2D* dHist_Elasticity_VS_NumUnusedTracks;
TH1I* dHist_NumUnusedTracks;
TH1D* dHist_EoverP_Positron_Measured;
TH1D* dHist_EoverP_Electron_Measured;
TH1D* dHist_ElasticityKinFit;
TH1D* dHist_ElasticityMeasured;
TH2D* dHist_Energy_FCALbyPeak_vs_EoverP_electronKF;
TH2D* dHist_Energy_FCALbyPeak_vs_EoverP_electronMeas;
TH2D* dHist_EoverP_vs_P_ElectronMeas;
TH2D* dHist_EoverP_vs_P_Electron;
TH2D* dHist_Elasticity_VS_PoverEtot;
TH1D* dHist_Elas_PoE_rotate;
TH1D* dHist_PoEtot;
TH1D* dHist_Ilia;
TH2D* dHist_EoP1_VS_EoP2;
TH1D* dHist_EoP1_Plus_EoP2;
TH2D* dHist_Elas_VS_EoP1;
TH2D* dHist_Elas_VS_EoP2;
TH2D* dHist_Elas_VS_EoP1_Plus_EoP2;
TH1D* dHist_Elas_EoP1_rotate;
TH1D* dHist_Elas_EoP2_rotate;
TH1D* dHist_Elas_EoP1_Plus_EoP2norm_rotate;
TH1D* dHist_EoP2_chop1;
TH1D* dHist_EoP2_chop2;
TH1D* dHist_EoP2_chop3;
TH1D* dHist_EoP2_chop4;
TH1D* dHist_EoP2_chop5;
TH1D* dHist_DetectorTiming_ep;
TH1D* dHist_DetectorTiming_em;
TH2D* dHist_MissingProtonP3Mag_VS_W;
TH2D* dHist_MissingProtonP3Mag_VS_SumPMag_UnusedTracks;
TH2D* dHist_MissingProtonTheta_VS_W;
TH2D* dHist_MissingProtonPhi_VS_W;
TH2D* dHist_UnusedTrackP3Mag_VS_W;
TH2D* dHist_UnusedTrackTheta_VS_W;
TH2D* dHist_UnusedTrackTheta_VS_MissingProtonTheta;
TH1D* dHist_SumP3Mag_UnusedTracks;
TH1D* dHist_P_unused;
TH1D* dHist_SumP3Mag_OneUnusedTrack;
TH1D* dHist_UnusedTrackTheta;
TH1D* dHist_UnusedTrackThetaRad;
TH1D* dHist_UnusedTrackPX;
TH1D* dHist_UnusedTrackPY;
TH1D* dHist_UnusedTrackPZ;
TH1D* dHist_ShowerQuality_ep;
TH1D* dHist_dEdx_TOF_ep;
TH1D* dHist_dEdx_TOF_em;
TH2D* dHist_dEdx_TOF_VS_P_Positron;
TH2D* dHist_dEdx_TOF_VS_P_Electron;
TH2D* dHist_dEdx_TOF_ep_VS_P_missp;
TH2D* dHist_dEdx_TOF_em_VS_P_missp;
TH2D* dHist_dEdx_TOF_all_VS_P_missp;
TH2D* dHist_dEdx_TOF_ep_VS_W;
TH2D* dHist_dEdx_TOF_em_VS_W;
TH2D* dHist_dEdx_TOF_all_VS_W;
TH2D* dHist_dEdx_TOF_ep_VS_P_unused;
TH2D* dHist_dEdx_TOF_em_VS_P_unused;
TH2D* dHist_dEdx_TOF_all_VS_P_unused;
TH1D* dHist_dEdx_CDC_ep;
TH1D* dHist_dEdx_CDC_em;
TH2D* dHist_dEdx_CDC_Pos_VS_P_Positron;
TH2D* dHist_dEdx_CDC_Elec_VS_P_Electron;
TH2D* dHist_dEdx_CDC_All_VS_P_Positron;
TH2D* dHist_dEdx_CDC_Pos_VS_P_MissP;
TH2D* dHist_dEdx_CDC_em_VS_P_missp;
TH2D* dHist_dEdx_CDC_VS_MissingProtonP3Mag;
TH2D* dHist_dEdx_CDC_ep_VS_P_unused;
TH2D* dHist_dEdx_CDC_em_VS_P_unused;
TH2D* dHist_dEdx_CDC_all_VS_P_unused;
TH1D* dHist_dEdx_FDC_ep;
TH1D* dHist_dEdx_FDC_em;
TH2D* dHist_dEdx_FDC_ep_VS_P_ep;
TH2D* dHist_dEdx_FDC_em_VS_P_em;
TH2D* dHist_dEdx_FDC_all_VS_P_missp;
TH2D* dHist_dEdx_FDC_all_VS_P_ep;
TH2D* dHist_dEdx_FDC_ep_VS_P_missp;
TH2D* dHist_dEdx_FDC_em_VS_P_missp;
TH2D* dHist_dEdx_FDC_ep_VS_P_unused;
TH2D* dHist_dEdx_FDC_em_VS_P_unused;
TH2D* dHist_dEdx_FDC_all_VS_P_unused;
TH1D* dHist_dEdx_ST_ep;
TH1D* dHist_dEdx_ST_em;
TH2D* dHist_dEdx_ST_ep_VS_P_ep;
TH2D* dHist_dEdx_ST_em_VS_P_em;
TH2D* dHist_dEdx_ST_all_VS_P_missp;
TH2D* dHist_dEdx_ST_all_VS_P_ep;
TH2D* dHist_dEdx_ST_ep_VS_P_missp;
TH2D* dHist_dEdx_ST_em_VS_P_missp;
TH2D* dHist_dEdx_ST_ep_VS_P_unused;
TH2D* dHist_dEdx_ST_em_VS_P_unused;
TH2D* dHist_dEdx_ST_all_VS_P_unused;
TH1D* dHist_TrackFCAL_DOCA_Charged;
TH1D* dHist_TrackFCAL_DOCA_ep;
TH1D* dHist_TrackFCAL_DOCA_em;
TH1D* dHist_TrackFCAL_DOCA_Neutral;
TH2D* dHist_TrackFCAL_DOCA_Charged_VS_W;
TH2D* dHist_TrackFCAL_DOCA_ep_VS_W;
TH2D* dHist_TrackFCAL_DOCA_em_VS_W;
TH2D* dHist_TrackFCAL_DOCA_Neutral_VS_W;
TH2D* dHist_E9E25_FCAL_all_VS_W;
TH2D* dHist_E9E25_FCAL_ep_VS_W;
TH2D* dHist_E9E25_FCAL_em_VS_W;
TH2D* dHist_Elasticity_VS_W;
TH1D* dHist_OpeningAngle;
TH2D* dHist_OpeningAngle_VS_W;
TH2D* dHist_t_VS_W;
Double_t dMinKinFitCL;
Double_t dMaxKinFitChiSq;
Double_t dMinBeamEnergy;
Double_t dMaxBeamEnergy;
Double_t dMin2eMass;
Double_t dMax2eMass;
Double_t dMinMissingMassSquared;
Double_t dMaxMissingMassSquared;
Double_t dMinPositronP3;
Double_t dMinElectronP3;
Double_t dMinPoverE;
Double_t dMaxPoverE;
Double_t dMinEoverP;
Double_t dMinEoverPkin;
Double_t dMaxEoverPkin;
Double_t dMinEoverPkin2;
Double_t dMaxEoverPkin2;
Double_t dMaxTOF_dEdx_ep;
Double_t dMaxTOF_dEdx_em;
Double_t dMaxFCAL_DOCA_em;
Double_t dMaxFCAL_DOCA_ep;
Double_t dMaxMissingProtonP3Mag;
Double_t dMaxFCALElasticity;
Int_t dMaxNumUnusedTracks;
//Andrew's Cut Options
Int_t ABeamCut;
Int_t AKinFitCLCut;
Int_t AMissingMassSqCut;
Int_t AInvariantMassCut;
Int_t ATOF2HitCut;
Int_t ATOFdEdxPositronCut;
Int_t ATOFdEdxElectronCut;
Int_t AFCAL2HitCut;
Int_t AFCAL2TrackEoverPmeasCut;
Int_t AFCALE1overP1kinCut;
Int_t AFCALE2overP2kinCut;
Int_t AFCALElasticityCut;
Int_t ADOCAPositronCut;
Int_t ADOCAElectronCut;
Int_t AUnusedShowerEnergyCut;
// Constants
Double_t PI = 3.14159;
Double_t MProton = 0.93827231; //(GeV/c^2)
Double_t ElectronMass = 0.000511;
ClassDef(DSelector_2eMissingProton, 0);
};
void DSelector_2eMissingProton::Get_ComboWrappers(void)
{
//Step 0
dStep0Wrapper = dComboWrapper->Get_ParticleComboStep(0);
dComboBeamWrapper = static_cast<DBeamParticle*>(dStep0Wrapper->Get_InitialParticle());
dPositronWrapper = static_cast<DChargedTrackHypothesis*>(dStep0Wrapper->Get_FinalParticle(0));
dElectronWrapper = static_cast<DChargedTrackHypothesis*>(dStep0Wrapper->Get_FinalParticle(1));
dMissingProtonWrapper = dStep0Wrapper->Get_FinalParticle(2);
}
#endif // DSelector_2eMissingProton_h