CbmRoot
CbmAnaConversionRecoFull.cxx
Go to the documentation of this file.
1 
12 
13 // standard includes
14 #include <iostream>
15 
16 // includes from ROOT
17 #include "TRandom3.h"
18 
19 // included from CbmRoot
23 #include "CbmDrawHist.h"
24 #include "CbmGlobalTrack.h"
25 #include "CbmL1PFFitter.h"
26 #include "CbmLitGlobalElectronId.h"
27 #include "CbmMCTrack.h"
28 #include "CbmRichPoint.h"
29 #include "CbmRichRing.h"
30 #include "CbmStsTrack.h"
31 #include "CbmTrackMatchNew.h"
32 #include "FairLogger.h"
33 #include "FairRootManager.h"
34 #include "L1Field.h"
35 
36 
37 #define M2E 2.6112004954086e-7
38 using namespace std;
39 
40 
42  : fRichPoints(NULL)
43  , fRichRings(NULL)
44  , fRichRingMatches(NULL)
45  , fMcTracks(NULL)
46  , fStsTracks(NULL)
47  , fStsTrackMatches(NULL)
48  , fGlobalTracks(NULL)
49  , fPrimVertex(NULL)
50  , fKFVertex()
51  , fHistoList_recofull()
52  , fHistoList_recofull_1()
53  , fHistoList_recofull_2()
54  , fHistoList_recofull_3()
55  , fHistoList_recofull_4()
56  , fHistoList_recofull_new()
57  , fhElectrons(NULL)
58  , fhMomentumFits(NULL)
59  , fhMomentumFits_electronRich(NULL)
60  , fhMomentumFits_pi0reco(NULL)
61  , fElectrons_track()
62  , fElectrons_momenta()
63  , fElectrons_momentaChi()
64  , fElectrons_mctrackID()
65  , fElectrons_track_1()
66  , fElectrons_momenta_1()
67  , fElectrons_momentaChi_1()
68  , fElectrons_mctrackID_1()
69  , fVector_photons_pairs_1()
70  , fElectrons_track_2()
71  , fElectrons_momenta_2()
72  , fElectrons_momentaChi_2()
73  , fElectrons_mctrackID_2()
74  , fVector_photons_pairs_2()
75  , fElectrons_track_3()
76  , fElectrons_momenta_3()
77  , fElectrons_momentaChi_3()
78  , fElectrons_mctrackID_3()
79  , fVector_photons_pairs_3()
80  , fElectrons_track_4()
81  , fElectrons_momenta_4()
82  , fElectrons_momentaChi_4()
83  , fElectrons_mctrackID_4()
84  , fVector_photons_pairs_4()
85  , fElectrons_track_new()
86  , fElectrons_momenta_new()
87  , fElectrons_momentaChi_new()
88  , fElectrons_mctrackID_new()
89  , fElectrons_globaltrackID_new()
90  , fVector_photons_pairs_new()
91  , fhElectrons_invmass(NULL)
92  , fhElectrons_invmass_cut(NULL)
93  , fhElectrons_nofPerEvent(NULL)
94  , fhPhotons_nofPerEvent(NULL)
95  , fVector_photons_pairs()
96  , fVector_photons_momenta()
97  , fhPhotons_invmass(NULL)
98  , fhPhotons_invmass_cut(NULL)
99  , fhPhotons_invmass_cut_chi1(NULL)
100  , fhPhotons_invmass_cut_chi3(NULL)
101  , fhPhotons_invmass_cut_chi5(NULL)
102  , fhPhotons_invmass_cut_chi10(NULL)
103  , fhPhotons_invmass_cut_chi25(NULL)
104  , fhPhotons_invmass_cut_chi40(NULL)
105  , fhPhotons_invmass_cut_chi65(NULL)
106  , fhPhotons_invmass_cut_chi80(NULL)
107  , fhPhotons_invmass_cut_ptBin1(NULL)
108  , fhPhotons_invmass_cut_ptBin2(NULL)
109  , fhPhotons_invmass_cut_ptBin3(NULL)
110  , fhPhotons_invmass_cut_ptBin4(NULL)
111  , fhPhotons_invmass_vs_chi(NULL)
112  , fhPhotons_startvertex_vs_chi(NULL)
113  , fhPhotons_angleBetween(NULL)
114  , fhPhotons_invmass_vs_pt(NULL)
115  , fhPhotons_rapidity_vs_pt(NULL)
116  , fhPhotons_invmass_vs_openingAngle(NULL)
117  , fhPhotons_openingAngle_vs_momentum(NULL)
118  , fhPhotons_MC_motherpdg(NULL)
119  , fhPhotons_MC_invmass1(NULL)
120  , fhPhotons_MC_invmass2(NULL)
121  , fhPhotons_MC_invmass3(NULL)
122  , fhPhotons_MC_invmass4(NULL)
123  , fhPhotons_MC_startvertexZ(NULL)
124  , fhPhotons_MC_motherIdCut(NULL)
125  , fhPhotons_Refit_chiDiff(NULL)
126  , fhPhotons_Refit_momentumDiff(NULL)
127  , fhPhotons_Refit_chiDistribution(NULL)
128  , fhPhotons_RefitPion_chiDistribution(NULL)
129  , fElectrons_track_refit()
130  , fElectrons_momenta_refit()
131  , fVector_photons_pairs_refit()
132  , fhPhotons_invmass_refit(NULL)
133  , fhPhotons_invmass_refit_cut(NULL)
134  , fVector_photons_pairs_direction()
135  , fhPhotons_invmass_direction(NULL)
136  , fhPhotons_invmass_direction_cut(NULL)
137  , fhPhotons_boostAngle(NULL)
138  , fhPhotons_boostAngleMC(NULL)
139  , fhPhotons_boostAngleTest(NULL)
140  , fhPhotons_tX(NULL)
141  , fhPhotons_tY(NULL)
142  , fhElectrons_nofPerEvent_1(NULL)
143  , fhPhotons_nofPerEvent_1(NULL)
144  , fhPhotons_invmass_1(NULL)
145  , fhPhotons_invmass_ptBin1_1(NULL)
146  , fhPhotons_invmass_ptBin2_1(NULL)
147  , fhPhotons_invmass_ptBin3_1(NULL)
148  , fhPhotons_invmass_ptBin4_1(NULL)
149  , fhElectrons_invmass_1(NULL)
150  , fhPhotons_invmass_vs_pt_1(NULL)
151  , fhElectrons_nofPerEvent_2(NULL)
152  , fhPhotons_nofPerEvent_2(NULL)
153  , fhPhotons_invmass_2(NULL)
154  , fhPhotons_invmass_ptBin1_2(NULL)
155  , fhPhotons_invmass_ptBin2_2(NULL)
156  , fhPhotons_invmass_ptBin3_2(NULL)
157  , fhPhotons_invmass_ptBin4_2(NULL)
158  , fhElectrons_invmass_2(NULL)
159  , fhPhotons_invmass_vs_pt_2(NULL)
160  , fhElectrons_nofPerEvent_3(NULL)
161  , fhPhotons_nofPerEvent_3(NULL)
162  , fhPhotons_invmass_3(NULL)
163  , fhPhotons_invmass_ptBin1_3(NULL)
164  , fhPhotons_invmass_ptBin2_3(NULL)
165  , fhPhotons_invmass_ptBin3_3(NULL)
166  , fhPhotons_invmass_ptBin4_3(NULL)
167  , fhElectrons_invmass_3(NULL)
168  , fhPhotons_invmass_vs_pt_3(NULL)
169  , fhElectrons_nofPerEvent_4(NULL)
170  , fhPhotons_nofPerEvent_4(NULL)
171  , fhPhotons_invmass_4(NULL)
172  , fhPhotons_invmass_ptBin1_4(NULL)
173  , fhPhotons_invmass_ptBin2_4(NULL)
174  , fhPhotons_invmass_ptBin3_4(NULL)
175  , fhPhotons_invmass_ptBin4_4(NULL)
176  , fhElectrons_invmass_4(NULL)
177  , fhPhotons_invmass_vs_pt_4(NULL)
178  , fhElectrons_nofPerEvent_new()
179  , fhPhotons_nofPerEvent_new()
180  , fhPhotons_nofPerEventAfter_new()
181  , fhPhotons_invmass_new()
182  , fhPhotons_invmass_ann0_new()
183  , fhPhotons_invmass_ptBin1_new()
184  , fhPhotons_invmass_ptBin2_new()
185  , fhPhotons_invmass_ptBin3_new()
186  , fhPhotons_invmass_ptBin4_new()
187  , fhElectrons_invmass_new()
188  , fhPhotons_invmass_vs_pt_new()
189  , fhPhotons_invmass_MCcut1_new()
190  , fhPhotons_invmass_MCcut2_new()
191  , fhPhotons_invmass_MCcut3_new()
192  , fhPhotons_invmass_MCcut4_new()
193  , fhPhotons_invmass_MCcut5_new()
194  , fhPhotons_invmass_MCcut6_new()
195  , fhPhotons_invmass_MCcut7_new()
196  , fhPhotons_invmass_MCcutTest_new()
197  , fhPhotons_invmass_MCcutTest2_new()
198  , fhPhotons_invmass_MCcutTest3_new()
199  , fhPhotons_invmass_MCcutAll_new()
200  , fhPhotons_pt_vs_rap_new()
201  , fhElectrons_openingAngle_sameSign_new()
202  , fhPhotons_stats()
203  , fhPhotons_MCtrue_pdgCodes()
204  , fhPhotons_peakCheck1()
205  , fhPhotons_peakCheck2()
206  , fhPhotons_invmass_ANNcuts_new()
207  , fhPhotons_phaseSpace_pi0()
208  , fhPhotons_phaseSpace_eta()
209  , fMixedEventsElectrons_list1()
210  , fMixedEventsElectrons_list2()
211  , fMixedEventsElectrons_list3()
212  , fMixedEventsElectrons_list4()
213  , fMixedEventsElectrons_list1_gtrack()
214  , fMixedEventsElectrons_list2_gtrack()
215  , fMixedEventsElectrons_list3_gtrack()
216  , fMixedEventsElectrons_list4_gtrack()
217  , fhMixedEventsTest2_invmass(NULL)
218  , fMixedTest3_momenta()
219  , fMixedTest3_gtrack()
220  , fMixedTest3_eventno()
221  , globalEventNo()
222  , fhMixedEventsTest3_invmass(NULL)
223  , fMixedTest4_photons()
224  , fMixedTest4_mctracks()
225  , fMixedTest4_isRichElectronAnn0()
226  , fMixedTest4_ElectronAnns()
227  , fMixedTest4_eventno()
228  , fhMixedEventsTest4_invmass(NULL)
229  , fhMixedEventsTest4_invmass_ann0(NULL)
230  , fhMixedEventsTest4_pt_vs_rap(NULL)
231  , fhMixedEventsTest4_invmass_ptBin1(NULL)
232  , fhMixedEventsTest4_invmass_ptBin2(NULL)
233  , fhMixedEventsTest4_invmass_ptBin3(NULL)
234  , fhMixedEventsTest4_invmass_ptBin4(NULL)
235  , fhMixedEventsTest4_invmass_ANNcuts(NULL)
236  , timer()
237  , fTime(0.) {}
238 
240 
241 
243  FairRootManager* ioman = FairRootManager::Instance();
244  if (NULL == ioman) {
245  Fatal("CbmAnaConversion::Init", "RootManager not instantised!");
246  }
247 
248  fRichPoints = (TClonesArray*) ioman->GetObject("RichPoint");
249  if (NULL == fRichPoints) {
250  Fatal("CbmAnaConversion::Init", "No RichPoint array!");
251  }
252 
253  fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
254  if (NULL == fMcTracks) {
255  Fatal("CbmAnaConversion::Init", "No MCTrack array!");
256  }
257 
258  fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
259  if (NULL == fStsTracks) {
260  Fatal("CbmAnaConversion::Init", "No StsTrack array!");
261  }
262 
263  fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
264  if (NULL == fStsTrackMatches) {
265  Fatal("CbmAnaConversion::Init", "No StsTrackMatch array!");
266  }
267 
268  fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
269  if (NULL == fGlobalTracks) {
270  Fatal("CbmAnaConversion::Init", "No GlobalTrack array!");
271  }
272 
273  // Get pointer to PrimaryVertex object from IOManager if it exists
274  // The old name for the object is "PrimaryVertex" the new one
275  // "PrimaryVertex." Check first for the new name
276  fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
277  if (nullptr == fPrimVertex) {
278  fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex"));
279  }
280  if (nullptr == fPrimVertex) { LOG(fatal) << "No PrimaryVertex array!"; }
281 
282  fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
283  if (NULL == fRichRings) {
284  Fatal("CbmAnaConversion::Init", "No RichRing array!");
285  }
286 
287  fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
288  if (NULL == fRichRingMatches) {
289  Fatal("CbmAnaConversion::Init", "No RichRingMatch array!");
290  }
291 
292 
293  InitHistos();
295 
296  globalEventNo = 0;
297 }
298 
299 
301  fHistoList_recofull.clear();
302  fHistoList_recofull_1.clear();
303  fHistoList_recofull_2.clear();
304  fHistoList_recofull_3.clear();
305  fHistoList_recofull_4.clear();
306 
307  for (int i = 1; i <= 4; i++) {
308  fHistoList_recofull_new[i].clear();
309  }
310 
311  Double_t invmassSpectra_nof = 800;
312  Double_t invmassSpectra_start = -0.00125;
313  Double_t invmassSpectra_end = 1.99875;
314 
315 
316  fhElectrons = new TH1I("fhElectrons", "fhElectrons;; #", 8, 0., 8.);
317  fHistoList_recofull.push_back(fhElectrons);
318  fhElectrons->GetXaxis()->SetBinLabel(1, "electrons rich");
319  fhElectrons->GetXaxis()->SetBinLabel(2, "electrons trd");
320  fhElectrons->GetXaxis()->SetBinLabel(3, "electrons tof");
321  fhElectrons->GetXaxis()->SetBinLabel(4, "electrons rich+trd");
322  fhElectrons->GetXaxis()->SetBinLabel(5, "electrons rich+tof");
323  fhElectrons->GetXaxis()->SetBinLabel(6, "electrons trd+tof");
324  fhElectrons->GetXaxis()->SetBinLabel(7, "electrons rich+trd+tof");
325  fhElectrons->GetXaxis()->SetBinLabel(8, "electrons 2 out of 3");
326 
327 
329  new TH1D("fhMomentumFits", "fhMomentumFits; chi; #", 10000, 0., 1000.);
331  fhMomentumFits_electronRich = new TH1D("fhMomentumFits_electronRich",
332  "fhMomentumFits_electronRich; chi; #",
333  10000,
334  0.,
335  1000.);
337  fhMomentumFits_pi0reco = new TH1D("fhMomentumFits_pi0reco",
338  "fhMomentumFits_pi0reco; chi; #",
339  10000,
340  0.,
341  1000.);
343 
344 
345  fhElectrons_invmass = new TH1D("fhElectrons_invmass",
346  "fhElectrons_invmass; invariant mass; #",
347  invmassSpectra_nof,
348  invmassSpectra_start,
349  invmassSpectra_end);
351  new TH1D("fhElectrons_invmass_cut",
352  "fhElectrons_invmass_cut; invariant mass; #",
353  invmassSpectra_nof,
354  invmassSpectra_start,
355  invmassSpectra_end);
358 
360  new TH1D("fhElectrons_nofPerEvent",
361  "fhElectrons_nofPerEvent; nof electrons per event; #",
362  101,
363  -0.5,
364  100.5);
367  new TH1D("fhPhotons_nofPerEvent",
368  "fhPhotons_nofPerEvent; nof photons per event; #",
369  101,
370  -0.5,
371  100.5);
373 
374  fhPhotons_invmass = new TH1D("fhPhotons_invmass",
375  "fhPhotons_invmass; invariant mass; #",
376  invmassSpectra_nof,
377  invmassSpectra_start,
378  invmassSpectra_end);
380  fhPhotons_invmass_cut = new TH1D("fhPhotons_invmass_cut",
381  "fhPhotons_invmass_cut; invariant mass; #",
382  invmassSpectra_nof,
383  invmassSpectra_start,
384  invmassSpectra_end);
386 
387 
389  new TH1D("fhPhotons_invmass_cut_ptBin1",
390  "fhPhotons_invmass_cut_ptBin1; invariant mass; #",
391  invmassSpectra_nof,
392  invmassSpectra_start,
393  invmassSpectra_end);
396  new TH1D("fhPhotons_invmass_cut_ptBin2",
397  "fhPhotons_invmass_cut_ptBin2; invariant mass; #",
398  invmassSpectra_nof,
399  invmassSpectra_start,
400  invmassSpectra_end);
403  new TH1D("fhPhotons_invmass_cut_ptBin3",
404  "fhPhotons_invmass_cut_ptBin3; invariant mass; #",
405  invmassSpectra_nof,
406  invmassSpectra_start,
407  invmassSpectra_end);
410  new TH1D("fhPhotons_invmass_cut_ptBin4",
411  "fhPhotons_invmass_cut_ptBin4; invariant mass; #",
412  invmassSpectra_nof,
413  invmassSpectra_start,
414  invmassSpectra_end);
416 
417 
419  new TH1D("fhPhotons_angleBetween",
420  "fhPhotons_angleBetween; opening angle [deg]; #",
421  1000,
422  0,
423  100);
425 
426 
428  new TH1D("fhPhotons_invmass_cut_chi1",
429  "fhPhotons_invmass_cut_chi1; invariant mass; #",
430  invmassSpectra_nof,
431  invmassSpectra_start,
432  invmassSpectra_end);
435  new TH1D("fhPhotons_invmass_cut_chi3",
436  "fhPhotons_invmass_cut_chi3; invariant mass; #",
437  invmassSpectra_nof,
438  invmassSpectra_start,
439  invmassSpectra_end);
442  new TH1D("fhPhotons_invmass_cut_chi5",
443  "fhPhotons_invmass_cut_chi5; invariant mass; #",
444  invmassSpectra_nof,
445  invmassSpectra_start,
446  invmassSpectra_end);
449  new TH1D("fhPhotons_invmass_cut_chi10",
450  "fhPhotons_invmass_cut_chi10; invariant mass; #",
451  invmassSpectra_nof,
452  invmassSpectra_start,
453  invmassSpectra_end);
456  new TH1D("fhPhotons_invmass_cut_chi25",
457  "fhPhotons_invmass_cut_chi25; invariant mass; #",
458  invmassSpectra_nof,
459  invmassSpectra_start,
460  invmassSpectra_end);
463  new TH1D("fhPhotons_invmass_cut_chi40",
464  "fhPhotons_invmass_cut_chi40; invariant mass; #",
465  invmassSpectra_nof,
466  invmassSpectra_start,
467  invmassSpectra_end);
470  new TH1D("fhPhotons_invmass_cut_chi65",
471  "fhPhotons_invmass_cut_chi65; invariant mass; #",
472  invmassSpectra_nof,
473  invmassSpectra_start,
474  invmassSpectra_end);
477  new TH1D("fhPhotons_invmass_cut_chi80",
478  "fhPhotons_invmass_cut_chi80; invariant mass; #",
479  invmassSpectra_nof,
480  invmassSpectra_start,
481  invmassSpectra_end);
483 
485  new TH2D("fhPhotons_invmass_vs_chi",
486  "fhPhotons_invmass_vs_chi; invariant mass; chi",
487  600,
488  -0.0025,
489  2.9975,
490  1000,
491  0.,
492  100.);
495  new TH2D("fhPhotons_startvertex_vs_chi",
496  "fhPhotons_startvertex_vs_chi; startvertex; chi",
497  400,
498  -5.,
499  95.,
500  1000,
501  0.,
502  200.);
504  fhPhotons_invmass_vs_pt = new TH2D("fhPhotons_invmass_vs_pt",
505  "fhPhotons_invmass_vs_pt; invmass; pt",
506  600,
507  -0.0025,
508  2.9975,
509  100,
510  0.,
511  10.);
514  new TH2D("fhPhotons_rapidity_vs_pt",
515  "fhPhotons_rapidity_vs_pt; pt [GeV]; rap [GeV]",
516  240,
517  -2.,
518  10.,
519  210,
520  0.,
521  7.);
523 
525  new TH2D("fhPhotons_invmass_vs_openingAngle",
526  "fhPhotons_invmass_vs_openingAngle; invmass; openingAngle",
527  600,
528  -0.0025,
529  2.9975,
530  100,
531  0.,
532  10.);
535  new TH2D("fhPhotons_openingAngle_vs_momentum",
536  "fhPhotons_openingAngle_vs_momentum; openingAngle; momentum",
537  100,
538  0.,
539  10.,
540  100,
541  0.,
542  10.);
544 
545 
546  fhPhotons_MC_motherpdg = new TH1D("fhPhotons_MC_motherpdg",
547  "fhPhotons_MC_motherpdg; pdg; #",
548  1000,
549  0.,
550  1000.);
553  new TH1D("fhPhotons_MC_invmass1",
554  "fhPhotons_MC_minvmass1 (MC-true cut: at least gamma correct "
555  "reconstructed); invariant mass; #",
556  invmassSpectra_nof,
557  invmassSpectra_start,
558  invmassSpectra_end);
560  fhPhotons_MC_invmass2 = new TH1D("fhPhotons_MC_invmass2",
561  "fhPhotons_MC_minvmass2 (MC-true cut: gamma "
562  "from same mother); invariant mass; #",
563  invmassSpectra_nof,
564  invmassSpectra_start,
565  invmassSpectra_end);
567  fhPhotons_MC_invmass3 = new TH1D("fhPhotons_MC_invmass3",
568  "fhPhotons_MC_minvmass3 (MC-true cut: gamma "
569  "from different mother); invariant mass; #",
570  invmassSpectra_nof,
571  invmassSpectra_start,
572  invmassSpectra_end);
575  new TH1D("fhPhotons_MC_invmass4",
576  "fhPhotons_MC_minvmass4 (MC-true cut: wrong combination of "
577  "electrons); invariant mass; #",
578  invmassSpectra_nof,
579  invmassSpectra_start,
580  invmassSpectra_end);
582 
584  new TH1D("fhPhotons_MC_startvertexZ",
585  "fhPhotons_MC_startvertexZ; startvertexZ [cm]; #",
586  1000,
587  -5.,
588  95.);
590 
592  new TH1D("fhPhotons_MC_motherIdCut",
593  "fhPhotons_MC_motherIdCut; invariant mass; #",
594  invmassSpectra_nof,
595  invmassSpectra_start,
596  invmassSpectra_end);
598 
600  new TH1D("fhPhotons_Refit_chiDiff",
601  "fhPhotons_Refit_chiDiff; difference of chi; #",
602  1000,
603  -0.1,
604  99.9);
606 
608  new TH1D("fhPhotons_Refit_momentumDiff",
609  "fhPhotons_Refit_momentumDiff; difference of momentum mag; #",
610  1000,
611  -0.1,
612  4.9);
614 
616  new TH1D("fhPhotons_Refit_chiDistribution",
617  "fhPhotons_Refit_chiDistribution; chi value; #",
618  10000,
619  0.,
620  1000.);
622 
624  new TH1D("fhPhotons_RefitPion_chiDistribution",
625  "fhPhotons_RefitPion_chiDistribution; chi value; #",
626  10000,
627  0.,
628  1000.);
630 
632  new TH1D("fhPhotons_invmass_refit",
633  "fhPhotons_invmass_refit; invariant mass; #",
634  invmassSpectra_nof,
635  invmassSpectra_start,
636  invmassSpectra_end);
639  new TH1D("fhPhotons_invmass_refit_cut",
640  "fhPhotons_invmass_refit_cut; invariant mass; #",
641  invmassSpectra_nof,
642  invmassSpectra_start,
643  invmassSpectra_end);
645 
646 
648  new TH1D("fhPhotons_invmass_direction",
649  "fhPhotons_invmass_direction; invariant mass; #",
650  invmassSpectra_nof,
651  invmassSpectra_start,
652  invmassSpectra_end);
655  new TH1D("fhPhotons_invmass_direction_cut",
656  "fhPhotons_invmass_direction_cut; invariant mass; #",
657  invmassSpectra_nof,
658  invmassSpectra_start,
659  invmassSpectra_end);
661  fhPhotons_boostAngle = new TH1D("fhPhotons_boostAngle",
662  "fhPhotons_boostAngle; boostAngle; #",
663  7400,
664  -370.,
665  370.);
667  fhPhotons_boostAngleMC = new TH1D("fhPhotons_boostAngleMC",
668  "fhPhotons_boostAngleMC; boostAngle; #",
669  7400,
670  -370.,
671  370.);
673  fhPhotons_boostAngleTest = new TH1D("fhPhotons_boostAngleTest",
674  "fhPhotons_boostAngleTest; boostAngle; #",
675  10000,
676  -5.,
677  5.);
679 
680 
681  fhPhotons_tX =
682  new TH1D("fhPhotons_tX", "fhPhotons_tX; tX; #", 201, -1.005, 1.005);
684  fhPhotons_tY =
685  new TH1D("fhPhotons_tY", "fhPhotons_tY; tY; #", 201, -1.005, 1.005);
687 
688 
689  // histograms for index = 1 (no refit, no chicut)
691  new TH1D("fhElectrons_nofPerEvent_1",
692  "fhElectrons_nofPerEvent_1; nof electrons per event; #",
693  101,
694  -0.5,
695  100.5);
698  new TH1D("fhPhotons_nofPerEvent_1",
699  "fhPhotons_nofPerEvent_1; nof photons per event; #",
700  101,
701  -0.5,
702  100.5);
704 
705  fhPhotons_invmass_1 = new TH1D("fhPhotons_invmass_1",
706  "fhPhotons_invmass_1; invariant mass; #",
707  600,
708  -0.0025,
709  2.9975);
711 
713  new TH1D("fhPhotons_invmass_ptBin1_1",
714  "fhPhotons_invmass_ptBin1_1; invariant mass; #",
715  600,
716  -0.0025,
717  2.9975);
720  new TH1D("fhPhotons_invmass_ptBin2_1",
721  "fhPhotons_invmass_ptBin2_1; invariant mass; #",
722  600,
723  -0.0025,
724  2.9975);
727  new TH1D("fhPhotons_invmass_ptBin3_1",
728  "fhPhotons_invmass_ptBin3_1; invariant mass; #",
729  600,
730  -0.0025,
731  2.9975);
734  new TH1D("fhPhotons_invmass_ptBin4_1",
735  "fhPhotons_invmass_ptBin4_1; invariant mass; #",
736  600,
737  -0.0025,
738  2.9975);
740 
741  fhElectrons_invmass_1 = new TH1D("fhElectrons_invmass_1",
742  "fhElectrons_invmass_1; invariant mass; #",
743  600,
744  -0.0025,
745  2.9975);
747  fhPhotons_invmass_vs_pt_1 = new TH2D("fhPhotons_invmass_vs_pt_1",
748  "fhPhotons_invmass_vs_pt_1; invmass; pt",
749  600,
750  -0.0025,
751  2.9975,
752  100,
753  0.,
754  10.);
756 
757 
758  // histograms for index = 2 (no refit, with chicut)
760  new TH1D("fhElectrons_nofPerEvent_2",
761  "fhElectrons_nofPerEvent_2; nof electrons per event; #",
762  101,
763  -0.5,
764  100.5);
767  new TH1D("fhPhotons_nofPerEvent_2",
768  "fhPhotons_nofPerEvent_2; nof photons per event; #",
769  101,
770  -0.5,
771  100.5);
773 
774  fhPhotons_invmass_2 = new TH1D("fhPhotons_invmass_2",
775  "fhPhotons_invmass_2; invariant mass; #",
776  600,
777  -0.0025,
778  2.9975);
780 
782  new TH1D("fhPhotons_invmass_ptBin1_2",
783  "fhPhotons_invmass_ptBin1_2; invariant mass; #",
784  600,
785  -0.0025,
786  2.9975);
789  new TH1D("fhPhotons_invmass_ptBin2_2",
790  "fhPhotons_invmass_ptBin2_2; invariant mass; #",
791  600,
792  -0.0025,
793  2.9975);
796  new TH1D("fhPhotons_invmass_ptBin3_2",
797  "fhPhotons_invmass_ptBin3_2; invariant mass; #",
798  600,
799  -0.0025,
800  2.9975);
803  new TH1D("fhPhotons_invmass_ptBin4_2",
804  "fhPhotons_invmass_ptBin4_2; invariant mass; #",
805  600,
806  -0.0025,
807  2.9975);
809 
810  fhElectrons_invmass_2 = new TH1D("fhElectrons_invmass_2",
811  "fhElectrons_invmass_2; invariant mass; #",
812  600,
813  -0.0025,
814  2.9975);
816  fhPhotons_invmass_vs_pt_2 = new TH2D("fhPhotons_invmass_vs_pt_2",
817  "fhPhotons_invmass_vs_pt_2; invmass; pt",
818  600,
819  -0.0025,
820  2.9975,
821  100,
822  0.,
823  10.);
825 
826 
827  // histograms for index = 3 (with refit, no chicut)
829  new TH1D("fhElectrons_nofPerEvent_3",
830  "fhElectrons_nofPerEvent_3; nof electrons per event; #",
831  101,
832  -0.5,
833  100.5);
836  new TH1D("fhPhotons_nofPerEvent_3",
837  "fhPhotons_nofPerEvent_3; nof photons per event; #",
838  101,
839  -0.5,
840  100.5);
842 
843  fhPhotons_invmass_3 = new TH1D("fhPhotons_invmass_3",
844  "fhPhotons_invmass_3; invariant mass; #",
845  600,
846  -0.0025,
847  2.9975);
849 
851  new TH1D("fhPhotons_invmass_ptBin1_3",
852  "fhPhotons_invmass_ptBin1_3; invariant mass; #",
853  600,
854  -0.0025,
855  2.9975);
858  new TH1D("fhPhotons_invmass_ptBin2_3",
859  "fhPhotons_invmass_ptBin2_3; invariant mass; #",
860  600,
861  -0.0025,
862  2.9975);
865  new TH1D("fhPhotons_invmass_ptBin3_3",
866  "fhPhotons_invmass_ptBin3_3; invariant mass; #",
867  600,
868  -0.0025,
869  2.9975);
872  new TH1D("fhPhotons_invmass_ptBin4_3",
873  "fhPhotons_invmass_ptBin4_3; invariant mass; #",
874  600,
875  -0.0025,
876  2.9975);
878 
879  fhElectrons_invmass_3 = new TH1D("fhElectrons_invmass_3",
880  "fhElectrons_invmass_3; invariant mass; #",
881  600,
882  -0.0025,
883  2.9975);
885  fhPhotons_invmass_vs_pt_3 = new TH2D("fhPhotons_invmass_vs_pt_3",
886  "fhPhotons_invmass_vs_pt_3; invmass; pt",
887  600,
888  -0.0025,
889  2.9975,
890  100,
891  0.,
892  10.);
894 
895 
896  // histograms for index = 4 (with refit, with chicut)
898  new TH1D("fhElectrons_nofPerEvent_4",
899  "fhElectrons_nofPerEvent_4; nof electrons per event; #",
900  101,
901  -0.5,
902  100.5);
905  new TH1D("fhPhotons_nofPerEvent_4",
906  "fhPhotons_nofPerEvent_4; nof photons per event; #",
907  101,
908  -0.5,
909  100.5);
911 
912  fhPhotons_invmass_4 = new TH1D("fhPhotons_invmass_4",
913  "fhPhotons_invmass_4; invariant mass; #",
914  600,
915  -0.0025,
916  2.9975);
918 
920  new TH1D("fhPhotons_invmass_ptBin1_4",
921  "fhPhotons_invmass_ptBin1_4; invariant mass; #",
922  600,
923  -0.0025,
924  2.9975);
927  new TH1D("fhPhotons_invmass_ptBin2_4",
928  "fhPhotons_invmass_ptBin2_4; invariant mass; #",
929  600,
930  -0.0025,
931  2.9975);
934  new TH1D("fhPhotons_invmass_ptBin3_4",
935  "fhPhotons_invmass_ptBin3_4; invariant mass; #",
936  600,
937  -0.0025,
938  2.9975);
941  new TH1D("fhPhotons_invmass_ptBin4_4",
942  "fhPhotons_invmass_ptBin4_4; invariant mass; #",
943  600,
944  -0.0025,
945  2.9975);
947 
948  fhElectrons_invmass_4 = new TH1D("fhElectrons_invmass_4",
949  "fhElectrons_invmass_4; invariant mass; #",
950  600,
951  -0.0025,
952  2.9975);
954  fhPhotons_invmass_vs_pt_4 = new TH2D("fhPhotons_invmass_vs_pt_4",
955  "fhPhotons_invmass_vs_pt_4; invmass; pt",
956  600,
957  -0.0025,
958  2.9975,
959  100,
960  0.,
961  10.);
963 
964 
965  for (int i = 1; i <= 4; i++) {
966  fhElectrons_nofPerEvent_new[i] = new TH1D(
967  Form("fhElectrons_nofPerEvent_new_%i", i),
968  Form("fhElectrons_nofPerEvent_new_%i; nof electrons per event; #", i),
969  31,
970  -0.5,
971  30.5);
973  fhPhotons_nofPerEvent_new[i] = new TH1D(
974  Form("fhPhotons_nofPerEvent_new_%i", i),
975  Form("fhPhotons_nofPerEvent_new_%i; nof photons per event; #", i),
976  31,
977  -0.5,
978  30.5);
980  fhPhotons_nofPerEventAfter_new[i] = new TH1D(
981  Form("fhPhotons_nofPerEventAfter_new_%i", i),
982  Form("fhPhotons_nofPerEventAfter_new_%i; nof photons per event; #", i),
983  31,
984  -0.5,
985  30.5);
988  new TH1D(Form("fhPi0_nofPerEvent_new_%i", i),
989  Form("fhPi0_nofPerEvent_new_%i; nof pi0 per event; #", i),
990  31,
991  -0.5,
992  30.5);
994 
995  fhPhotons_invmass_new[i] = new TH1D(
996  Form("fhPhotons_invmass_new_%i", i),
997  Form(
998  "fhPhotons_invmass_new_%i; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
999  i),
1000  invmassSpectra_nof,
1001  invmassSpectra_start,
1002  invmassSpectra_end);
1005  new TH1D(Form("fhPhotons_invmass_ann0_new_%i", i),
1006  Form("fhPhotons_invmass_ann0_new_%i; invariant mass of 4 "
1007  "e^{#pm} in GeV/c^{2}; #",
1008  i),
1009  invmassSpectra_nof,
1010  invmassSpectra_start,
1011  invmassSpectra_end);
1013 
1015  new TH1D(Form("fhPhotons_invmass_ptBin1_new_%i", i),
1016  Form("fhPhotons_invmass_ptBin1_new_%i; invariant mass of 4 "
1017  "e^{#pm} in GeV/c^{2}; #",
1018  i),
1019  invmassSpectra_nof,
1020  invmassSpectra_start,
1021  invmassSpectra_end);
1024  new TH1D(Form("fhPhotons_invmass_ptBin2_new_%i", i),
1025  Form("fhPhotons_invmass_ptBin2_new_%i; invariant mass of 4 "
1026  "e^{#pm} in GeV/c^{2}; #",
1027  i),
1028  invmassSpectra_nof,
1029  invmassSpectra_start,
1030  invmassSpectra_end);
1033  new TH1D(Form("fhPhotons_invmass_ptBin3_new_%i", i),
1034  Form("fhPhotons_invmass_ptBin3_new_%i; invariant mass of 4 "
1035  "e^{#pm} in GeV/c^{2}; #",
1036  i),
1037  invmassSpectra_nof,
1038  invmassSpectra_start,
1039  invmassSpectra_end);
1042  new TH1D(Form("fhPhotons_invmass_ptBin4_new_%i", i),
1043  Form("fhPhotons_invmass_ptBin4_new_%i; invariant mass of 4 "
1044  "e^{#pm} in GeV/c^{2}; #",
1045  i),
1046  invmassSpectra_nof,
1047  invmassSpectra_start,
1048  invmassSpectra_end);
1051  new TH1D(Form("fhPhotons_invmass_ptBin5_new_%i", i),
1052  Form("fhPhotons_invmass_ptBin5_new_%i; invariant mass of 4 "
1053  "e^{#pm} in GeV/c^{2}; #",
1054  i),
1055  invmassSpectra_nof,
1056  invmassSpectra_start,
1057  invmassSpectra_end);
1060  new TH1D(Form("fhPhotons_invmass_ptBin6_new_%i", i),
1061  Form("fhPhotons_invmass_ptBin6_new_%i; invariant mass of 4 "
1062  "e^{#pm} in GeV/c^{2}; #",
1063  i),
1064  invmassSpectra_nof,
1065  invmassSpectra_start,
1066  invmassSpectra_end);
1068 
1070  new TH1D(Form("fhElectrons_invmass_new_%i", i),
1071  Form("fhElectrons_invmass_new_%i; invariant mass of 4 e^{#pm} "
1072  "in GeV/c^{2}; #",
1073  i),
1074  invmassSpectra_nof,
1075  invmassSpectra_start,
1076  invmassSpectra_end);
1078 
1080  new TH2D(Form("fhPhotons_invmass_vs_pt_new_%i", i),
1081  Form("fhPhotons_invmass_vs_pt_new_%i; invariant mass of 4 "
1082  "e^{#pm} in GeV/c^{2}; pt",
1083  i),
1084  600,
1085  -0.0025,
1086  2.9975,
1087  100,
1088  0.,
1089  10.);
1091 
1092  fhPhotons_invmass_MCcut1_new[i] = new TH1D(
1093  Form("fhPhotons_invmass_MCcut1_new_%i", i),
1094  Form(
1095  "fhPhotons_invmass_MCcut1_new_%i (MC-true cut: at least gamma correct "
1096  "reconstructed); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1097  i),
1098  invmassSpectra_nof,
1099  invmassSpectra_start,
1100  invmassSpectra_end);
1103  new TH1D(Form("fhPhotons_invmass_MCcut2_new_%i", i),
1104  Form("fhPhotons_invmass_MCcut2_new_%i (MC-true cut: gamma from "
1105  "same mother); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1106  i),
1107  invmassSpectra_nof,
1108  invmassSpectra_start,
1109  invmassSpectra_end);
1111  fhPhotons_invmass_MCcut3_new[i] = new TH1D(
1112  Form("fhPhotons_invmass_MCcut3_new_%i", i),
1113  Form("fhPhotons_invmass_MCcut3_new_%i (MC-true cut: gamma from different "
1114  "mother); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1115  i),
1116  invmassSpectra_nof,
1117  invmassSpectra_start,
1118  invmassSpectra_end);
1120  fhPhotons_invmass_MCcut4_new[i] = new TH1D(
1121  Form("fhPhotons_invmass_MCcut4_new_%i", i),
1122  Form("fhPhotons_invmass_MCcut4_new_%i (MC-true cut: wrong combination of "
1123  "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1124  i),
1125  invmassSpectra_nof,
1126  invmassSpectra_start,
1127  invmassSpectra_end);
1129  fhPhotons_invmass_MCcut5_new[i] = new TH1D(
1130  Form("fhPhotons_invmass_MCcut5_new_%i", i),
1131  Form("fhPhotons_invmass_MCcut5_new_%i (MC-true cut: wrong combination of "
1132  "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1133  i),
1134  invmassSpectra_nof,
1135  invmassSpectra_start,
1136  invmassSpectra_end);
1138  fhPhotons_invmass_MCcut6_new[i] = new TH1D(
1139  Form("fhPhotons_invmass_MCcut6_new_%i", i),
1140  Form("fhPhotons_invmass_MCcut6_new_%i (MC-true cut: wrong combination of "
1141  "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1142  i),
1143  invmassSpectra_nof,
1144  invmassSpectra_start,
1145  invmassSpectra_end);
1147  fhPhotons_invmass_MCcut7_new[i] = new TH1D(
1148  Form("fhPhotons_invmass_MCcut7_new_%i", i),
1149  Form("fhPhotons_invmass_MCcut7_new_%i (MC-true cut: wrong combination of "
1150  "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1151  i),
1152  invmassSpectra_nof,
1153  invmassSpectra_start,
1154  invmassSpectra_end);
1156 
1158  new TH2D(Form("fhPhotons_invmass_MCcutAll_new_%i", i),
1159  Form("fhPhotons_invmass_MCcutAll_new_%i; case; invmass", i),
1160  25,
1161  0.,
1162  25.,
1163  invmassSpectra_nof,
1164  invmassSpectra_start,
1165  invmassSpectra_end);
1167 
1169  new TH1D(Form("fhPhotons_invmass_MCcutTest_new_%i", i),
1170  Form("fhPhotons_invmass_MCcutTest_new_%i (MC-true cut: test); "
1171  "invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1172  i),
1173  invmassSpectra_nof,
1174  invmassSpectra_start,
1175  invmassSpectra_end);
1178  new TH1D(Form("fhPhotons_invmass_MCcutTest2_new_%i", i),
1179  Form("fhPhotons_invmass_MCcutTest2_new_%i (MC-true cut: test); "
1180  "invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1181  i),
1182  invmassSpectra_nof,
1183  invmassSpectra_start,
1184  invmassSpectra_end);
1187  new TH1D(Form("fhPhotons_invmass_MCcutTest3_new_%i", i),
1188  Form("fhPhotons_invmass_MCcutTest3_new_%i (MC-true cut: test); "
1189  "invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
1190  i),
1191  invmassSpectra_nof,
1192  invmassSpectra_start,
1193  invmassSpectra_end);
1195 
1196  fhPhotons_pt_vs_rap_new[i] = new TH2D(
1197  Form("fhPhotons_pt_vs_rap_new_%i", i),
1198  Form("fhPhotons_pt_vs_rap_new_%i; p_{t} in GeV/c; rapidity y", i),
1199  240,
1200  -2.,
1201  10.,
1202  270,
1203  -2.,
1204  7.);
1206 
1208  Form("fhElectrons_openingAngle_sameSign_new_%i", i),
1209  Form("fhElectrons_openingAngle_sameSign_new_%i; opening angle; #", i),
1210  101,
1211  -0.5,
1212  100.5);
1213  fHistoList_recofull_new[i].push_back(
1215 
1216 
1218  new TH1D(Form("fhMixedEventsTest_invmass_%i", i),
1219  Form("fhMixedEventsTest_invmass_%i; invariant mass of 4 e^{#pm} "
1220  "in GeV/c^{2}; #",
1221  i),
1222  invmassSpectra_nof,
1223  invmassSpectra_start,
1224  invmassSpectra_end);
1226 
1227  fhPhotons_stats[i] = new TH1D(Form("fhPhotons_stats_%i", i),
1228  Form("fhPhotons_stats_%i; ; #", i),
1229  16,
1230  0,
1231  16);
1233  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(1, "fullrec_allCombs");
1234  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(2, "fullrec_cut1");
1235  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(3, "fullrec_cut2");
1236  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(4, "fullrec_cut3");
1237  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(5, "fullrec_cut4");
1238  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(6, "fullrec_cut5");
1239  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(7, "fullrec_cut6");
1240  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(8, "");
1241  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(9, "mix_allCombs");
1242  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(10, "mix_cut1");
1243  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(11, "mix_cut2");
1244  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(12, "mix_cut3");
1245  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(13, "mix_cut4");
1246  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(14, "mix_cut5");
1247  fhPhotons_stats[i]->GetXaxis()->SetBinLabel(15, "mix_cut6");
1248 
1249 
1251  new TH1D(Form("fhPhotons_peakCheck1_%i", i),
1252  Form("fhPhotons_peakCheck1_%i; sum; #", i),
1253  20,
1254  -0.5,
1255  19.5);
1257  new TH1D(Form("fhPhotons_peakCheck2_%i", i),
1258  Form("fhPhotons_peakCheck2_%i; sum; #", i),
1259  20,
1260  -0.5,
1261  19.5);
1264 
1266  new TH2D(Form("fhPhotons_invmass_ANNcuts_new_%i", i),
1267  Form("fhPhotons_invmass_ANNcuts_new_%i;ann;invariant mass of 4 "
1268  "e^{#pm} in GeV/c^{2}",
1269  i),
1270  10,
1271  0,
1272  10,
1273  invmassSpectra_nof,
1274  invmassSpectra_start,
1275  invmassSpectra_end);
1277 
1278 
1279  fhPhotons_phaseSpace_pi0[i] = new TH2D(
1280  Form("fhPhotons_phaseSpace_pi0_%i", i),
1281  Form("fhPhotons_phaseSpace_pi0_%i; p_{t} in GeV/c;rapidity y", i),
1282  240,
1283  -2.,
1284  10.,
1285  270,
1286  -2.,
1287  7.);
1288  fhPhotons_phaseSpace_eta[i] = new TH2D(
1289  Form("fhPhotons_phaseSpace_eta_%i", i),
1290  Form("fhPhotons_phaseSpace_eta_%i; p_{t} in GeV/c;rapidity y", i),
1291  240,
1292  -2.,
1293  10.,
1294  270,
1295  -2.,
1296  7.);
1299  }
1300 
1301 
1303  new TH1D(Form("fhPhotons_MCtrue_pdgCodes_%i", 4),
1304  Form("fhPhotons_MCtrue_pdgCodes_%i; pdg code; #", 4),
1305  1000,
1306  0,
1307  1000);
1309 
1310 
1311  // EVENT MIXING HISTOGRAMS
1312  // =======================
1314  new TH1D(Form("fhMixedEventsTest2_invmass_%i", 4),
1315  Form("fhMixedEventsTest2_invmass_%i; invariant mass of 4 e^{#pm} "
1316  "in GeV/c^{2}; #",
1317  4),
1318  invmassSpectra_nof,
1319  invmassSpectra_start,
1320  invmassSpectra_end);
1323  new TH1D(Form("fhMixedEventsTest3_invmass_%i", 4),
1324  Form("fhMixedEventsTest3_invmass_%i; invariant mass of 4 e^{#pm} "
1325  "in GeV/c^{2}; #",
1326  4),
1327  invmassSpectra_nof,
1328  invmassSpectra_start,
1329  invmassSpectra_end);
1331 
1333  new TH1D(Form("fhMixedEventsTest4_invmass_%i", 4),
1334  Form("fhMixedEventsTest4_invmass_%i; invariant mass of 4 e^{#pm} "
1335  "in GeV/c^{2}; #",
1336  4),
1337  invmassSpectra_nof,
1338  invmassSpectra_start,
1339  invmassSpectra_end);
1342  new TH1D(Form("fhMixedEventsTest4_invmass_ann0_%i", 4),
1343  Form("fhMixedEventsTest4_invmass_ann0_%i; invariant mass of 4 "
1344  "e^{#pm} in GeV/c^{2}; #",
1345  4),
1346  invmassSpectra_nof,
1347  invmassSpectra_start,
1348  invmassSpectra_end);
1350 
1351  fhMixedEventsTest4_pt_vs_rap = new TH2D(
1352  Form("fhMixedEventsTest4_pt_vs_rap_%i", 4),
1353  Form("fhMixedEventsTest4_pt_vs_rap_%i; p_{t} in GeV/c; rapidity y", 4),
1354  240,
1355  -2.,
1356  10.,
1357  270,
1358  -2.,
1359  7.);
1361 
1363  new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin1", 4),
1364  Form("fhMixedEventsTest4_invmass_%i_ptBin1; invariant mass of 4 "
1365  "e^{#pm} in GeV/c^{2}; #",
1366  4),
1367  invmassSpectra_nof,
1368  invmassSpectra_start,
1369  invmassSpectra_end);
1372  new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin2", 4),
1373  Form("fhMixedEventsTest4_invmass_%i_ptBin2; invariant mass of 4 "
1374  "e^{#pm} in GeV/c^{2}; #",
1375  4),
1376  invmassSpectra_nof,
1377  invmassSpectra_start,
1378  invmassSpectra_end);
1381  new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin3", 4),
1382  Form("fhMixedEventsTest4_invmass_%i_ptBin3; invariant mass of 4 "
1383  "e^{#pm} in GeV/c^{2}; #",
1384  4),
1385  invmassSpectra_nof,
1386  invmassSpectra_start,
1387  invmassSpectra_end);
1390  new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin4", 4),
1391  Form("fhMixedEventsTest4_invmass_%i_ptBin4; invariant mass of 4 "
1392  "e^{#pm} in GeV/c^{2}; #",
1393  4),
1394  invmassSpectra_nof,
1395  invmassSpectra_start,
1396  invmassSpectra_end);
1398 
1400  new TH2D(Form("fhMixedEventsTest4_invmass_ANNcuts_%i", 4),
1401  Form("fhMixedEventsTest4_invmass_ANNcuts_%i;; invariant mass of 4 "
1402  "e^{#pm} in GeV/c^{2}",
1403  4),
1404  10,
1405  0,
1406  10,
1407  invmassSpectra_nof,
1408  invmassSpectra_start,
1409  invmassSpectra_end);
1411 }
1412 
1413 
1415 
1416 
1417  gDirectory->mkdir("RecoFull");
1418  gDirectory->cd("RecoFull");
1419 
1420  gDirectory->mkdir("NoRefit-NoChicut"); // index 1
1421  gDirectory->cd("NoRefit-NoChicut");
1422  for (UInt_t i = 0; i < fHistoList_recofull_new[1].size(); i++) {
1423  //for (UInt_t i = 0; i < fHistoList_recofull_1.size(); i++){
1424  //fHistoList_recofull_1[i]->Write();
1425  fHistoList_recofull_new[1][i]->Write();
1426  }
1427  gDirectory->cd("..");
1428 
1429  gDirectory->mkdir("NoRefit-WithChicut"); // index 2
1430  gDirectory->cd("NoRefit-WithChicut");
1431  for (UInt_t i = 0; i < fHistoList_recofull_new[2].size(); i++) {
1432  //for (UInt_t i = 0; i < fHistoList_recofull_2.size(); i++){
1433  //fHistoList_recofull_2[i]->Write();
1434  fHistoList_recofull_new[2][i]->Write();
1435  }
1436  gDirectory->cd("..");
1437 
1438  gDirectory->mkdir("WithRefit-NoChicut"); // index 3
1439  gDirectory->cd("WithRefit-NoChicut");
1440  for (UInt_t i = 0; i < fHistoList_recofull_new[3].size(); i++) {
1441  //for (UInt_t i = 0; i < fHistoList_recofull_3.size(); i++){
1442  //fHistoList_recofull_3[i]->Write();
1443  fHistoList_recofull_new[3][i]->Write();
1444  }
1445  gDirectory->cd("..");
1446 
1447  gDirectory->mkdir("WithRefit-WithChicut"); // index 4
1448  gDirectory->cd("WithRefit-WithChicut");
1449  for (UInt_t i = 0; i < fHistoList_recofull_new[4].size(); i++) {
1450  //for (UInt_t i = 0; i < fHistoList_recofull_4.size(); i++){
1451  //fHistoList_recofull_4[i]->Write();
1452  fHistoList_recofull_new[4][i]->Write();
1453  }
1454  gDirectory->cd("..");
1455 
1456  for (UInt_t i = 0; i < fHistoList_recofull.size(); i++) {
1457  fHistoList_recofull[i]->Write();
1458  }
1459  gDirectory->cd("..");
1460 
1461 
1462  cout << "CbmAnaConversionRecoFull: Realtime - " << fTime << endl;
1463 }
1464 
1466  timer.Start();
1467 
1468  globalEventNo++;
1469 
1470  if (fPrimVertex != NULL) {
1472  } else {
1473  Fatal("CbmAnaConversion::Exec", "No PrimaryVertex array!");
1474  }
1475 
1476 
1477  fElectrons_track.clear();
1478  fElectrons_momenta.clear();
1479  fElectrons_momentaChi.clear();
1480  fElectrons_mctrackID.clear();
1481  fVector_photons_pairs.clear();
1482 
1483  fElectrons_track_1.clear();
1484  fElectrons_momenta_1.clear();
1485  fElectrons_momentaChi_1.clear();
1486  fElectrons_mctrackID_1.clear();
1487  fVector_photons_pairs_1.clear();
1488 
1489  fElectrons_track_2.clear();
1490  fElectrons_momenta_2.clear();
1491  fElectrons_momentaChi_2.clear();
1492  fElectrons_mctrackID_2.clear();
1493  fVector_photons_pairs_2.clear();
1494 
1495  fElectrons_track_3.clear();
1496  fElectrons_momenta_3.clear();
1497  fElectrons_momentaChi_3.clear();
1498  fElectrons_mctrackID_3.clear();
1499  fVector_photons_pairs_3.clear();
1500 
1501  fElectrons_track_4.clear();
1502  fElectrons_momenta_4.clear();
1503  fElectrons_momentaChi_4.clear();
1504  fElectrons_mctrackID_4.clear();
1505  fVector_photons_pairs_4.clear();
1506 
1507 
1508  for (int i = 1; i <= 4; i++) {
1509  fElectrons_track_new[i].clear();
1510  fElectrons_momenta_new[i].clear();
1511  fElectrons_momentaChi_new[i].clear();
1512  fElectrons_mctrackID_new[i].clear();
1514  fVector_photons_pairs_new[i].clear();
1515 
1516  while (fMixedEventsElectrons[i].size() > 20) {
1519  fMixedEventsElectrons_gtrack[i].begin());
1520  }
1521  }
1522 
1523 
1524  // execution each 20/100 events (i.e. accumulation of data over 20/100 events)
1525  if (globalEventNo % 20 == 0) {
1526  MixedEventTest3();
1527  fMixedTest3_momenta.clear();
1528  fMixedTest3_gtrack.clear();
1529  fMixedTest3_eventno.clear();
1530  }
1531  if (globalEventNo % 200 == 0) {
1532  MixedEventTest4();
1533  fMixedTest4_photons.clear();
1534  fMixedTest4_mctracks.clear();
1535  fMixedTest4_eventno.clear();
1537  fMixedTest4_ElectronAnns.clear();
1538  }
1539 
1540 
1541  fElectrons_track_refit.clear();
1542  fElectrons_momenta_refit.clear();
1544 
1546 
1547  Int_t nofGT_richsts = 0;
1548  Int_t nofElectrons = 0;
1549  Int_t nofElectrons_1 = 0;
1550  Int_t nofElectrons_2 = 0;
1551  Int_t nofElectrons_3 = 0;
1552  Int_t nofElectrons_4 = 0;
1553 
1554 
1555  Int_t FilledMixedEventElectron =
1556  0; // just one variable for test1 here, because only the first identified electron of each event should be taken (therefore the check below for variable < 5)
1557 
1558  // everything related to reconstructed data
1559  Int_t nofGlobalTracks = fGlobalTracks->GetEntriesFast();
1560  cout << "CbmAnaConversionRecoFull: number of global tracks "
1561  << nofGlobalTracks << endl;
1562  for (int iG = 0; iG < nofGlobalTracks; iG++) {
1563  CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(iG);
1564  if (NULL == gTrack) continue;
1565  int stsInd = gTrack->GetStsTrackIndex();
1566  int richInd = gTrack->GetRichRingIndex();
1567  if (richInd < 0) continue;
1568  if (stsInd < 0) continue;
1569 
1570  CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
1571  if (stsTrack == NULL) continue;
1572 
1573  /* CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*)fStsTrackMatches->At(stsInd);
1574  if (stsMatch == NULL) continue;
1575  int stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
1576  if (stsMcTrackId < 0) continue;
1577  CbmMCTrack* mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
1578  if (mcTrack1 == NULL) continue;
1579 
1580  CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*)fRichRingMatches->At(richInd);
1581  if (richMatch == NULL) continue;
1582  int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1583  if (richMcTrackId < 0) continue;
1584  CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1585  if (mcTrack2 == NULL) continue;
1586 */
1587  CbmTrackMatchNew* stsMatch =
1588  (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
1589  int stsMcTrackId = 0;
1590  CbmMCTrack* mcTrack1;
1591  if (stsMatch != NULL) {
1592  if (stsMatch->GetNofLinks() > 0) {
1593  stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
1594  if (stsMcTrackId >= 0) {
1595  mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
1596  if (mcTrack1 == NULL) stsMcTrackId = 0;
1597  }
1598  }
1599  }
1600 
1601  CbmTrackMatchNew* richMatch =
1602  (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
1603  int richMcTrackId = 0;
1604  CbmMCTrack* mcTrack2 = NULL;
1605  if (richMatch != NULL) {
1606  richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1607  if (richMcTrackId >= 0) {
1608  mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1609  if (mcTrack2 == NULL) richMcTrackId = 0;
1610  }
1611  }
1612 
1613  //if(stsMcTrackId != richMcTrackId) continue;
1614  nofGT_richsts++;
1615 
1616  // int pdg = TMath::Abs(mcTrack1->GetPdgCode());
1617 
1618 
1619  // calculate refitted momenta at primary vertex
1620  TVector3 refittedMomentum;
1621  CbmL1PFFitter fPFFitter;
1622  vector<CbmStsTrack> stsTracks;
1623  stsTracks.resize(1);
1624  stsTracks[0] = *stsTrack;
1625  vector<L1FieldRegion> vField;
1626  vector<float> chiPrim;
1627  fPFFitter.GetChiToVertex(stsTracks, vField, chiPrim, fKFVertex, 3e6);
1628  //cand.chi2sts = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
1629  //cand.chi2Prim = chiPrim[0];
1630  const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
1631  vtxTrack->Momentum(refittedMomentum);
1632 
1633  // Double_t result_chi2ndf = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
1634  float result_chi = chiPrim[0];
1635  fhMomentumFits->Fill(result_chi);
1636  // Int_t pidHypo = gTrack->GetPidHypo();
1637 
1638  // #################################################################
1639  // ##### up to here standard calculation of reconstructed data #####
1640  // #################################################################
1641 
1642 
1643  // indizes in the following
1644  // 1 = no refit, no chicut
1645  // 2 = no refit, with chicut
1646  // 3 = with refit, no chicut
1647  // 4 = with refit, with chicut
1648 
1649 
1650  Bool_t electron_rich2 =
1652  iG, refittedMomentum.Mag());
1653 
1654 
1655  Double_t chiCut =
1656  CbmAnaConversionCutSettings::CalcChiCut(refittedMomentum.Perp());
1657 
1658 
1659  if (electron_rich2) { // electron identification without refit of momentum
1660  nofElectrons_1++;
1661  fElectrons_track_1.push_back(gTrack);
1662  fElectrons_momenta_1.push_back(refittedMomentum);
1663  fElectrons_momentaChi_1.push_back(result_chi);
1664  //fElectrons_mctrackID_1.push_back(richMcTrackId);
1665  fElectrons_mctrackID_1.push_back(stsMcTrackId);
1666 
1667  fElectrons_track_new[1].push_back(gTrack);
1668  fElectrons_momenta_new[1].push_back(refittedMomentum);
1669  fElectrons_momentaChi_new[1].push_back(result_chi);
1670  //fElectrons_mctrackID_1.push_back(richMcTrackId);
1671  fElectrons_mctrackID_new[1].push_back(stsMcTrackId);
1672  fElectrons_globaltrackID_new[1].push_back(iG);
1673 
1674  if (FilledMixedEventElectron < 5) {
1675  fMixedEventsElectrons[1].push_back(refittedMomentum);
1676  fMixedEventsElectrons_gtrack[1].push_back(gTrack);
1677  FilledMixedEventElectron++;
1678  }
1679 
1680  // using the old method
1681  fElectrons_track.push_back(gTrack);
1682  fElectrons_momenta.push_back(refittedMomentum);
1683  fElectrons_momentaChi.push_back(result_chi);
1684  //fElectrons_mctrackID_1.push_back(richMcTrackId);
1685  fElectrons_mctrackID.push_back(stsMcTrackId);
1686 
1687  if (result_chi <= chiCut) {
1688  nofElectrons_2++;
1689  fElectrons_track_2.push_back(gTrack);
1690  fElectrons_momenta_2.push_back(refittedMomentum);
1691  fElectrons_momentaChi_2.push_back(result_chi);
1692  //fElectrons_mctrackID_2.push_back(richMcTrackId);
1693  fElectrons_mctrackID_2.push_back(stsMcTrackId);
1694 
1695  fElectrons_track_new[2].push_back(gTrack);
1696  fElectrons_momenta_new[2].push_back(refittedMomentum);
1697  fElectrons_momentaChi_new[2].push_back(result_chi);
1698  //fElectrons_mctrackID_1.push_back(richMcTrackId);
1699  fElectrons_mctrackID_new[2].push_back(stsMcTrackId);
1700  fElectrons_globaltrackID_new[2].push_back(iG);
1701 
1702  if (FilledMixedEventElectron < 5) {
1703  fMixedEventsElectrons[2].push_back(refittedMomentum);
1704  fMixedEventsElectrons_gtrack[2].push_back(gTrack);
1705  FilledMixedEventElectron++;
1706  }
1707  }
1708  }
1709 
1710 
1711  // Doing refit of momenta
1712 
1713  CbmL1PFFitter fPFFitter_electron;
1714  vector<CbmStsTrack> stsTracks_electron;
1715  stsTracks_electron.resize(1);
1716  stsTracks_electron[0] = *stsTrack;
1717  vector<L1FieldRegion> vField_electron;
1718  vector<float> chiPrim_electron;
1719  vector<int> pidHypo_electron;
1720  pidHypo_electron.push_back(11);
1721  fPFFitter_electron.Fit(stsTracks_electron, pidHypo_electron);
1722  fPFFitter_electron.GetChiToVertex(
1723  stsTracks_electron, vField_electron, chiPrim_electron, fKFVertex, 3e6);
1724 
1725  TVector3 refittedMomentum_electron;
1726  const FairTrackParam* vtxTrack_electron =
1727  stsTracks_electron[0].GetParamFirst();
1728  vtxTrack_electron->Momentum(refittedMomentum_electron);
1729  float result_chi_electron = chiPrim_electron[0];
1730 
1731  refittedMomentum = refittedMomentum_electron;
1732  result_chi = result_chi_electron;
1733 
1734  //cout << "refitted momenta!" << endl;
1735 
1736 
1737  Bool_t electron_rich = CbmLitGlobalElectronId::GetInstance().IsRichElectron(
1738  iG, refittedMomentum.Mag());
1739  //Bool_t electron_rich = (pdg == 11);
1740  Bool_t electron_trd = CbmLitGlobalElectronId::GetInstance().IsTrdElectron(
1741  iG, refittedMomentum.Mag());
1742  Bool_t electron_tof = CbmLitGlobalElectronId::GetInstance().IsTofElectron(
1743  iG, refittedMomentum.Mag());
1744 
1745 
1746  if (electron_rich) { // electron identification with refit of momentum
1747  nofElectrons_3++;
1748  fElectrons_track_3.push_back(gTrack);
1749  fElectrons_momenta_3.push_back(refittedMomentum);
1750  fElectrons_momentaChi_3.push_back(result_chi);
1751  //fElectrons_mctrackID_3.push_back(richMcTrackId);
1752  fElectrons_mctrackID_3.push_back(stsMcTrackId);
1753 
1754  fElectrons_track_new[3].push_back(gTrack);
1755  fElectrons_momenta_new[3].push_back(refittedMomentum);
1756  fElectrons_momentaChi_new[3].push_back(result_chi);
1757  //fElectrons_mctrackID_1.push_back(richMcTrackId);
1758  fElectrons_mctrackID_new[3].push_back(stsMcTrackId);
1759  fElectrons_globaltrackID_new[3].push_back(iG);
1760 
1761  if (FilledMixedEventElectron < 5) {
1762  fMixedEventsElectrons[3].push_back(refittedMomentum);
1763  fMixedEventsElectrons_gtrack[3].push_back(gTrack);
1764  FilledMixedEventElectron++;
1765  }
1766  if (result_chi <= chiCut) {
1767  nofElectrons_4++;
1768  fElectrons_track_4.push_back(gTrack);
1769  fElectrons_momenta_4.push_back(refittedMomentum);
1770  fElectrons_momentaChi_4.push_back(result_chi);
1771  //fElectrons_mctrackID_4.push_back(richMcTrackId);
1772  fElectrons_mctrackID_4.push_back(stsMcTrackId);
1773 
1774  fElectrons_track_new[4].push_back(gTrack);
1775  fElectrons_momenta_new[4].push_back(refittedMomentum);
1776  fElectrons_momentaChi_new[4].push_back(result_chi);
1777  //fElectrons_mctrackID_1.push_back(richMcTrackId);
1778  fElectrons_mctrackID_new[4].push_back(stsMcTrackId);
1779  fElectrons_globaltrackID_new[4].push_back(iG);
1780 
1781  // for event mixing technique
1782  if (FilledMixedEventElectron < 5) { // test1
1783  fMixedEventsElectrons[4].push_back(refittedMomentum);
1784  fMixedEventsElectrons_gtrack[4].push_back(gTrack);
1785  FilledMixedEventElectron++;
1786  }
1787  // test3
1788  fMixedTest3_momenta.push_back(refittedMomentum);
1789  fMixedTest3_gtrack.push_back(gTrack);
1791  }
1792 
1793  fhMomentumFits_electronRich->Fill(result_chi);
1794  //TVector3 startvertex;
1795  //mcTrack2->GetStartVertex(startvertex);
1796  //fhPhotons_startvertex_vs_chi->Fill(startvertex.Z(), result_chi);
1797  }
1798 
1799 
1800  if (electron_rich) fhElectrons->Fill(0);
1801  if (electron_trd) fhElectrons->Fill(1);
1802  if (electron_tof) fhElectrons->Fill(2);
1803  if (electron_rich && electron_trd) fhElectrons->Fill(3);
1804  if (electron_rich && electron_tof) fhElectrons->Fill(4);
1805  if (electron_trd && electron_tof) fhElectrons->Fill(5);
1806  if (electron_rich && electron_trd && electron_tof) fhElectrons->Fill(6);
1807  if ((electron_rich && electron_trd) || (electron_rich && electron_tof)
1808  || (electron_trd && electron_tof))
1809  fhElectrons->Fill(7);
1810  }
1811 
1812 
1813  // for mixed events technique, test2
1822 
1823 
1824  fhElectrons_nofPerEvent->Fill(nofElectrons);
1825  fhElectrons_nofPerEvent_1->Fill(nofElectrons_1);
1826  fhElectrons_nofPerEvent_2->Fill(nofElectrons_2);
1827  fhElectrons_nofPerEvent_3->Fill(nofElectrons_3);
1828  fhElectrons_nofPerEvent_4->Fill(nofElectrons_4);
1829 
1830  cout << "CbmAnaConversionRecoFull: number of global tracks in STS and RICH "
1831  << nofGT_richsts << endl;
1832 
1833  CombineElectrons();
1834  CombinePhotons();
1835 
1836  cout << "CbmAnaConversionRecoFull: combining for each case!" << endl;
1837 
1838  for (int i = 1; i <= 4; i++) {
1839  cout << "CbmAnaConversionRecoFull: case " << i << endl;
1845  i);
1851  i);
1852  }
1853  /*
1854  CombineElectrons(fElectrons_track_1, fElectrons_momenta_1, fElectrons_momentaChi_1, fElectrons_mctrackID_1, fVector_photons_pairs_1, 1);
1855  CombinePhotons(fElectrons_track_1, fElectrons_momenta_1, fElectrons_momentaChi_1, fElectrons_mctrackID_1, fVector_photons_pairs_1, 1);
1856 
1857  CombineElectrons(fElectrons_track_2, fElectrons_momenta_2, fElectrons_momentaChi_2, fElectrons_mctrackID_2, fVector_photons_pairs_2, 2);
1858  CombinePhotons(fElectrons_track_2, fElectrons_momenta_2, fElectrons_momentaChi_2, fElectrons_mctrackID_2, fVector_photons_pairs_2, 2);
1859 
1860  CombineElectrons(fElectrons_track_3, fElectrons_momenta_3, fElectrons_momentaChi_3, fElectrons_mctrackID_3, fVector_photons_pairs_3, 3);
1861  CombinePhotons(fElectrons_track_3, fElectrons_momenta_3, fElectrons_momentaChi_3, fElectrons_mctrackID_3, fVector_photons_pairs_3, 3);
1862 
1863  CombineElectrons(fElectrons_track_4, fElectrons_momenta_4, fElectrons_momentaChi_4, fElectrons_mctrackID_4, fVector_photons_pairs_4, 4);
1864  CombinePhotons(fElectrons_track_4, fElectrons_momenta_4, fElectrons_momentaChi_4, fElectrons_mctrackID_4, fVector_photons_pairs_4, 4);
1865 */
1866  //CombineElectronsRefit();
1867  //CombinePhotonsRefit();
1868 
1869  //CombinePhotonsDirection();
1870 
1871 
1872  MixedEventTest();
1873  MixedEventTest2();
1874 
1875  timer.Stop();
1876  fTime += timer.RealTime();
1877 }
1878 
1879 
1880 //void CbmAnaConversionRecoFull::CombineElectrons( vector<CbmGlobalTrack*> gtrack, vector<TVector3> momenta, vector<float> momentaChi, vector<int> mctrackID)
1882  vector<CbmGlobalTrack*> gtrack,
1883  vector<TVector3> momenta,
1884  vector<float> /*momentaChi*/,
1885  vector<int> /*mctrackID*/,
1886  vector<vector<int>> reconstructedPhotons,
1887  Int_t index) {
1888  Int_t nof = momenta.size();
1889  fhElectrons_nofPerEvent_new[index]->Fill(nof);
1890  cout << "CbmAnaConversionRecoFull: " << index << ": CombineElectrons, nof - "
1891  << nof << endl;
1892  Int_t nofPhotons = 0;
1893  if (nof >= 2) {
1894  for (int a = 0; a < nof - 1; a++) {
1895  for (int b = a + 1; b < nof; b++) {
1896  Int_t check1 =
1897  (gtrack[a]->GetParamLast()->GetQp()
1898  > 0); // positive or negative charge (qp = charge over momentum ratio)
1899  Int_t check2 = (gtrack[b]->GetParamLast()->GetQp() > 0);
1900  Int_t test = check1 + check2;
1901  if (test != 1) continue; // need one electron and one positron
1902  //if(fElectrons_momentaChi[a] > 10 || fElectrons_momentaChi[b] > 10) continue;
1903 
1904  CbmLmvmKinematicParams params1 =
1905  CalculateKinematicParamsReco(momenta[a], momenta[b]);
1906 
1907  CbmAnaConversionKinematicParams paramsTest =
1909  momenta[a], momenta[b]);
1910 
1911  Double_t openingAngleCut = 1.8 - 0.6 * paramsTest.fPt;
1912  Double_t invMassCut = 0.03;
1913 
1914  Int_t IsPhoton_openingAngle1 = (paramsTest.fAngle < openingAngleCut);
1915  Int_t IsPhoton_invMass1 = (paramsTest.fMinv < invMassCut);
1916 
1917  /*
1918  Double_t tXa = gtrack[a]->GetParamLast()->GetTx();
1919  Double_t tYa = gtrack[a]->GetParamLast()->GetTy();
1920  Double_t tXb = gtrack[b]->GetParamLast()->GetTx();
1921  Double_t tYb = gtrack[b]->GetParamLast()->GetTy();
1922 */
1923 
1924  if (IsPhoton_openingAngle1 && IsPhoton_invMass1) {
1925  nofPhotons++;
1926  vector<int> pair; // = {a, b};
1927  pair.push_back(a);
1928  pair.push_back(b);
1929  reconstructedPhotons.push_back(pair);
1930 
1931  if (index == 1) {
1932  fhElectrons_invmass_1->Fill(params1.fMinv);
1933  fVector_photons_pairs_1.push_back(pair);
1934  //fVector_photons_pairs.push_back(pair);
1935  }
1936  if (index == 2) {
1937  fhElectrons_invmass_2->Fill(params1.fMinv);
1938  fVector_photons_pairs_2.push_back(pair);
1939  }
1940  if (index == 3) {
1941  fhElectrons_invmass_3->Fill(params1.fMinv);
1942  fVector_photons_pairs_3.push_back(pair);
1943  }
1944  if (index == 4) {
1945  fhElectrons_invmass_4->Fill(params1.fMinv);
1946  fVector_photons_pairs_4.push_back(pair);
1947  }
1948 
1949  fhElectrons_invmass_new[index]->Fill(params1.fMinv);
1950  fVector_photons_pairs_new[index].push_back(pair);
1951 
1952 
1953  //fVector_photons_momenta.push_back(params1.momPair);
1954 
1955  //fhPhotons_tX->Fill(tXa);
1956  //fhPhotons_tX->Fill(tXb);
1957  //fhPhotons_tY->Fill(tYa);
1958  //fhPhotons_tY->Fill(tYb);
1959 
1960  TVector3 momentumE1f;
1961  TVector3 momentumE2f;
1962  gtrack[a]->GetParamFirst()->Momentum(momentumE1f);
1963  gtrack[b]->GetParamFirst()->Momentum(momentumE2f);
1964  TVector3 momentumE1l;
1965  TVector3 momentumE2l;
1966  gtrack[a]->GetParamLast()->Momentum(momentumE1l);
1967  gtrack[b]->GetParamLast()->Momentum(momentumE2l);
1968 
1969  //Double_t energyE1 = TMath::Sqrt(momentumE1.Mag2() + M2E);
1970  //TLorentzVector lorVecE1(momentumE1, energyE1);
1971  //Double_t energyE2 = TMath::Sqrt(momentumE2.Mag2() + M2E);
1972  //TLorentzVector lorVecE2(momentumE2, energyE2);
1973  //TLorentzVector g = lorVecE1 + lorVecE2;
1974 
1975  //lorVecE1.Boost(g.BoostVector() );
1976  //lorVecE2.Boost(g.BoostVector() );
1977 
1978  TVector3 normal1 = momentumE1f.Cross(momentumE1l);
1979  TVector3 normal2 = momentumE2f.Cross(momentumE2l);
1980  Double_t normalAngle = normal1.Angle(normal2);
1981  Double_t theta = 180. * normalAngle / TMath::Pi();
1982 
1983  //Double_t boostAngle = lorVecE1.Angle(lorVecE2.Vect());
1984 
1985  //fhPhotons_boostAngle->Fill(normalAngle);
1986 
1987 
1988  //if( TMath::Abs(tXa - tXb) < 0.5 || TMath::Abs(tYa - tYb) < 0.5 ) {
1989  if (theta < 30) { fVector_photons_pairs_direction.push_back(pair); }
1990 
1991 
1992  // mixed event test, test4
1993  if (index == 4) {
1994  vector<TVector3> pairmomenta;
1995  pairmomenta.push_back(momenta[a]);
1996  pairmomenta.push_back(momenta[b]);
1997  vector<CbmMCTrack*> pair_mctracks;
1998  pair_mctracks.push_back(
1999  (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][a]));
2000  pair_mctracks.push_back(
2001  (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][b]));
2002  fMixedTest4_photons.push_back(pairmomenta);
2004  fMixedTest4_mctracks.push_back(pair_mctracks);
2005 
2006  vector<Bool_t> IsRichElectronAnn0;
2007  IsRichElectronAnn0.push_back(
2008  CbmLitGlobalElectronId::GetInstance().IsRichElectron(
2009  fElectrons_globaltrackID_new[index][a], momenta[a].Mag()));
2010  IsRichElectronAnn0.push_back(
2011  CbmLitGlobalElectronId::GetInstance().IsRichElectron(
2012  fElectrons_globaltrackID_new[index][b], momenta[b].Mag()));
2013  fMixedTest4_isRichElectronAnn0.push_back(IsRichElectronAnn0);
2014 
2015  vector<Double_t> electronANNs;
2016  electronANNs.push_back(ElectronANNvalue(
2017  fElectrons_globaltrackID_new[index][a], momenta[a].Mag()));
2018  electronANNs.push_back(ElectronANNvalue(
2019  fElectrons_globaltrackID_new[index][b], momenta[b].Mag()));
2020  fMixedTest4_ElectronAnns.push_back(electronANNs);
2021  }
2022  }
2023  }
2024  }
2025  }
2026  //if(index == 1) fhPhotons_nofPerEvent_1->Fill(nofPhotons);
2027  //if(index == 2) fhPhotons_nofPerEvent_2->Fill(nofPhotons);
2028  //if(index == 3) fhPhotons_nofPerEvent_3->Fill(nofPhotons);
2029  //if(index == 4) fhPhotons_nofPerEvent_4->Fill(nofPhotons);
2030  fhPhotons_nofPerEvent_new[index]->Fill(nofPhotons);
2031  //fhPhotons_nofPerEvent->Fill(nofPhotons);
2032  cout << "CbmAnaConversionRecoFull: CombineElectrons: " << index
2033  << ": Crosscheck - nof reconstructed photons: " << nofPhotons << endl;
2034 }
2035 
2036 
2038  const TVector3 part2,
2039  const TVector3 part3,
2040  const TVector3 part4)
2041 // calculation of invariant mass from four electrons/positrons
2042 {
2043  Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
2044  TLorentzVector lorVec1(part1, energy1);
2045 
2046  Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
2047  TLorentzVector lorVec2(part2, energy2);
2048 
2049  Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
2050  TLorentzVector lorVec3(part3, energy3);
2051 
2052  Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
2053  TLorentzVector lorVec4(part4, energy4);
2054 
2055  TLorentzVector sum;
2056  sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
2057 
2058  return sum.Mag();
2059 }
2060 
2061 
2062 Double_t CbmAnaConversionRecoFull::Pt_4particlesRECO(const TVector3 part1,
2063  const TVector3 part2,
2064  const TVector3 part3,
2065  const TVector3 part4) {
2066  Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
2067  TLorentzVector lorVec1(part1, energy1);
2068 
2069  Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
2070  TLorentzVector lorVec2(part2, energy2);
2071 
2072  Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
2073  TLorentzVector lorVec3(part3, energy3);
2074 
2075  Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
2076  TLorentzVector lorVec4(part4, energy4);
2077 
2078  TLorentzVector sum;
2079  sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
2080 
2081  Double_t perp = sum.Perp();
2082  Double_t pt = TMath::Sqrt(sum.X() * sum.X() + sum.Y() * sum.Y());
2083 
2084  cout << "CbmAnaConversionRecoFull::Pt_4particlesRECO: perp/pt = " << perp
2085  << " / " << pt << endl;
2086 
2087  return perp;
2088 }
2089 
2090 
2091 Double_t CbmAnaConversionRecoFull::Rap_4particlesRECO(const TVector3 part1,
2092  const TVector3 part2,
2093  const TVector3 part3,
2094  const TVector3 part4) {
2095  Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
2096  TLorentzVector lorVec1(part1, energy1);
2097 
2098  Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
2099  TLorentzVector lorVec2(part2, energy2);
2100 
2101  Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
2102  TLorentzVector lorVec3(part3, energy3);
2103 
2104  Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
2105  TLorentzVector lorVec4(part4, energy4);
2106 
2107  TLorentzVector sum;
2108  sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
2109 
2110 
2111  TVector3 momPair = part1 + part2 + part3 + part4;
2112  Double_t energyPair = energy1 + energy2 + energy3 + energy4;
2113  Double_t pzPair = momPair.Pz();
2114  Double_t yPair =
2115  0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
2116 
2117  cout << "CbmAnaConversionRecoFull::Rap_4particlesRECO: yPair = " << yPair
2118  << endl;
2119 
2120  return yPair;
2121 }
2122 
2123 
2125  const TVector3 electron1,
2126  const TVector3 electron2) {
2127  CbmLmvmKinematicParams params;
2128 
2129  Double_t energyP = TMath::Sqrt(electron1.Mag2() + M2E);
2130  TLorentzVector lorVecP(electron1, energyP);
2131 
2132  Double_t energyM = TMath::Sqrt(electron2.Mag2() + M2E);
2133  TLorentzVector lorVecM(electron2, energyM);
2134 
2135  TVector3 momPair = electron1 + electron2;
2136  Double_t energyPair = energyP + energyM;
2137  Double_t ptPair = momPair.Perp();
2138  Double_t pzPair = momPair.Pz();
2139  Double_t yPair =
2140  0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
2141  Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
2142  Double_t theta = 180. * anglePair / TMath::Pi();
2143  Double_t minv = 2. * TMath::Sin(anglePair / 2.)
2144  * TMath::Sqrt(electron1.Mag() * electron2.Mag());
2145 
2146  params.fMomentumMag = momPair.Mag();
2147  params.fPt = ptPair;
2148  params.fRapidity = yPair;
2149  params.fMinv = minv;
2150  params.fAngle = theta;
2151  return params;
2152 }
2153 
2154 
2157  const TVector3 part1,
2158  const TVector3 part2,
2159  const TVector3 part3,
2160  const TVector3 part4) {
2161  CbmLmvmKinematicParams params;
2162 
2163  Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
2164  TLorentzVector lorVec1(part1, energy1);
2165 
2166  Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
2167  TLorentzVector lorVec2(part2, energy2);
2168 
2169  Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
2170  TLorentzVector lorVec3(part3, energy3);
2171 
2172  Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
2173  TLorentzVector lorVec4(part4, energy4);
2174 
2175  TLorentzVector sum;
2176  sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
2177 
2178  TVector3 momPair = part1 + part2 + part3 + part4;
2179  Double_t energyPair = energy1 + energy2 + energy3 + energy4;
2180  Double_t ptPair = momPair.Perp();
2181  Double_t pzPair = momPair.Pz();
2182  Double_t yPair =
2183  0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
2184  // Double_t anglePair = 0;
2185  // Double_t theta = 180.*anglePair/TMath::Pi();
2186  Double_t minv = sum.Mag();
2187 
2188  params.fMomentumMag = momPair.Mag();
2189  params.fPt = ptPair;
2190  params.fRapidity = yPair;
2191  params.fMinv = minv;
2192  params.fAngle = 0;
2193  return params;
2194 }
2195 
2196 
2198  vector<CbmGlobalTrack*> gtrack,
2199  vector<TVector3> momenta,
2200  vector<float> momentaChi,
2201  vector<int>,
2202  vector<vector<int>> reconstructedPhotons,
2203  Int_t index)
2204 // index: kind of electron cut: 1 = no refit, no chicut; 2 = no refit, with chicut; 3 = with refit, no chicut; 4 = with refit, with chicut
2205 {
2206  if (index == 1) reconstructedPhotons = fVector_photons_pairs_1;
2207  if (index == 2) reconstructedPhotons = fVector_photons_pairs_2;
2208  if (index == 3) reconstructedPhotons = fVector_photons_pairs_3;
2209  if (index == 4) reconstructedPhotons = fVector_photons_pairs_4;
2210 
2211  reconstructedPhotons = fVector_photons_pairs_new[index];
2212 
2213  Int_t nofPi0 = 0;
2214 
2215  Int_t nof = reconstructedPhotons.size();
2216  fhPhotons_nofPerEventAfter_new[index]->Fill(nof);
2217  cout << "CbmAnaConversionRecoFull: " << index << ": CombinePhotons, nof - "
2218  << nof << endl;
2219  if (nof >= 2) {
2220  for (int a = 0; a < nof - 1; a++) {
2221  for (int b = a + 1; b < nof; b++) {
2222  cout << "####" << endl;
2223  cout << "CbmAnaConversionRecoFull: calculating invariant mass! (" << a
2224  << "/" << b << ")" << endl;
2225  Int_t electron11 = reconstructedPhotons[a][0];
2226  Int_t electron12 = reconstructedPhotons[a][1];
2227  Int_t electron21 = reconstructedPhotons[b][0];
2228  Int_t electron22 = reconstructedPhotons[b][1];
2229  cout << "CbmAnaConversionRecoFull: calculating invariant mass! ("
2230  << electron11 << "/" << electron12 << "/" << electron21 << "/"
2231  << electron22 << ")" << endl;
2232 
2233  if (electron11 == electron12 || electron11 == electron21
2234  || electron11 == electron22 || electron12 == electron21
2235  || electron12 == electron22 || electron21 == electron22) {
2236  cout << "CbmAnaConversionRecoFull: RecoFull_DoubleIndex!" << endl;
2237  continue;
2238  }
2239  nofPi0++;
2240 
2241  Int_t charge11 = (gtrack[electron11]->GetParamLast()->GetQp() > 0);
2242  //Int_t charge12 = (gtrack[electron12]->GetParamLast()->GetQp() > 0);
2243  Int_t charge21 = (gtrack[electron21]->GetParamLast()->GetQp() > 0);
2244  Int_t charge22 = (gtrack[electron22]->GetParamLast()->GetQp() > 0);
2245  if ((charge11 + charge21 == 2) || (charge11 + charge21 == 0)) {
2246  CbmAnaConversionKinematicParams paramsTest1 =
2248  momenta[electron11], momenta[electron21]);
2249  CbmAnaConversionKinematicParams paramsTest2 =
2251  momenta[electron12], momenta[electron22]);
2253  paramsTest1.fAngle);
2255  paramsTest2.fAngle);
2256  }
2257  if ((charge11 + charge22 == 2) || (charge11 + charge22 == 0)) {
2258  CbmAnaConversionKinematicParams paramsTest1 =
2260  momenta[electron11], momenta[electron22]);
2261  CbmAnaConversionKinematicParams paramsTest2 =
2263  momenta[electron12], momenta[electron21]);
2265  paramsTest1.fAngle);
2267  paramsTest2.fAngle);
2268  }
2269 
2270  Double_t invmass = Invmass_4particlesRECO(momenta[electron11],
2271  momenta[electron12],
2272  momenta[electron21],
2273  momenta[electron22]);
2274 
2275  if (index == 1) fhPhotons_invmass_1->Fill(invmass);
2276  if (index == 2) fhPhotons_invmass_2->Fill(invmass);
2277  if (index == 3) fhPhotons_invmass_3->Fill(invmass);
2278  if (index == 4) fhPhotons_invmass_4->Fill(invmass);
2279  fhPhotons_invmass_new[index]->Fill(invmass);
2280 
2281  Double_t pt = Pt_4particlesRECO(momenta[electron11],
2282  momenta[electron12],
2283  momenta[electron21],
2284  momenta[electron22]);
2285  Double_t rap = Rap_4particlesRECO(momenta[electron11],
2286  momenta[electron12],
2287  momenta[electron21],
2288  momenta[electron22]);
2289 
2290  fhPhotons_pt_vs_rap_new[index]->Fill(pt, rap);
2291 
2292  Double_t opening_angle = OpeningAngleBetweenPhotons(
2293  momenta, reconstructedPhotons[a], reconstructedPhotons[b]);
2294  if (index == 1) fhPhotons_angleBetween->Fill(opening_angle);
2295 
2296 
2297  CbmLmvmKinematicParams params1 =
2298  CalculateKinematicParams_4particles(momenta[electron11],
2299  momenta[electron12],
2300  momenta[electron21],
2301  momenta[electron22]);
2302 
2303  CbmAnaConversionKinematicParams paramsTest =
2305  momenta[electron11],
2306  momenta[electron12],
2307  momenta[electron21],
2308  momenta[electron22]);
2309 
2310  Bool_t IsRichElectron_ann0_e11 =
2312  fElectrons_globaltrackID_new[index][electron11],
2313  momenta[electron11].Mag());
2314  Bool_t IsRichElectron_ann0_e12 =
2316  fElectrons_globaltrackID_new[index][electron12],
2317  momenta[electron12].Mag());
2318  Bool_t IsRichElectron_ann0_e21 =
2320  fElectrons_globaltrackID_new[index][electron21],
2321  momenta[electron21].Mag());
2322  Bool_t IsRichElectron_ann0_e22 =
2324  fElectrons_globaltrackID_new[index][electron22],
2325  momenta[electron22].Mag());
2326 
2327  Double_t ANNe11 =
2329  momenta[electron11].Mag());
2330  Double_t ANNe12 =
2332  momenta[electron12].Mag());
2333  Double_t ANNe21 =
2335  momenta[electron21].Mag());
2336  Double_t ANNe22 =
2338  momenta[electron22].Mag());
2339 
2340  if (IsRichElectron_ann0_e11 && IsRichElectron_ann0_e12
2341  && IsRichElectron_ann0_e21 && IsRichElectron_ann0_e22) {
2342  fhPhotons_invmass_ann0_new[index]->Fill(invmass);
2343  }
2344  if (ANNe11 > -1 && ANNe12 > -1 && ANNe21 > -1 && ANNe22 > -1)
2345  fhPhotons_invmass_ANNcuts_new[index]->Fill(1, invmass);
2346  if (ANNe11 > -0.9 && ANNe12 > -0.9 && ANNe21 > -0.9 && ANNe22 > -0.9)
2347  fhPhotons_invmass_ANNcuts_new[index]->Fill(2, invmass);
2348  if (ANNe11 > -0.8 && ANNe12 > -0.8 && ANNe21 > -0.8 && ANNe22 > -0.8)
2349  fhPhotons_invmass_ANNcuts_new[index]->Fill(3, invmass);
2350  if (ANNe11 > -0.7 && ANNe12 > -0.7 && ANNe21 > -0.7 && ANNe22 > -0.7)
2351  fhPhotons_invmass_ANNcuts_new[index]->Fill(4, invmass);
2352  if (ANNe11 > -0.6 && ANNe12 > -0.6 && ANNe21 > -0.6 && ANNe22 > -0.6)
2353  fhPhotons_invmass_ANNcuts_new[index]->Fill(5, invmass);
2354  if (ANNe11 > -0.5 && ANNe12 > -0.5 && ANNe21 > -0.5 && ANNe22 > -0.5)
2355  fhPhotons_invmass_ANNcuts_new[index]->Fill(6, invmass);
2356  if (ANNe11 > -0.0 && ANNe12 > -0.0 && ANNe21 > -0.0 && ANNe22 > -0.0)
2357  fhPhotons_invmass_ANNcuts_new[index]->Fill(7, invmass);
2358 
2359  cout << "CbmAnaConversionRecoFull: debug: (" << invmass << "/"
2360  << paramsTest.fMinv << ") - (" << pt << "/" << paramsTest.fPt
2361  << ") - (" << rap << "/" << paramsTest.fRapidity << ")" << endl;
2362 
2363  //TVector3 momentumE1;
2364  //TVector3 momentumE2;
2365  //gtrack[a]->GetParamLast()->Momentum(momentumE1);
2366  //gtrack[b]->GetParamLast()->Momentum(momentumE2);
2367 
2368  Double_t energyE11 = TMath::Sqrt(momenta[electron11].Mag2() + M2E);
2369  TLorentzVector lorVecE11(momenta[electron11], energyE11);
2370  Double_t energyE12 = TMath::Sqrt(momenta[electron12].Mag2() + M2E);
2371  TLorentzVector lorVecE12(momenta[electron12], energyE12);
2372  Double_t energyE21 = TMath::Sqrt(momenta[electron21].Mag2() + M2E);
2373  TLorentzVector lorVecE21(momenta[electron21], energyE21);
2374  Double_t energyE22 = TMath::Sqrt(momenta[electron22].Mag2() + M2E);
2375  TLorentzVector lorVecE22(momenta[electron22], energyE22);
2376  TLorentzVector g1 = lorVecE11 + lorVecE12;
2377  TLorentzVector g2 = lorVecE21 + lorVecE22;
2378  TLorentzVector pi = lorVecE11 + lorVecE12 + lorVecE21 + lorVecE22;
2379 
2380  g1.Boost(-pi.BoostVector());
2381  g2.Boost(-pi.BoostVector());
2382 
2383  Double_t boostAngle = g1.Angle(g2.Vect());
2384  Double_t theta = 180. * boostAngle / TMath::Pi();
2385 
2386  if (index == 1) fhPhotons_boostAngleTest->Fill(boostAngle);
2387 
2388  //if(opening_angle < 10) {
2389  if (true) {
2390  if (false) {
2391  fhPhotons_boostAngle->Fill(theta);
2392 
2393  fhPhotons_invmass_cut->Fill(invmass);
2394  fhPhotons_invmass_vs_pt->Fill(invmass, pt);
2395  fhPhotons_rapidity_vs_pt->Fill(pt, rap);
2396  fhPhotons_invmass_vs_openingAngle->Fill(invmass, opening_angle);
2397  fhPhotons_openingAngle_vs_momentum->Fill(opening_angle,
2398  params1.fMomentumMag);
2399 
2400  fhMomentumFits_pi0reco->Fill(momentaChi[electron11]);
2401  fhMomentumFits_pi0reco->Fill(momentaChi[electron12]);
2402  fhMomentumFits_pi0reco->Fill(momentaChi[electron21]);
2403  fhMomentumFits_pi0reco->Fill(momentaChi[electron22]);
2404 
2405  fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron11]);
2406  fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron12]);
2407  fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron21]);
2408  fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron22]);
2409  }
2410 
2411  if (index == 1) {
2412  if (pt <= 1) fhPhotons_invmass_ptBin1_1->Fill(invmass);
2413  if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_1->Fill(invmass);
2414  if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_1->Fill(invmass);
2415  if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_1->Fill(invmass);
2416  fhPhotons_invmass_vs_pt_1->Fill(invmass, pt);
2417  }
2418  if (index == 2) {
2419  if (pt <= 1) fhPhotons_invmass_ptBin1_2->Fill(invmass);
2420  if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_2->Fill(invmass);
2421  if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_2->Fill(invmass);
2422  if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_2->Fill(invmass);
2423  fhPhotons_invmass_vs_pt_2->Fill(invmass, pt);
2424  }
2425  if (index == 3) {
2426  if (pt <= 1) fhPhotons_invmass_ptBin1_3->Fill(invmass);
2427  if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_3->Fill(invmass);
2428  if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_3->Fill(invmass);
2429  if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_3->Fill(invmass);
2430  fhPhotons_invmass_vs_pt_3->Fill(invmass, pt);
2431  }
2432  if (index == 4) {
2433  if (pt <= 1) fhPhotons_invmass_ptBin1_4->Fill(invmass);
2434  if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_4->Fill(invmass);
2435  if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_4->Fill(invmass);
2436  if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_4->Fill(invmass);
2437  fhPhotons_invmass_vs_pt_4->Fill(invmass, pt);
2438 
2439  if (!(fElectrons_mctrackID_new[index][electron11]
2440  == fElectrons_mctrackID_new[index][electron12]
2441  || fElectrons_mctrackID_new[index][electron11]
2442  == fElectrons_mctrackID_new[index][electron21]
2443  || fElectrons_mctrackID_new[index][electron11]
2444  == fElectrons_mctrackID_new[index][electron22]
2445  || fElectrons_mctrackID_new[index][electron12]
2446  == fElectrons_mctrackID_new[index][electron21]
2447  || fElectrons_mctrackID_new[index][electron12]
2448  == fElectrons_mctrackID_new[index][electron22]
2449  || fElectrons_mctrackID_new[index][electron21]
2450  == fElectrons_mctrackID_new[index][electron22])) {
2451  fhPhotons_invmass_MCcutTest_new[index]->Fill(invmass);
2452  }
2453  }
2454 
2455  if (pt <= 0.5) fhPhotons_invmass_ptBin1_new[index]->Fill(invmass);
2456  if (pt > 0.5 && pt <= 1)
2457  fhPhotons_invmass_ptBin2_new[index]->Fill(invmass);
2458  if (pt > 1 && pt <= 1.5)
2459  fhPhotons_invmass_ptBin3_new[index]->Fill(invmass);
2460  if (pt > 1.5 && pt <= 2)
2461  fhPhotons_invmass_ptBin4_new[index]->Fill(invmass);
2462  if (pt > 2 && pt <= 2.5)
2463  fhPhotons_invmass_ptBin5_new[index]->Fill(invmass);
2464  if (pt > 2.5 && pt <= 3)
2465  fhPhotons_invmass_ptBin6_new[index]->Fill(invmass);
2466  fhPhotons_invmass_vs_pt_new[index]->Fill(invmass, pt);
2467 
2468  /*
2469  Double_t chicut = 1.0;
2470  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2471  fhPhotons_invmass_cut_chi1->Fill(invmass);
2472  }
2473  chicut = 3.0;
2474  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2475  fhPhotons_invmass_cut_chi3->Fill(invmass);
2476  }
2477  chicut = 5.0;
2478  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2479  fhPhotons_invmass_cut_chi5->Fill(invmass);
2480  }
2481  chicut = 10.0;
2482  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2483  fhPhotons_invmass_cut_chi10->Fill(invmass);
2484  }
2485  chicut = 25.0;
2486  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2487  fhPhotons_invmass_cut_chi25->Fill(invmass);
2488  }
2489  chicut = 40.0;
2490  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2491  fhPhotons_invmass_cut_chi40->Fill(invmass);
2492  }
2493  chicut = 65.0;
2494  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2495  fhPhotons_invmass_cut_chi65->Fill(invmass);
2496  }
2497  chicut = 80.0;
2498  if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2499  fhPhotons_invmass_cut_chi80->Fill(invmass);
2500  }
2501  */
2502 
2503 
2504  if (fElectrons_mctrackID_new[index][electron11] == 0
2505  || fElectrons_mctrackID_new[index][electron12] == 0
2506  || fElectrons_mctrackID_new[index][electron21] == 0
2507  || fElectrons_mctrackID_new[index][electron22] == 0)
2508  continue;
2509 
2510  // CROSSCHECK WITH MC-TRUE DATA!
2511  CbmMCTrack* mctrack11 = (CbmMCTrack*) fMcTracks->At(
2513  [electron11]); // mctracks of four leptons
2514  CbmMCTrack* mctrack12 = (CbmMCTrack*) fMcTracks->At(
2515  fElectrons_mctrackID_new[index][electron12]);
2516  CbmMCTrack* mctrack21 = (CbmMCTrack*) fMcTracks->At(
2517  fElectrons_mctrackID_new[index][electron21]);
2518  CbmMCTrack* mctrack22 = (CbmMCTrack*) fMcTracks->At(
2519  fElectrons_mctrackID_new[index][electron22]);
2520 
2521  Int_t pdg11 = mctrack11->GetPdgCode(); // pdg codes of four leptons
2522  Int_t pdg12 = mctrack12->GetPdgCode();
2523  Int_t pdg21 = mctrack21->GetPdgCode();
2524  Int_t pdg22 = mctrack22->GetPdgCode();
2525 
2526  Int_t motherId11 =
2527  mctrack11->GetMotherId(); // motherIDs of four leptons
2528  Int_t motherId12 = mctrack12->GetMotherId();
2529  Int_t motherId21 = mctrack21->GetMotherId();
2530  Int_t motherId22 = mctrack22->GetMotherId();
2531 
2532  CbmMCTrack* mothermctrack11 =
2533  NULL; // mctracks of mother particles of the four leptons
2534  CbmMCTrack* mothermctrack12 = NULL;
2535  CbmMCTrack* mothermctrack21 = NULL;
2536  CbmMCTrack* mothermctrack22 = NULL;
2537  if (motherId11 > 0)
2538  mothermctrack11 = (CbmMCTrack*) fMcTracks->At(motherId11);
2539  if (motherId11 > 0)
2540  mothermctrack12 = (CbmMCTrack*) fMcTracks->At(motherId12);
2541  if (motherId11 > 0)
2542  mothermctrack21 = (CbmMCTrack*) fMcTracks->At(motherId21);
2543  if (motherId11 > 0)
2544  mothermctrack22 = (CbmMCTrack*) fMcTracks->At(motherId22);
2545 
2546  Int_t motherpdg11 = -2; // pdg codes of the mother particles
2547  Int_t motherpdg12 = -2;
2548  Int_t motherpdg21 = -2;
2549  Int_t motherpdg22 = -2;
2550  if (mothermctrack11 != NULL)
2551  motherpdg11 = mothermctrack11->GetPdgCode();
2552  if (mothermctrack12 != NULL)
2553  motherpdg12 = mothermctrack12->GetPdgCode();
2554  if (mothermctrack21 != NULL)
2555  motherpdg21 = mothermctrack21->GetPdgCode();
2556  if (mothermctrack22 != NULL)
2557  motherpdg22 = mothermctrack22->GetPdgCode();
2558 
2559  Int_t grandmotherId11 = -2; // grandmotherIDs of four leptons
2560  Int_t grandmotherId12 = -2;
2561  Int_t grandmotherId21 = -2;
2562  Int_t grandmotherId22 = -2;
2563  if (mothermctrack11 != NULL)
2564  grandmotherId11 = mothermctrack11->GetMotherId();
2565  if (mothermctrack12 != NULL)
2566  grandmotherId12 = mothermctrack12->GetMotherId();
2567  if (mothermctrack21 != NULL)
2568  grandmotherId21 = mothermctrack21->GetMotherId();
2569  if (mothermctrack22 != NULL)
2570  grandmotherId22 = mothermctrack22->GetMotherId();
2571 
2572 
2573  Int_t sameGrandmothers1 = 0;
2574  Int_t sameGrandmothers2 = 0;
2575  Int_t sameGrandmothers3 = 0;
2576  Int_t sameGrandmothers4 = 0;
2577  if (grandmotherId11 == grandmotherId12) sameGrandmothers1++;
2578  if (grandmotherId11 == grandmotherId21) sameGrandmothers1++;
2579  if (grandmotherId11 == grandmotherId22) sameGrandmothers1++;
2580  if (grandmotherId12 == grandmotherId11) sameGrandmothers2++;
2581  if (grandmotherId12 == grandmotherId21) sameGrandmothers2++;
2582  if (grandmotherId12 == grandmotherId22) sameGrandmothers2++;
2583  if (grandmotherId21 == grandmotherId11) sameGrandmothers3++;
2584  if (grandmotherId21 == grandmotherId12) sameGrandmothers3++;
2585  if (grandmotherId21 == grandmotherId22) sameGrandmothers3++;
2586  if (grandmotherId22 == grandmotherId11) sameGrandmothers4++;
2587  if (grandmotherId22 == grandmotherId12) sameGrandmothers4++;
2588  if (grandmotherId22 == grandmotherId21) sameGrandmothers4++;
2589  Int_t sameGrandmothersSum = sameGrandmothers1 + sameGrandmothers2
2590  + sameGrandmothers3 + sameGrandmothers4;
2591 
2592  Int_t sameMothers1 = 0;
2593  Int_t sameMothers2 = 0;
2594  Int_t sameMothers3 = 0;
2595  Int_t sameMothers4 = 0;
2596  if (motherId11 == motherId12) sameMothers1++;
2597  if (motherId11 == motherId21) sameMothers1++;
2598  if (motherId11 == motherId22) sameMothers1++;
2599  if (motherId12 == motherId11) sameMothers2++;
2600  if (motherId12 == motherId21) sameMothers2++;
2601  if (motherId12 == motherId22) sameMothers2++;
2602  if (motherId21 == motherId11) sameMothers3++;
2603  if (motherId21 == motherId12) sameMothers3++;
2604  if (motherId21 == motherId22) sameMothers3++;
2605  if (motherId22 == motherId11) sameMothers4++;
2606  if (motherId22 == motherId12) sameMothers4++;
2607  if (motherId22 == motherId21) sameMothers4++;
2608  Int_t sameMothersSum =
2609  sameMothers1 + sameMothers2 + sameMothers3 + sameMothers4;
2610 
2611 
2612  if (
2613  motherId11 == motherId12
2614  && motherId21
2615  == motherId22) { // both combined e+e- pairs come from the same mother (which can be gamma, pi0, or whatever)
2616  fhPhotons_invmass_MCcutAll_new[index]->Fill(1, invmass);
2617  if (TMath::Abs(motherpdg11) == 22
2618  && TMath::Abs(motherpdg21) == 22) {
2619  fhPhotons_invmass_MCcutAll_new[index]->Fill(2, invmass);
2620  }
2621  if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22
2622  && grandmotherId11 == grandmotherId21
2623  && grandmotherId11 > 0) { // decay in to gg of pi0 and eta
2624  fhPhotons_invmass_MCcutAll_new[index]->Fill(3, invmass);
2625  if (invmass < 0.3)
2626  fhPhotons_phaseSpace_pi0[index]->Fill(paramsTest.fPt,
2627  paramsTest.fRapidity);
2628  if (invmass > 0.3)
2629  fhPhotons_phaseSpace_eta[index]->Fill(paramsTest.fPt,
2630  paramsTest.fRapidity);
2631  }
2632  if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22
2633  && grandmotherId11 != grandmotherId21) {
2634  fhPhotons_invmass_MCcutAll_new[index]->Fill(4, invmass);
2635  }
2636  if ((TMath::Abs(motherpdg11) == 22
2637  && TMath::Abs(motherpdg21) == 111)
2638  || (TMath::Abs(motherpdg11) == 111
2639  && TMath::Abs(motherpdg21) == 22)) {
2640  fhPhotons_invmass_MCcutAll_new[index]->Fill(5, invmass);
2641  if (grandmotherId11 == motherId21
2642  || motherId11 == grandmotherId21) { // Dalitz decay
2643  fhPhotons_invmass_MCcutAll_new[index]->Fill(12, invmass);
2644  fhPhotons_phaseSpace_pi0[index]->Fill(paramsTest.fPt,
2645  paramsTest.fRapidity);
2646  }
2647  }
2648  if (TMath::Abs(motherpdg11) == 111
2649  && TMath::Abs(motherpdg21) == 111) {
2650  fhPhotons_invmass_MCcutAll_new[index]->Fill(6, invmass);
2651  }
2652  if ((TMath::Abs(motherpdg11) != 22
2653  && TMath::Abs(motherpdg11) != 111)
2654  || (TMath::Abs(motherpdg21) != 22
2655  && TMath::Abs(motherpdg21) != 111)) {
2656  fhPhotons_invmass_MCcutAll_new[index]->Fill(7, invmass);
2657  }
2658  if (TMath::Abs(motherpdg11) != 22 && TMath::Abs(motherpdg11) != 111
2659  && TMath::Abs(motherpdg21) != 22
2660  && TMath::Abs(motherpdg21) != 111) {
2661  fhPhotons_invmass_MCcutAll_new[index]->Fill(8, invmass);
2662  }
2663  if (grandmotherId11 == grandmotherId21) {
2664  fhPhotons_invmass_MCcutAll_new[index]->Fill(9, invmass);
2665  }
2666  }
2667  if ((motherId11 == motherId12 && motherId21 != motherId22)
2668  || (motherId11 != motherId12 && motherId21 == motherId22)) {
2669  fhPhotons_invmass_MCcutAll_new[index]->Fill(10, invmass);
2670  }
2671  if (motherId11 != motherId12 && motherId21 != motherId22) {
2672  fhPhotons_invmass_MCcutAll_new[index]->Fill(11, invmass);
2673  if (sameGrandmothersSum == 12)
2674  fhPhotons_invmass_MCcutAll_new[index]->Fill(13, invmass);
2675  if (sameGrandmothersSum == 6)
2676  fhPhotons_invmass_MCcutAll_new[index]->Fill(14, invmass);
2677  if (sameGrandmothersSum == 4) {
2678  fhPhotons_invmass_MCcutAll_new[index]->Fill(15, invmass);
2679  if (grandmotherId11 < 0 || grandmotherId12 < 0
2680  || grandmotherId21 < 0 || grandmotherId22 < 0) {
2681  fhPhotons_invmass_MCcutAll_new[index]->Fill(16, invmass);
2682  }
2683  if (grandmotherId11 == grandmotherId12) {
2684  fhPhotons_invmass_MCcutAll_new[index]->Fill(17, invmass);
2685  }
2686  if (grandmotherId11 != grandmotherId12) {
2687  fhPhotons_invmass_MCcutAll_new[index]->Fill(18, invmass);
2688  }
2689  if ((motherId11 == motherId21 || motherId11 == motherId22)
2690  && (motherId12 == motherId21 || motherId11 == motherId22)) {
2691  fhPhotons_invmass_MCcutAll_new[index]->Fill(19, invmass);
2692  }
2693  }
2694  if (sameGrandmothersSum == 2)
2695  fhPhotons_invmass_MCcutAll_new[index]->Fill(20, invmass);
2696  if (sameGrandmothersSum == 0)
2697  fhPhotons_invmass_MCcutAll_new[index]->Fill(21, invmass);
2698  fhPhotons_peakCheck1[index]->Fill(sameGrandmothersSum);
2699  fhPhotons_peakCheck2[index]->Fill(sameMothersSum);
2700 
2701  cout << "CbmAnaConversionRecoFull: MC-Crosscheck: " << electron11
2702  << "/" << electron12 << "/" << electron21 << "/" << electron22
2703  << " - " << pdg11 << "/" << pdg12 << "/" << pdg21 << "/"
2704  << pdg22 << " - " << motherId11 << "/" << motherId12 << "/"
2705  << motherId21 << "/" << motherId22 << " - " << motherpdg11
2706  << "/" << motherpdg12 << "/" << motherpdg21 << "/"
2707  << motherpdg22 << endl;
2708  cout << "CbmAnaConversionRecoFull: MC-Crosscheck: "
2709  << grandmotherId11 << "/" << grandmotherId12 << "/"
2710  << grandmotherId21 << "/" << grandmotherId22 << endl;
2711  }
2712 
2713 
2714  // ################################################
2715  if (index == 4 && TMath::Abs(pdg11) == 11 && TMath::Abs(pdg12) == 11
2716  && TMath::Abs(pdg21) == 11 && TMath::Abs(pdg22) == 11) {
2717  fhPhotons_invmass_MCcutTest2_new[index]->Fill(invmass);
2718  }
2719  if (index == 4 && (pdg11 + pdg12 + pdg21 + pdg22) == 0) {
2720  fhPhotons_invmass_MCcutTest3_new[index]->Fill(invmass);
2721  }
2722 
2723  if (index == 4 && invmass < 0.1) {
2724  fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg11));
2725  fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg21));
2726  fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg12));
2727  fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg22));
2728  }
2729 
2730 
2731  TVector3 startvertex11;
2732  mctrack11->GetStartVertex(startvertex11);
2733  TVector3 startvertex12;
2734  mctrack12->GetStartVertex(startvertex12);
2735  TVector3 startvertex21;
2736  mctrack21->GetStartVertex(startvertex21);
2737  TVector3 startvertex22;
2738  mctrack22->GetStartVertex(startvertex22);
2739 
2740  //fhPhotons_MC_startvertexZ->Fill(startvertex11.Z());
2741  //fhPhotons_MC_startvertexZ->Fill(startvertex12.Z());
2742  //fhPhotons_MC_startvertexZ->Fill(startvertex21.Z());
2743  //fhPhotons_MC_startvertexZ->Fill(startvertex22.Z());
2744 
2745  fhPhotons_stats[index]->Fill(0); // all combinations
2746 
2747  if (motherId11 == motherId12 && motherId21 == motherId22) {
2748  fhPhotons_invmass_MCcut1_new[index]->Fill(invmass);
2749  fhPhotons_stats[index]->Fill(1);
2750  if (motherId11 != -1 && motherId21 != -1) {
2751  CbmMCTrack* mothermctrack11n =
2752  (CbmMCTrack*) fMcTracks->At(motherId11);
2753  CbmMCTrack* mothermctrack21n =
2754  (CbmMCTrack*) fMcTracks->At(motherId21);
2755 
2756  Int_t grandmotherId11n = mothermctrack11n->GetMotherId();
2757  Int_t grandmotherId21n = mothermctrack21n->GetMotherId();
2758 
2759  if (grandmotherId11n == grandmotherId21n) {
2760  fhPhotons_invmass_MCcut2_new[index]->Fill(invmass);
2761  fhPhotons_stats[index]->Fill(2);
2762  if (grandmotherId11n == -1) continue;
2763  CbmMCTrack* pi0mctrack11 =
2764  (CbmMCTrack*) fMcTracks->At(grandmotherId11n);
2765  if (pi0mctrack11->GetMotherId() == -1) {
2766  //fhPhotons_MC_motherIdCut->Fill(invmass);
2767  }
2768  }
2769  if (grandmotherId11n != grandmotherId21n) {
2770  fhPhotons_invmass_MCcut3_new[index]->Fill(invmass);
2771  fhPhotons_stats[index]->Fill(3);
2772  }
2773  }
2774  }
2775 
2776  if (motherId11 != motherId12 || motherId21 != motherId22) {
2777  fhPhotons_invmass_MCcut4_new[index]->Fill(invmass);
2778  fhPhotons_stats[index]->Fill(4);
2779  }
2780  if ((motherId11 != motherId12 && motherId21 == motherId22)
2781  || (motherId11 == motherId12 && motherId21 != motherId22)) {
2782  fhPhotons_invmass_MCcut5_new[index]->Fill(invmass);
2783  fhPhotons_stats[index]->Fill(5);
2784  }
2785  if (motherId11 != motherId12 && motherId21 != motherId22) {
2786  fhPhotons_invmass_MCcut6_new[index]->Fill(invmass);
2787  fhPhotons_stats[index]->Fill(6);
2788  if (TMath::Abs(pdg11) != 11 || TMath::Abs(pdg12) != 11
2789  || TMath::Abs(pdg21) != 11 || TMath::Abs(pdg22) != 11) {
2790  fhPhotons_invmass_MCcut7_new[index]->Fill(invmass);
2791  }
2792  }
2793 
2794 
2795  /*
2796  if(motherId11 != -1 && motherId12 != -1 && motherId21 != -1 && motherId22 != -1) {
2797  CbmMCTrack* mothermctrack11 = (CbmMCTrack*)fMcTracks->At(motherId11);
2798  CbmMCTrack* mothermctrack12 = (CbmMCTrack*)fMcTracks->At(motherId12);
2799  CbmMCTrack* mothermctrack21 = (CbmMCTrack*)fMcTracks->At(motherId21);
2800  CbmMCTrack* mothermctrack22 = (CbmMCTrack*)fMcTracks->At(motherId22);
2801 
2802  fhPhotons_MC_motherpdg->Fill(mothermctrack11->GetPdgCode());
2803  fhPhotons_MC_motherpdg->Fill(mothermctrack12->GetPdgCode());
2804  fhPhotons_MC_motherpdg->Fill(mothermctrack21->GetPdgCode());
2805  fhPhotons_MC_motherpdg->Fill(mothermctrack22->GetPdgCode());
2806  }
2807 
2808 
2809 
2810  TLorentzVector lorVecE11c;
2811  TLorentzVector lorVecE12c;
2812  TLorentzVector lorVecE21c;
2813  TLorentzVector lorVecE22c;
2814 
2815  mctrack11->Get4Momentum(lorVecE11c);
2816  mctrack12->Get4Momentum(lorVecE12c);
2817  mctrack21->Get4Momentum(lorVecE21c);
2818  mctrack22->Get4Momentum(lorVecE22c);
2819 
2820  TLorentzVector g1c = lorVecE11c + lorVecE12c;
2821  TLorentzVector g2c = lorVecE21c + lorVecE22c;
2822  TLorentzVector pic = lorVecE11c + lorVecE12c + lorVecE21c + lorVecE22c;
2823 
2824  g1c.Boost(-pic.BoostVector() );
2825  g2c.Boost(-pic.BoostVector() );
2826 
2827  Double_t boostAnglec = g1c.Angle(g2c.Vect());
2828  Double_t thetac = 180.*boostAnglec/TMath::Pi();
2829  fhPhotons_boostAngleMC->Fill(thetac);
2830 
2831 
2832  */
2833  }
2834  }
2835  }
2836  }
2837  fhPi0_nofPerEvent_new[index]->Fill(nofPi0);
2838 }
2839 
2840 
2841 Double_t
2843  vector<int> photon1,
2844  vector<int> photon2) {
2845  Double_t energy1 = TMath::Sqrt(momenta[photon1[0]].Mag2() + M2E);
2846  TLorentzVector lorVec1(momenta[photon1[0]], energy1);
2847 
2848  Double_t energy2 = TMath::Sqrt(momenta[photon1[1]].Mag2() + M2E);
2849  TLorentzVector lorVec2(momenta[photon1[1]], energy2);
2850 
2851  Double_t energy3 = TMath::Sqrt(momenta[photon2[0]].Mag2() + M2E);
2852  TLorentzVector lorVec3(momenta[photon2[0]], energy3);
2853 
2854  Double_t energy4 = TMath::Sqrt(momenta[photon2[1]].Mag2() + M2E);
2855  TLorentzVector lorVec4(momenta[photon2[1]], energy4);
2856 
2857  TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
2858  TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
2859 
2860  Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
2861  Double_t theta = 180. * angleBetweenPhotons / TMath::Pi();
2862 
2863  return theta;
2864 }
2865 
2866 
2867 Double_t
2869  vector<int> photon2) {
2870  Double_t energy1 = TMath::Sqrt(fElectrons_momenta[photon1[0]].Mag2() + M2E);
2871  TLorentzVector lorVec1(fElectrons_momenta[photon1[0]], energy1);
2872 
2873  Double_t energy2 = TMath::Sqrt(fElectrons_momenta[photon1[1]].Mag2() + M2E);
2874  TLorentzVector lorVec2(fElectrons_momenta[photon1[1]], energy2);
2875 
2876  Double_t energy3 = TMath::Sqrt(fElectrons_momenta[photon2[0]].Mag2() + M2E);
2877  TLorentzVector lorVec3(fElectrons_momenta[photon2[0]], energy3);
2878 
2879  Double_t energy4 = TMath::Sqrt(fElectrons_momenta[photon2[1]].Mag2() + M2E);
2880  TLorentzVector lorVec4(fElectrons_momenta[photon2[1]], energy4);
2881 
2882  TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
2883  TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
2884 
2885  Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
2886  Double_t theta = 180. * angleBetweenPhotons / TMath::Pi();
2887 
2888  return theta;
2889 }
2890 
2891 
2892 /*
2893 void CbmAnaConversionRecoFull::CombineElectronsRefit()
2894 {
2895  Int_t nof = fElectrons_momenta_refit.size();
2896  cout << "CbmAnaConversionRecoFull: CombineElectronsRefit, nof - " << nof << endl;
2897  if(nof >= 2) {
2898  for(int a=0; a<nof-1; a++) {
2899  for(int b=a+1; b<nof; b++) {
2900  Int_t check1 = (fElectrons_track_refit[a]->GetParamLast()->GetQp() > 0); // positive or negative charge (qp = charge over momentum ratio)
2901  Int_t check2 = (fElectrons_track_refit[b]->GetParamLast()->GetQp() > 0);
2902  Int_t test = check1 + check2;
2903  if(test != 1) continue; // need one electron and one positron
2904  //if(fElectrons_momentaChi[a] > 10 || fElectrons_momentaChi[b] > 10) continue;
2905 
2906  CbmLmvmKinematicParams params1 = CalculateKinematicParamsReco(fElectrons_momenta_refit[a], fElectrons_momenta_refit[b]);
2907 
2908  Double_t openingAngleCut = 1;
2909  Double_t invMassCut = 0.03;
2910 
2911  Int_t IsPhoton_openingAngle1 = (params1.fAngle < openingAngleCut);
2912  Int_t IsPhoton_invMass1 = (params1.fMinv < invMassCut);
2913 
2914  if(IsPhoton_openingAngle1 && IsPhoton_invMass1) {
2915  vector<int> pair; // = {a, b};
2916  pair.push_back(a);
2917  pair.push_back(b);
2918  fVector_photons_pairs_refit.push_back(pair);
2919  }
2920  }
2921  }
2922  }
2923 }
2924 
2925 
2926 
2927 
2928 void CbmAnaConversionRecoFull::CombinePhotonsRefit()
2929 {
2930  Int_t nof = fVector_photons_pairs_refit.size();
2931  cout << "CbmAnaConversionRecoFull: CombinePhotonsRefit, nof - " << nof << endl;
2932  if(nof >= 2) {
2933  for(int a=0; a<nof-1; a++) {
2934  for(int b=a+1; b<nof; b++) {
2935  Int_t electron11 = fVector_photons_pairs_refit[a][0];
2936  Int_t electron12 = fVector_photons_pairs_refit[a][1];
2937  Int_t electron21 = fVector_photons_pairs_refit[b][0];
2938  Int_t electron22 = fVector_photons_pairs_refit[b][1];
2939 
2940  Double_t invmass = Invmass_4particlesRECO(fElectrons_momenta_refit[electron11], fElectrons_momenta_refit[electron12], fElectrons_momenta_refit[electron21], fElectrons_momenta_refit[electron22]);
2941  fhPhotons_invmass_refit->Fill(invmass);
2942 
2943  Double_t opening_angle = OpeningAngleBetweenPhotonsRefit(fVector_photons_pairs_refit[a], fVector_photons_pairs_refit[b]);
2944  //fhPhotons_angleBetween->Fill(opening_angle);
2945 
2946  if(opening_angle < 8) {
2947  fhPhotons_invmass_refit_cut->Fill(invmass);
2948 
2949  //Double_t chicut = 1.0;
2950  //if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2951  // fhPhotons_invmass_cut_chi1->Fill(invmass);
2952  //}
2953  }
2954  }
2955  }
2956  }
2957 }
2958 
2959 
2960 
2961 
2962 Double_t CbmAnaConversionRecoFull::OpeningAngleBetweenPhotonsRefit(vector<int> photon1, vector<int> photon2)
2963 {
2964  Double_t energy1 = TMath::Sqrt(fElectrons_momenta_refit[photon1[0]].Mag2() + M2E);
2965  TLorentzVector lorVec1(fElectrons_momenta_refit[photon1[0]], energy1);
2966 
2967  Double_t energy2 = TMath::Sqrt(fElectrons_momenta_refit[photon1[1]].Mag2() + M2E);
2968  TLorentzVector lorVec2(fElectrons_momenta_refit[photon1[1]], energy2);
2969 
2970  Double_t energy3 = TMath::Sqrt(fElectrons_momenta_refit[photon2[0]].Mag2() + M2E);
2971  TLorentzVector lorVec3(fElectrons_momenta_refit[photon2[0]], energy3);
2972 
2973  Double_t energy4 = TMath::Sqrt(fElectrons_momenta_refit[photon2[1]].Mag2() + M2E);
2974  TLorentzVector lorVec4(fElectrons_momenta_refit[photon2[1]], energy4);
2975 
2976  TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
2977  TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
2978 
2979  Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
2980  Double_t theta = 180.*angleBetweenPhotons/TMath::Pi();
2981 
2982  return theta;
2983 }
2984 
2985 
2986 
2987 void CbmAnaConversionRecoFull::CombinePhotonsDirection()
2988 {
2989  Int_t nof = fVector_photons_pairs_direction.size();
2990  cout << "CbmAnaConversionRecoFull: CombinePhotonsDirection, nof - " << nof << endl;
2991  if(nof >= 2) {
2992  for(int a=0; a<nof-1; a++) {
2993  for(int b=a+1; b<nof; b++) {
2994  Int_t electron11 = fVector_photons_pairs_direction[a][0];
2995  Int_t electron12 = fVector_photons_pairs_direction[a][1];
2996  Int_t electron21 = fVector_photons_pairs_direction[b][0];
2997  Int_t electron22 = fVector_photons_pairs_direction[b][1];
2998 
2999  Double_t invmass = Invmass_4particlesRECO(fElectrons_momenta[electron11], fElectrons_momenta[electron12], fElectrons_momenta[electron21], fElectrons_momenta[electron22]);
3000  fhPhotons_invmass_direction->Fill(invmass);
3001 
3002  Double_t opening_angle = OpeningAngleBetweenPhotonsRefit(fVector_photons_pairs_direction[a], fVector_photons_pairs_direction[b]);
3003  //fhPhotons_angleBetween->Fill(opening_angle);
3004 
3005  if(opening_angle < 8) {
3006  fhPhotons_invmass_direction_cut->Fill(invmass);
3007 
3008  //Double_t chicut = 1.0;
3009  //if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
3010  // fhPhotons_invmass_cut_chi1->Fill(invmass);
3011  //}
3012  }
3013  }
3014  }
3015  }
3016 }
3017 */
3018 
3019 
3020 /*
3021 void CbmAnaConversionRecoFull::CombineElectrons()
3022 {
3023  Int_t nof = fElectrons_momenta.size();
3024  if(nof >= 4) {
3025  for(int a=0; a<nof-3; a++) {
3026  for(int b=a; b<nof-2; b++) {
3027  for(int c=b; c<nof-1; c++) {
3028  for(int d=c; d<nof; d++) {
3029  Int_t check1 = (fElectrons_track[a]->GetParamLast()->GetQp() > 0); // positive or negative charge (qp = charge over momentum ratio)
3030  Int_t check2 = (fElectrons_track[b]->GetParamLast()->GetQp() > 0);
3031  Int_t check3 = (fElectrons_track[c]->GetParamLast()->GetQp() > 0);
3032  Int_t check4 = (fElectrons_track[d]->GetParamLast()->GetQp() > 0);
3033  Int_t test = check1 + check2 + check3 + check4;
3034  if(test != 2) continue; // need two electrons and two positrons
3035 
3036 
3037  Double_t invmass = Invmass_4particlesRECO(fElectrons_momenta[a], fElectrons_momenta[b], fElectrons_momenta[c], fElectrons_momenta[d]);
3038  fhElectrons_invmass->Fill(invmass);
3039 
3040 
3041  CbmLmvmKinematicParams params1 = CalculateKinematicParamsReco(fElectrons_momenta[a], fElectrons_momenta[b]);
3042  CbmLmvmKinematicParams params2 = CalculateKinematicParamsReco(fElectrons_momenta[a], fElectrons_momenta[c]);
3043  CbmLmvmKinematicParams params3 = CalculateKinematicParamsReco(fElectrons_momenta[a], fElectrons_momenta[d]);
3044  CbmLmvmKinematicParams params4 = CalculateKinematicParamsReco(fElectrons_momenta[b], fElectrons_momenta[c]);
3045  CbmLmvmKinematicParams params5 = CalculateKinematicParamsReco(fElectrons_momenta[b], fElectrons_momenta[d]);
3046  CbmLmvmKinematicParams params6 = CalculateKinematicParamsReco(fElectrons_momenta[c], fElectrons_momenta[d]);
3047 
3048  Double_t openingAngleCut = 1;
3049  Int_t IsPhoton_openingAngle1 = (params1.fAngle < openingAngleCut);
3050  Int_t IsPhoton_openingAngle2 = (params2.fAngle < openingAngleCut);
3051  Int_t IsPhoton_openingAngle3 = (params3.fAngle < openingAngleCut);
3052  Int_t IsPhoton_openingAngle4 = (params4.fAngle < openingAngleCut);
3053  Int_t IsPhoton_openingAngle5 = (params5.fAngle < openingAngleCut);
3054  Int_t IsPhoton_openingAngle6 = (params6.fAngle < openingAngleCut);
3055 
3056  Double_t invMassCut = 0.03;
3057  Int_t IsPhoton_invMass1 = (params1.fMinv < invMassCut);
3058  Int_t IsPhoton_invMass2 = (params2.fMinv < invMassCut);
3059  Int_t IsPhoton_invMass3 = (params3.fMinv < invMassCut);
3060  Int_t IsPhoton_invMass4 = (params4.fMinv < invMassCut);
3061  Int_t IsPhoton_invMass5 = (params5.fMinv < invMassCut);
3062  Int_t IsPhoton_invMass6 = (params6.fMinv < invMassCut);
3063 
3064  if(IsPhoton_openingAngle1 && IsPhoton_openingAngle6 && IsPhoton_invMass1 && IsPhoton_invMass6 && (check1 + check2 == 1) && (check3 + check4 == 1)) {
3065  fhElectrons_invmass_cut->Fill(invmass);
3066  }
3067  if(IsPhoton_openingAngle2 && IsPhoton_openingAngle5 && IsPhoton_invMass2 && IsPhoton_invMass5 && (check1 + check3 == 1) && (check2 + check4 == 1)) {
3068  fhElectrons_invmass_cut->Fill(invmass);
3069  }
3070  if(IsPhoton_openingAngle3 && IsPhoton_openingAngle4 && IsPhoton_invMass3 && IsPhoton_invMass4 && (check1 + check4 == 1) && (check2 + check3 == 1)) {
3071  fhElectrons_invmass_cut->Fill(invmass);
3072  }
3073  }
3074  }
3075  }
3076  }
3077  }
3078 }
3079 */
3080 
3081 
3083  Int_t nof = fElectrons_momenta.size();
3084  cout << "CbmAnaConversionRecoFull: CombineElectrons, nof - " << nof << endl;
3085  Int_t nofPhotons = 0;
3086  if (nof >= 2) {
3087  for (int a = 0; a < nof - 1; a++) {
3088  for (int b = a + 1; b < nof; b++) {
3089  Int_t check1 =
3090  (fElectrons_track[a]->GetParamLast()->GetQp()
3091  > 0); // positive or negative charge (qp = charge over momentum ratio)
3092  Int_t check2 = (fElectrons_track[b]->GetParamLast()->GetQp() > 0);
3093  Int_t test = check1 + check2;
3094  if (test != 1) continue; // need one electron and one positron
3095  //if(fElectrons_momentaChi[a] > 10 || fElectrons_momentaChi[b] > 10) continue;
3096 
3099 
3100  // standard fixed opening angle cut
3101  //Double_t openingAngleCut = 1;
3102 
3103  // opening angle cut depending on pt of e+e- pair
3104  Double_t openingAngleCut = 1.8 - 0.6 * params1.fPt;
3105  //Double_t openingAngleCut = 1.5 - 0.5 * params1.fPt;
3106  //Double_t openingAngleCut = 1.2;
3107 
3108  Double_t invMassCut = 0.03;
3109 
3110  Int_t IsPhoton_openingAngle1 = (params1.fAngle < openingAngleCut);
3111  Int_t IsPhoton_invMass1 = (params1.fMinv < invMassCut);
3112 
3113  Double_t tXa = fElectrons_track[a]->GetParamLast()->GetTx();
3114  Double_t tYa = fElectrons_track[a]->GetParamLast()->GetTy();
3115  Double_t tXb = fElectrons_track[b]->GetParamLast()->GetTx();
3116  Double_t tYb = fElectrons_track[b]->GetParamLast()->GetTy();
3117 
3118  fhElectrons_invmass->Fill(params1.fMinv);
3119 
3120  if (IsPhoton_openingAngle1 && IsPhoton_invMass1) {
3121  nofPhotons++;
3122  vector<int> pair; // = {a, b};
3123  pair.push_back(a);
3124  pair.push_back(b);
3125  fVector_photons_pairs.push_back(pair);
3126  fhElectrons_invmass_cut->Fill(params1.fMinv);
3127  //fVector_photons_momenta.push_back(params1.momPair);
3128 
3129  fhPhotons_tX->Fill(tXa);
3130  fhPhotons_tX->Fill(tXb);
3131  fhPhotons_tY->Fill(tYa);
3132  fhPhotons_tY->Fill(tYb);
3133 
3134  TVector3 momentumE1f;
3135  TVector3 momentumE2f;
3136  fElectrons_track[a]->GetParamFirst()->Momentum(momentumE1f);
3137  fElectrons_track[b]->GetParamFirst()->Momentum(momentumE2f);
3138  TVector3 momentumE1l;
3139  TVector3 momentumE2l;
3140  fElectrons_track[a]->GetParamLast()->Momentum(momentumE1l);
3141  fElectrons_track[b]->GetParamLast()->Momentum(momentumE2l);
3142 
3143  //Double_t energyE1 = TMath::Sqrt(momentumE1.Mag2() + M2E);
3144  //TLorentzVector lorVecE1(momentumE1, energyE1);
3145  //Double_t energyE2 = TMath::Sqrt(momentumE2.Mag2() + M2E);
3146  //TLorentzVector lorVecE2(momentumE2, energyE2);
3147  //TLorentzVector g = lorVecE1 + lorVecE2;
3148 
3149  //lorVecE1.Boost(g.BoostVector() );
3150  //lorVecE2.Boost(g.BoostVector() );
3151 
3152  TVector3 normal1 = momentumE1f.Cross(momentumE1l);
3153  TVector3 normal2 = momentumE2f.Cross(momentumE2l);
3154  Double_t normalAngle = normal1.Angle(normal2);
3155  Double_t theta = 180. * normalAngle / TMath::Pi();
3156 
3157  //Double_t boostAngle = lorVecE1.Angle(lorVecE2.Vect());
3158 
3159  //fhPhotons_boostAngle->Fill(normalAngle);
3160 
3161 
3162  //if( TMath::Abs(tXa - tXb) < 0.5 || TMath::Abs(tYa - tYb) < 0.5 ) {
3163  if (theta < 30) { fVector_photons_pairs_direction.push_back(pair); }
3164  }
3165  }
3166  }
3167  }
3168  fhPhotons_nofPerEvent->Fill(nofPhotons);
3169 }
3170 
3171 
3173  Int_t nof = fVector_photons_pairs.size();
3174  cout << "CbmAnaConversionRecoFull: CombinePhotons, nof - " << nof << endl;
3175  if (nof >= 2) {
3176  for (int a = 0; a < nof - 1; a++) {
3177  for (int b = a + 1; b < nof; b++) {
3178  Int_t electron11 = fVector_photons_pairs[a][0];
3179  Int_t electron12 = fVector_photons_pairs[a][1];
3180  Int_t electron21 = fVector_photons_pairs[b][0];
3181  Int_t electron22 = fVector_photons_pairs[b][1];
3182 
3183 
3184  if (electron11 == electron12 || electron11 == electron21
3185  || electron11 == electron22 || electron12 == electron21
3186  || electron12 == electron22 || electron21 == electron22) {
3187  cout << "CbmAnaConversionRecoFull: "
3188  "RecoFull_CombinePhotons()_DoubleIndex!"
3189  << endl;
3190  continue;
3191  }
3192 
3193  Double_t invmass =
3195  fElectrons_momenta[electron12],
3196  fElectrons_momenta[electron21],
3197  fElectrons_momenta[electron22]);
3198  fhPhotons_invmass->Fill(invmass);
3199 
3200  Double_t pt = Pt_4particlesRECO(fElectrons_momenta[electron11],
3201  fElectrons_momenta[electron12],
3202  fElectrons_momenta[electron21],
3203  fElectrons_momenta[electron22]);
3204  Double_t rap = Rap_4particlesRECO(fElectrons_momenta[electron11],
3205  fElectrons_momenta[electron12],
3206  fElectrons_momenta[electron21],
3207  fElectrons_momenta[electron22]);
3208 
3209  Double_t opening_angle = OpeningAngleBetweenPhotons2(
3211  fhPhotons_angleBetween->Fill(opening_angle);
3212 
3213 
3214  CbmLmvmKinematicParams params1 =
3216  fElectrons_momenta[electron12],
3217  fElectrons_momenta[electron21],
3218  fElectrons_momenta[electron22]);
3219 
3220 
3221  //TVector3 momentumE1;
3222  //TVector3 momentumE2;
3223  //fElectrons_track[a]->GetParamLast()->Momentum(momentumE1);
3224  //fElectrons_track[b]->GetParamLast()->Momentum(momentumE2);
3225 
3226  Double_t energyE11 =
3227  TMath::Sqrt(fElectrons_momenta[electron11].Mag2() + M2E);
3228  TLorentzVector lorVecE11(fElectrons_momenta[electron11], energyE11);
3229  Double_t energyE12 =
3230  TMath::Sqrt(fElectrons_momenta[electron12].Mag2() + M2E);
3231  TLorentzVector lorVecE12(fElectrons_momenta[electron12], energyE12);
3232  Double_t energyE21 =
3233  TMath::Sqrt(fElectrons_momenta[electron21].Mag2() + M2E);
3234  TLorentzVector lorVecE21(fElectrons_momenta[electron21], energyE21);
3235  Double_t energyE22 =
3236  TMath::Sqrt(fElectrons_momenta[electron22].Mag2() + M2E);
3237  TLorentzVector lorVecE22(fElectrons_momenta[electron22], energyE22);
3238  TLorentzVector g1 = lorVecE11 + lorVecE12;
3239  TLorentzVector g2 = lorVecE21 + lorVecE22;
3240  TLorentzVector pi = lorVecE11 + lorVecE12 + lorVecE21 + lorVecE22;
3241 
3242  g1.Boost(-pi.BoostVector());
3243  g2.Boost(-pi.BoostVector());
3244 
3245  Double_t boostAngle = g1.Angle(g2.Vect());
3246  Double_t theta = 180. * boostAngle / TMath::Pi();
3247 
3248  fhPhotons_boostAngleTest->Fill(boostAngle);
3249 
3250  //if(opening_angle < 10) {
3251  if (true) {
3252  fhPhotons_boostAngle->Fill(theta);
3253 
3254  fhPhotons_invmass_cut->Fill(invmass);
3255  fhPhotons_invmass_vs_pt->Fill(invmass, pt);
3256  fhPhotons_rapidity_vs_pt->Fill(pt, rap);
3257  fhPhotons_invmass_vs_openingAngle->Fill(invmass, opening_angle);
3258  fhPhotons_openingAngle_vs_momentum->Fill(opening_angle,
3259  params1.fMomentumMag);
3260 
3261  fhMomentumFits_pi0reco->Fill(fElectrons_momentaChi[electron11]);
3262  fhMomentumFits_pi0reco->Fill(fElectrons_momentaChi[electron12]);
3263  fhMomentumFits_pi0reco->Fill(fElectrons_momentaChi[electron21]);
3264  fhMomentumFits_pi0reco->Fill(fElectrons_momentaChi[electron22]);
3265 
3266  fhPhotons_invmass_vs_chi->Fill(invmass,
3267  fElectrons_momentaChi[electron11]);
3268  fhPhotons_invmass_vs_chi->Fill(invmass,
3269  fElectrons_momentaChi[electron12]);
3270  fhPhotons_invmass_vs_chi->Fill(invmass,
3271  fElectrons_momentaChi[electron21]);
3272  fhPhotons_invmass_vs_chi->Fill(invmass,
3273  fElectrons_momentaChi[electron22]);
3274 
3275  if (pt <= 1) fhPhotons_invmass_cut_ptBin1->Fill(invmass);
3276  if (pt > 1 && pt <= 2) fhPhotons_invmass_cut_ptBin2->Fill(invmass);
3277  if (pt > 2 && pt <= 3) fhPhotons_invmass_cut_ptBin3->Fill(invmass);
3278  if (pt > 3 && pt <= 4) fhPhotons_invmass_cut_ptBin4->Fill(invmass);
3279 
3280  Double_t chicut = 1.0;
3281  if (fElectrons_momentaChi[electron11] < chicut
3282  && fElectrons_momentaChi[electron12] < chicut
3283  && fElectrons_momentaChi[electron21] < chicut
3284  && fElectrons_momentaChi[electron22] < chicut) {
3285  fhPhotons_invmass_cut_chi1->Fill(invmass);
3286  }
3287  chicut = 3.0;
3288  if (fElectrons_momentaChi[electron11] < chicut
3289  && fElectrons_momentaChi[electron12] < chicut
3290  && fElectrons_momentaChi[electron21] < chicut
3291  && fElectrons_momentaChi[electron22] < chicut) {
3292  fhPhotons_invmass_cut_chi3->Fill(invmass);
3293  }
3294  chicut = 5.0;
3295  if (fElectrons_momentaChi[electron11] < chicut
3296  && fElectrons_momentaChi[electron12] < chicut
3297  && fElectrons_momentaChi[electron21] < chicut
3298  && fElectrons_momentaChi[electron22] < chicut) {
3299  fhPhotons_invmass_cut_chi5->Fill(invmass);
3300  }
3301  chicut = 10.0;
3302  if (fElectrons_momentaChi[electron11] < chicut
3303  && fElectrons_momentaChi[electron12] < chicut
3304  && fElectrons_momentaChi[electron21] < chicut
3305  && fElectrons_momentaChi[electron22] < chicut) {
3306  fhPhotons_invmass_cut_chi10->Fill(invmass);
3307  }
3308  chicut = 25.0;
3309  if (fElectrons_momentaChi[electron11] < chicut
3310  && fElectrons_momentaChi[electron12] < chicut
3311  && fElectrons_momentaChi[electron21] < chicut
3312  && fElectrons_momentaChi[electron22] < chicut) {
3313  fhPhotons_invmass_cut_chi25->Fill(invmass);
3314  }
3315  chicut = 40.0;
3316  if (fElectrons_momentaChi[electron11] < chicut
3317  && fElectrons_momentaChi[electron12] < chicut
3318  && fElectrons_momentaChi[electron21] < chicut
3319  && fElectrons_momentaChi[electron22] < chicut) {
3320  fhPhotons_invmass_cut_chi40->Fill(invmass);
3321  }
3322  chicut = 65.0;
3323  if (fElectrons_momentaChi[electron11] < chicut
3324  && fElectrons_momentaChi[electron12] < chicut
3325  && fElectrons_momentaChi[electron21] < chicut
3326  && fElectrons_momentaChi[electron22] < chicut) {
3327  fhPhotons_invmass_cut_chi65->Fill(invmass);
3328  }
3329  chicut = 80.0;
3330  if (fElectrons_momentaChi[electron11] < chicut
3331  && fElectrons_momentaChi[electron12] < chicut
3332  && fElectrons_momentaChi[electron21] < chicut
3333  && fElectrons_momentaChi[electron22] < chicut) {
3334  fhPhotons_invmass_cut_chi80->Fill(invmass);
3335  }
3336 
3337 
3338  if (fElectrons_mctrackID[electron11] == 0
3339  || fElectrons_mctrackID[electron12] == 0
3340  || fElectrons_mctrackID[electron21] == 0
3341  || fElectrons_mctrackID[electron22] == 0)
3342  continue;
3343  // CROSSCHECK WITH MC-TRUE DATA!
3344  CbmMCTrack* mctrack11 =
3345  (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron11]);
3346  CbmMCTrack* mctrack12 =
3347  (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron12]);
3348  CbmMCTrack* mctrack21 =
3349  (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron21]);
3350  CbmMCTrack* mctrack22 =
3351  (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron22]);
3352 
3353  Int_t motherId11 = mctrack11->GetMotherId();
3354  Int_t motherId12 = mctrack12->GetMotherId();
3355  Int_t motherId21 = mctrack21->GetMotherId();
3356  Int_t motherId22 = mctrack22->GetMotherId();
3357 
3358  TVector3 startvertex11;
3359  mctrack11->GetStartVertex(startvertex11);
3360  TVector3 startvertex12;
3361  mctrack12->GetStartVertex(startvertex12);
3362  TVector3 startvertex21;
3363  mctrack21->GetStartVertex(startvertex21);
3364  TVector3 startvertex22;
3365  mctrack22->GetStartVertex(startvertex22);
3366 
3367  fhPhotons_MC_startvertexZ->Fill(startvertex11.Z());
3368  fhPhotons_MC_startvertexZ->Fill(startvertex12.Z());
3369  fhPhotons_MC_startvertexZ->Fill(startvertex21.Z());
3370  fhPhotons_MC_startvertexZ->Fill(startvertex22.Z());
3371 
3372  if (motherId11 == motherId12 && motherId21 == motherId22) {
3373  fhPhotons_MC_invmass1->Fill(invmass);
3374  if (motherId11 != -1 && motherId21 != -1) {
3375  CbmMCTrack* mothermctrack11 =
3376  (CbmMCTrack*) fMcTracks->At(motherId11);
3377  CbmMCTrack* mothermctrack21 =
3378  (CbmMCTrack*) fMcTracks->At(motherId21);
3379 
3380  Int_t grandmotherId11 = mothermctrack11->GetMotherId();
3381  Int_t grandmotherId21 = mothermctrack21->GetMotherId();
3382 
3383  if (grandmotherId11 == grandmotherId21) {
3384  fhPhotons_MC_invmass2->Fill(invmass);
3385  if (grandmotherId11 == -1) continue;
3386  CbmMCTrack* pi0mctrack11 =
3387  (CbmMCTrack*) fMcTracks->At(grandmotherId11);
3388  if (pi0mctrack11->GetMotherId() == -1) {
3389  fhPhotons_MC_motherIdCut->Fill(invmass);
3390  }
3391  }
3392  if (grandmotherId11 != grandmotherId21) {
3393  fhPhotons_MC_invmass3->Fill(invmass);
3394  }
3395  }
3396  }
3397 
3398  if (motherId11 != motherId12 || motherId21 != motherId22) {
3399  fhPhotons_MC_invmass4->Fill(invmass);
3400  }
3401 
3402 
3403  if (motherId11 != -1 && motherId12 != -1 && motherId21 != -1
3404  && motherId22 != -1) {
3405  CbmMCTrack* mothermctrack11 =
3406  (CbmMCTrack*) fMcTracks->At(motherId11);
3407  CbmMCTrack* mothermctrack12 =
3408  (CbmMCTrack*) fMcTracks->At(motherId12);
3409  CbmMCTrack* mothermctrack21 =
3410  (CbmMCTrack*) fMcTracks->At(motherId21);
3411  CbmMCTrack* mothermctrack22 =
3412  (CbmMCTrack*) fMcTracks->At(motherId22);
3413 
3414  fhPhotons_MC_motherpdg->Fill(mothermctrack11->GetPdgCode());
3415  fhPhotons_MC_motherpdg->Fill(mothermctrack12->GetPdgCode());
3416  fhPhotons_MC_motherpdg->Fill(mothermctrack21->GetPdgCode());
3417  fhPhotons_MC_motherpdg->Fill(mothermctrack22->GetPdgCode());
3418  }
3419 
3420 
3421  TLorentzVector lorVecE11c;
3422  TLorentzVector lorVecE12c;
3423  TLorentzVector lorVecE21c;
3424  TLorentzVector lorVecE22c;
3425 
3426  mctrack11->Get4Momentum(lorVecE11c);
3427  mctrack12->Get4Momentum(lorVecE12c);
3428  mctrack21->Get4Momentum(lorVecE21c);
3429  mctrack22->Get4Momentum(lorVecE22c);
3430 
3431  TLorentzVector g1c = lorVecE11c + lorVecE12c;
3432  TLorentzVector g2c = lorVecE21c + lorVecE22c;
3433  TLorentzVector pic =
3434  lorVecE11c + lorVecE12c + lorVecE21c + lorVecE22c;
3435 
3436  g1c.Boost(-pic.BoostVector());
3437  g2c.Boost(-pic.BoostVector());
3438 
3439  Double_t boostAnglec = g1c.Angle(g2c.Vect());
3440  Double_t thetac = 180. * boostAnglec / TMath::Pi();
3441  fhPhotons_boostAngleMC->Fill(thetac);
3442  }
3443  }
3444  }
3445  }
3446 }
3447 
3448 
3450 // takes all first identified electrons from all events and combines them afterwards
3451 {
3452  for (int i = 1; i < 5; i++) {
3453  if (fMixedEventsElectrons[i].size() < 4) continue;
3454  for (UInt_t a = 0; a < fMixedEventsElectrons[i].size() - 3; a++) {
3455  for (UInt_t b = a + 1; b < fMixedEventsElectrons[i].size() - 2; b++) {
3456  for (UInt_t c = b + 1; c < fMixedEventsElectrons[i].size() - 1; c++) {
3457  for (UInt_t d = c + 1; d < fMixedEventsElectrons[i].size(); d++) {
3458  Int_t check1 =
3459  (fMixedEventsElectrons_gtrack[i][a]->GetParamLast()->GetQp() > 0);
3460  Int_t check2 =
3461  (fMixedEventsElectrons_gtrack[i][b]->GetParamLast()->GetQp() > 0);
3462  Int_t check3 =
3463  (fMixedEventsElectrons_gtrack[i][c]->GetParamLast()->GetQp() > 0);
3464  Int_t check4 =
3465  (fMixedEventsElectrons_gtrack[i][d]->GetParamLast()->GetQp() > 0);
3466 
3467  if (check1 + check2 + check3 + check4 != 2) continue;
3468 
3469  TVector3 e1 = fMixedEventsElectrons[i][a];
3470  TVector3 e2 = fMixedEventsElectrons[i][b];
3471  TVector3 e3 = fMixedEventsElectrons[i][c];
3472  TVector3 e4 = fMixedEventsElectrons[i][d];
3473 
3474 
3477  e1, e2);
3480  e1, e3);
3483  e1, e4);
3486  e2, e3);
3489  e2, e4);
3492  e3, e4);
3493 
3494 
3495  Int_t angleCheck12 =
3496  (params12.fAngle
3498  params12.fPt)
3499  && check1 + check2 == 1);
3500  Int_t angleCheck13 =
3501  (params13.fAngle
3503  params13.fPt)
3504  && check1 + check3 == 1);
3505  Int_t angleCheck14 =
3506  (params14.fAngle
3508  params14.fPt)
3509  && check1 + check4 == 1);
3510  Int_t angleCheck23 =
3511  (params23.fAngle
3513  params23.fPt)
3514  && check2 + check3 == 1);
3515  Int_t angleCheck24 =
3516  (params24.fAngle
3518  params24.fPt)
3519  && check2 + check4 == 1);
3520  Int_t angleCheck34 =
3521  (params34.fAngle
3523  params34.fPt)
3524  && check3 + check4 == 1);
3525 
3526  if (angleCheck12 && angleCheck34) {
3529  KinematicParams_4particles_Reco(e1, e2, e3, e4);
3530  fhMixedEventsTest_invmass[i]->Fill(params.fMinv);
3531  cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
3532  "filled!, part"
3533  << i << endl;
3534  }
3535  if (angleCheck13 && angleCheck24) {
3538  KinematicParams_4particles_Reco(e1, e2, e3, e4);
3539  fhMixedEventsTest_invmass[i]->Fill(params.fMinv);
3540  cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
3541  "filled!, part"
3542  << i << endl;
3543  }
3544  if (angleCheck14 && angleCheck23) {
3547  KinematicParams_4particles_Reco(e1, e2, e3, e4);
3548  fhMixedEventsTest_invmass[i]->Fill(params.fMinv);
3549  cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
3550  "filled!, part"
3551  << i << endl;
3552  }
3553  }
3554  }
3555  }
3556  }
3557  }
3558 }
3559 
3560 
3562 // takes all identified electron from the last 4 events
3563 {
3564  if (fMixedEventsElectrons_list1.size() == 0
3565  || fMixedEventsElectrons_list2.size() == 0
3566  || fMixedEventsElectrons_list3.size() == 0
3567  || fMixedEventsElectrons_list4.size() == 0)
3568  return;
3569  for (UInt_t a = 0; a < fMixedEventsElectrons_list1.size(); a++) {
3570  for (UInt_t b = 0; b < fMixedEventsElectrons_list2.size(); b++) {
3571  for (UInt_t c = 0; c < fMixedEventsElectrons_list3.size(); c++) {
3572  for (UInt_t d = 0; d < fMixedEventsElectrons_list4.size(); d++) {
3573  Int_t check1 =
3574  (fMixedEventsElectrons_list1_gtrack[a]->GetParamLast()->GetQp()
3575  > 0);
3576  Int_t check2 =
3577  (fMixedEventsElectrons_list2_gtrack[b]->GetParamLast()->GetQp()
3578  > 0);
3579  Int_t check3 =
3580  (fMixedEventsElectrons_list3_gtrack[c]->GetParamLast()->GetQp()
3581  > 0);
3582  Int_t check4 =
3583  (fMixedEventsElectrons_list4_gtrack[d]->GetParamLast()->GetQp()
3584  > 0);
3585 
3586  if (check1 + check2 + check3 + check4 != 2) continue;
3587 
3588  TVector3 e1 = fMixedEventsElectrons_list1[a];
3589  TVector3 e2 = fMixedEventsElectrons_list2[b];
3590  TVector3 e3 = fMixedEventsElectrons_list3[c];
3591  TVector3 e4 = fMixedEventsElectrons_list4[d];
3592 
3593 
3596  e1, e2);
3599  e1, e3);
3602  e1, e4);
3605  e2, e3);
3608  e2, e4);
3611  e3, e4);
3612 
3613 
3614  Int_t angleCheck12 =
3615  (params12.fAngle
3617  && check1 + check2 == 1);
3618  Int_t angleCheck13 =
3619  (params13.fAngle
3621  && check1 + check3 == 1);
3622  Int_t angleCheck14 =
3623  (params14.fAngle
3625  && check1 + check4 == 1);
3626  Int_t angleCheck23 =
3627  (params23.fAngle
3629  && check2 + check3 == 1);
3630  Int_t angleCheck24 =
3631  (params24.fAngle
3633  && check2 + check4 == 1);
3634  Int_t angleCheck34 =
3635  (params34.fAngle
3637  && check3 + check4 == 1);
3638 
3639  if (angleCheck12 && angleCheck34) {
3642  e1, e2, e3, e4);
3643  fhMixedEventsTest2_invmass->Fill(params.fMinv);
3644  cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
3645  "filled!, part"
3646  << endl;
3647  }
3648  if (angleCheck13 && angleCheck24) {
3651  e1, e2, e3, e4);
3652  fhMixedEventsTest2_invmass->Fill(params.fMinv);
3653  cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
3654  "filled!, part"
3655  << endl;
3656  }
3657  if (angleCheck14 && angleCheck23) {
3660  e1, e2, e3, e4);
3661  fhMixedEventsTest2_invmass->Fill(params.fMinv);
3662  cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
3663  "filled!, part"
3664  << endl;
3665  }
3666  }
3667  }
3668  }
3669  }
3670 }
3671 
3672 
3674 // takes all electrons from the last 20 events and combines them
3675 {
3676  Int_t nof = fMixedTest3_momenta.size();
3677  cout << "CbmAnaConversionRecoFull: MixedEventTest3 - nof entries " << nof
3678  << endl;
3679  for (Int_t a = 0; a < nof - 3; a++) {
3680  for (Int_t b = a + 1; b < nof - 1; b++) {
3681  for (Int_t c = b + 1; c < nof - 1; c++) {
3682  for (Int_t d = c + 1; d < nof; d++) {
3689  continue;
3690  Int_t check1 = (fMixedTest3_gtrack[a]->GetParamLast()->GetQp() > 0);
3691  Int_t check2 = (fMixedTest3_gtrack[b]->GetParamLast()->GetQp() > 0);
3692  Int_t check3 = (fMixedTest3_gtrack[c]->GetParamLast()->GetQp() > 0);
3693  Int_t check4 = (fMixedTest3_gtrack[d]->GetParamLast()->GetQp() > 0);
3694 
3695  if (check1 + check2 + check3 + check4 != 2) continue;
3696 
3697  TVector3 e1 = fMixedTest3_momenta[a];
3698  TVector3 e2 = fMixedTest3_momenta[b];
3699  TVector3 e3 = fMixedTest3_momenta[c];
3700  TVector3 e4 = fMixedTest3_momenta[d];
3701 
3702 
3705  e1, e2);
3708  e1, e3);
3711  e1, e4);
3714  e2, e3);
3717  e2, e4);
3720  e3, e4);
3721 
3722 
3723  Int_t angleCheck12 =
3724  (params12.fAngle
3726  && check1 + check2 == 1);
3727  Int_t angleCheck13 =
3728  (params13.fAngle
3730  && check1 + check3 == 1);
3731  Int_t angleCheck14 =
3732  (params14.fAngle
3734  && check1 + check4 == 1);
3735  Int_t angleCheck23 =
3736  (params23.fAngle
3738  && check2 + check3 == 1);
3739  Int_t angleCheck24 =
3740  (params24.fAngle
3742  && check2 + check4 == 1);
3743  Int_t angleCheck34 =
3744  (params34.fAngle
3746  && check3 + check4 == 1);
3747 
3748  if (angleCheck12 && angleCheck34) {
3751  e1, e2, e3, e4);
3752  fhMixedEventsTest3_invmass->Fill(params.fMinv);
3753  //cout << "CbmAnaConversionRecoFull: MixedEventTest3(), event filled!, part" << endl;
3754  }
3755  if (angleCheck13 && angleCheck24) {
3758  e1, e2, e3, e4);
3759  fhMixedEventsTest3_invmass->Fill(params.fMinv);
3760  //cout << "CbmAnaConversionRecoFull: MixedEventTest3(), event filled!, part" << endl;
3761  }
3762  if (angleCheck14 && angleCheck23) {
3765  e1, e2, e3, e4);
3766  fhMixedEventsTest3_invmass->Fill(params.fMinv);
3767  //cout << "CbmAnaConversionRecoFull: MixedEventTest3(), event filled!, part" << endl;
3768  }
3769  }
3770  }
3771  }
3772  }
3773 }
3774 
3775 
3777 // combines photons from two different events, taken from each time 200 events
3778 {
3779  Int_t nof = fMixedTest4_photons.size();
3780  cout << "CbmAnaConversionRecoFull: MixedEventTest4 - nof entries " << nof
3781  << endl;
3782  for (Int_t a = 0; a < nof - 1; a++) {
3783  for (Int_t b = a + 1; b < nof; b++) {
3784  if (fMixedTest4_eventno[a] == fMixedTest4_eventno[b]) continue;
3785 
3786  TVector3 e11 = fMixedTest4_photons[a][0];
3787  TVector3 e12 = fMixedTest4_photons[a][1];
3788  TVector3 e21 = fMixedTest4_photons[b][0];
3789  TVector3 e22 = fMixedTest4_photons[b][1];
3790 
3791  CbmMCTrack* mctrack11 = fMixedTest4_mctracks[a][0];
3792  CbmMCTrack* mctrack12 = fMixedTest4_mctracks[a][1];
3793  CbmMCTrack* mctrack21 = fMixedTest4_mctracks[b][0];
3794  CbmMCTrack* mctrack22 = fMixedTest4_mctracks[b][1];
3795 
3796  Int_t motherId11 = mctrack11->GetMotherId();
3797  Int_t motherId12 = mctrack12->GetMotherId();
3798  Int_t motherId21 = mctrack21->GetMotherId();
3799  Int_t motherId22 = mctrack22->GetMotherId();
3800 
3801 
3804  e11, e12, e21, e22);
3805  fhMixedEventsTest4_invmass->Fill(params.fMinv);
3806  fhMixedEventsTest4_pt_vs_rap->Fill(params.fPt, params.fRapidity);
3807  //cout << "CbmAnaConversionRecoFull: MixedEventTest4(), event filled!, part" << endl;
3808 
3809  fhPhotons_stats[4]->Fill(8); // all combinations
3810  if (motherId11 == motherId12 && motherId21 == motherId22) {
3811  fhPhotons_stats[4]->Fill(9);
3812  }
3813  if (motherId11 != motherId12 || motherId21 != motherId22) {
3814  fhPhotons_stats[4]->Fill(12);
3815  }
3816  if ((motherId11 != motherId12 && motherId21 == motherId22)
3817  || (motherId11 == motherId12 && motherId21 != motherId22)) {
3818  fhPhotons_stats[4]->Fill(13);
3819  }
3820  if (motherId11 != motherId12 && motherId21 != motherId22) {
3821  fhPhotons_stats[4]->Fill(14);
3822  }
3823 
3824 
3825  if (params.fPt <= 0.5)
3827  if (params.fPt > 0.5 && params.fPt <= 1)
3829  if (params.fPt > 1 && params.fPt <= 1.5)
3831  if (params.fPt > 1.5 && params.fPt <= 2)
3833 
3834 
3835  Bool_t IsRichElectron_ann0_e11 = fMixedTest4_isRichElectronAnn0[a][0];
3836  Bool_t IsRichElectron_ann0_e12 = fMixedTest4_isRichElectronAnn0[a][1];
3837  Bool_t IsRichElectron_ann0_e21 = fMixedTest4_isRichElectronAnn0[b][0];
3838  Bool_t IsRichElectron_ann0_e22 = fMixedTest4_isRichElectronAnn0[b][1];
3839 
3840  if (IsRichElectron_ann0_e11 && IsRichElectron_ann0_e12
3841  && IsRichElectron_ann0_e21 && IsRichElectron_ann0_e22) {
3842  fhMixedEventsTest4_invmass_ann0->Fill(params.fMinv);
3843  }
3844 
3845 
3846  Double_t ANNe11 = fMixedTest4_ElectronAnns[a][0];
3847  Double_t ANNe12 = fMixedTest4_ElectronAnns[a][1];
3848  Double_t ANNe21 = fMixedTest4_ElectronAnns[b][0];
3849  Double_t ANNe22 = fMixedTest4_ElectronAnns[b][1];
3850 
3851  if (ANNe11 > -1 && ANNe12 > -1 && ANNe21 > -1 && ANNe22 > -1)
3852  fhMixedEventsTest4_invmass_ANNcuts->Fill(1, params.fMinv);
3853  if (ANNe11 > -0.9 && ANNe12 > -0.9 && ANNe21 > -0.9 && ANNe22 > -0.9)
3854  fhMixedEventsTest4_invmass_ANNcuts->Fill(2, params.fMinv);
3855  if (ANNe11 > -0.8 && ANNe12 > -0.8 && ANNe21 > -0.8 && ANNe22 > -0.8)
3856  fhMixedEventsTest4_invmass_ANNcuts->Fill(3, params.fMinv);
3857  if (ANNe11 > -0.7 && ANNe12 > -0.7 && ANNe21 > -0.7 && ANNe22 > -0.7)
3858  fhMixedEventsTest4_invmass_ANNcuts->Fill(4, params.fMinv);
3859  if (ANNe11 > -0.6 && ANNe12 > -0.6 && ANNe21 > -0.6 && ANNe22 > -0.6)
3860  fhMixedEventsTest4_invmass_ANNcuts->Fill(5, params.fMinv);
3861  if (ANNe11 > -0.5 && ANNe12 > -0.5 && ANNe21 > -0.5 && ANNe22 > -0.5)
3862  fhMixedEventsTest4_invmass_ANNcuts->Fill(6, params.fMinv);
3863  if (ANNe11 > -0.0 && ANNe12 > -0.0 && ANNe21 > -0.0 && ANNe22 > -0.0)
3864  fhMixedEventsTest4_invmass_ANNcuts->Fill(7, params.fMinv);
3865  }
3866  }
3867 }
3868 
3869 
3870 Double_t CbmAnaConversionRecoFull::ElectronANNvalue(Int_t globalTrackIndex,
3871  Double_t momentum) {
3872  if (NULL == fGlobalTracks || NULL == fRichRings) return -2;
3873  //CbmGlobalTrack* globalTrack = (CbmGlobalTrack*) fGlobalTracks->At(globalTrackIndex);
3874  const CbmGlobalTrack* globalTrack =
3875  static_cast<const CbmGlobalTrack*>(fGlobalTracks->At(globalTrackIndex));
3876  Int_t richId = globalTrack->GetRichRingIndex();
3877  if (richId < 0) return -2;
3878  CbmRichRing* ring = static_cast<CbmRichRing*>(fRichRings->At(richId));
3879  if (NULL == ring) return -2;
3880 
3882  globalTrackIndex, momentum);
3883  return ann;
3884 }
CbmAnaConversionRecoFull::fhElectrons_invmass_2
TH1D * fhElectrons_invmass_2
Definition: CbmAnaConversionRecoFull.h:238
CbmRichPoint.h
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin2_1
TH1D * fhPhotons_invmass_ptBin2_1
Definition: CbmAnaConversionRecoFull.h:224
CbmAnaConversionRecoFull::fhMixedEventsTest_invmass
TH1D * fhMixedEventsTest_invmass[5]
Definition: CbmAnaConversionRecoFull.h:305
CbmAnaConversionRecoFull::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmAnaConversionRecoFull.h:98
CbmAnaConversionRecoFull::fhPhotons_startvertex_vs_chi
TH2D * fhPhotons_startvertex_vs_chi
Definition: CbmAnaConversionRecoFull.h:182
CbmAnaConversionRecoFull::fElectrons_momenta
std::vector< TVector3 > fElectrons_momenta
Definition: CbmAnaConversionRecoFull.h:120
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition: CbmMCTrack.h:71
CbmMatch::GetMatchedLink
const CbmLink & GetMatchedLink() const
Definition: CbmMatch.h:37
CbmAnaConversionRecoFull::fElectrons_momenta_refit
std::vector< TVector3 > fElectrons_momenta_refit
Definition: CbmAnaConversionRecoFull.h:204
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_pt_2
TH2D * fhPhotons_invmass_vs_pt_2
Definition: CbmAnaConversionRecoFull.h:239
CbmAnaConversionRecoFull::fhElectrons_nofPerEvent_1
TH1D * fhElectrons_nofPerEvent_1
Definition: CbmAnaConversionRecoFull.h:220
CbmAnaConversionRecoFull::fElectrons_track_3
std::vector< CbmGlobalTrack * > fElectrons_track_3
Definition: CbmAnaConversionRecoFull.h:137
CbmAnaConversionRecoFull::fMixedEventsElectrons_list1
std::vector< TVector3 > fMixedEventsElectrons_list1
Definition: CbmAnaConversionRecoFull.h:308
CbmAnaConversionRecoFull::MixedEventTest2
void MixedEventTest2()
Definition: CbmAnaConversionRecoFull.cxx:3561
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcutTest3_new
TH1D * fhPhotons_invmass_MCcutTest3_new[5]
Definition: CbmAnaConversionRecoFull.h:287
CbmAnaConversionRecoFull::fHistoList_recofull_3
std::vector< TH1 * > fHistoList_recofull_3
Definition: CbmAnaConversionRecoFull.h:109
CbmAnaConversionKinematicParams::fPt
Double_t fPt
Definition: CbmAnaConversionKinematicParams.h:19
CbmAnaConversionRecoFull::fElectrons_momenta_1
std::vector< TVector3 > fElectrons_momenta_1
Definition: CbmAnaConversionRecoFull.h:126
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcut1_new
TH1D * fhPhotons_invmass_MCcut1_new[5]
Definition: CbmAnaConversionRecoFull.h:278
CbmAnaConversionRecoFull::fElectrons_mctrackID_2
std::vector< int > fElectrons_mctrackID_2
Definition: CbmAnaConversionRecoFull.h:134
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcut5_new
TH1D * fhPhotons_invmass_MCcut5_new[5]
Definition: CbmAnaConversionRecoFull.h:282
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcut2_new
TH1D * fhPhotons_invmass_MCcut2_new[5]
Definition: CbmAnaConversionRecoFull.h:279
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin6_new
TH1D * fhPhotons_invmass_ptBin6_new[5]
Definition: CbmAnaConversionRecoFull.h:275
CbmAnaConversionRecoFull::fMixedEventsElectrons_list1_gtrack
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list1_gtrack
Definition: CbmAnaConversionRecoFull.h:312
CbmAnaConversionRecoFull::fhPhotons_nofPerEvent
TH1D * fhPhotons_nofPerEvent
Definition: CbmAnaConversionRecoFull.h:160
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition: CbmMatch.h:38
CbmAnaConversionRecoFull::fhElectrons
TH1I * fhElectrons
Definition: CbmAnaConversionRecoFull.h:113
CbmAnaConversionRecoFull::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmAnaConversionRecoFull.h:101
CbmAnaConversionRecoFull::fVector_photons_pairs_3
std::vector< std::vector< int > > fVector_photons_pairs_3
Definition: CbmAnaConversionRecoFull.h:141
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin1_2
TH1D * fhPhotons_invmass_ptBin1_2
Definition: CbmAnaConversionRecoFull.h:234
CbmAnaConversionRecoFull::fhPhotons_MC_invmass4
TH1D * fhPhotons_MC_invmass4
Definition: CbmAnaConversionRecoFull.h:193
CbmAnaConversionRecoFull::fhMixedEventsTest2_invmass
TH1D * fhMixedEventsTest2_invmass
Definition: CbmAnaConversionRecoFull.h:316
CbmAnaConversionRecoFull::fElectrons_mctrackID
std::vector< int > fElectrons_mctrackID
Definition: CbmAnaConversionRecoFull.h:122
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi1
TH1D * fhPhotons_invmass_cut_chi1
Definition: CbmAnaConversionRecoFull.h:167
CbmAnaConversionRecoFull::fElectrons_mctrackID_new
std::vector< int > fElectrons_mctrackID_new[5]
Definition: CbmAnaConversionRecoFull.h:152
CbmAnaConversionRecoFull::fMixedTest4_mctracks
std::vector< std::vector< CbmMCTrack * > > fMixedTest4_mctracks
Definition: CbmAnaConversionRecoFull.h:327
CbmAnaConversionRecoFull::fElectrons_momenta_new
std::vector< TVector3 > fElectrons_momenta_new[5]
Definition: CbmAnaConversionRecoFull.h:150
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin3_1
TH1D * fhPhotons_invmass_ptBin3_1
Definition: CbmAnaConversionRecoFull.h:225
CbmAnaConversionRecoFull::fhPhotons_invmass_1
TH1D * fhPhotons_invmass_1
Definition: CbmAnaConversionRecoFull.h:222
CbmAnaConversionRecoFull::fElectrons_track_new
std::vector< CbmGlobalTrack * > fElectrons_track_new[5]
Definition: CbmAnaConversionRecoFull.h:149
CbmAnaConversionRecoFull::fMixedTest4_isRichElectronAnn0
std::vector< std::vector< Bool_t > > fMixedTest4_isRichElectronAnn0
Definition: CbmAnaConversionRecoFull.h:328
CbmAnaConversionRecoFull::fhPhotons_Refit_momentumDiff
TH1D * fhPhotons_Refit_momentumDiff
Definition: CbmAnaConversionRecoFull.h:198
CbmAnaConversionCutSettings::CalcOpeningAngleCut
static Double_t CalcOpeningAngleCut(Double_t pt)
Definition: CbmAnaConversionCutSettings.h:21
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin2_4
TH1D * fhPhotons_invmass_ptBin2_4
Definition: CbmAnaConversionRecoFull.h:257
L1Field.h
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcutAll_new
TH2D * fhPhotons_invmass_MCcutAll_new[5]
Definition: CbmAnaConversionRecoFull.h:288
CbmL1PFFitter
Definition: CbmL1PFFitter.h:31
CbmAnaConversionRecoFull::fhPhotons_nofPerEvent_3
TH1D * fhPhotons_nofPerEvent_3
Definition: CbmAnaConversionRecoFull.h:243
CbmAnaConversionRecoFull::fMixedTest3_momenta
std::vector< TVector3 > fMixedTest3_momenta
Definition: CbmAnaConversionRecoFull.h:319
CbmAnaConversionRecoFull::fVector_photons_pairs_new
std::vector< std::vector< int > > fVector_photons_pairs_new[5]
Definition: CbmAnaConversionRecoFull.h:154
CbmL1PFFitter::Fit
void Fit(std::vector< CbmStsTrack > &Tracks, std::vector< int > &pidHypo)
Definition: CbmL1PFFitter.cxx:81
CbmAnaConversionRecoFull::fhMixedEventsTest4_invmass
TH1D * fhMixedEventsTest4_invmass
Definition: CbmAnaConversionRecoFull.h:331
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcutTest_new
TH1D * fhPhotons_invmass_MCcutTest_new[5]
Definition: CbmAnaConversionRecoFull.h:285
CbmAnaConversionRecoFull::fPrimVertex
CbmVertex * fPrimVertex
Definition: CbmAnaConversionRecoFull.h:103
CbmAnaConversionRecoFull::fElectrons_mctrackID_1
std::vector< int > fElectrons_mctrackID_1
Definition: CbmAnaConversionRecoFull.h:128
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin3_3
TH1D * fhPhotons_invmass_ptBin3_3
Definition: CbmAnaConversionRecoFull.h:247
CbmGlobalTrack::GetRichRingIndex
Int_t GetRichRingIndex() const
Definition: CbmGlobalTrack.h:41
CbmAnaConversionRecoFull::fhPhotons_invmass_4
TH1D * fhPhotons_invmass_4
Definition: CbmAnaConversionRecoFull.h:255
CbmAnaConversionRecoFull::fHistoList_recofull_1
std::vector< TH1 * > fHistoList_recofull_1
Definition: CbmAnaConversionRecoFull.h:107
CbmAnaConversionRecoFull::fhPhotons_tY
TH1D * fhPhotons_tY
Definition: CbmAnaConversionRecoFull.h:217
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
CbmAnaConversionKinematicParams::fAngle
Double_t fAngle
Definition: CbmAnaConversionKinematicParams.h:22
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmAnaConversionRecoFull::fhPhotons_rapidity_vs_pt
TH2D * fhPhotons_rapidity_vs_pt
Definition: CbmAnaConversionRecoFull.h:185
CbmAnaConversionRecoFull::fhPhotons_MC_invmass1
TH1D * fhPhotons_MC_invmass1
Definition: CbmAnaConversionRecoFull.h:190
CbmAnaConversionRecoFull::fhPhotons_invmass_refit_cut
TH1D * fhPhotons_invmass_refit_cut
Definition: CbmAnaConversionRecoFull.h:207
CbmAnaConversionRecoFull::fhMomentumFits
TH1D * fhMomentumFits
Definition: CbmAnaConversionRecoFull.h:115
CbmAnaConversionRecoFull::fhPhotons_nofPerEvent_new
TH1D * fhPhotons_nofPerEvent_new[5]
Definition: CbmAnaConversionRecoFull.h:265
CbmAnaConversionKinematicParams.h
CbmAnaConversionRecoFull::Invmass_4particlesRECO
Double_t Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
Definition: CbmAnaConversionRecoFull.cxx:2037
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_pt_3
TH2D * fhPhotons_invmass_vs_pt_3
Definition: CbmAnaConversionRecoFull.h:250
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi40
TH1D * fhPhotons_invmass_cut_chi40
Definition: CbmAnaConversionRecoFull.h:172
CbmAnaConversionRecoFull::fRichPoints
TClonesArray * fRichPoints
Definition: CbmAnaConversionRecoFull.h:96
CbmAnaConversionRecoFull::fRichRings
TClonesArray * fRichRings
Definition: CbmAnaConversionRecoFull.h:97
CbmAnaConversionRecoFull::fMixedTest4_eventno
std::vector< int > fMixedTest4_eventno
Definition: CbmAnaConversionRecoFull.h:330
CbmAnaConversionRecoFull::CombinePhotons
void CombinePhotons()
Definition: CbmAnaConversionRecoFull.cxx:3172
CbmGlobalTrack.h
CbmLitGlobalElectronId::IsTrdElectron
Bool_t IsTrdElectron(Int_t globalTrackindex, Double_t momentum)
Identify electron in RICH detector.
Definition: CbmLitGlobalElectronId.cxx:82
CbmAnaConversionRecoFull::fhPhotons_invmass_direction_cut
TH1D * fhPhotons_invmass_direction_cut
Definition: CbmAnaConversionRecoFull.h:211
CbmAnaConversionRecoFull::fhPhotons_nofPerEvent_4
TH1D * fhPhotons_nofPerEvent_4
Definition: CbmAnaConversionRecoFull.h:254
CbmAnaConversionRecoFull::fhMixedEventsTest4_invmass_ann0
TH1D * fhMixedEventsTest4_invmass_ann0
Definition: CbmAnaConversionRecoFull.h:332
CbmAnaConversionRecoFull::fhElectrons_invmass_3
TH1D * fhElectrons_invmass_3
Definition: CbmAnaConversionRecoFull.h:249
CbmAnaConversionRecoFull::fMixedEventsElectrons_list3_gtrack
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list3_gtrack
Definition: CbmAnaConversionRecoFull.h:314
CbmLitGlobalElectronId::SetRichAnnCut
void SetRichAnnCut(Double_t par)
Set cut on RICH ANN output value.
Definition: CbmLitGlobalElectronId.h:107
CbmRichRing
Definition: CbmRichRing.h:17
CbmAnaConversionRecoFull::fVector_photons_pairs_4
std::vector< std::vector< int > > fVector_photons_pairs_4
Definition: CbmAnaConversionRecoFull.h:147
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin3_4
TH1D * fhPhotons_invmass_ptBin3_4
Definition: CbmAnaConversionRecoFull.h:258
CbmAnaConversionRecoFull::fhPhotons_invmass_3
TH1D * fhPhotons_invmass_3
Definition: CbmAnaConversionRecoFull.h:244
CbmAnaConversionRecoFull::fhPhotons_boostAngleMC
TH1D * fhPhotons_boostAngleMC
Definition: CbmAnaConversionRecoFull.h:213
CbmAnaConversionRecoFull::timer
TStopwatch timer
Definition: CbmAnaConversionRecoFull.h:341
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin4_2
TH1D * fhPhotons_invmass_ptBin4_2
Definition: CbmAnaConversionRecoFull.h:237
CbmAnaConversionRecoFull::fMixedTest4_photons
std::vector< std::vector< TVector3 > > fMixedTest4_photons
Definition: CbmAnaConversionRecoFull.h:326
CbmAnaConversionRecoFull::fhPhotons_MC_startvertexZ
TH1D * fhPhotons_MC_startvertexZ
Definition: CbmAnaConversionRecoFull.h:194
CbmRichRing.h
CbmAnaConversionRecoFull::fhPhotons_nofPerEvent_1
TH1D * fhPhotons_nofPerEvent_1
Definition: CbmAnaConversionRecoFull.h:221
CbmAnaConversionRecoFull::fMixedEventsElectrons_list2_gtrack
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list2_gtrack
Definition: CbmAnaConversionRecoFull.h:313
CbmDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
CbmAnaConversionRecoFull::fElectrons_momentaChi_3
std::vector< float > fElectrons_momentaChi_3
Definition: CbmAnaConversionRecoFull.h:139
CbmAnaConversionRecoFull::fVector_photons_pairs_1
std::vector< std::vector< int > > fVector_photons_pairs_1
Definition: CbmAnaConversionRecoFull.h:129
CbmAnaConversionRecoFull::fVector_photons_pairs_direction
std::vector< std::vector< int > > fVector_photons_pairs_direction
Definition: CbmAnaConversionRecoFull.h:209
CbmAnaConversionRecoFull::fhElectrons_nofPerEvent_2
TH1D * fhElectrons_nofPerEvent_2
Definition: CbmAnaConversionRecoFull.h:231
CbmLmvmKinematicParams::fMinv
Double_t fMinv
Definition: CbmLmvmKinematicParams.h:22
CbmAnaConversionRecoFull::fMixedEventsElectrons_list2
std::vector< TVector3 > fMixedEventsElectrons_list2
Definition: CbmAnaConversionRecoFull.h:309
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_pt_1
TH2D * fhPhotons_invmass_vs_pt_1
Definition: CbmAnaConversionRecoFull.h:228
CbmAnaConversionRecoFull::fVector_photons_pairs
std::vector< std::vector< int > > fVector_photons_pairs
Definition: CbmAnaConversionRecoFull.h:163
CbmAnaConversionRecoFull::fhElectrons_invmass_new
TH1D * fhElectrons_invmass_new[5]
Definition: CbmAnaConversionRecoFull.h:276
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin4_3
TH1D * fhPhotons_invmass_ptBin4_3
Definition: CbmAnaConversionRecoFull.h:248
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcut6_new
TH1D * fhPhotons_invmass_MCcut6_new[5]
Definition: CbmAnaConversionRecoFull.h:283
CbmAnaConversionRecoFull::fhMixedEventsTest4_invmass_ANNcuts
TH2D * fhMixedEventsTest4_invmass_ANNcuts
Definition: CbmAnaConversionRecoFull.h:338
CbmLitGlobalElectronId::IsRichElectron
Bool_t IsRichElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in RICH detector.
Definition: CbmLitGlobalElectronId.cxx:52
CbmAnaConversionCutSettings.h
CbmAnaConversionRecoFull::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmAnaConversionRecoFull.h:102
CbmAnaConversionRecoFull::fElectrons_momentaChi_4
std::vector< float > fElectrons_momentaChi_4
Definition: CbmAnaConversionRecoFull.h:145
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_ptBin4
TH1D * fhPhotons_invmass_cut_ptBin4
Definition: CbmAnaConversionRecoFull.h:179
CbmAnaConversionRecoFull::fhPhotons_MC_motherIdCut
TH1D * fhPhotons_MC_motherIdCut
Definition: CbmAnaConversionRecoFull.h:195
CbmAnaConversionRecoFull::fTime
Double_t fTime
Definition: CbmAnaConversionRecoFull.h:342
CbmAnaConversionRecoFull::fhElectrons_invmass_1
TH1D * fhElectrons_invmass_1
Definition: CbmAnaConversionRecoFull.h:227
CbmAnaConversionRecoFull::fhElectrons_nofPerEvent_new
TH1D * fhElectrons_nofPerEvent_new[5]
Definition: CbmAnaConversionRecoFull.h:264
CbmAnaConversionRecoFull::~CbmAnaConversionRecoFull
virtual ~CbmAnaConversionRecoFull()
Definition: CbmAnaConversionRecoFull.cxx:239
CbmAnaConversionRecoFull::fElectrons_track_refit
std::vector< CbmGlobalTrack * > fElectrons_track_refit
Definition: CbmAnaConversionRecoFull.h:203
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin1_new
TH1D * fhPhotons_invmass_ptBin1_new[5]
Definition: CbmAnaConversionRecoFull.h:270
CbmAnaConversionRecoFull::fhMixedEventsTest4_invmass_ptBin3
TH1D * fhMixedEventsTest4_invmass_ptBin3
Definition: CbmAnaConversionRecoFull.h:336
CbmAnaConversionKinematicParams::KinematicParams_2particles_Reco
static CbmAnaConversionKinematicParams KinematicParams_2particles_Reco(const TVector3 electron1, const TVector3 electron2)
Definition: CbmAnaConversionKinematicParams.h:128
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_pt
TH2D * fhPhotons_invmass_vs_pt
Definition: CbmAnaConversionRecoFull.h:184
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_chi
TH2D * fhPhotons_invmass_vs_chi
Definition: CbmAnaConversionRecoFull.h:181
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin2_2
TH1D * fhPhotons_invmass_ptBin2_2
Definition: CbmAnaConversionRecoFull.h:235
CbmAnaConversionRecoFull::fhPhotons_invmass_ANNcuts_new
TH2D * fhPhotons_invmass_ANNcuts_new[5]
Definition: CbmAnaConversionRecoFull.h:295
CbmAnaConversionRecoFull::fMixedTest4_ElectronAnns
std::vector< std::vector< Double_t > > fMixedTest4_ElectronAnns
Definition: CbmAnaConversionRecoFull.h:329
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi5
TH1D * fhPhotons_invmass_cut_chi5
Definition: CbmAnaConversionRecoFull.h:169
CbmAnaConversionRecoFull::fElectrons_track_2
std::vector< CbmGlobalTrack * > fElectrons_track_2
Definition: CbmAnaConversionRecoFull.h:131
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi10
TH1D * fhPhotons_invmass_cut_chi10
Definition: CbmAnaConversionRecoFull.h:170
CbmStsTrack.h
Data class for STS tracks.
CbmGlobalTrack::GetStsTrackIndex
Int_t GetStsTrackIndex() const
Definition: CbmGlobalTrack.h:38
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin1_1
TH1D * fhPhotons_invmass_ptBin1_1
Definition: CbmAnaConversionRecoFull.h:223
CbmAnaConversionRecoFull::fhPhotons_MCtrue_pdgCodes
TH1D * fhPhotons_MCtrue_pdgCodes
Definition: CbmAnaConversionRecoFull.h:292
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi65
TH1D * fhPhotons_invmass_cut_chi65
Definition: CbmAnaConversionRecoFull.h:173
CbmAnaConversionRecoFull::fStsTracks
TClonesArray * fStsTracks
Definition: CbmAnaConversionRecoFull.h:100
CbmL1PFFitter::GetChiToVertex
void GetChiToVertex(std::vector< CbmStsTrack > &Tracks, std::vector< L1FieldRegion > &field, std::vector< float > &chiToVtx, CbmKFVertex &primVtx, float chiPrim=-1)
Definition: CbmL1PFFitter.cxx:403
d
double d
Definition: P4_F64vec2.h:24
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin2_3
TH1D * fhPhotons_invmass_ptBin2_3
Definition: CbmAnaConversionRecoFull.h:246
CbmAnaConversionRecoFull::fMixedEventsElectrons_list4
std::vector< TVector3 > fMixedEventsElectrons_list4
Definition: CbmAnaConversionRecoFull.h:311
CbmAnaConversionRecoFull::fMcTracks
TClonesArray * fMcTracks
Definition: CbmAnaConversionRecoFull.h:99
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcut7_new
TH1D * fhPhotons_invmass_MCcut7_new[5]
Definition: CbmAnaConversionRecoFull.h:284
CbmAnaConversionRecoFull::fMixedTest3_eventno
std::vector< int > fMixedTest3_eventno
Definition: CbmAnaConversionRecoFull.h:321
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi3
TH1D * fhPhotons_invmass_cut_chi3
Definition: CbmAnaConversionRecoFull.h:168
CbmAnaConversionRecoFull::fhPhotons_invmass_direction
TH1D * fhPhotons_invmass_direction
Definition: CbmAnaConversionRecoFull.h:210
CbmAnaConversionKinematicParams::fMinv
Double_t fMinv
Definition: CbmAnaConversionKinematicParams.h:21
CbmAnaConversionCutSettings::CalcChiCut
static Double_t CalcChiCut(Double_t pt)
Definition: CbmAnaConversionCutSettings.h:69
CbmAnaConversionRecoFull::fhElectrons_nofPerEvent
TH1D * fhElectrons_nofPerEvent
Definition: CbmAnaConversionRecoFull.h:159
CbmTrackMatchNew.h
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin1_4
TH1D * fhPhotons_invmass_ptBin1_4
Definition: CbmAnaConversionRecoFull.h:256
CbmAnaConversionRecoFull::fhPhotons_angleBetween
TH1D * fhPhotons_angleBetween
Definition: CbmAnaConversionRecoFull.h:183
CbmVertex
Definition: CbmVertex.h:26
CbmAnaConversionKinematicParams::KinematicParams_4particles_Reco
static CbmAnaConversionKinematicParams KinematicParams_4particles_Reco(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
Definition: CbmAnaConversionKinematicParams.h:84
CbmL1PFFitter.h
CbmAnaConversionRecoFull::fhPhotons_invmass_ann0_new
TH1D * fhPhotons_invmass_ann0_new[5]
Definition: CbmAnaConversionRecoFull.h:269
CbmAnaConversionRecoFull::fhPhotons_nofPerEventAfter_new
TH1D * fhPhotons_nofPerEventAfter_new[5]
Definition: CbmAnaConversionRecoFull.h:266
CbmAnaConversionRecoFull::fhPhotons_stats
TH1D * fhPhotons_stats[5]
Definition: CbmAnaConversionRecoFull.h:291
CbmAnaConversionRecoFull::fElectrons_track
std::vector< CbmGlobalTrack * > fElectrons_track
Definition: CbmAnaConversionRecoFull.h:119
CbmAnaConversionRecoFull::fhPhotons_MC_motherpdg
TH1D * fhPhotons_MC_motherpdg
Definition: CbmAnaConversionRecoFull.h:189
CbmAnaConversionRecoFull::fhPhotons_MC_invmass3
TH1D * fhPhotons_MC_invmass3
Definition: CbmAnaConversionRecoFull.h:192
CbmAnaConversionRecoFull::fhPhotons_pt_vs_rap_new
TH2D * fhPhotons_pt_vs_rap_new[5]
Definition: CbmAnaConversionRecoFull.h:289
CbmAnaConversionRecoFull::fhMomentumFits_electronRich
TH1D * fhMomentumFits_electronRich
Definition: CbmAnaConversionRecoFull.h:116
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_ptBin2
TH1D * fhPhotons_invmass_cut_ptBin2
Definition: CbmAnaConversionRecoFull.h:177
CbmLmvmKinematicParams::fRapidity
Double_t fRapidity
Definition: CbmLmvmKinematicParams.h:21
CbmAnaConversionRecoFull::fHistoList_recofull_2
std::vector< TH1 * > fHistoList_recofull_2
Definition: CbmAnaConversionRecoFull.h:108
CbmMCTrack::GetStartVertex
void GetStartVertex(TVector3 &vertex) const
Definition: CbmMCTrack.h:182
CbmAnaConversionRecoFull::fKFVertex
CbmKFVertex fKFVertex
Definition: CbmAnaConversionRecoFull.h:104
xMath::Pi
double Pi()
Definition: xMath.h:5
CbmAnaConversionRecoFull::OpeningAngleBetweenPhotons
Double_t OpeningAngleBetweenPhotons(std::vector< TVector3 > momenta, std::vector< int > photon1, std::vector< int > photons2)
Definition: CbmAnaConversionRecoFull.cxx:2842
CbmAnaConversionRecoFull::OpeningAngleBetweenPhotons2
Double_t OpeningAngleBetweenPhotons2(std::vector< int > photon1, std::vector< int > photons2)
Definition: CbmAnaConversionRecoFull.cxx:2868
CbmAnaConversionRecoFull::fhElectrons_invmass_cut
TH1D * fhElectrons_invmass_cut
Definition: CbmAnaConversionRecoFull.h:158
CbmAnaConversionRecoFull::fVector_photons_pairs_refit
std::vector< std::vector< int > > fVector_photons_pairs_refit
Definition: CbmAnaConversionRecoFull.h:205
CbmAnaConversionRecoFull::fhElectrons_invmass_4
TH1D * fhElectrons_invmass_4
Definition: CbmAnaConversionRecoFull.h:260
CbmAnaConversionRecoFull::CbmAnaConversionRecoFull
CbmAnaConversionRecoFull()
Definition: CbmAnaConversionRecoFull.cxx:41
CbmAnaConversionRecoFull::fhPi0_nofPerEvent_new
TH1D * fhPi0_nofPerEvent_new[5]
Definition: CbmAnaConversionRecoFull.h:267
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin4_4
TH1D * fhPhotons_invmass_ptBin4_4
Definition: CbmAnaConversionRecoFull.h:259
CbmAnaConversionRecoFull::fMixedEventsElectrons_list3
std::vector< TVector3 > fMixedEventsElectrons_list3
Definition: CbmAnaConversionRecoFull.h:310
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi25
TH1D * fhPhotons_invmass_cut_chi25
Definition: CbmAnaConversionRecoFull.h:171
CbmAnaConversionRecoFull::fElectrons_momentaChi
std::vector< float > fElectrons_momentaChi
Definition: CbmAnaConversionRecoFull.h:121
CbmAnaConversionRecoFull::fElectrons_momentaChi_1
std::vector< float > fElectrons_momentaChi_1
Definition: CbmAnaConversionRecoFull.h:127
CbmAnaConversionRecoFull::globalEventNo
Int_t globalEventNo
Definition: CbmAnaConversionRecoFull.h:322
CbmLitGlobalElectronId::IsTofElectron
Bool_t IsTofElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in RICH detector.
Definition: CbmLitGlobalElectronId.cxx:99
CbmAnaConversionKinematicParams
Definition: CbmAnaConversionKinematicParams.h:16
CbmAnaConversionRecoFull::fMixedTest3_gtrack
std::vector< CbmGlobalTrack * > fMixedTest3_gtrack
Definition: CbmAnaConversionRecoFull.h:320
CbmAnaConversionRecoFull::ElectronANNvalue
Double_t ElectronANNvalue(Int_t globalTrackIndex, Double_t momentum)
Definition: CbmAnaConversionRecoFull.cxx:3870
CbmGlobalTrack
Definition: CbmGlobalTrack.h:26
CbmRichElectronIdAnn::GetInstance
static CbmRichElectronIdAnn & GetInstance()
Definition: CbmRichElectronIdAnn.h:43
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin5_new
TH1D * fhPhotons_invmass_ptBin5_new[5]
Definition: CbmAnaConversionRecoFull.h:274
CbmAnaConversionRecoFull::fHistoList_recofull_4
std::vector< TH1 * > fHistoList_recofull_4
Definition: CbmAnaConversionRecoFull.h:110
CbmAnaConversionRecoFull::fhMixedEventsTest4_pt_vs_rap
TH2D * fhMixedEventsTest4_pt_vs_rap
Definition: CbmAnaConversionRecoFull.h:333
CbmAnaConversionRecoFull::fhPhotons_phaseSpace_eta
TH2D * fhPhotons_phaseSpace_eta[5]
Definition: CbmAnaConversionRecoFull.h:298
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_pt_new
TH2D * fhPhotons_invmass_vs_pt_new[5]
Definition: CbmAnaConversionRecoFull.h:277
CbmAnaConversionRecoFull::MixedEventTest
void MixedEventTest()
Definition: CbmAnaConversionRecoFull.cxx:3449
CbmAnaConversionRecoFull::fMixedEventsElectrons
std::vector< TVector3 > fMixedEventsElectrons[5]
Definition: CbmAnaConversionRecoFull.h:303
CbmAnaConversionRecoFull::fhMixedEventsTest4_invmass_ptBin4
TH1D * fhMixedEventsTest4_invmass_ptBin4
Definition: CbmAnaConversionRecoFull.h:337
CbmMCTrack.h
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_openingAngle
TH2D * fhPhotons_invmass_vs_openingAngle
Definition: CbmAnaConversionRecoFull.h:186
CbmAnaConversionRecoFull::fElectrons_momentaChi_new
std::vector< float > fElectrons_momentaChi_new[5]
Definition: CbmAnaConversionRecoFull.h:151
CbmAnaConversionRecoFull::Finish
void Finish()
Definition: CbmAnaConversionRecoFull.cxx:1414
CbmAnaConversionRecoFull::fhPhotons_invmass_vs_pt_4
TH2D * fhPhotons_invmass_vs_pt_4
Definition: CbmAnaConversionRecoFull.h:261
CbmAnaConversionRecoFull::Rap_4particlesRECO
Double_t Rap_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
Definition: CbmAnaConversionRecoFull.cxx:2091
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin3_new
TH1D * fhPhotons_invmass_ptBin3_new[5]
Definition: CbmAnaConversionRecoFull.h:272
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcut3_new
TH1D * fhPhotons_invmass_MCcut3_new[5]
Definition: CbmAnaConversionRecoFull.h:280
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmAnaConversionRecoFull::fhElectrons_nofPerEvent_3
TH1D * fhElectrons_nofPerEvent_3
Definition: CbmAnaConversionRecoFull.h:242
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin1_3
TH1D * fhPhotons_invmass_ptBin1_3
Definition: CbmAnaConversionRecoFull.h:245
CbmAnaConversionRecoFull::fhPhotons_MC_invmass2
TH1D * fhPhotons_MC_invmass2
Definition: CbmAnaConversionRecoFull.h:191
CbmAnaConversionRecoFull::fhPhotons_peakCheck1
TH1D * fhPhotons_peakCheck1[5]
Definition: CbmAnaConversionRecoFull.h:293
CbmAnaConversionRecoFull::fhPhotons_invmass_cut
TH1D * fhPhotons_invmass_cut
Definition: CbmAnaConversionRecoFull.h:166
CbmAnaConversionRecoFull::fElectrons_mctrackID_3
std::vector< int > fElectrons_mctrackID_3
Definition: CbmAnaConversionRecoFull.h:140
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_chi80
TH1D * fhPhotons_invmass_cut_chi80
Definition: CbmAnaConversionRecoFull.h:174
CbmAnaConversionRecoFull::fhMixedEventsTest4_invmass_ptBin2
TH1D * fhMixedEventsTest4_invmass_ptBin2
Definition: CbmAnaConversionRecoFull.h:335
CbmAnaConversionRecoFull::fhPhotons_boostAngleTest
TH1D * fhPhotons_boostAngleTest
Definition: CbmAnaConversionRecoFull.h:214
CbmAnaConversionRecoFull::fhPhotons_phaseSpace_pi0
TH2D * fhPhotons_phaseSpace_pi0[5]
Definition: CbmAnaConversionRecoFull.h:297
CbmAnaConversionRecoFull::fElectrons_track_1
std::vector< CbmGlobalTrack * > fElectrons_track_1
Definition: CbmAnaConversionRecoFull.h:125
CbmRichElectronIdAnn::CalculateAnnValue
double CalculateAnnValue(int globalTrackIndex, double momentum)
Calculate output value of the ANN.
Definition: CbmRichElectronIdAnn.cxx:84
CbmAnaConversionRecoFull::fElectrons_momentaChi_2
std::vector< float > fElectrons_momentaChi_2
Definition: CbmAnaConversionRecoFull.h:133
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin2_new
TH1D * fhPhotons_invmass_ptBin2_new[5]
Definition: CbmAnaConversionRecoFull.h:271
CbmAnaConversionRecoFull::fElectrons_momenta_2
std::vector< TVector3 > fElectrons_momenta_2
Definition: CbmAnaConversionRecoFull.h:132
CbmAnaConversionRecoFull::fhElectrons_invmass
TH1D * fhElectrons_invmass
Definition: CbmAnaConversionRecoFull.h:157
CbmAnaConversionGlobalFunctions.h
CbmAnaConversionRecoFull::fHistoList_recofull_new
std::vector< TH1 * > fHistoList_recofull_new[5]
Definition: CbmAnaConversionRecoFull.h:111
CbmLmvmKinematicParams::fMomentumMag
Double_t fMomentumMag
Definition: CbmLmvmKinematicParams.h:19
CbmAnaConversionRecoFull::fElectrons_track_4
std::vector< CbmGlobalTrack * > fElectrons_track_4
Definition: CbmAnaConversionRecoFull.h:143
CbmTrackMatchNew
Definition: CbmTrackMatchNew.h:19
CbmAnaConversionRecoFull::fhElectrons_openingAngle_sameSign_new
TH1D * fhElectrons_openingAngle_sameSign_new[5]
Definition: CbmAnaConversionRecoFull.h:290
CbmAnaConversionRecoFull::CalculateKinematicParamsReco
CbmLmvmKinematicParams CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
Definition: CbmAnaConversionRecoFull.cxx:2124
CbmAnaConversionRecoFull::fElectrons_globaltrackID_new
std::vector< int > fElectrons_globaltrackID_new[5]
Definition: CbmAnaConversionRecoFull.h:153
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_ptBin3
TH1D * fhPhotons_invmass_cut_ptBin3
Definition: CbmAnaConversionRecoFull.h:178
CbmAnaConversionRecoFull::fhPhotons_RefitPion_chiDistribution
TH1D * fhPhotons_RefitPion_chiDistribution
Definition: CbmAnaConversionRecoFull.h:200
CbmLitGlobalElectronId.h
CbmMCTrack::Get4Momentum
void Get4Momentum(TLorentzVector &momentum) const
Definition: CbmMCTrack.h:177
CbmAnaConversionRecoFull::fElectrons_momenta_4
std::vector< TVector3 > fElectrons_momenta_4
Definition: CbmAnaConversionRecoFull.h:144
CbmAnaConversionRecoFull::fhPhotons_nofPerEvent_2
TH1D * fhPhotons_nofPerEvent_2
Definition: CbmAnaConversionRecoFull.h:232
CbmAnaConversionRecoFull::Init
void Init()
Definition: CbmAnaConversionRecoFull.cxx:242
CbmAnaConversionRecoFull::InitHistos
void InitHistos()
Definition: CbmAnaConversionRecoFull.cxx:300
CbmAnaConversionRecoFull::fhPhotons_invmass_cut_ptBin1
TH1D * fhPhotons_invmass_cut_ptBin1
Definition: CbmAnaConversionRecoFull.h:176
CbmAnaConversionRecoFull::fhPhotons_invmass_new
TH1D * fhPhotons_invmass_new[5]
Definition: CbmAnaConversionRecoFull.h:268
M2E
#define M2E
Definition: CbmAnaConversionRecoFull.cxx:37
CbmAnaConversionRecoFull::Exec
void Exec()
Definition: CbmAnaConversionRecoFull.cxx:1465
CbmAnaConversionRecoFull::fVector_photons_pairs_2
std::vector< std::vector< int > > fVector_photons_pairs_2
Definition: CbmAnaConversionRecoFull.h:135
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmAnaConversionRecoFull::fElectrons_momenta_3
std::vector< TVector3 > fElectrons_momenta_3
Definition: CbmAnaConversionRecoFull.h:138
CbmAnaConversionRecoFull.h
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin4_1
TH1D * fhPhotons_invmass_ptBin4_1
Definition: CbmAnaConversionRecoFull.h:226
CbmAnaConversionRecoFull::fhPhotons_invmass_2
TH1D * fhPhotons_invmass_2
Definition: CbmAnaConversionRecoFull.h:233
CbmAnaConversionRecoFull::fhPhotons_invmass_refit
TH1D * fhPhotons_invmass_refit
Definition: CbmAnaConversionRecoFull.h:206
CbmAnaConversionRecoFull::fhPhotons_peakCheck2
TH1D * fhPhotons_peakCheck2[5]
Definition: CbmAnaConversionRecoFull.h:294
CbmAnaConversionRecoFull::MixedEventTest3
void MixedEventTest3()
Definition: CbmAnaConversionRecoFull.cxx:3673
CbmAnaConversionRecoFull::fhPhotons_boostAngle
TH1D * fhPhotons_boostAngle
Definition: CbmAnaConversionRecoFull.h:212
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcutTest2_new
TH1D * fhPhotons_invmass_MCcutTest2_new[5]
Definition: CbmAnaConversionRecoFull.h:286
CbmLitGlobalElectronId::GetInstance
static CbmLitGlobalElectronId & GetInstance()
Definition: CbmLitGlobalElectronId.h:32
CbmAnaConversionRecoFull::fhPhotons_openingAngle_vs_momentum
TH2D * fhPhotons_openingAngle_vs_momentum
Definition: CbmAnaConversionRecoFull.h:187
CbmAnaConversionRecoFull::fhPhotons_Refit_chiDistribution
TH1D * fhPhotons_Refit_chiDistribution
Definition: CbmAnaConversionRecoFull.h:199
CbmLmvmKinematicParams
Definition: CbmLmvmKinematicParams.h:17
CbmLmvmKinematicParams::fPt
Double_t fPt
Definition: CbmLmvmKinematicParams.h:20
CbmAnaConversionRecoFull::CalculateKinematicParams_4particles
CbmLmvmKinematicParams CalculateKinematicParams_4particles(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
Definition: CbmAnaConversionRecoFull.cxx:2156
CbmAnaConversionRecoFull::fhMomentumFits_pi0reco
TH1D * fhMomentumFits_pi0reco
Definition: CbmAnaConversionRecoFull.h:117
CbmAnaConversionRecoFull::fhPhotons_tX
TH1D * fhPhotons_tX
Definition: CbmAnaConversionRecoFull.h:216
CbmAnaConversionRecoFull::fhElectrons_nofPerEvent_4
TH1D * fhElectrons_nofPerEvent_4
Definition: CbmAnaConversionRecoFull.h:253
CbmAnaConversionRecoFull::fHistoList_recofull
std::vector< TH1 * > fHistoList_recofull
Definition: CbmAnaConversionRecoFull.h:106
CbmAnaConversionRecoFull::fhPhotons_invmass_MCcut4_new
TH1D * fhPhotons_invmass_MCcut4_new[5]
Definition: CbmAnaConversionRecoFull.h:281
CbmAnaConversionRecoFull::MixedEventTest4
void MixedEventTest4()
Definition: CbmAnaConversionRecoFull.cxx:3776
CbmAnaConversionRecoFull::fMixedEventsElectrons_gtrack
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_gtrack[5]
Definition: CbmAnaConversionRecoFull.h:304
CbmAnaConversionRecoFull::fElectrons_mctrackID_4
std::vector< int > fElectrons_mctrackID_4
Definition: CbmAnaConversionRecoFull.h:146
CbmAnaConversionRecoFull::fhPhotons_invmass
TH1D * fhPhotons_invmass
Definition: CbmAnaConversionRecoFull.h:165
CbmAnaConversionRecoFull::fMixedEventsElectrons_list4_gtrack
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list4_gtrack
Definition: CbmAnaConversionRecoFull.h:315
CbmAnaConversionRecoFull::fhMixedEventsTest3_invmass
TH1D * fhMixedEventsTest3_invmass
Definition: CbmAnaConversionRecoFull.h:323
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin3_2
TH1D * fhPhotons_invmass_ptBin3_2
Definition: CbmAnaConversionRecoFull.h:236
CbmKFVertex
Definition: CbmKFVertex.h:6
CbmAnaConversionRecoFull::CombineElectrons
void CombineElectrons()
Definition: CbmAnaConversionRecoFull.cxx:3082
CbmAnaConversionRecoFull::fhMixedEventsTest4_invmass_ptBin1
TH1D * fhMixedEventsTest4_invmass_ptBin1
Definition: CbmAnaConversionRecoFull.h:334
CbmLmvmKinematicParams::fAngle
Double_t fAngle
Definition: CbmLmvmKinematicParams.h:23
CbmAnaConversionRecoFull::fhPhotons_Refit_chiDiff
TH1D * fhPhotons_Refit_chiDiff
Definition: CbmAnaConversionRecoFull.h:197
CbmAnaConversionKinematicParams::fRapidity
Double_t fRapidity
Definition: CbmAnaConversionKinematicParams.h:20
CbmAnaConversionRecoFull::Pt_4particlesRECO
Double_t Pt_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
Definition: CbmAnaConversionRecoFull.cxx:2062
CbmAnaConversionRecoFull::fhPhotons_invmass_ptBin4_new
TH1D * fhPhotons_invmass_ptBin4_new[5]
Definition: CbmAnaConversionRecoFull.h:273