CbmRoot
CbmAnaConversionPhotons.cxx
Go to the documentation of this file.
1 
9 
10 #include "CbmDrawHist.h"
11 #include "CbmGlobalTrack.h"
12 #include "CbmL1PFFitter.h"
13 #include "CbmMCTrack.h"
14 #include "CbmRichPoint.h"
15 #include "CbmRichRing.h"
16 #include "CbmStsTrack.h"
17 #include "CbmTrackMatchNew.h"
18 #include "FairLogger.h"
19 #include "FairRootManager.h"
20 #include "L1Field.h"
21 //#include "CbmStsKFTrackFitter.h"
22 #include "CbmLitGlobalElectronId.h"
23 
24 #include <algorithm>
25 #include <map>
26 
27 #include "TCanvas.h"
28 
29 
31 
32 
33 using namespace std;
34 
35 
37  : fRichPoints(NULL)
38  , fRichRings(NULL)
39  , fRichRingMatches(NULL)
40  , fMcTracks(NULL)
41  , fStsTracks(NULL)
42  , fStsTrackMatches(NULL)
43  , fGlobalTracks(NULL)
44  , fPrimVertex(NULL)
45  , fKFVertex()
46  , fHistoList_photons()
47  , fHistoList_EFG()
48  , fHistoList_EFG_angle()
49  , fHistoList_EFG_invmass()
50  , fHistoList_EFG_energy()
51  , fPhotons_nofPerEvent(NULL)
52  , fPhotons_pt(NULL)
53  , fPhotons_test(NULL)
54  , fPhotons_nofMC(NULL)
55  , fPhotons_energyMC(NULL)
56  , fPhotons_ptMC(NULL)
57  , fPhotons_ptRapMC(NULL)
58  , fPhotonsRest_energyMC(NULL)
59  , fPhotonsRest_pdgMotherMC(NULL)
60  , fPhotonsRest_ptMC(NULL)
61  , fPhotonsRest_ptMC_pi0(NULL)
62  , fPhotonsRest_ptMC_n(NULL)
63  , fPhotonsRest_ptMC_e(NULL)
64  , fPhotonsRest_ptMC_eta(NULL)
65  , fMCTracklist()
66  , fMCTracklist_allElectronsFromGamma()
67  , fRecoTracklist_allElectronsFromGamma()
68  , fRecoTracklist_allElectronsFromGammaMom()
69  , fRecoTracklist_allElectronsFromPi0()
70  , fRecoTracklist_allElectronsFromPi0Mom()
71  , fMCTracklist_allGammas()
72  , fMCTracklist_allGammasFromPi0()
73  , global_nof_photonsMC(0)
74  , global_nof_photonsReco(0)
75  , fhGlobalNofDirectPhotons(NULL)
76  , fhEFG_angle_all(NULL)
77  , fhEFG_angle_combBack(NULL)
78  , fhEFG_angle_allSameG(NULL)
79  , fhEFG_angle_direct(NULL)
80  , fhEFG_angle_pi0(NULL)
81  , fhEFG_angle_eta(NULL)
82  ,
83  //fhEFG_angleVSenergy_all(NULL),
84  //fhEFG_angleVSenergy_combBack(NULL),
85  fhEFG_angleVSenergy_allSameG(NULL)
86  , fhEFG_angleVSenergy_direct(NULL)
87  , fhEFG_angleVSenergy_pi0(NULL)
88  , fhEFG_angleVSenergy_eta(NULL)
89  , fhEFG_angleVSpt_all(NULL)
90  , fhEFG_angleVSpt_combBack(NULL)
91  , fhEFG_angleVSpt_allSameG(NULL)
92  , fhEFG_angleVSpt_direct(NULL)
93  , fhEFG_angleVSpt_pi0(NULL)
94  , fhEFG_angleVSpt_eta(NULL)
95  , fhEFG_invmass_all(NULL)
96  , fhEFG_invmass_combBack(NULL)
97  , fhEFG_invmass_allSameG(NULL)
98  , fhEFG_invmass_direct(NULL)
99  , fhEFG_invmass_pi0(NULL)
100  , fhEFG_invmass_eta(NULL)
101  , fhEFG_energy_all(NULL)
102  , fhEFG_energy_combBack(NULL)
103  , fhEFG_energy_allSameG(NULL)
104  , fhEFG_energy_direct(NULL)
105  , fhEFG_energy_pi0(NULL)
106  , fhEFG_energy_eta(NULL)
107  , fhEFG_angleBelow1GeV_all(NULL)
108  , fhEFG_angleBelow1GeV_combBack(NULL)
109  , fhEFG_angleBelow1GeV_allSameG(NULL)
110  , fhEFG_angleBelow1GeV_direct(NULL)
111  , fhEFG_angleBelow1GeV_pi0(NULL)
112  , fhEFG_angleBelow1GeV_eta(NULL)
113  , fhEFG_angleAbove1GeV_all(NULL)
114  , fhEFG_angleAbove1GeV_combBack(NULL)
115  , fhEFG_angleAbove1GeV_allSameG(NULL)
116  , fhEFG_angleAbove1GeV_direct(NULL)
117  , fhEFG_angleAbove1GeV_pi0(NULL)
118  , fhEFG_angleAbove1GeV_eta(NULL)
119  , fhEFG_momentumPair_all(NULL)
120  , fhEFG_momentumPair_combBack(NULL)
121  , fhEFG_momentumPair_allSameG(NULL)
122  , fhEFG_momentumPair_direct(NULL)
123  , fhEFG_momentumPair_pi0(NULL)
124  , fhEFG_momentumPair_eta(NULL)
125  ,
126  //fhEFG_startvertexVSangle_all(NULL),
127  //fhEFG_startvertexVSangle_combBack(NULL),
128  fhEFG_startvertexVSangle_allSameG(NULL)
129  , fhEFG_startvertexVSangle_direct(NULL)
130  , fhEFG_startvertexVSangle_pi0(NULL)
131  , fhEFG_startvertexVSangle_eta(NULL)
132  , fhEFG_startvertex_allSameG(NULL)
133  , fhEFG_angle_all_reco(NULL)
134  , fhEFG_angle_combBack_reco(NULL)
135  , fhEFG_angle_allSameG_reco(NULL)
136  , fhEFG_angle_direct_reco(NULL)
137  , fhEFG_angle_pi0_reco(NULL)
138  , fhEFG_angle_eta_reco(NULL)
139  , fhEFG_angle_all_reco_cuts(NULL)
140  , fhEFG_angle_combBack_reco_cuts(NULL)
141  , fhEFG_angle_allSameG_reco_cuts(NULL)
142  , fhEFG_angle_reco_CUTcomparison(NULL)
143  , fhEFG_angleBelow1GeV_all_reco(NULL)
144  , fhEFG_angleBelow1GeV_combBack_reco(NULL)
145  , fhEFG_angleBelow1GeV_allSameG_reco(NULL)
146  , fhEFG_angleBelow1GeV_direct_reco(NULL)
147  , fhEFG_angleBelow1GeV_pi0_reco(NULL)
148  , fhEFG_angleBelow1GeV_eta_reco(NULL)
149  , fhEFG_invmass_all_reco(NULL)
150  , fhEFG_invmass_combBack_reco(NULL)
151  , fhEFG_invmass_allSameG_reco(NULL)
152  , fhEFG_invmass_direct_reco(NULL)
153  , fhEFG_invmass_pi0_reco(NULL)
154  , fhEFG_invmass_eta_reco(NULL)
155  , fhEFG_invmass_all_reco_cut(NULL)
156  , fhEFG_invmass_combBack_reco_cut(NULL)
157  , fhEFG_invmass_allSameG_reco_cut(NULL)
158  , fhEFG_invmass_direct_reco_cut(NULL)
159  , fhEFG_invmass_pi0_reco_cut(NULL)
160  , fhEFG_invmass_eta_reco_cut(NULL)
161  , fhEFG_angleVSpt_all_reco(NULL)
162  , fhEFG_angleVSpt_combBack_reco(NULL)
163  , fhEFG_angleVSpt_allSameG_reco(NULL)
164  , fhEFG_angleVSpt_direct_reco(NULL)
165  , fhEFG_angleVSpt_pi0_reco(NULL)
166  , fhEFG_angleVSpt_eta_reco(NULL)
167  , fhEFG_invmassVSpt_all_reco(NULL)
168  , fhEFG_invmassVSpt_combBack_reco(NULL)
169  , fhEFG_invmassVSpt_allSameG_reco(NULL)
170  , fhEFG_invmassVSpt_direct_reco(NULL)
171  , fhEFG_invmassVSpt_pi0_reco(NULL)
172  , fhEFG_invmassVSpt_eta_reco(NULL)
173  , fhEFG_momentumResolutionPhoton_reco(NULL)
174  , fhEFG_momentumResolutionElectrons_reco(NULL)
175  , fhEFPI0_angle_reco(NULL)
176  , fhG_invmass(NULL)
177  , fhG_invmass_pi0(NULL)
178  , timer()
179  , fTime(0.) {}
180 
182 
183 
185  FairRootManager* ioman = FairRootManager::Instance();
186  if (NULL == ioman) {
187  Fatal("CbmAnaConversion::Init", "RootManager not instantised!");
188  }
189 
190  fRichPoints = (TClonesArray*) ioman->GetObject("RichPoint");
191  if (NULL == fRichPoints) {
192  Fatal("CbmAnaConversion::Init", "No RichPoint array!");
193  }
194 
195  fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
196  if (NULL == fMcTracks) {
197  Fatal("CbmAnaConversion::Init", "No MCTrack array!");
198  }
199 
200  fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
201  if (NULL == fStsTracks) {
202  Fatal("CbmAnaConversion::Init", "No StsTrack array!");
203  }
204 
205  fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
206  if (NULL == fStsTrackMatches) {
207  Fatal("CbmAnaConversion::Init", "No StsTrackMatch array!");
208  }
209 
210  fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
211  if (NULL == fGlobalTracks) {
212  Fatal("CbmAnaConversion::Init", "No GlobalTrack array!");
213  }
214 
215  // Get pointer to PrimaryVertex object from IOManager if it exists
216  // The old name for the object is "PrimaryVertex" the new one
217  // "PrimaryVertex." Check first for the new name
218  fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
219  if (nullptr == fPrimVertex) {
220  fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex"));
221  }
222  if (nullptr == fPrimVertex) { LOG(fatal) << "No PrimaryVertex array!"; }
223 
224  fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
225  if (NULL == fRichRings) {
226  Fatal("CbmAnaConversion::Init", "No RichRing array!");
227  }
228 
229  fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
230  if (NULL == fRichRingMatches) {
231  Fatal("CbmAnaConversion::Init", "No RichRingMatch array!");
232  }
233 
234 
235  InitHistos();
236 
239 }
240 
241 
243  fHistoList_photons.clear();
244  fHistoList_EFG.clear();
245  fHistoList_EFG_angle.clear();
246  fHistoList_EFG_invmass.clear();
247  fHistoList_EFG_energy.clear();
248 
250  new TH1I("fPhotons_nofPerEvent",
251  "fPhotons_nofPerEvent; nof photons per event; #",
252  30,
253  -0.5,
254  29.5);
256  fPhotons_pt = new TH1D("fPhotons_pt", "fPhotons_pt; pt; #", 50, -0.5, 4.5);
257  fHistoList_photons.push_back(fPhotons_pt);
258  fPhotons_test =
259  new TH1I("fPhotons_test", "fPhotons_test; test; #", 10, -0.5, 9.5);
261 
263  new TH1I("fPhotons_nofMC", "fPhotons_nofMC; test; #", 100, -0.5, 99.5);
265  fPhotons_energyMC = new TH1D(
266  "fPhotons_energyMC", "fPhotons_energyMC; energy; #", 500, -0.5, 49.5);
268  fPhotons_ptMC =
269  new TH1D("fPhotons_ptMC", "fPhotons_ptMC; pt; #", 500, -0.5, 4.5);
271  fPhotons_ptRapMC = new TH2D("fPhotons_ptRapMC",
272  "fPhotons_ptRapMC; pt; #",
273  500,
274  -0.5,
275  4.5,
276  1000,
277  -0.5,
278  9.5);
280  fPhotonsRest_energyMC = new TH1D("fPhotonsRest_energyMC",
281  "fPhotonsRest_energyMC; energy; #",
282  500,
283  -0.5,
284  49.5);
286  fPhotonsRest_pdgMotherMC = new TH1D("fPhotonsRest_pdgMotherMC",
287  "fPhotonsRest_pdgMotherMC; pdg code; #",
288  5000,
289  -0.5,
290  4999.5);
293  new TH1D("fPhotonsRest_ptMC", "fPhotonsRest_ptMC; pt; #", 500, -0.5, 4.5);
295 
296  fPhotonsRest_ptMC_pi0 = new TH1D("fDirectPhotonsRest_ptMC_pi0",
297  "fDirectPhotonsRest_ptMC_pi0; pt; #",
298  500,
299  -0.5,
300  4.5);
302  fPhotonsRest_ptMC_n = new TH1D(
303  "fPhotonsRest_ptMC_n", "fPhotonsRest_ptMC_n; pt; #", 500, -0.5, 4.5);
305  fPhotonsRest_ptMC_e = new TH1D(
306  "fPhotonsRest_ptMC_e", "fPhotonsRest_ptMC_e; pt; #", 500, -0.5, 4.5);
308  fPhotonsRest_ptMC_eta = new TH1D(
309  "fPhotonsRest_ptMC_eta", "fPhotonsRest_ptMC_eta; pt; #", 500, -0.5, 4.5);
311 
312  fhGlobalNofDirectPhotons = new TH1D(
313  "fhGlobalNofDirectPhotons", "fhGlobalNofDirectPhotons; ; #", 2, 0., 2.);
315  fhGlobalNofDirectPhotons->GetXaxis()->SetBinLabel(
316  1, "nof global DP"); // number of all direct photons from MC
317  fhGlobalNofDirectPhotons->GetXaxis()->SetBinLabel(
318  2,
319  "nof reconstructed DP"); // number of all direct photons which can be reconstructed
320 
321 
322  fhEFG_angle_all = new TH1D("fhEFG_angle_all",
323  "fhEFG_angle_all; opening angle [deg]; #",
324  2000,
325  0.,
326  100.);
328  new TH1D("fhEFG_angle_combBack",
329  "fhEFG_angle_combBack; opening angle [deg]; #",
330  2000,
331  0.,
332  100.);
334  new TH1D("fhEFG_angle_allSameG",
335  "fhEFG_angle_allSameG; opening angle [deg]; #",
336  400,
337  0.,
338  20.);
339  fhEFG_angle_direct = new TH1D("fhEFG_angle_direct",
340  "fhEFG_angle_direct; opening angle [deg]; #",
341  400,
342  0.,
343  20.);
344  fhEFG_angle_pi0 = new TH1D(
345  "fhEFG_angle_pi0", "fhEFG_angle_pi0; opening angle [deg]; #", 400, 0., 20.);
346  fhEFG_angle_eta = new TH1D(
347  "fhEFG_angle_eta", "fhEFG_angle_eta; opening angle [deg]; #", 400, 0., 20.);
354  fhEFG_invmass_all = new TH1D("fhEFG_invmass_all",
355  "fhEFG_invmass_all; invmass [GeV/c^2]; #",
356  5000,
357  0.,
358  0.5);
360  new TH1D("fhEFG_invmass_combBack",
361  "fhEFG_invmass_combBack; invmass [GeV/c^2]; #",
362  5000,
363  0.,
364  0.5);
366  new TH1D("fhEFG_invmass_allSameG",
367  "fhEFG_invmass_allSameG; invmass [GeV/c^2]; #",
368  1000,
369  0.,
370  0.1);
371  fhEFG_invmass_direct = new TH1D("fhEFG_invmass_direct",
372  "fhEFG_invmass_direct; invmass [GeV/c^2]; #",
373  1000,
374  0.,
375  0.1);
376  fhEFG_invmass_pi0 = new TH1D("fhEFG_invmass_pi0",
377  "fhEFG_invmass_pi0; invmass [GeV/c^2]; #",
378  1000,
379  0.,
380  0.1);
381  fhEFG_invmass_eta = new TH1D("fhEFG_invmass_eta",
382  "fhEFG_invmass_eta; invmass [GeV/c^2]; #",
383  1000,
384  0.,
385  0.1);
392  fhEFG_energy_all = new TH1D(
393  "fhEFG_energy_all", "fhEFG_energy_all; energy [GeV]; #", 1000, 0., 50);
394  fhEFG_energy_combBack = new TH1D("fhEFG_energy_combBack",
395  "fhEFG_energy_combBack; energy [GeV]; #",
396  1000,
397  0.,
398  50);
399  fhEFG_energy_allSameG = new TH1D("fhEFG_energy_allSameG",
400  "fhEFG_energy_allSameG; energy [GeV]; #",
401  1000,
402  0.,
403  50);
404  fhEFG_energy_direct = new TH1D("fhEFG_energy_direct",
405  "fhEFG_energy_direct; energy [GeV]; #",
406  1000,
407  0.,
408  50);
409  fhEFG_energy_pi0 = new TH1D(
410  "fhEFG_energy_pi0", "fhEFG_energy_pi0; energy [GeV]; #", 1000, 0., 50);
411  fhEFG_energy_eta = new TH1D(
412  "fhEFG_energy_eta", "fhEFG_energy_eta; energy [GeV]; #", 1000, 0., 50);
419 
420  // opening angles for photon-energies below 1 GeV
422  new TH1D("fhEFG_angleBelow1GeV_all",
423  "fhEFG_angleBelow1GeV_all; opening angle [deg]; #",
424  2000,
425  0.,
426  100.);
428  new TH1D("fhEFG_angleBelow1GeV_combBack",
429  "fhEFG_angleBelow1GeV_combBack; opening angle [deg]; #",
430  2000,
431  0.,
432  100.);
434  new TH1D("fhEFG_angleBelow1GeV_allSameG",
435  "fhEFG_angleBelow1GeV_allSameG; opening angle [deg]; #",
436  400,
437  0.,
438  20.);
440  new TH1D("fhEFG_angleBelow1GeV_direct",
441  "fhEFG_angleBelow1GeV_direct; opening angle [deg]; #",
442  400,
443  0.,
444  20.);
446  new TH1D("fhEFG_angleBelow1GeV_pi0",
447  "fhEFG_angleBelow1GeV_pi0; opening angle [deg]; #",
448  400,
449  0.,
450  20.);
452  new TH1D("fhEFG_angleBelow1GeV_eta",
453  "fhEFG_angleBelow1GeV_eta; opening angle [deg]; #",
454  400,
455  0.,
456  20.);
463 
464  // opening angles for photon-energies above 1 GeV
466  new TH1D("fhEFG_angleAbove1GeV_all",
467  "fhEFG_angleAbove1GeV_all; opening angle [deg]; #",
468  2000,
469  0.,
470  100.);
472  new TH1D("fhEFG_angleAbove1GeV_combBack",
473  "fhEFG_angleAbove1GeV_combBack; opening angle [deg]; #",
474  2000,
475  0.,
476  100.);
478  new TH1D("fhEFG_angleAbove1GeV_allSameG",
479  "fhEFG_angleAbove1GeV_allSameG; opening angle [deg]; #",
480  400,
481  0.,
482  20.);
484  new TH1D("fhEFG_angleAbove1GeV_direct",
485  "fhEFG_angleAbove1GeV_direct; opening angle [deg]; #",
486  400,
487  0.,
488  20.);
490  new TH1D("fhEFG_angleAbove1GeV_pi0",
491  "fhEFG_angleAbove1GeV_pi0; opening angle [deg]; #",
492  400,
493  0.,
494  20.);
496  new TH1D("fhEFG_angleAbove1GeV_eta",
497  "fhEFG_angleAbove1GeV_eta; opening angle [deg]; #",
498  400,
499  0.,
500  20.);
507 
508  // opening angle vs energy (MC)
509  //fhEFG_angleVSenergy_all = new TH2D("fhEFG_angleVSenergy_all", "fhEFG_angleVSenergy_all;opening angle [deg];energy [GeV]", 2000, 0., 100., 5000, 0., 50.);
510  //fhEFG_angleVSenergy_combBack = new TH2D("fhEFG_angleVSenergy_combBack", "fhEFG_angleVSenergy_combBack;opening angle [deg];energy [GeV]", 2000, 0., 100., 5000, 0., 50.);
512  new TH2D("fhEFG_angleVSenergy_allSameG",
513  "fhEFG_angleVSenergy_allSameG;energy [GeV];opening angle [deg]",
514  5000,
515  0.,
516  50.,
517  400,
518  0.,
519  20.);
521  new TH2D("fhEFG_angleVSenergy_direct",
522  "fhEFG_angleVSenergy_direct;energy [GeV];opening angle [deg]",
523  5000,
524  0.,
525  50.,
526  400,
527  0.,
528  20.);
530  new TH2D("fhEFG_angleVSenergy_pi0",
531  "fhEFG_angleVSenergy_pi0;energy [GeV];opening angle [deg]",
532  5000,
533  0.,
534  50.,
535  400,
536  0.,
537  20.);
539  new TH2D("fhEFG_angleVSenergy_eta",
540  "fhEFG_angleVSenergy_eta;energy [GeV];opening angle [deg]",
541  5000,
542  0.,
543  50.,
544  400,
545  0.,
546  20.);
547  //fHistoList_EFG_angle.push_back(fhEFG_angleVSenergy_all);
548  //fHistoList_EFG_angle.push_back(fhEFG_angleVSenergy_combBack);
553 
554  // opening angle vs pt (MC)
556  new TH2D("fhEFG_angleVSpt_all",
557  "fhEFG_angleVSpt_all;pt [GeV/c];opening angle [deg]",
558  500,
559  0.,
560  5.,
561  400,
562  0.,
563  20.);
565  new TH2D("fhEFG_angleVSpt_combBack",
566  "fhEFG_angleVSpt_combBack;pt [GeV/c];opening angle [deg]",
567  500,
568  0.,
569  5.,
570  400,
571  0.,
572  20.);
574  new TH2D("fhEFG_angleVSpt_allSameG",
575  "fhEFG_angleVSpt_allSameG;pt [GeV/c];opening angle [deg]",
576  500,
577  0.,
578  5.,
579  400,
580  0.,
581  20.);
583  new TH2D("fhEFG_angleVSpt_direct",
584  "fhEFG_angleVSpt_direct;pt [GeV/c];opening angle [deg]",
585  500,
586  0.,
587  5.,
588  400,
589  0.,
590  20.);
592  new TH2D("fhEFG_angleVSpt_pi0",
593  "fhEFG_angleVSpt_pi0;pt [GeV/c];opening angle [deg]",
594  500,
595  0.,
596  5.,
597  400,
598  0.,
599  20.);
601  new TH2D("fhEFG_angleVSpt_eta",
602  "fhEFG_angleVSpt_eta;pt [GeV/c];opening angle [deg]",
603  500,
604  0.,
605  5.,
606  400,
607  0.,
608  20.);
615 
616  // momentum of the e+e- pair (sum)
617  fhEFG_momentumPair_all = new TH1D("fhEFG_momentumPair_all",
618  "fhEFG_momentumPair_all; energy [GeV]; #",
619  1000,
620  0.,
621  50);
623  new TH1D("fhEFG_momentumPair_combBack",
624  "fhEFG_momentumPair_combBack; energy [GeV]; #",
625  1000,
626  0.,
627  50);
629  new TH1D("fhEFG_momentumPair_allSameG",
630  "fhEFG_momentumPair_allSameG; energy [GeV]; #",
631  1000,
632  0.,
633  50);
635  new TH1D("fhEFG_momentumPair_direct",
636  "fhEFG_momentumPair_direct; energy [GeV]; #",
637  1000,
638  0.,
639  50);
640  fhEFG_momentumPair_pi0 = new TH1D("fhEFG_momentumPair_pi0",
641  "fhEFG_momentumPair_pi0; energy [GeV]; #",
642  1000,
643  0.,
644  50);
645  fhEFG_momentumPair_eta = new TH1D("fhEFG_momentumPair_eta",
646  "fhEFG_momentumPair_eta; energy [GeV]; #",
647  1000,
648  0.,
649  50);
656 
657  //fhEFG_startvertexVSangle_all = new TH2D("fhEFG_startvertexVSangle_all", "fhEFG_startvertexVSangle_all; startvertex; angle", 100, -0.01, 0.02, 2000, 0., 100.);
658  //fhEFG_startvertexVSangle_combBack = new TH2D("fhEFG_startvertexVSangle_combBack", "fhEFG_startvertexVSangle_combBack; startvertex; angle", 100, -0.01, 0.02, 2000, 0., 100.);
660  new TH2D("fhEFG_startvertexVSangle_allSameG",
661  "fhEFG_startvertexVSangle_allSameG; startvertex [cm]; angle [deg]",
662  200,
663  -0.02,
664  0.02,
665  400,
666  0.,
667  20.);
669  new TH2D("fhEFG_startvertexVSangle_direct",
670  "fhEFG_startvertexVSangle_direct; startvertex [cm]; angle [deg]",
671  200,
672  -0.02,
673  0.02,
674  400,
675  0.,
676  20.);
678  new TH2D("fhEFG_startvertexVSangle_pi0",
679  "fhEFG_startvertexVSangle_pi0; startvertex [cm]; angle [deg]",
680  200,
681  -0.02,
682  0.02,
683  400,
684  0.,
685  20.);
687  new TH2D("fhEFG_startvertexVSangle_eta",
688  "fhEFG_startvertexVSangle_eta; startvertex [cm]; angle [deg]",
689  200,
690  -0.02,
691  0.02,
692  400,
693  0.,
694  20.);
695  //fHistoList_EFG.push_back(fhEFG_startvertexVSangle_all);
696  //fHistoList_EFG.push_back(fhEFG_startvertexVSangle_combBack);
701 
703  new TH1D("fhEFG_startvertex_allSameG",
704  "fhEFG_startvertex_allSameG; startvertex [cm];#",
705  200,
706  -0.02,
707  0.02);
709 
710 
711  // opening angles for all photon-energies (RECO)
713  new TH1D("fhEFG_angle_all_reco",
714  "fhEFG_angle_all_reco; opening angle [deg]; #",
715  2001,
716  -0.05,
717  200.05);
719  new TH1D("fhEFG_angle_combBack_reco",
720  "fhEFG_angle_combBack_reco; opening angle [deg]; #",
721  2001,
722  -0.05,
723  200.05);
725  new TH1D("fhEFG_angle_allSameG_reco",
726  "fhEFG_angle_allSameG_reco; opening angle [deg]; #",
727  1001,
728  -0.05,
729  100.05);
731  new TH1D("fhEFG_angle_direct_reco",
732  "fhEFG_angle_direct_reco; opening angle [deg]; #",
733  1001,
734  -0.05,
735  100.05);
737  new TH1D("fhEFG_angle_pi0_reco",
738  "fhEFG_angle_pi0_reco; opening angle [deg]; #",
739  1001,
740  -0.05,
741  100.05);
743  new TH1D("fhEFG_angle_eta_reco",
744  "fhEFG_angle_eta_reco; opening angle [deg]; #",
745  1001,
746  -0.05,
747  100.05);
754 
755 
756  // histogram for comparison of different opening angle cuts and their influence on signal and background amounts
758  new TH1I("fhEFG_angle_reco_CUTcomparison",
759  "fhEFG_angle_reco_CUTcomparison; ; #",
760  12,
761  0.,
762  12.);
764  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(1, "true, no cut");
765  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(2, "false, no cut");
766  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(3, "true, cut1");
767  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(4, "false, cut1");
768  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(5, "true, cut2");
769  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(6, "false, cut2");
770  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(7, "true, cut3");
771  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(8, "false, cut3");
772  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(9, "true, cut4");
773  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(10, "false, cut4");
774  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(11, "true, cut5");
775  fhEFG_angle_reco_CUTcomparison->GetXaxis()->SetBinLabel(12, "false, cut5");
776 
777 
778  // opening angles for all photon-energies (RECO) with application of opening angle cuts
780  new TH1D("fhEFG_angle_all_reco_cuts",
781  "fhEFG_angle_all_reco_cuts; opening angle [deg]; #",
782  101,
783  -0.05,
784  10.05);
786  new TH1D("fhEFG_angle_combBack_reco_cuts",
787  "fhEFG_angle_combBack_reco_cuts; opening angle [deg]; #",
788  101,
789  -0.05,
790  10.05);
792  new TH1D("fhEFG_angle_allSameG_reco_cuts",
793  "fhEFG_angle_allSameG_reco_cuts; opening angle [deg]; #",
794  101,
795  -0.05,
796  10.05);
800 
801 
802  // opening angles for photon-energies below 1 GeV (RECO)
804  new TH1D("fhEFG_angleBelow1GeV_all_reco",
805  "fhEFG_angleBelow1GeV_all_reco; opening angle [deg]; #",
806  2000,
807  0.,
808  100.);
810  new TH1D("fhEFG_angleBelow1GeV_combBack_reco",
811  "fhEFG_angleBelow1GeV_combBack_reco; opening angle [deg]; #",
812  2000,
813  0.,
814  100.);
816  new TH1D("fhEFG_angleBelow1GeV_allSameG_reco",
817  "fhEFG_angleBelow1GeV_allSameG_reco; opening angle [deg]; #",
818  2000,
819  0.,
820  100.);
822  new TH1D("fhEFG_angleBelow1GeV_direct_reco",
823  "fhEFG_angleBelow1GeV_direct_reco; opening angle [deg]; #",
824  2000,
825  0.,
826  100.);
828  new TH1D("fhEFG_angleBelow1GeV_pi0_reco",
829  "fhEFG_angleBelow1GeV_pi0_reco; opening angle [deg]; #",
830  2000,
831  0.,
832  100.);
834  new TH1D("fhEFG_angleBelow1GeV_eta_reco",
835  "fhEFG_angleBelow1GeV_eta_reco; opening angle [deg]; #",
836  2000,
837  0.,
838  100.);
845 
847  new TH1D("fhEFG_invmass_all_reco",
848  "fhEFG_invmass_all_reco; invmass [GeV/c^2]; #",
849  5000,
850  0.,
851  5.);
853  new TH1D("fhEFG_invmass_combBack_reco",
854  "fhEFG_invmass_combBack_reco; invmass [GeV/c^2]; #",
855  5000,
856  0.,
857  5.);
859  new TH1D("fhEFG_invmass_allSameG_reco",
860  "fhEFG_invmass_allSameG_reco; invmass [GeV/c^2]; #",
861  5000,
862  0.,
863  5);
865  new TH1D("fhEFG_invmass_direct_reco",
866  "fhEFG_invmass_direct_reco; invmass [GeV/c^2]; #",
867  5000,
868  0.,
869  5);
871  new TH1D("fhEFG_invmass_pi0_reco",
872  "fhEFG_invmass_pi0_reco; invmass [GeV/c^2]; #",
873  5000,
874  0.,
875  5);
877  new TH1D("fhEFG_invmass_eta_reco",
878  "fhEFG_invmass_eta_reco; invmass [GeV/c^2]; #",
879  5000,
880  0.,
881  5);
888 
890  new TH1D("fhEFG_invmass_all_reco_cut",
891  "fhEFG_invmass_all_reco_cut; invmass [GeV/c^2]; #",
892  5000,
893  0.,
894  5.);
896  new TH1D("fhEFG_invmass_combBack_reco_cut",
897  "fhEFG_invmass_combBack_reco_cut; invmass [GeV/c^2]; #",
898  5000,
899  0.,
900  5.);
902  new TH1D("fhEFG_invmass_allSameG_reco_cut",
903  "fhEFG_invmass_allSameG_reco_cut; invmass [GeV/c^2]; #",
904  5000,
905  0.,
906  5);
908  new TH1D("fhEFG_invmass_direct_reco_cut",
909  "fhEFG_invmass_direct_reco_cut; invmass [GeV/c^2]; #",
910  5000,
911  0.,
912  5);
914  new TH1D("fhEFG_invmass_pi0_reco_cut",
915  "fhEFG_invmass_pi0_reco_cut; invmass [GeV/c^2]; #",
916  5000,
917  0.,
918  5);
920  new TH1D("fhEFG_invmass_eta_reco_cut",
921  "fhEFG_invmass_eta_reco_cut; invmass [GeV/c^2]; #",
922  5000,
923  0.,
924  5);
931 
932 
933  // opening angle vs pt (reco)
935  new TH2D("fhEFG_angleVSpt_all_reco",
936  "fhEFG_angleVSpt_all_reco;pt [GeV/c];opening angle [deg]",
937  500,
938  0.,
939  5.,
940  400,
941  0.,
942  20.);
944  new TH2D("fhEFG_angleVSpt_combBack_reco",
945  "fhEFG_angleVSpt_combBack_reco;pt [GeV/c];opening angle [deg]",
946  500,
947  0.,
948  5.,
949  400,
950  0.,
951  20.);
953  new TH2D("fhEFG_angleVSpt_allSameG_reco",
954  "fhEFG_angleVSpt_allSameG_reco;pt [GeV/c];opening angle [deg]",
955  500,
956  0.,
957  5.,
958  400,
959  0.,
960  20.);
962  new TH2D("fhEFG_angleVSpt_direct_reco",
963  "fhEFG_angleVSpt_direct_reco;pt [GeV/c];opening angle [deg]",
964  500,
965  0.,
966  5.,
967  400,
968  0.,
969  20.);
971  new TH2D("fhEFG_angleVSpt_pi0_reco",
972  "fhEFG_angleVSpt_pi0_reco;pt [GeV/c];opening angle [deg]",
973  500,
974  0.,
975  5.,
976  400,
977  0.,
978  20.);
980  new TH2D("fhEFG_angleVSpt_eta_reco",
981  "fhEFG_angleVSpt_eta_reco;pt [GeV/c];opening angle [deg]",
982  500,
983  0.,
984  5.,
985  400,
986  0.,
987  20.);
994 
995 
996  // invariant mass vs pt (reco)
998  new TH2D("fhEFG_invmassVSpt_all_reco",
999  "fhEFG_invmassVSpt_all_reco;pt [GeV/c];invmass [GeV]",
1000  500,
1001  0.,
1002  5.,
1003  5000,
1004  0.,
1005  5.);
1007  new TH2D("fhEFG_invmassVSpt_combBack_reco",
1008  "fhEFG_invmassVSpt_combBack_reco;pt [GeV/c];invmass [GeV]",
1009  500,
1010  0.,
1011  5.,
1012  5000,
1013  0.,
1014  5.);
1016  new TH2D("fhEFG_invmassVSpt_allSameG_reco",
1017  "fhEFG_invmassVSpt_allSameG_reco;pt [GeV/c];invmass [GeV]",
1018  500,
1019  0.,
1020  5.,
1021  5000,
1022  0.,
1023  5.);
1025  new TH2D("fhEFG_invmassVSpt_direct_reco",
1026  "fhEFG_invmassVSpt_direct_reco;pt [GeV/c];invmass [GeV]",
1027  500,
1028  0.,
1029  5.,
1030  5000,
1031  0.,
1032  5.);
1034  new TH2D("fhEFG_invmassVSpt_pi0_reco",
1035  "fhEFG_invmassVSpt_pi0_reco;pt [GeV/c];invmass [GeV]",
1036  500,
1037  0.,
1038  5.,
1039  5000,
1040  0.,
1041  5.);
1043  new TH2D("fhEFG_invmassVSpt_eta_reco",
1044  "fhEFG_invmassVSpt_eta_reco;pt [GeV/c];invmass [GeV]",
1045  500,
1046  0.,
1047  5.,
1048  5000,
1049  0.,
1050  5.);
1057 
1058 
1060  new TH2D("fhEFG_momentumResolutionPhoton_reco",
1061  "fhEFG_momentumResolutionPhoton_reco;p [GeV/c]; dp/p [%]",
1062  20,
1063  0.,
1064  20.,
1065  800,
1066  0.,
1067  200.);
1069  new TH2D("fhEFG_momentumResolutionElectrons_reco",
1070  "fhEFG_momentumResolutionElectrons_reco;p [GeV/c]; dp/p [%]",
1071  20,
1072  0.,
1073  20.,
1074  1600,
1075  0.,
1076  400.);
1079 
1080 
1081  fhEFPI0_angle_reco = new TH1D("fhEFPI0_angle_reco",
1082  "fhEFPI0_angle_reco; opening angle [deg]; #",
1083  500,
1084  0.,
1085  50.);
1087 
1088 
1089  fhG_invmass =
1090  new TH1D("fhG_invmass", "fhG_invmass; invmass [GeV/c^2]; #", 10000, 0., 1.);
1091  fHistoList_photons.push_back(fhG_invmass);
1092  fhG_invmass_pi0 = new TH1D(
1093  "fhG_invmass_pi0", "fhG_invmass_pi0; invmass [GeV/c^2]; #", 10000, 0., 1.);
1095 }
1096 
1097 
1099  //gDirectory->cd("analysis-conversion");
1100  gDirectory->mkdir("Photons");
1101  gDirectory->cd("Photons");
1102 
1103  gDirectory->mkdir("electrons from gamma");
1104  gDirectory->cd("electrons from gamma");
1105 
1106  gDirectory->mkdir("angle");
1107  gDirectory->mkdir("invariant mass");
1108  gDirectory->mkdir("energy");
1109 
1110  gDirectory->cd("angle");
1111  for (UInt_t i = 0; i < fHistoList_EFG_angle.size(); i++) {
1112  fHistoList_EFG_angle[i]->Write();
1113  }
1114  gDirectory->cd("..");
1115 
1116  gDirectory->cd("invariant mass");
1117  for (UInt_t i = 0; i < fHistoList_EFG_invmass.size(); i++) {
1118  fHistoList_EFG_invmass[i]->Write();
1119  }
1120  gDirectory->cd("..");
1121 
1122  gDirectory->cd("energy");
1123  for (UInt_t i = 0; i < fHistoList_EFG_energy.size(); i++) {
1124  fHistoList_EFG_energy[i]->Write();
1125  }
1126  gDirectory->cd("..");
1127 
1128 
1129  for (UInt_t i = 0; i < fHistoList_EFG.size(); i++) {
1130  fHistoList_EFG[i]->Write();
1131  }
1132  gDirectory->cd("..");
1133 
1134  for (UInt_t i = 0; i < fHistoList_photons.size(); i++) {
1135  fHistoList_photons[i]->Write();
1136  }
1137  gDirectory->cd("..");
1138 
1139 
1140  cout << "CbmAnaConversionPhotons: Realtime - " << fTime << endl;
1141  //timer.Print();
1142 
1143  cout << "CbmAnaConversionPhotons: all MC direct photons: "
1145  << ", all reconstructible direct photons: " << global_nof_photonsReco
1146  << " => "
1147  << 1.0 * global_nof_photonsReco / (1.0 * global_nof_photonsMC) * 100
1148  << " % can be reconstructed!" << endl;
1149 
1150 
1151  // normalisation of some histograms
1152  fPhotonsRest_ptMC_pi0->Scale(1.0 / (1.0 * fPhotonsRest_ptMC_pi0->Integral()));
1153  fPhotonsRest_ptMC_n->Scale(1.0 / fPhotonsRest_ptMC_n->Integral());
1154  fPhotonsRest_ptMC_e->Scale(1.0 / fPhotonsRest_ptMC_e->Integral());
1155 
1156  // TCanvas* c = new TCanvas();
1157  // c->SetWindowSize(1600, 1600);
1158  // DrawH1(fPhotonsRest_ptMC_pi0);
1159  // DrawH1(fPhotonsRest_ptMC_n);
1160  // DrawH1(fPhotonsRest_ptMC_e);
1161  // DrawH1(fPhotonsRest_ptMC_eta);
1162 }
1163 
1164 
1166  timer.Start();
1167 
1168 
1169  if (fPrimVertex != NULL) {
1171  } else {
1172  Fatal("CbmAnaConversion::Exec", "No PrimaryVertex array!");
1173  }
1174 
1175  int nofDirectPhotons = 0;
1176 
1177  fMCTracklist.clear();
1183  fMCTracklist_allGammas.clear();
1185 
1186  //AnalysePhotons();
1187 
1188  // everything related to MC-true data
1189  Int_t nofMcTracks = fMcTracks->GetEntriesFast();
1190  for (int i = 0; i < nofMcTracks; i++) {
1191  CbmMCTrack* mctrack = (CbmMCTrack*) fMcTracks->At(i);
1192  if (mctrack == NULL) continue;
1193  int pdg = TMath::Abs(mctrack->GetPdgCode());
1194  if (pdg == 11)
1196  mctrack); // filling tracklist with all electrons with mother gamma (in function)
1197  if (pdg == 22) FillMCTracklist_allGammas(mctrack);
1198 
1199  nofDirectPhotons += CheckMC(mctrack);
1200  }
1201 
1202  fPhotons_nofPerEvent->Fill(nofDirectPhotons);
1203  global_nof_photonsMC += nofDirectPhotons;
1204 
1206  AnalyseGammas();
1207 
1208 
1209  // everything related to reconstructed data
1210  Int_t nofGlobalTracks = fGlobalTracks->GetEntriesFast();
1211  for (int iG = 0; iG < nofGlobalTracks; iG++) {
1212  CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(iG);
1213  if (NULL == gTrack) continue;
1214  int stsInd = gTrack->GetStsTrackIndex();
1215  int richInd = gTrack->GetRichRingIndex();
1216  if (richInd < 0) continue;
1217  if (stsInd < 0) continue;
1218 
1219  CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
1220  if (stsTrack == NULL) continue;
1221 
1222  CbmTrackMatchNew* stsMatch =
1223  (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
1224  if (stsMatch == NULL) continue;
1225  int stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
1226  if (stsMcTrackId < 0) continue;
1227  CbmMCTrack* mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
1228  if (mcTrack1 == NULL) continue;
1229 
1230  CbmTrackMatchNew* richMatch =
1231  (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
1232  if (richMatch == NULL) continue;
1233  int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1234  if (richMcTrackId < 0) continue;
1235  CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1236  if (mcTrack2 == NULL) continue;
1237 
1238  if (stsMcTrackId != richMcTrackId) continue;
1239 
1240  int pdg = TMath::Abs(mcTrack1->GetPdgCode());
1241 
1242 
1243  // calculate refitted momenta at primary vertex
1244  TVector3 refittedMomentum;
1245  CbmL1PFFitter fPFFitter;
1246  vector<CbmStsTrack> stsTracks;
1247  stsTracks.resize(1);
1248  stsTracks[0] = *stsTrack;
1249  vector<L1FieldRegion> vField;
1250  vector<float> chiPrim;
1251  fPFFitter.GetChiToVertex(stsTracks, vField, chiPrim, fKFVertex, 3e6);
1252  //cand.chi2sts = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
1253  //cand.chi2Prim = chiPrim[0];
1254  const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
1255  vtxTrack->Momentum(refittedMomentum);
1256 
1257 
1258  // Doing refit of momenta with electron assumption
1259  CbmL1PFFitter fPFFitter_electron;
1260  vector<CbmStsTrack> stsTracks_electron;
1261  stsTracks_electron.resize(1);
1262  stsTracks_electron[0] = *stsTrack;
1263  vector<L1FieldRegion> vField_electron;
1264  vector<float> chiPrim_electron;
1265  vector<int> pidHypo_electron;
1266  pidHypo_electron.push_back(11);
1267  fPFFitter_electron.Fit(stsTracks_electron, pidHypo_electron);
1268  fPFFitter_electron.GetChiToVertex(
1269  stsTracks_electron, vField_electron, chiPrim_electron, fKFVertex, 3e6);
1270 
1271  TVector3 refittedMomentum_electron;
1272  const FairTrackParam* vtxTrack_electron =
1273  stsTracks_electron[0].GetParamFirst();
1274  vtxTrack_electron->Momentum(refittedMomentum_electron);
1275  refittedMomentum = refittedMomentum_electron;
1276 
1277 
1278  if (pdg == 11) FillRecoTracklist_allElectrons(mcTrack1, refittedMomentum);
1279 
1280  if (pdg == 11) {
1281  int motherID = mcTrack1->GetMotherId();
1282  if (motherID == -1) continue;
1283  CbmMCTrack* mothermcTrack1 = (CbmMCTrack*) fMcTracks->At(motherID);
1284  int motherpdg = TMath::Abs(mothermcTrack1->GetPdgCode());
1285  if (motherpdg != 22) continue;
1286  int grandmotherID = mothermcTrack1->GetMotherId();
1287  if (grandmotherID != -1) continue;
1288 
1289  //nof_photons++;
1290  fPhotons_pt->Fill(mothermcTrack1->GetPt());
1291  FillMCTracklist(mcTrack1);
1292  }
1293  }
1294 
1295  CombineElectrons();
1298 
1299 
1300  timer.Stop();
1301  cout << "CbmAnaConversionPhotons: time spent (Exec) " << timer.RealTime()
1302  << endl;
1303  fTime += timer.RealTime();
1304 }
1305 
1306 
1308  Int_t nof_photons = 0;
1309 
1310  Int_t nofGlobalTracks = fGlobalTracks->GetEntriesFast();
1311  for (int iG = 0; iG < nofGlobalTracks; iG++) {
1312  CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(iG);
1313  if (NULL == gTrack) continue;
1314  int stsInd = gTrack->GetStsTrackIndex();
1315  int richInd = gTrack->GetRichRingIndex();
1316  if (richInd < 0) continue; // no RICH segment -> no ring
1317  if (stsInd < 0) continue;
1318 
1319  CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
1320  if (stsTrack == NULL) continue;
1321 
1322  CbmTrackMatchNew* stsMatch =
1323  (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
1324  if (stsMatch == NULL) continue;
1325  int stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
1326  if (stsMcTrackId < 0) continue;
1327  CbmMCTrack* mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
1328  if (mcTrack1 == NULL) continue;
1329 
1330  CbmTrackMatchNew* richMatch =
1331  (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
1332  if (richMatch == NULL) continue;
1333  int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1334  if (richMcTrackId < 0) continue;
1335  CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1336  if (mcTrack2 == NULL) continue;
1337 
1338  // stsMcTrackId == richMcTrackId -> track was reconstructed in STS and made a ring in RICH, track matching was correct
1339  // in case they are not equal, the ring comes either from a secondary particle or STS track was not reconstructed
1340  if (stsMcTrackId != richMcTrackId) continue;
1341 
1342  int pdg = TMath::Abs(
1343  mcTrack2
1344  ->GetPdgCode()); // extract pdg code of particle directly from rich ring
1345 
1346  if (pdg == 11) {
1347  int motherID = mcTrack1->GetMotherId();
1348  if (motherID == -1) continue;
1349  CbmMCTrack* mothermcTrack1 = (CbmMCTrack*) fMcTracks->At(motherID);
1350  int motherpdg = TMath::Abs(mothermcTrack1->GetPdgCode());
1351  if (motherpdg != 22) continue;
1352  int grandmotherID = mothermcTrack1->GetMotherId();
1353  if (grandmotherID != -1) continue;
1354 
1355  nof_photons++;
1356  fPhotons_pt->Fill(mothermcTrack1->GetPt());
1357  FillMCTracklist(mcTrack1);
1358  }
1359  }
1360 
1361  //fPhotons_nofPerEvent->Fill(nof_photons);
1362 
1363  CombineElectrons();
1364 }
1365 
1366 
1368  fMCTracklist.push_back(mctrack);
1369  int motherID = mctrack->GetMotherId();
1370  CbmMCTrack* mothermctrack = (CbmMCTrack*) fMcTracks->At(motherID);
1371  int motherpdg = mothermctrack->GetPdgCode();
1372  cout << "CbmAnaConversionPhotons: filling tracklist, pdg "
1373  << mctrack->GetPdgCode() << " - motherpdg " << motherpdg
1374  << " - motherID " << motherID << endl;
1375 }
1376 
1377 
1379  CbmMCTrack* mctrack) {
1380  int motherID = mctrack->GetMotherId();
1381  TVector3 startvertex;
1382  mctrack->GetStartVertex(startvertex);
1383  if (startvertex.Z() > 0.1) return;
1384  if (motherID == -1)
1385  return;
1386  else {
1387  CbmMCTrack* mothermctrack = (CbmMCTrack*) fMcTracks->At(motherID);
1388  int motherpdg = mothermctrack->GetPdgCode();
1389  if (motherpdg == 22) {
1390  fMCTracklist_allElectronsFromGamma.push_back(mctrack);
1391  }
1392  }
1393 }
1394 
1395 
1397  int motherID = mctrack->GetMotherId();
1398  TVector3 startvertex;
1399  mctrack->GetStartVertex(startvertex);
1400  if (startvertex.Z() > 0.1) return;
1401  if (motherID == -1)
1402  return;
1403  else {
1404  fMCTracklist_allGammas.push_back(mctrack);
1405  CbmMCTrack* mothermctrack = (CbmMCTrack*) fMcTracks->At(motherID);
1406  int motherpdg = mothermctrack->GetPdgCode();
1407  if (motherpdg == 111) { fMCTracklist_allGammasFromPi0.push_back(mctrack); }
1408  }
1409 }
1410 
1411 
1413  CbmMCTrack* mctrack,
1414  TVector3 refittedMom) {
1415  int motherID = mctrack->GetMotherId();
1416  TVector3 startvertex;
1417  mctrack->GetStartVertex(startvertex);
1418  if (startvertex.Z() > 0.1) return;
1419  if (motherID == -1)
1420  return;
1421  else {
1422  CbmMCTrack* mothermctrack = (CbmMCTrack*) fMcTracks->At(motherID);
1423  int motherpdg = mothermctrack->GetPdgCode();
1424  if (motherpdg == 22) {
1425  fRecoTracklist_allElectronsFromGamma.push_back(mctrack);
1426  fRecoTracklist_allElectronsFromGammaMom.push_back(refittedMom);
1427  }
1428  if (motherpdg == 111) {
1429  fRecoTracklist_allElectronsFromPi0.push_back(mctrack);
1430  fRecoTracklist_allElectronsFromPi0Mom.push_back(refittedMom);
1431  }
1432  }
1433 }
1434 
1435 
1437  TH1I* zwischenhisto =
1438  new TH1I("zwischenhisto", "zwischenhisto", 1000000, 0, 1000000);
1439  for (unsigned int i = 0; i < fMCTracklist.size(); i++) {
1440  zwischenhisto->Fill(fMCTracklist[i]->GetMotherId());
1441  }
1442  fPhotons_test->Fill(zwischenhisto->GetMaximum());
1443  if (zwischenhisto->GetMaximum() >= 2) {
1444  cout << "CbmAnaConversionPhotons: photon found, mother ids "
1445  << zwischenhisto->GetMaximumBin() - 1 << endl;
1446  CbmMCTrack* mcTrack1 =
1447  (CbmMCTrack*) fMcTracks->At(zwischenhisto->GetMaximumBin() - 1);
1448  cout << "CbmAnaConversionPhotons: additional data: pdg "
1449  << mcTrack1->GetPdgCode() << " motherId " << mcTrack1->GetMotherId()
1450  << endl;
1451  }
1452  zwischenhisto->Delete();
1453 
1454 
1455  int photoncounter = 0;
1456  std::multimap<int, int> electronMap;
1457  for (unsigned int i = 0; i < fMCTracklist.size(); i++) {
1458  electronMap.insert(std::pair<int, int>(fMCTracklist[i]->GetMotherId(), i));
1459  }
1460 
1461  int check = 0;
1462  for (std::map<int, int>::iterator it = electronMap.begin();
1463  it != electronMap.end();
1464  ++it) {
1465  if (it == electronMap.begin()) check = 1;
1466  if (it != electronMap.begin()) {
1467  std::map<int, int>::iterator zwischen = it;
1468  zwischen--;
1469  int id = it->first;
1470  int id_old = zwischen->first;
1471  if (id == id_old) {
1472  check++;
1473  if (check > 1) {
1474  cout << "CbmAnaConversionPhotons: map - photon found " << id << endl;
1475  photoncounter++;
1476  fhGlobalNofDirectPhotons->Fill(1);
1477  }
1478  } else
1479  check = 1;
1480  }
1481  }
1482  //fPhotons_nofPerEvent->Fill(photoncounter);
1483 
1484  global_nof_photonsReco += photoncounter;
1485 }
1486 
1487 
1489  int nofDirectPhotons = 0;
1490 
1491  // Int_t nofMcTracks = fMcTracks->GetEntriesFast();
1492  // for (int i = 0; i < nofMcTracks; i++) {
1493  // CbmMCTrack* mctrack = (CbmMCTrack*)fMcTracks->At(i);
1494  // if (mctrack == NULL) continue;
1495 
1496  int pdg = mctrack->GetPdgCode();
1497  int motherId = mctrack->GetMotherId();
1498  Double_t energy = mctrack->GetEnergy();
1499  Double_t pt = mctrack->GetPt();
1500  Double_t rapidity = mctrack->GetRapidity();
1501 
1502  if (pdg == 22 && motherId == -1) { // only direct photons
1503  nofDirectPhotons++;
1504  fhGlobalNofDirectPhotons->Fill(0);
1505  fPhotons_energyMC->Fill(energy);
1506  fPhotons_ptMC->Fill(pt);
1507  fPhotons_ptRapMC->Fill(pt, rapidity);
1508  }
1509  if (pdg == 22 && motherId != -1) { // only secondary photons
1510  fPhotonsRest_energyMC->Fill(energy);
1511  fPhotonsRest_ptMC->Fill(pt);
1512 
1513  CbmMCTrack* mothermctrack = (CbmMCTrack*) fMcTracks->At(motherId);
1514  int motherpdg = mothermctrack->GetPdgCode();
1515  fPhotonsRest_pdgMotherMC->Fill(motherpdg);
1516 
1517  if (motherpdg == 111) fPhotonsRest_ptMC_pi0->Fill(pt);
1518  if (motherpdg == 2112) fPhotonsRest_ptMC_n->Fill(pt);
1519  if (motherpdg == 11) fPhotonsRest_ptMC_e->Fill(pt);
1520  if (motherpdg == 221) fPhotonsRest_ptMC_eta->Fill(pt);
1521  }
1522  // }
1523 
1524  // fPhotons_nofMC->Fill(nofDirectPhotons);
1525 
1526  // global_nof_photonsMC += nofDirectPhotons;
1527  return nofDirectPhotons;
1528 }
1529 
1530 
1533  const CbmMCTrack* mctrackM) {
1534  CbmLmvmKinematicParams params;
1535 
1536  TVector3 momP; //momentum e+
1537  mctrackP->GetMomentum(momP);
1538  Double_t energyP = TMath::Sqrt(momP.Mag2() + M2E);
1539  TLorentzVector lorVecP(momP, energyP);
1540 
1541  TVector3 momM; //momentum e-
1542  mctrackM->GetMomentum(momM);
1543  Double_t energyM = TMath::Sqrt(momM.Mag2() + M2E);
1544  TLorentzVector lorVecM(momM, energyM);
1545 
1546  TVector3 momPair = momP + momM;
1547  Double_t energyPair = energyP + energyM;
1548  Double_t ptPair = momPair.Perp();
1549  Double_t pzPair = momPair.Pz();
1550  Double_t yPair =
1551  0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
1552  Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
1553  Double_t theta = 180. * anglePair / TMath::Pi();
1554  Double_t minv =
1555  2. * TMath::Sin(anglePair / 2.) * TMath::Sqrt(momM.Mag() * momP.Mag());
1556 
1557  params.fMomentumMag = momPair.Mag();
1558  params.fPt = ptPair;
1559  params.fRapidity = yPair;
1560  params.fMinv = minv;
1561  params.fAngle = theta;
1562  //params.fMomentumPhoton = momPair;
1563  return params;
1564 }
1565 
1566 
1568  const TVector3 electron1,
1569  const TVector3 electron2) {
1570  CbmLmvmKinematicParams params;
1571 
1572  Double_t energyP = TMath::Sqrt(electron1.Mag2() + M2E);
1573  TLorentzVector lorVecP(electron1, energyP);
1574 
1575  Double_t energyM = TMath::Sqrt(electron2.Mag2() + M2E);
1576  TLorentzVector lorVecM(electron2, energyM);
1577 
1578  TVector3 momPair = electron1 + electron2;
1579  Double_t energyPair = energyP + energyM;
1580  Double_t ptPair = momPair.Perp();
1581  Double_t pzPair = momPair.Pz();
1582  Double_t yPair =
1583  0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
1584  Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
1585  Double_t theta = 180. * anglePair / TMath::Pi();
1586  Double_t minv = 2. * TMath::Sin(anglePair / 2.)
1587  * TMath::Sqrt(electron1.Mag() * electron2.Mag());
1588 
1589  params.fMomentumMag = momPair.Mag();
1590  params.fPt = ptPair;
1591  params.fRapidity = yPair;
1592  params.fMinv = minv;
1593  params.fAngle = theta;
1594  return params;
1595 }
1596 
1597 
1599  int electronnumber = fMCTracklist_allElectronsFromGamma.size();
1600  cout
1601  << "CbmAnaConversionPhotons: array size in AnalyseElectronsFromGammaMC(): "
1602  << electronnumber << endl;
1603  for (int i = 0; i < electronnumber - 1; i++) {
1604  for (int j = i; j < electronnumber; j++) {
1605  if (fMCTracklist_allElectronsFromGamma[i]->GetPdgCode()
1606  + fMCTracklist_allElectronsFromGamma[j]->GetPdgCode()
1607  != 0)
1608  continue; // only 1 electron and 1 positron allowed
1609 
1610  int motherID_i = fMCTracklist_allElectronsFromGamma[i]->GetMotherId();
1611  int motherID_j = fMCTracklist_allElectronsFromGamma[j]->GetMotherId();
1612 
1613  CbmLmvmKinematicParams paramSet =
1616 
1617  CbmMCTrack* mothermctrack_i = (CbmMCTrack*) fMcTracks->At(motherID_i);
1618  int grandmotherID_i = mothermctrack_i->GetMotherId();
1619 
1620 
1621  // fill all combinations of e+e-, even if they dont come from the same origin
1622  fhEFG_angle_all->Fill(paramSet.fAngle);
1623  fhEFG_angleVSpt_all->Fill(paramSet.fAngle, mothermctrack_i->GetPt());
1624  fhEFG_invmass_all->Fill(paramSet.fMinv);
1625  fhEFG_momentumPair_all->Fill(paramSet.fMomentumMag);
1626  fhEFG_energy_all->Fill(mothermctrack_i->GetEnergy());
1627 
1628 
1629  // fill only combinations of e+e-, which do not have the same mother gamma -> combinatorial background
1630  if (motherID_i != motherID_j) {
1631  fhEFG_angle_combBack->Fill(paramSet.fAngle);
1632  fhEFG_angleVSpt_combBack->Fill(paramSet.fAngle,
1633  mothermctrack_i->GetPt());
1634  fhEFG_invmass_combBack->Fill(paramSet.fMinv);
1635  fhEFG_momentumPair_combBack->Fill(paramSet.fMomentumMag);
1636  fhEFG_energy_combBack->Fill(mothermctrack_i->GetEnergy());
1637  continue;
1638  }
1639 
1640  TVector3 startvertex;
1641  fMCTracklist_allElectronsFromGamma[i]->GetStartVertex(startvertex);
1642 
1643 
1644  // fill all combinations of e+e- with the same origin
1645  fhEFG_angle_allSameG->Fill(paramSet.fAngle);
1646  fhEFG_angleVSenergy_allSameG->Fill(paramSet.fAngle,
1647  mothermctrack_i->GetEnergy());
1648  fhEFG_angleVSpt_allSameG->Fill(paramSet.fAngle, mothermctrack_i->GetPt());
1649  fhEFG_invmass_allSameG->Fill(paramSet.fMinv);
1650  fhEFG_momentumPair_allSameG->Fill(paramSet.fMomentumMag);
1651  fhEFG_energy_allSameG->Fill(mothermctrack_i->GetEnergy());
1652  fhEFG_startvertexVSangle_allSameG->Fill(startvertex.Z(), paramSet.fAngle);
1653  fhEFG_startvertex_allSameG->Fill(startvertex.Z());
1654  if (mothermctrack_i->GetEnergy() <= 1)
1655  fhEFG_angleBelow1GeV_allSameG->Fill(paramSet.fAngle);
1656  if (mothermctrack_i->GetEnergy() > 1)
1657  fhEFG_angleAbove1GeV_allSameG->Fill(paramSet.fAngle);
1658 
1659 
1660  // combinations of e+e- from the same gamma, gamma = direct gamma
1661  if (grandmotherID_i == -1) {
1662  fhEFG_angle_direct->Fill(paramSet.fAngle);
1663  fhEFG_angleVSenergy_direct->Fill(paramSet.fAngle,
1664  mothermctrack_i->GetEnergy());
1665  fhEFG_angleVSpt_direct->Fill(paramSet.fAngle, mothermctrack_i->GetPt());
1666  fhEFG_invmass_direct->Fill(paramSet.fMinv);
1667  fhEFG_momentumPair_direct->Fill(paramSet.fMomentumMag);
1668  fhEFG_energy_direct->Fill(mothermctrack_i->GetEnergy());
1669  fhEFG_startvertexVSangle_direct->Fill(startvertex.Z(), paramSet.fAngle);
1670  if (mothermctrack_i->GetEnergy() <= 1)
1671  fhEFG_angleBelow1GeV_direct->Fill(paramSet.fAngle);
1672  if (mothermctrack_i->GetEnergy() > 1)
1673  fhEFG_angleAbove1GeV_direct->Fill(paramSet.fAngle);
1674  }
1675  // combinations of e+e- from the same gamma, with gamma estimating from another particle (pi0/eta/...)
1676  else {
1677  CbmMCTrack* grandmothermctrack_i =
1678  (CbmMCTrack*) fMcTracks->At(grandmotherID_i);
1679  int grandmotherpdg_i = grandmothermctrack_i->GetPdgCode();
1680  if (grandmotherpdg_i == 111) { // pi0
1681  fhEFG_angle_pi0->Fill(paramSet.fAngle);
1682  fhEFG_angleVSenergy_pi0->Fill(paramSet.fAngle,
1683  mothermctrack_i->GetEnergy());
1684  fhEFG_angleVSpt_pi0->Fill(paramSet.fAngle, mothermctrack_i->GetPt());
1685  fhEFG_invmass_pi0->Fill(paramSet.fMinv);
1686  fhEFG_momentumPair_pi0->Fill(paramSet.fMomentumMag);
1687  fhEFG_energy_pi0->Fill(mothermctrack_i->GetEnergy());
1688  fhEFG_startvertexVSangle_pi0->Fill(startvertex.Z(), paramSet.fAngle);
1689  if (mothermctrack_i->GetEnergy() <= 1)
1690  fhEFG_angleBelow1GeV_pi0->Fill(paramSet.fAngle);
1691  if (mothermctrack_i->GetEnergy() > 1)
1692  fhEFG_angleAbove1GeV_pi0->Fill(paramSet.fAngle);
1693  }
1694  if (grandmotherpdg_i == 221) { // eta
1695  fhEFG_angle_eta->Fill(paramSet.fAngle);
1696  fhEFG_angleVSenergy_eta->Fill(paramSet.fAngle,
1697  mothermctrack_i->GetEnergy());
1698  fhEFG_angleVSpt_eta->Fill(paramSet.fAngle, mothermctrack_i->GetPt());
1699  fhEFG_invmass_eta->Fill(paramSet.fMinv);
1700  fhEFG_momentumPair_eta->Fill(paramSet.fMomentumMag);
1701  fhEFG_energy_eta->Fill(mothermctrack_i->GetEnergy());
1702  fhEFG_startvertexVSangle_eta->Fill(startvertex.Z(), paramSet.fAngle);
1703  if (mothermctrack_i->GetEnergy() <= 1)
1704  fhEFG_angleBelow1GeV_eta->Fill(paramSet.fAngle);
1705  if (mothermctrack_i->GetEnergy() > 1)
1706  fhEFG_angleAbove1GeV_eta->Fill(paramSet.fAngle);
1707  }
1708  }
1709  }
1710  }
1711 }
1712 
1713 
1715  int electronnumber = fRecoTracklist_allElectronsFromGamma.size();
1718  cout << "CbmAnaConversionPhotons::AnalyseElectronsFromGammaReco() - array "
1719  "sizes dont fit!"
1720  << endl;
1721  return;
1722  }
1723  cout << "CbmAnaConversionPhotons: array size in "
1724  "AnalyseElectronsFromGammaReco(): "
1725  << electronnumber << endl;
1726  for (int i = 0; i < electronnumber; i++) {
1727  for (int j = i; j < electronnumber; j++) {
1728  if (fRecoTracklist_allElectronsFromGamma[i]->GetPdgCode()
1729  + fRecoTracklist_allElectronsFromGamma[j]->GetPdgCode()
1730  != 0)
1731  continue; // only 1 electron and 1 positron allowed
1732 
1733 
1737  Double_t OpeningAngleCut =
1739 
1740 
1741  fhEFG_angle_all_reco->Fill(
1742  paramSet
1743  .fAngle); // fill all combinations of e+e-, even if they dont come from the same origin
1744  fhEFG_angleVSpt_all_reco->Fill(paramSet.fPt, paramSet.fAngle);
1745  fhEFG_invmassVSpt_all_reco->Fill(paramSet.fPt, paramSet.fMinv);
1746  fhEFG_invmass_all_reco->Fill(paramSet.fMinv);
1747  if (paramSet.fAngle < OpeningAngleCut) {
1748  fhEFG_invmass_all_reco_cut->Fill(paramSet.fMinv);
1749  fhEFG_angle_all_reco_cuts->Fill(paramSet.fAngle);
1750  }
1751 
1752  int motherID_i = fRecoTracklist_allElectronsFromGamma[i]->GetMotherId();
1753  int motherID_j = fRecoTracklist_allElectronsFromGamma[j]->GetMotherId();
1754 
1755  if (motherID_i != motherID_j) {
1756  fhEFG_angle_combBack_reco->Fill(paramSet.fAngle);
1757  fhEFG_angleVSpt_combBack_reco->Fill(paramSet.fPt, paramSet.fAngle);
1758  fhEFG_invmassVSpt_combBack_reco->Fill(paramSet.fPt, paramSet.fMinv);
1759  fhEFG_invmass_combBack_reco->Fill(paramSet.fMinv);
1760  if (paramSet.fAngle < OpeningAngleCut) {
1761  fhEFG_invmass_combBack_reco_cut->Fill(paramSet.fMinv);
1762  fhEFG_angle_combBack_reco_cuts->Fill(paramSet.fAngle);
1763  }
1764 
1765  // study of different opening angle cuts
1766  fhEFG_angle_reco_CUTcomparison->Fill(1); // no cuts applied
1767  if (paramSet.fAngle
1770  if (paramSet.fAngle
1772  paramSet.fPt))
1774  if (paramSet.fAngle
1776  paramSet.fPt))
1778  if (paramSet.fAngle
1780  paramSet.fPt))
1782  if (paramSet.fAngle
1784  paramSet.fPt))
1786  continue;
1787  }
1788 
1790  paramSet.fAngle); // all combinations of e+e- with the same origin
1791  fhEFG_invmass_allSameG_reco->Fill(paramSet.fMinv);
1792  fhEFG_angleVSpt_allSameG_reco->Fill(paramSet.fPt, paramSet.fAngle);
1793  fhEFG_invmassVSpt_allSameG_reco->Fill(paramSet.fPt, paramSet.fMinv);
1794  if (paramSet.fAngle < OpeningAngleCut) {
1795  fhEFG_invmass_allSameG_reco_cut->Fill(paramSet.fMinv);
1796  fhEFG_angle_allSameG_reco_cuts->Fill(paramSet.fAngle);
1797  }
1798 
1799 
1800  // study of different opening angle cuts
1801  fhEFG_angle_reco_CUTcomparison->Fill(0); // no cuts applied
1802  if (paramSet.fAngle
1805  if (paramSet.fAngle
1808  if (paramSet.fAngle
1811  if (paramSet.fAngle
1814  if (paramSet.fAngle
1817 
1818 
1819  CbmMCTrack* mothermctrack_i = (CbmMCTrack*) fMcTracks->At(motherID_i);
1820  int grandmotherID_i = mothermctrack_i->GetMotherId();
1821 
1823  paramSet.fMomentumMag,
1824  TMath::Abs(mothermctrack_i->GetP() - paramSet.fMomentumMag)
1825  / paramSet.fMomentumMag * 100); // dp/p in percent
1828  TMath::Abs(fRecoTracklist_allElectronsFromGammaMom[i].Mag()
1833  TMath::Abs(fRecoTracklist_allElectronsFromGammaMom[j].Mag()
1835  / fRecoTracklist_allElectronsFromGammaMom[j].Mag() * 100);
1836 
1837 
1838  if (
1839  grandmotherID_i
1840  == -1) { // combinations of e+e- from the same gamma, gamma = direct gamma
1841  fhEFG_angle_direct_reco->Fill(paramSet.fAngle);
1842  fhEFG_invmass_direct_reco->Fill(paramSet.fMinv);
1843  fhEFG_angleVSpt_direct_reco->Fill(paramSet.fPt, paramSet.fAngle);
1844  fhEFG_invmassVSpt_direct_reco->Fill(paramSet.fPt, paramSet.fMinv);
1845  if (paramSet.fAngle < 1)
1846  fhEFG_invmass_direct_reco_cut->Fill(paramSet.fMinv);
1847  } else { // combinations of e+e- from the same gamma, with gamma estimating from another particle (pi0/eta/...)
1848  CbmMCTrack* grandmothermctrack_i =
1849  (CbmMCTrack*) fMcTracks->At(grandmotherID_i);
1850  int grandmotherpdg_i = grandmothermctrack_i->GetPdgCode();
1851 
1852  if (grandmotherpdg_i == 111) {
1853  fhEFG_angle_pi0_reco->Fill(paramSet.fAngle);
1854  fhEFG_invmass_pi0_reco->Fill(paramSet.fMinv);
1855  fhEFG_angleVSpt_pi0_reco->Fill(paramSet.fPt, paramSet.fAngle);
1856  fhEFG_invmassVSpt_pi0_reco->Fill(paramSet.fPt, paramSet.fMinv);
1857  if (paramSet.fAngle < 1)
1858  fhEFG_invmass_pi0_reco_cut->Fill(paramSet.fMinv);
1859  }
1860  if (grandmotherpdg_i == 221) {
1861  fhEFG_angle_eta_reco->Fill(paramSet.fAngle);
1862  fhEFG_invmass_eta_reco->Fill(paramSet.fMinv);
1863  fhEFG_angleVSpt_eta_reco->Fill(paramSet.fPt, paramSet.fAngle);
1864  fhEFG_invmassVSpt_eta_reco->Fill(paramSet.fPt, paramSet.fMinv);
1865  if (paramSet.fAngle < 1)
1866  fhEFG_invmass_eta_reco_cut->Fill(paramSet.fMinv);
1867  }
1868  }
1869  }
1870  }
1871 }
1872 
1873 
1875  int electronnumber = fRecoTracklist_allElectronsFromPi0.size();
1878  cout << "CbmAnaConversionPhotons::AnalyseElectronsFromGammaPi0() - array "
1879  "sizes dont fit!"
1880  << endl;
1881  return;
1882  }
1883  cout
1884  << "CbmAnaConversionPhotons: array size in AnalyseElectronsFromPi0Reco(): "
1885  << electronnumber << endl;
1886  for (int i = 0; i < electronnumber; i++) {
1887  for (int j = i; j < electronnumber; j++) {
1888  if (fRecoTracklist_allElectronsFromPi0[i]->GetPdgCode()
1889  + fRecoTracklist_allElectronsFromPi0[j]->GetPdgCode()
1890  != 0)
1891  continue; // only 1 electron and 1 positron allowed
1892 
1893 
1894  CbmLmvmKinematicParams paramSet =
1897 
1898  int motherID_i = fRecoTracklist_allElectronsFromPi0[i]->GetMotherId();
1899  int motherID_j = fRecoTracklist_allElectronsFromPi0[j]->GetMotherId();
1900 
1901  if (motherID_i != motherID_j) { continue; }
1902  fhEFPI0_angle_reco->Fill(paramSet.fAngle);
1903  }
1904  }
1905 }
1906 
1907 
1909  int number = fMCTracklist_allGammas.size();
1910  cout << "CbmAnaConversionPhotons: array size in AnalyseGammas(): " << number
1911  << endl;
1912  for (int i = 0; i < number - 1; i++) {
1913  for (int j = i; j < number; j++) {
1914 
1915  // calculate invariant mass
1916  TVector3 gamma1;
1917  fMCTracklist_allGammas[i]->GetMomentum(gamma1);
1918  Double_t energy1 = TMath::Sqrt(gamma1.Mag2());
1919  TLorentzVector lorVec1(gamma1, energy1);
1920  TVector3 gamma2;
1921  fMCTracklist_allGammas[j]->GetMomentum(gamma2);
1922  Double_t energy2 = TMath::Sqrt(gamma2.Mag2());
1923  TLorentzVector lorVec2(gamma2, energy2);
1924  TLorentzVector sum;
1925  sum = lorVec1 + lorVec2;
1926 
1927  fhG_invmass->Fill(sum.Mag());
1928  }
1929  }
1930 
1931 
1932  int number_pi0 = fMCTracklist_allGammasFromPi0.size();
1933  cout << "CbmAnaConversionPhotons: array size in AnalyseGammas(): "
1934  << number_pi0 << endl;
1935  for (int i = 0; i < number_pi0 - 1; i++) {
1936  for (int j = i; j < number_pi0; j++) {
1937 
1938  // calculate invariant mass
1939  TVector3 gamma1;
1940  fMCTracklist_allGammasFromPi0[i]->GetMomentum(gamma1);
1941  Double_t energy1 = TMath::Sqrt(gamma1.Mag2());
1942  TLorentzVector lorVec1(gamma1, energy1);
1943  TVector3 gamma2;
1944  fMCTracklist_allGammasFromPi0[j]->GetMomentum(gamma2);
1945  Double_t energy2 = TMath::Sqrt(gamma2.Mag2());
1946  TLorentzVector lorVec2(gamma2, energy2);
1947  TLorentzVector sum;
1948  sum = lorVec1 + lorVec2;
1949 
1950  fhG_invmass_pi0->Fill(sum.Mag());
1951  }
1952  }
1953 }
CbmRichPoint.h
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_pi0
TH1D * fhEFG_angleBelow1GeV_pi0
Definition: CbmAnaConversionPhotons.h:168
CbmAnaConversionPhotons::fHistoList_EFG
std::vector< TH1 * > fHistoList_EFG
Definition: CbmAnaConversionPhotons.h:87
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition: CbmMCTrack.h:71
CbmAnaConversionPhotons::fhEFG_momentumResolutionElectrons_reco
TH2D * fhEFG_momentumResolutionElectrons_reco
Definition: CbmAnaConversionPhotons.h:255
CbmMatch::GetMatchedLink
const CbmLink & GetMatchedLink() const
Definition: CbmMatch.h:37
CbmAnaConversionPhotons::fhEFG_angleVSpt_direct_reco
TH2D * fhEFG_angleVSpt_direct_reco
Definition: CbmAnaConversionPhotons.h:241
CbmMCTrack::GetMomentum
void GetMomentum(TVector3 &momentum) const
Definition: CbmMCTrack.h:172
CbmAnaConversionPhotons::fhEFG_angleAbove1GeV_allSameG
TH1D * fhEFG_angleAbove1GeV_allSameG
Definition: CbmAnaConversionPhotons.h:174
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_combBack
TH1D * fhEFG_angleBelow1GeV_combBack
Definition: CbmAnaConversionPhotons.h:165
CbmAnaConversionPhotons::fhEFG_angleVSpt_all_reco
TH2D * fhEFG_angleVSpt_all_reco
Definition: CbmAnaConversionPhotons.h:238
CbmAnaConversionPhotons::fhGlobalNofDirectPhotons
TH1D * fhGlobalNofDirectPhotons
Definition: CbmAnaConversionPhotons.h:121
CbmAnaConversionPhotons::fhEFG_invmass_all_reco_cut
TH1D * fhEFG_invmass_all_reco_cut
Definition: CbmAnaConversionPhotons.h:230
CbmAnaConversionPhotons::fRecoTracklist_allElectronsFromPi0
std::vector< CbmMCTrack * > fRecoTracklist_allElectronsFromPi0
Definition: CbmAnaConversionPhotons.h:113
CbmAnaConversionPhotons.h
CbmAnaConversionPhotons::Exec
void Exec()
Definition: CbmAnaConversionPhotons.cxx:1165
CbmAnaConversionPhotons::fhEFG_startvertexVSangle_allSameG
TH2D * fhEFG_startvertexVSangle_allSameG
Definition: CbmAnaConversionPhotons.h:190
CbmAnaConversionPhotons::fhEFG_energy_allSameG
TH1D * fhEFG_energy_allSameG
Definition: CbmAnaConversionPhotons.h:158
CbmAnaConversionPhotons::fhEFG_angle_allSameG_reco
TH1D * fhEFG_angle_allSameG_reco
Definition: CbmAnaConversionPhotons.h:200
CbmAnaConversionPhotons::fhEFG_angleVSenergy_allSameG
TH2D * fhEFG_angleVSenergy_allSameG
Definition: CbmAnaConversionPhotons.h:134
CbmAnaConversionPhotons::fhEFG_angleAbove1GeV_eta
TH1D * fhEFG_angleAbove1GeV_eta
Definition: CbmAnaConversionPhotons.h:177
CbmAnaConversionPhotons::global_nof_photonsMC
Int_t global_nof_photonsMC
Definition: CbmAnaConversionPhotons.h:119
CbmAnaConversionPhotons::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmAnaConversionPhotons.h:80
CbmAnaConversionPhotons::fhEFG_angleVSpt_allSameG_reco
TH2D * fhEFG_angleVSpt_allSameG_reco
Definition: CbmAnaConversionPhotons.h:240
CbmAnaConversionPhotons::fPhotons_ptMC
TH1D * fPhotons_ptMC
Definition: CbmAnaConversionPhotons.h:98
CbmAnaConversionPhotons::CbmAnaConversionPhotons
CbmAnaConversionPhotons()
Definition: CbmAnaConversionPhotons.cxx:36
CbmAnaConversionCutSettings::CalcOpeningAngleCut
static Double_t CalcOpeningAngleCut(Double_t pt)
Definition: CbmAnaConversionCutSettings.h:21
L1Field.h
CbmL1PFFitter
Definition: CbmL1PFFitter.h:31
CbmAnaConversionPhotons::fPhotonsRest_pdgMotherMC
TH1D * fPhotonsRest_pdgMotherMC
Definition: CbmAnaConversionPhotons.h:101
CbmAnaConversionPhotons::fhEFG_invmass_combBack_reco_cut
TH1D * fhEFG_invmass_combBack_reco_cut
Definition: CbmAnaConversionPhotons.h:231
CbmL1PFFitter::Fit
void Fit(std::vector< CbmStsTrack > &Tracks, std::vector< int > &pidHypo)
Definition: CbmL1PFFitter.cxx:81
CbmAnaConversionPhotons::fhEFG_invmass_pi0_reco_cut
TH1D * fhEFG_invmass_pi0_reco_cut
Definition: CbmAnaConversionPhotons.h:234
CbmAnaConversionPhotons::CalculateKinematicParams
CbmLmvmKinematicParams CalculateKinematicParams(const CbmMCTrack *mctrackP, const CbmMCTrack *mctrackM)
Definition: CbmAnaConversionPhotons.cxx:1532
CbmAnaConversionPhotons::fPhotonsRest_ptMC
TH1D * fPhotonsRest_ptMC
Definition: CbmAnaConversionPhotons.h:102
CbmGlobalTrack::GetRichRingIndex
Int_t GetRichRingIndex() const
Definition: CbmGlobalTrack.h:41
CbmAnaConversionPhotons::fRichRings
TClonesArray * fRichRings
Definition: CbmAnaConversionPhotons.h:76
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
CbmAnaConversionPhotons::fhEFG_invmass_all_reco
TH1D * fhEFG_invmass_all_reco
Definition: CbmAnaConversionPhotons.h:222
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_eta_reco
TH1D * fhEFG_angleBelow1GeV_eta_reco
Definition: CbmAnaConversionPhotons.h:219
CbmAnaConversionPhotons::fhEFG_invmassVSpt_allSameG_reco
TH2D * fhEFG_invmassVSpt_allSameG_reco
Definition: CbmAnaConversionPhotons.h:248
CbmAnaConversionPhotons::fhEFG_angleVSenergy_pi0
TH2D * fhEFG_angleVSenergy_pi0
Definition: CbmAnaConversionPhotons.h:136
CbmAnaConversionPhotons::FillMCTracklist_allElectrons
void FillMCTracklist_allElectrons(CbmMCTrack *mctrack)
Definition: CbmAnaConversionPhotons.cxx:1378
CbmAnaConversionPhotons::fhEFG_angleVSpt_all
TH2D * fhEFG_angleVSpt_all
Definition: CbmAnaConversionPhotons.h:140
CbmAnaConversionPhotons::fPhotonsRest_ptMC_pi0
TH1D * fPhotonsRest_ptMC_pi0
Definition: CbmAnaConversionPhotons.h:104
CbmAnaConversionPhotons::CalculateKinematicParamsReco
CbmLmvmKinematicParams CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
Definition: CbmAnaConversionPhotons.cxx:1567
CbmAnaConversionPhotons::fhEFG_invmassVSpt_combBack_reco
TH2D * fhEFG_invmassVSpt_combBack_reco
Definition: CbmAnaConversionPhotons.h:247
CbmGlobalTrack.h
CbmAnaConversionPhotons::fhEFG_invmass_pi0_reco
TH1D * fhEFG_invmass_pi0_reco
Definition: CbmAnaConversionPhotons.h:226
CbmAnaConversionPhotons::fPhotons_nofMC
TH1I * fPhotons_nofMC
Definition: CbmAnaConversionPhotons.h:96
CbmAnaConversionPhotons::fHistoList_EFG_energy
std::vector< TH1 * > fHistoList_EFG_energy
Definition: CbmAnaConversionPhotons.h:90
CbmAnaConversionPhotons::fhEFG_invmass_all
TH1D * fhEFG_invmass_all
Definition: CbmAnaConversionPhotons.h:148
CbmAnaConversionPhotons::fhEFG_angleVSenergy_eta
TH2D * fhEFG_angleVSenergy_eta
Definition: CbmAnaConversionPhotons.h:137
CbmAnaConversionPhotons::fhEFG_energy_all
TH1D * fhEFG_energy_all
Definition: CbmAnaConversionPhotons.h:156
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_eta
TH1D * fhEFG_angleBelow1GeV_eta
Definition: CbmAnaConversionPhotons.h:169
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_combBack_reco
TH1D * fhEFG_angleBelow1GeV_combBack_reco
Definition: CbmAnaConversionPhotons.h:215
CbmRichRing.h
CbmDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
CbmAnaConversionPhotons::~CbmAnaConversionPhotons
virtual ~CbmAnaConversionPhotons()
Definition: CbmAnaConversionPhotons.cxx:181
CbmAnaConversionPhotons::fhEFG_energy_direct
TH1D * fhEFG_energy_direct
Definition: CbmAnaConversionPhotons.h:159
CbmAnaConversionPhotons::fhEFG_angle_direct
TH1D * fhEFG_angle_direct
Definition: CbmAnaConversionPhotons.h:127
CbmLmvmKinematicParams::fMinv
Double_t fMinv
Definition: CbmLmvmKinematicParams.h:22
CbmAnaConversionPhotons::fMCTracklist
std::vector< CbmMCTrack * > fMCTracklist
Definition: CbmAnaConversionPhotons.h:109
CbmAnaConversionPhotons::CombineElectrons
void CombineElectrons()
Definition: CbmAnaConversionPhotons.cxx:1436
CbmAnaConversionPhotons::InitHistos
void InitHistos()
Definition: CbmAnaConversionPhotons.cxx:242
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_pi0_reco
TH1D * fhEFG_angleBelow1GeV_pi0_reco
Definition: CbmAnaConversionPhotons.h:218
CbmAnaConversionPhotons::fhEFG_invmassVSpt_direct_reco
TH2D * fhEFG_invmassVSpt_direct_reco
Definition: CbmAnaConversionPhotons.h:249
CbmAnaConversionPhotons::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmAnaConversionPhotons.h:77
CbmAnaConversionPhotons::fhEFG_invmass_pi0
TH1D * fhEFG_invmass_pi0
Definition: CbmAnaConversionPhotons.h:152
CbmAnaConversionPhotons::fPhotonsRest_ptMC_eta
TH1D * fPhotonsRest_ptMC_eta
Definition: CbmAnaConversionPhotons.h:107
CbmAnaConversionPhotons::fRecoTracklist_allElectronsFromGammaMom
std::vector< TVector3 > fRecoTracklist_allElectronsFromGammaMom
Definition: CbmAnaConversionPhotons.h:112
CbmAnaConversionCutSettings::CalcOpeningAngleCutAlt2
static Double_t CalcOpeningAngleCutAlt2(Double_t)
Definition: CbmAnaConversionCutSettings.h:36
CbmAnaConversionCutSettings.h
CbmAnaConversionPhotons::fhEFG_startvertex_allSameG
TH1D * fhEFG_startvertex_allSameG
Definition: CbmAnaConversionPhotons.h:195
CbmAnaConversionPhotons::fhEFG_momentumPair_eta
TH1D * fhEFG_momentumPair_eta
Definition: CbmAnaConversionPhotons.h:185
CbmAnaConversionPhotons::AnalyseElectronsFromGammaMC
void AnalyseElectronsFromGammaMC()
Definition: CbmAnaConversionPhotons.cxx:1598
CbmAnaConversionPhotons::FillMCTracklist
void FillMCTracklist(CbmMCTrack *mctrack)
Definition: CbmAnaConversionPhotons.cxx:1367
CbmAnaConversionPhotons::fhEFG_angle_allSameG
TH1D * fhEFG_angle_allSameG
Definition: CbmAnaConversionPhotons.h:126
CbmAnaConversionPhotons::fMCTracklist_allGammas
std::vector< CbmMCTrack * > fMCTracklist_allGammas
Definition: CbmAnaConversionPhotons.h:116
CbmAnaConversionCutSettings::CalcOpeningAngleCutAlt1
static Double_t CalcOpeningAngleCutAlt1(Double_t pt)
Definition: CbmAnaConversionCutSettings.h:29
M2E
#define M2E
Definition: CbmAnaJpsiKinematicParams.h:10
CbmAnaConversionPhotons::fPhotonsRest_energyMC
TH1D * fPhotonsRest_energyMC
Definition: CbmAnaConversionPhotons.h:100
CbmStsTrack.h
Data class for STS tracks.
CbmGlobalTrack::GetStsTrackIndex
Int_t GetStsTrackIndex() const
Definition: CbmGlobalTrack.h:38
CbmAnaConversionPhotons::fhG_invmass_pi0
TH1D * fhG_invmass_pi0
Definition: CbmAnaConversionPhotons.h:262
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_allSameG_reco
TH1D * fhEFG_angleBelow1GeV_allSameG_reco
Definition: CbmAnaConversionPhotons.h:216
CbmAnaConversionPhotons::fhEFG_angle_combBack_reco_cuts
TH1D * fhEFG_angle_combBack_reco_cuts
Definition: CbmAnaConversionPhotons.h:207
CbmAnaConversionPhotons::fhEFG_invmass_eta
TH1D * fhEFG_invmass_eta
Definition: CbmAnaConversionPhotons.h:153
CbmAnaConversionPhotons::fPhotons_test
TH1I * fPhotons_test
Definition: CbmAnaConversionPhotons.h:95
CbmAnaConversionPhotons::fhEFG_angleVSpt_eta
TH2D * fhEFG_angleVSpt_eta
Definition: CbmAnaConversionPhotons.h:145
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
CbmAnaConversionPhotons::fhEFG_angle_combBack_reco
TH1D * fhEFG_angle_combBack_reco
Definition: CbmAnaConversionPhotons.h:199
CbmAnaConversionPhotons::fhEFG_angle_pi0_reco
TH1D * fhEFG_angle_pi0_reco
Definition: CbmAnaConversionPhotons.h:202
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_all
TH1D * fhEFG_angleBelow1GeV_all
Definition: CbmAnaConversionPhotons.h:164
CbmAnaConversionPhotons::fhEFG_invmass_allSameG_reco_cut
TH1D * fhEFG_invmass_allSameG_reco_cut
Definition: CbmAnaConversionPhotons.h:232
CbmAnaConversionPhotons::fMcTracks
TClonesArray * fMcTracks
Definition: CbmAnaConversionPhotons.h:78
CbmAnaConversionPhotons::fhEFG_invmass_direct_reco
TH1D * fhEFG_invmass_direct_reco
Definition: CbmAnaConversionPhotons.h:225
CbmAnaConversionPhotons::fhEFG_startvertexVSangle_pi0
TH2D * fhEFG_startvertexVSangle_pi0
Definition: CbmAnaConversionPhotons.h:192
CbmAnaConversionPhotons::fhEFG_invmass_direct
TH1D * fhEFG_invmass_direct
Definition: CbmAnaConversionPhotons.h:151
CbmAnaConversionPhotons::fhEFG_startvertexVSangle_direct
TH2D * fhEFG_startvertexVSangle_direct
Definition: CbmAnaConversionPhotons.h:191
CbmTrackMatchNew.h
CbmVertex
Definition: CbmVertex.h:26
CbmL1PFFitter.h
CbmAnaConversionPhotons::fhEFG_invmassVSpt_all_reco
TH2D * fhEFG_invmassVSpt_all_reco
Definition: CbmAnaConversionPhotons.h:246
CbmAnaConversionPhotons::fhEFG_angle_all_reco
TH1D * fhEFG_angle_all_reco
Definition: CbmAnaConversionPhotons.h:198
CbmAnaConversionPhotons::AnalyseElectronsFromGammaReco
void AnalyseElectronsFromGammaReco()
Definition: CbmAnaConversionPhotons.cxx:1714
CbmAnaConversionPhotons::fhEFG_angleVSpt_direct
TH2D * fhEFG_angleVSpt_direct
Definition: CbmAnaConversionPhotons.h:143
CbmLmvmKinematicParams::fRapidity
Double_t fRapidity
Definition: CbmLmvmKinematicParams.h:21
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_all_reco
TH1D * fhEFG_angleBelow1GeV_all_reco
Definition: CbmAnaConversionPhotons.h:214
CbmAnaConversionPhotons::fhEFG_angle_eta_reco
TH1D * fhEFG_angle_eta_reco
Definition: CbmAnaConversionPhotons.h:203
CbmMCTrack::GetStartVertex
void GetStartVertex(TVector3 &vertex) const
Definition: CbmMCTrack.h:182
CbmAnaConversionPhotons::fMCTracklist_allGammasFromPi0
std::vector< CbmMCTrack * > fMCTracklist_allGammasFromPi0
Definition: CbmAnaConversionPhotons.h:117
CbmAnaConversionPhotons::AnalyseGammas
void AnalyseGammas()
Definition: CbmAnaConversionPhotons.cxx:1908
xMath::Pi
double Pi()
Definition: xMath.h:5
CbmAnaConversionPhotons::fhEFG_angle_reco_CUTcomparison
TH1I * fhEFG_angle_reco_CUTcomparison
Definition: CbmAnaConversionPhotons.h:211
CbmAnaConversionPhotons::fRichPoints
TClonesArray * fRichPoints
Definition: CbmAnaConversionPhotons.h:75
CbmAnaConversionPhotons::fhEFG_momentumPair_all
TH1D * fhEFG_momentumPair_all
Definition: CbmAnaConversionPhotons.h:180
CbmAnaConversionPhotons::fhEFG_angle_combBack
TH1D * fhEFG_angle_combBack
Definition: CbmAnaConversionPhotons.h:125
CbmAnaConversionPhotons::fhEFG_momentumResolutionPhoton_reco
TH2D * fhEFG_momentumResolutionPhoton_reco
Definition: CbmAnaConversionPhotons.h:254
CbmAnaConversionPhotons::fMCTracklist_allElectronsFromGamma
std::vector< CbmMCTrack * > fMCTracklist_allElectronsFromGamma
Definition: CbmAnaConversionPhotons.h:110
CbmAnaConversionPhotons::Init
void Init()
Definition: CbmAnaConversionPhotons.cxx:184
CbmAnaConversionPhotons::fRecoTracklist_allElectronsFromPi0Mom
std::vector< TVector3 > fRecoTracklist_allElectronsFromPi0Mom
Definition: CbmAnaConversionPhotons.h:114
CbmAnaConversionPhotons::fhEFG_angle_all_reco_cuts
TH1D * fhEFG_angle_all_reco_cuts
Definition: CbmAnaConversionPhotons.h:206
CbmAnaConversionPhotons::fKFVertex
CbmKFVertex fKFVertex
Definition: CbmAnaConversionPhotons.h:83
CbmMCTrack::GetPt
Double_t GetPt() const
Definition: CbmMCTrack.h:99
CbmAnaConversionPhotons::Finish
void Finish()
Definition: CbmAnaConversionPhotons.cxx:1098
CbmAnaConversionPhotons::fhEFG_angle_allSameG_reco_cuts
TH1D * fhEFG_angle_allSameG_reco_cuts
Definition: CbmAnaConversionPhotons.h:208
CbmAnaConversionPhotons::fPhotonsRest_ptMC_e
TH1D * fPhotonsRest_ptMC_e
Definition: CbmAnaConversionPhotons.h:106
CbmAnaConversionPhotons::fhEFG_angleVSpt_allSameG
TH2D * fhEFG_angleVSpt_allSameG
Definition: CbmAnaConversionPhotons.h:142
CbmAnaConversionPhotons::fhEFG_angleVSpt_eta_reco
TH2D * fhEFG_angleVSpt_eta_reco
Definition: CbmAnaConversionPhotons.h:243
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_allSameG
TH1D * fhEFG_angleBelow1GeV_allSameG
Definition: CbmAnaConversionPhotons.h:166
CbmAnaConversionPhotons::fPhotons_ptRapMC
TH2D * fPhotons_ptRapMC
Definition: CbmAnaConversionPhotons.h:99
CbmAnaConversionPhotons::fHistoList_photons
std::vector< TH1 * > fHistoList_photons
Definition: CbmAnaConversionPhotons.h:86
CbmGlobalTrack
Definition: CbmGlobalTrack.h:26
CbmMCTrack::GetRapidity
Double_t GetRapidity() const
Definition: CbmMCTrack.cxx:177
CbmAnaConversionPhotons::fhEFG_energy_combBack
TH1D * fhEFG_energy_combBack
Definition: CbmAnaConversionPhotons.h:157
CbmAnaConversionPhotons::fRecoTracklist_allElectronsFromGamma
std::vector< CbmMCTrack * > fRecoTracklist_allElectronsFromGamma
Definition: CbmAnaConversionPhotons.h:111
CbmAnaConversionPhotons::FillMCTracklist_allGammas
void FillMCTracklist_allGammas(CbmMCTrack *mctrack)
Definition: CbmAnaConversionPhotons.cxx:1396
CbmAnaConversionPhotons::fPhotonsRest_ptMC_n
TH1D * fPhotonsRest_ptMC_n
Definition: CbmAnaConversionPhotons.h:105
CbmAnaConversionPhotons::fhEFG_invmassVSpt_pi0_reco
TH2D * fhEFG_invmassVSpt_pi0_reco
Definition: CbmAnaConversionPhotons.h:250
CbmAnaConversionPhotons::AnalysePhotons
void AnalysePhotons()
Definition: CbmAnaConversionPhotons.cxx:1307
CbmAnaConversionPhotons::fhEFG_angle_all
TH1D * fhEFG_angle_all
Definition: CbmAnaConversionPhotons.h:124
CbmMCTrack.h
CbmAnaConversionPhotons::fhEFPI0_angle_reco
TH1D * fhEFPI0_angle_reco
Definition: CbmAnaConversionPhotons.h:258
CbmAnaConversionPhotons::fhEFG_angle_pi0
TH1D * fhEFG_angle_pi0
Definition: CbmAnaConversionPhotons.h:128
CbmAnaConversionPhotons::fhG_invmass
TH1D * fhG_invmass
Definition: CbmAnaConversionPhotons.h:261
CbmAnaConversionPhotons::fhEFG_angleAbove1GeV_direct
TH1D * fhEFG_angleAbove1GeV_direct
Definition: CbmAnaConversionPhotons.h:175
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmAnaConversionPhotons::fhEFG_angleAbove1GeV_all
TH1D * fhEFG_angleAbove1GeV_all
Definition: CbmAnaConversionPhotons.h:172
CbmAnaConversionPhotons::fPhotons_nofPerEvent
TH1I * fPhotons_nofPerEvent
Definition: CbmAnaConversionPhotons.h:93
CbmAnaConversionPhotons::fhEFG_angleVSpt_combBack
TH2D * fhEFG_angleVSpt_combBack
Definition: CbmAnaConversionPhotons.h:141
CbmAnaConversionPhotons::fStsTracks
TClonesArray * fStsTracks
Definition: CbmAnaConversionPhotons.h:79
CbmAnaConversionPhotons::fTime
Double_t fTime
Definition: CbmAnaConversionPhotons.h:267
CbmAnaConversionPhotons::fHistoList_EFG_invmass
std::vector< TH1 * > fHistoList_EFG_invmass
Definition: CbmAnaConversionPhotons.h:89
CbmAnaConversionPhotons::fhEFG_invmass_direct_reco_cut
TH1D * fhEFG_invmass_direct_reco_cut
Definition: CbmAnaConversionPhotons.h:233
CbmAnaConversionPhotons::AnalyseElectronsFromPi0Reco
void AnalyseElectronsFromPi0Reco()
Definition: CbmAnaConversionPhotons.cxx:1874
CbmAnaConversionPhotons::fPhotons_pt
TH1D * fPhotons_pt
Definition: CbmAnaConversionPhotons.h:94
CbmAnaConversionPhotons::global_nof_photonsReco
Int_t global_nof_photonsReco
Definition: CbmAnaConversionPhotons.h:120
CbmAnaConversionCutSettings::CalcOpeningAngleCutAlt3
static Double_t CalcOpeningAngleCutAlt3(Double_t)
Definition: CbmAnaConversionCutSettings.h:43
CbmAnaConversionPhotons::fhEFG_angleVSpt_combBack_reco
TH2D * fhEFG_angleVSpt_combBack_reco
Definition: CbmAnaConversionPhotons.h:239
CbmAnaConversionPhotons::fhEFG_momentumPair_direct
TH1D * fhEFG_momentumPair_direct
Definition: CbmAnaConversionPhotons.h:183
CbmAnaConversionPhotons::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmAnaConversionPhotons.h:81
CbmLmvmKinematicParams::fMomentumMag
Double_t fMomentumMag
Definition: CbmLmvmKinematicParams.h:19
CbmAnaConversionPhotons::fhEFG_invmassVSpt_eta_reco
TH2D * fhEFG_invmassVSpt_eta_reco
Definition: CbmAnaConversionPhotons.h:251
CbmAnaConversionPhotons::FillRecoTracklist_allElectrons
void FillRecoTracklist_allElectrons(CbmMCTrack *mctrack, TVector3 refittedMom)
Definition: CbmAnaConversionPhotons.cxx:1412
CbmAnaConversionCutSettings::CalcOpeningAngleCutAlt4
static Double_t CalcOpeningAngleCutAlt4(Double_t pt)
Definition: CbmAnaConversionCutSettings.h:50
CbmAnaConversionPhotons::fhEFG_invmass_allSameG
TH1D * fhEFG_invmass_allSameG
Definition: CbmAnaConversionPhotons.h:150
CbmTrackMatchNew
Definition: CbmTrackMatchNew.h:19
CbmAnaConversionPhotons::fhEFG_angleAbove1GeV_combBack
TH1D * fhEFG_angleAbove1GeV_combBack
Definition: CbmAnaConversionPhotons.h:173
CbmLitGlobalElectronId.h
CbmAnaConversionPhotons::fhEFG_momentumPair_pi0
TH1D * fhEFG_momentumPair_pi0
Definition: CbmAnaConversionPhotons.h:184
CbmAnaConversionPhotons::fhEFG_energy_pi0
TH1D * fhEFG_energy_pi0
Definition: CbmAnaConversionPhotons.h:160
CbmAnaConversionPhotons::fhEFG_angleVSenergy_direct
TH2D * fhEFG_angleVSenergy_direct
Definition: CbmAnaConversionPhotons.h:135
CbmMCTrack::GetEnergy
Double_t GetEnergy() const
Definition: CbmMCTrack.h:165
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmAnaConversionPhotons::fhEFG_invmass_combBack
TH1D * fhEFG_invmass_combBack
Definition: CbmAnaConversionPhotons.h:149
CbmAnaConversionPhotons::fhEFG_angleVSpt_pi0
TH2D * fhEFG_angleVSpt_pi0
Definition: CbmAnaConversionPhotons.h:144
CbmAnaConversionPhotons::fhEFG_angle_direct_reco
TH1D * fhEFG_angle_direct_reco
Definition: CbmAnaConversionPhotons.h:201
CbmAnaConversionPhotons::fhEFG_momentumPair_allSameG
TH1D * fhEFG_momentumPair_allSameG
Definition: CbmAnaConversionPhotons.h:182
CbmAnaConversionPhotons::timer
TStopwatch timer
Definition: CbmAnaConversionPhotons.h:266
CbmAnaConversionPhotons::fhEFG_angle_eta
TH1D * fhEFG_angle_eta
Definition: CbmAnaConversionPhotons.h:129
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_direct_reco
TH1D * fhEFG_angleBelow1GeV_direct_reco
Definition: CbmAnaConversionPhotons.h:217
CbmAnaConversionPhotons::fhEFG_invmass_combBack_reco
TH1D * fhEFG_invmass_combBack_reco
Definition: CbmAnaConversionPhotons.h:223
CbmMCTrack::GetP
Double_t GetP() const
Definition: CbmMCTrack.h:100
CbmAnaConversionPhotons::fhEFG_startvertexVSangle_eta
TH2D * fhEFG_startvertexVSangle_eta
Definition: CbmAnaConversionPhotons.h:193
CbmAnaConversionPhotons::fPrimVertex
CbmVertex * fPrimVertex
Definition: CbmAnaConversionPhotons.h:82
CbmAnaConversionPhotons::fhEFG_momentumPair_combBack
TH1D * fhEFG_momentumPair_combBack
Definition: CbmAnaConversionPhotons.h:181
CbmLmvmKinematicParams
Definition: CbmLmvmKinematicParams.h:17
CbmLmvmKinematicParams::fPt
Double_t fPt
Definition: CbmLmvmKinematicParams.h:20
CbmAnaConversionPhotons::fPhotons_energyMC
TH1D * fPhotons_energyMC
Definition: CbmAnaConversionPhotons.h:97
CbmAnaConversionPhotons::CheckMC
int CheckMC(CbmMCTrack *mctrack)
Definition: CbmAnaConversionPhotons.cxx:1488
CbmAnaConversionPhotons::fhEFG_angleAbove1GeV_pi0
TH1D * fhEFG_angleAbove1GeV_pi0
Definition: CbmAnaConversionPhotons.h:176
CbmAnaConversionPhotons::fhEFG_angleVSpt_pi0_reco
TH2D * fhEFG_angleVSpt_pi0_reco
Definition: CbmAnaConversionPhotons.h:242
CbmAnaConversionPhotons::fhEFG_invmass_allSameG_reco
TH1D * fhEFG_invmass_allSameG_reco
Definition: CbmAnaConversionPhotons.h:224
CbmAnaConversionPhotons::fHistoList_EFG_angle
std::vector< TH1 * > fHistoList_EFG_angle
Definition: CbmAnaConversionPhotons.h:88
CbmAnaConversionPhotons::fhEFG_invmass_eta_reco
TH1D * fhEFG_invmass_eta_reco
Definition: CbmAnaConversionPhotons.h:227
CbmKFVertex
Definition: CbmKFVertex.h:6
CbmAnaConversionPhotons::fhEFG_energy_eta
TH1D * fhEFG_energy_eta
Definition: CbmAnaConversionPhotons.h:161
CbmLmvmKinematicParams::fAngle
Double_t fAngle
Definition: CbmLmvmKinematicParams.h:23
CbmAnaConversionPhotons::fhEFG_invmass_eta_reco_cut
TH1D * fhEFG_invmass_eta_reco_cut
Definition: CbmAnaConversionPhotons.h:235
CbmAnaConversionPhotons::fhEFG_angleBelow1GeV_direct
TH1D * fhEFG_angleBelow1GeV_direct
Definition: CbmAnaConversionPhotons.h:167