18 #include "FairLogger.h"
19 #include "FairRootManager.h"
39 , fRichRingMatches(NULL)
42 , fStsTrackMatches(NULL)
46 , fHistoList_photons()
48 , fHistoList_EFG_angle()
49 , fHistoList_EFG_invmass()
50 , fHistoList_EFG_energy()
51 , fPhotons_nofPerEvent(NULL)
54 , fPhotons_nofMC(NULL)
55 , fPhotons_energyMC(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)
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)
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)
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)
177 , fhG_invmass_pi0(NULL)
185 FairRootManager* ioman = FairRootManager::Instance();
187 Fatal(
"CbmAnaConversion::Init",
"RootManager not instantised!");
190 fRichPoints = (TClonesArray*) ioman->GetObject(
"RichPoint");
192 Fatal(
"CbmAnaConversion::Init",
"No RichPoint array!");
195 fMcTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
197 Fatal(
"CbmAnaConversion::Init",
"No MCTrack array!");
200 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
202 Fatal(
"CbmAnaConversion::Init",
"No StsTrack array!");
207 Fatal(
"CbmAnaConversion::Init",
"No StsTrackMatch array!");
210 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
212 Fatal(
"CbmAnaConversion::Init",
"No GlobalTrack array!");
222 if (
nullptr ==
fPrimVertex) { LOG(fatal) <<
"No PrimaryVertex array!"; }
224 fRichRings = (TClonesArray*) ioman->GetObject(
"RichRing");
226 Fatal(
"CbmAnaConversion::Init",
"No RichRing array!");
231 Fatal(
"CbmAnaConversion::Init",
"No RichRingMatch array!");
250 new TH1I(
"fPhotons_nofPerEvent",
251 "fPhotons_nofPerEvent; nof photons per event; #",
256 fPhotons_pt =
new TH1D(
"fPhotons_pt",
"fPhotons_pt; pt; #", 50, -0.5, 4.5);
259 new TH1I(
"fPhotons_test",
"fPhotons_test; test; #", 10, -0.5, 9.5);
263 new TH1I(
"fPhotons_nofMC",
"fPhotons_nofMC; test; #", 100, -0.5, 99.5);
266 "fPhotons_energyMC",
"fPhotons_energyMC; energy; #", 500, -0.5, 49.5);
269 new TH1D(
"fPhotons_ptMC",
"fPhotons_ptMC; pt; #", 500, -0.5, 4.5);
272 "fPhotons_ptRapMC; pt; #",
281 "fPhotonsRest_energyMC; energy; #",
287 "fPhotonsRest_pdgMotherMC; pdg code; #",
293 new TH1D(
"fPhotonsRest_ptMC",
"fPhotonsRest_ptMC; pt; #", 500, -0.5, 4.5);
297 "fDirectPhotonsRest_ptMC_pi0; pt; #",
303 "fPhotonsRest_ptMC_n",
"fPhotonsRest_ptMC_n; pt; #", 500, -0.5, 4.5);
306 "fPhotonsRest_ptMC_e",
"fPhotonsRest_ptMC_e; pt; #", 500, -0.5, 4.5);
309 "fPhotonsRest_ptMC_eta",
"fPhotonsRest_ptMC_eta; pt; #", 500, -0.5, 4.5);
313 "fhGlobalNofDirectPhotons",
"fhGlobalNofDirectPhotons; ; #", 2, 0., 2.);
319 "nof reconstructed DP");
323 "fhEFG_angle_all; opening angle [deg]; #",
328 new TH1D(
"fhEFG_angle_combBack",
329 "fhEFG_angle_combBack; opening angle [deg]; #",
334 new TH1D(
"fhEFG_angle_allSameG",
335 "fhEFG_angle_allSameG; opening angle [deg]; #",
340 "fhEFG_angle_direct; opening angle [deg]; #",
345 "fhEFG_angle_pi0",
"fhEFG_angle_pi0; opening angle [deg]; #", 400, 0., 20.);
347 "fhEFG_angle_eta",
"fhEFG_angle_eta; opening angle [deg]; #", 400, 0., 20.);
355 "fhEFG_invmass_all; invmass [GeV/c^2]; #",
360 new TH1D(
"fhEFG_invmass_combBack",
361 "fhEFG_invmass_combBack; invmass [GeV/c^2]; #",
366 new TH1D(
"fhEFG_invmass_allSameG",
367 "fhEFG_invmass_allSameG; invmass [GeV/c^2]; #",
372 "fhEFG_invmass_direct; invmass [GeV/c^2]; #",
377 "fhEFG_invmass_pi0; invmass [GeV/c^2]; #",
382 "fhEFG_invmass_eta; invmass [GeV/c^2]; #",
393 "fhEFG_energy_all",
"fhEFG_energy_all; energy [GeV]; #", 1000, 0., 50);
395 "fhEFG_energy_combBack; energy [GeV]; #",
400 "fhEFG_energy_allSameG; energy [GeV]; #",
405 "fhEFG_energy_direct; energy [GeV]; #",
410 "fhEFG_energy_pi0",
"fhEFG_energy_pi0; energy [GeV]; #", 1000, 0., 50);
412 "fhEFG_energy_eta",
"fhEFG_energy_eta; energy [GeV]; #", 1000, 0., 50);
422 new TH1D(
"fhEFG_angleBelow1GeV_all",
423 "fhEFG_angleBelow1GeV_all; opening angle [deg]; #",
428 new TH1D(
"fhEFG_angleBelow1GeV_combBack",
429 "fhEFG_angleBelow1GeV_combBack; opening angle [deg]; #",
434 new TH1D(
"fhEFG_angleBelow1GeV_allSameG",
435 "fhEFG_angleBelow1GeV_allSameG; opening angle [deg]; #",
440 new TH1D(
"fhEFG_angleBelow1GeV_direct",
441 "fhEFG_angleBelow1GeV_direct; opening angle [deg]; #",
446 new TH1D(
"fhEFG_angleBelow1GeV_pi0",
447 "fhEFG_angleBelow1GeV_pi0; opening angle [deg]; #",
452 new TH1D(
"fhEFG_angleBelow1GeV_eta",
453 "fhEFG_angleBelow1GeV_eta; opening angle [deg]; #",
466 new TH1D(
"fhEFG_angleAbove1GeV_all",
467 "fhEFG_angleAbove1GeV_all; opening angle [deg]; #",
472 new TH1D(
"fhEFG_angleAbove1GeV_combBack",
473 "fhEFG_angleAbove1GeV_combBack; opening angle [deg]; #",
478 new TH1D(
"fhEFG_angleAbove1GeV_allSameG",
479 "fhEFG_angleAbove1GeV_allSameG; opening angle [deg]; #",
484 new TH1D(
"fhEFG_angleAbove1GeV_direct",
485 "fhEFG_angleAbove1GeV_direct; opening angle [deg]; #",
490 new TH1D(
"fhEFG_angleAbove1GeV_pi0",
491 "fhEFG_angleAbove1GeV_pi0; opening angle [deg]; #",
496 new TH1D(
"fhEFG_angleAbove1GeV_eta",
497 "fhEFG_angleAbove1GeV_eta; opening angle [deg]; #",
512 new TH2D(
"fhEFG_angleVSenergy_allSameG",
513 "fhEFG_angleVSenergy_allSameG;energy [GeV];opening angle [deg]",
521 new TH2D(
"fhEFG_angleVSenergy_direct",
522 "fhEFG_angleVSenergy_direct;energy [GeV];opening angle [deg]",
530 new TH2D(
"fhEFG_angleVSenergy_pi0",
531 "fhEFG_angleVSenergy_pi0;energy [GeV];opening angle [deg]",
539 new TH2D(
"fhEFG_angleVSenergy_eta",
540 "fhEFG_angleVSenergy_eta;energy [GeV];opening angle [deg]",
556 new TH2D(
"fhEFG_angleVSpt_all",
557 "fhEFG_angleVSpt_all;pt [GeV/c];opening angle [deg]",
565 new TH2D(
"fhEFG_angleVSpt_combBack",
566 "fhEFG_angleVSpt_combBack;pt [GeV/c];opening angle [deg]",
574 new TH2D(
"fhEFG_angleVSpt_allSameG",
575 "fhEFG_angleVSpt_allSameG;pt [GeV/c];opening angle [deg]",
583 new TH2D(
"fhEFG_angleVSpt_direct",
584 "fhEFG_angleVSpt_direct;pt [GeV/c];opening angle [deg]",
592 new TH2D(
"fhEFG_angleVSpt_pi0",
593 "fhEFG_angleVSpt_pi0;pt [GeV/c];opening angle [deg]",
601 new TH2D(
"fhEFG_angleVSpt_eta",
602 "fhEFG_angleVSpt_eta;pt [GeV/c];opening angle [deg]",
618 "fhEFG_momentumPair_all; energy [GeV]; #",
623 new TH1D(
"fhEFG_momentumPair_combBack",
624 "fhEFG_momentumPair_combBack; energy [GeV]; #",
629 new TH1D(
"fhEFG_momentumPair_allSameG",
630 "fhEFG_momentumPair_allSameG; energy [GeV]; #",
635 new TH1D(
"fhEFG_momentumPair_direct",
636 "fhEFG_momentumPair_direct; energy [GeV]; #",
641 "fhEFG_momentumPair_pi0; energy [GeV]; #",
646 "fhEFG_momentumPair_eta; energy [GeV]; #",
660 new TH2D(
"fhEFG_startvertexVSangle_allSameG",
661 "fhEFG_startvertexVSangle_allSameG; startvertex [cm]; angle [deg]",
669 new TH2D(
"fhEFG_startvertexVSangle_direct",
670 "fhEFG_startvertexVSangle_direct; startvertex [cm]; angle [deg]",
678 new TH2D(
"fhEFG_startvertexVSangle_pi0",
679 "fhEFG_startvertexVSangle_pi0; startvertex [cm]; angle [deg]",
687 new TH2D(
"fhEFG_startvertexVSangle_eta",
688 "fhEFG_startvertexVSangle_eta; startvertex [cm]; angle [deg]",
703 new TH1D(
"fhEFG_startvertex_allSameG",
704 "fhEFG_startvertex_allSameG; startvertex [cm];#",
713 new TH1D(
"fhEFG_angle_all_reco",
714 "fhEFG_angle_all_reco; opening angle [deg]; #",
719 new TH1D(
"fhEFG_angle_combBack_reco",
720 "fhEFG_angle_combBack_reco; opening angle [deg]; #",
725 new TH1D(
"fhEFG_angle_allSameG_reco",
726 "fhEFG_angle_allSameG_reco; opening angle [deg]; #",
731 new TH1D(
"fhEFG_angle_direct_reco",
732 "fhEFG_angle_direct_reco; opening angle [deg]; #",
737 new TH1D(
"fhEFG_angle_pi0_reco",
738 "fhEFG_angle_pi0_reco; opening angle [deg]; #",
743 new TH1D(
"fhEFG_angle_eta_reco",
744 "fhEFG_angle_eta_reco; opening angle [deg]; #",
758 new TH1I(
"fhEFG_angle_reco_CUTcomparison",
759 "fhEFG_angle_reco_CUTcomparison; ; #",
780 new TH1D(
"fhEFG_angle_all_reco_cuts",
781 "fhEFG_angle_all_reco_cuts; opening angle [deg]; #",
786 new TH1D(
"fhEFG_angle_combBack_reco_cuts",
787 "fhEFG_angle_combBack_reco_cuts; opening angle [deg]; #",
792 new TH1D(
"fhEFG_angle_allSameG_reco_cuts",
793 "fhEFG_angle_allSameG_reco_cuts; opening angle [deg]; #",
804 new TH1D(
"fhEFG_angleBelow1GeV_all_reco",
805 "fhEFG_angleBelow1GeV_all_reco; opening angle [deg]; #",
810 new TH1D(
"fhEFG_angleBelow1GeV_combBack_reco",
811 "fhEFG_angleBelow1GeV_combBack_reco; opening angle [deg]; #",
816 new TH1D(
"fhEFG_angleBelow1GeV_allSameG_reco",
817 "fhEFG_angleBelow1GeV_allSameG_reco; opening angle [deg]; #",
822 new TH1D(
"fhEFG_angleBelow1GeV_direct_reco",
823 "fhEFG_angleBelow1GeV_direct_reco; opening angle [deg]; #",
828 new TH1D(
"fhEFG_angleBelow1GeV_pi0_reco",
829 "fhEFG_angleBelow1GeV_pi0_reco; opening angle [deg]; #",
834 new TH1D(
"fhEFG_angleBelow1GeV_eta_reco",
835 "fhEFG_angleBelow1GeV_eta_reco; opening angle [deg]; #",
847 new TH1D(
"fhEFG_invmass_all_reco",
848 "fhEFG_invmass_all_reco; invmass [GeV/c^2]; #",
853 new TH1D(
"fhEFG_invmass_combBack_reco",
854 "fhEFG_invmass_combBack_reco; invmass [GeV/c^2]; #",
859 new TH1D(
"fhEFG_invmass_allSameG_reco",
860 "fhEFG_invmass_allSameG_reco; invmass [GeV/c^2]; #",
865 new TH1D(
"fhEFG_invmass_direct_reco",
866 "fhEFG_invmass_direct_reco; invmass [GeV/c^2]; #",
871 new TH1D(
"fhEFG_invmass_pi0_reco",
872 "fhEFG_invmass_pi0_reco; invmass [GeV/c^2]; #",
877 new TH1D(
"fhEFG_invmass_eta_reco",
878 "fhEFG_invmass_eta_reco; invmass [GeV/c^2]; #",
890 new TH1D(
"fhEFG_invmass_all_reco_cut",
891 "fhEFG_invmass_all_reco_cut; invmass [GeV/c^2]; #",
896 new TH1D(
"fhEFG_invmass_combBack_reco_cut",
897 "fhEFG_invmass_combBack_reco_cut; invmass [GeV/c^2]; #",
902 new TH1D(
"fhEFG_invmass_allSameG_reco_cut",
903 "fhEFG_invmass_allSameG_reco_cut; invmass [GeV/c^2]; #",
908 new TH1D(
"fhEFG_invmass_direct_reco_cut",
909 "fhEFG_invmass_direct_reco_cut; invmass [GeV/c^2]; #",
914 new TH1D(
"fhEFG_invmass_pi0_reco_cut",
915 "fhEFG_invmass_pi0_reco_cut; invmass [GeV/c^2]; #",
920 new TH1D(
"fhEFG_invmass_eta_reco_cut",
921 "fhEFG_invmass_eta_reco_cut; invmass [GeV/c^2]; #",
935 new TH2D(
"fhEFG_angleVSpt_all_reco",
936 "fhEFG_angleVSpt_all_reco;pt [GeV/c];opening angle [deg]",
944 new TH2D(
"fhEFG_angleVSpt_combBack_reco",
945 "fhEFG_angleVSpt_combBack_reco;pt [GeV/c];opening angle [deg]",
953 new TH2D(
"fhEFG_angleVSpt_allSameG_reco",
954 "fhEFG_angleVSpt_allSameG_reco;pt [GeV/c];opening angle [deg]",
962 new TH2D(
"fhEFG_angleVSpt_direct_reco",
963 "fhEFG_angleVSpt_direct_reco;pt [GeV/c];opening angle [deg]",
971 new TH2D(
"fhEFG_angleVSpt_pi0_reco",
972 "fhEFG_angleVSpt_pi0_reco;pt [GeV/c];opening angle [deg]",
980 new TH2D(
"fhEFG_angleVSpt_eta_reco",
981 "fhEFG_angleVSpt_eta_reco;pt [GeV/c];opening angle [deg]",
998 new TH2D(
"fhEFG_invmassVSpt_all_reco",
999 "fhEFG_invmassVSpt_all_reco;pt [GeV/c];invmass [GeV]",
1007 new TH2D(
"fhEFG_invmassVSpt_combBack_reco",
1008 "fhEFG_invmassVSpt_combBack_reco;pt [GeV/c];invmass [GeV]",
1016 new TH2D(
"fhEFG_invmassVSpt_allSameG_reco",
1017 "fhEFG_invmassVSpt_allSameG_reco;pt [GeV/c];invmass [GeV]",
1025 new TH2D(
"fhEFG_invmassVSpt_direct_reco",
1026 "fhEFG_invmassVSpt_direct_reco;pt [GeV/c];invmass [GeV]",
1034 new TH2D(
"fhEFG_invmassVSpt_pi0_reco",
1035 "fhEFG_invmassVSpt_pi0_reco;pt [GeV/c];invmass [GeV]",
1043 new TH2D(
"fhEFG_invmassVSpt_eta_reco",
1044 "fhEFG_invmassVSpt_eta_reco;pt [GeV/c];invmass [GeV]",
1060 new TH2D(
"fhEFG_momentumResolutionPhoton_reco",
1061 "fhEFG_momentumResolutionPhoton_reco;p [GeV/c]; dp/p [%]",
1069 new TH2D(
"fhEFG_momentumResolutionElectrons_reco",
1070 "fhEFG_momentumResolutionElectrons_reco;p [GeV/c]; dp/p [%]",
1082 "fhEFPI0_angle_reco; opening angle [deg]; #",
1090 new TH1D(
"fhG_invmass",
"fhG_invmass; invmass [GeV/c^2]; #", 10000, 0., 1.);
1093 "fhG_invmass_pi0",
"fhG_invmass_pi0; invmass [GeV/c^2]; #", 10000, 0., 1.);
1100 gDirectory->mkdir(
"Photons");
1101 gDirectory->cd(
"Photons");
1103 gDirectory->mkdir(
"electrons from gamma");
1104 gDirectory->cd(
"electrons from gamma");
1106 gDirectory->mkdir(
"angle");
1107 gDirectory->mkdir(
"invariant mass");
1108 gDirectory->mkdir(
"energy");
1110 gDirectory->cd(
"angle");
1114 gDirectory->cd(
"..");
1116 gDirectory->cd(
"invariant mass");
1120 gDirectory->cd(
"..");
1122 gDirectory->cd(
"energy");
1126 gDirectory->cd(
"..");
1132 gDirectory->cd(
"..");
1137 gDirectory->cd(
"..");
1140 cout <<
"CbmAnaConversionPhotons: Realtime - " <<
fTime << endl;
1143 cout <<
"CbmAnaConversionPhotons: all MC direct photons: "
1148 <<
" % can be reconstructed!" << endl;
1172 Fatal(
"CbmAnaConversion::Exec",
"No PrimaryVertex array!");
1175 int nofDirectPhotons = 0;
1189 Int_t nofMcTracks =
fMcTracks->GetEntriesFast();
1190 for (
int i = 0;
i < nofMcTracks;
i++) {
1192 if (mctrack == NULL)
continue;
1199 nofDirectPhotons +=
CheckMC(mctrack);
1211 for (
int iG = 0; iG < nofGlobalTracks; iG++) {
1213 if (NULL == gTrack)
continue;
1216 if (richInd < 0)
continue;
1217 if (stsInd < 0)
continue;
1220 if (stsTrack == NULL)
continue;
1224 if (stsMatch == NULL)
continue;
1226 if (stsMcTrackId < 0)
continue;
1228 if (mcTrack1 == NULL)
continue;
1232 if (richMatch == NULL)
continue;
1234 if (richMcTrackId < 0)
continue;
1236 if (mcTrack2 == NULL)
continue;
1238 if (stsMcTrackId != richMcTrackId)
continue;
1240 int pdg = TMath::Abs(mcTrack1->
GetPdgCode());
1244 TVector3 refittedMomentum;
1246 vector<CbmStsTrack> stsTracks;
1247 stsTracks.resize(1);
1248 stsTracks[0] = *stsTrack;
1249 vector<L1FieldRegion> vField;
1250 vector<float> chiPrim;
1254 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
1255 vtxTrack->Momentum(refittedMomentum);
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);
1269 stsTracks_electron, vField_electron, chiPrim_electron,
fKFVertex, 3e6);
1271 TVector3 refittedMomentum_electron;
1272 const FairTrackParam* vtxTrack_electron =
1273 stsTracks_electron[0].GetParamFirst();
1274 vtxTrack_electron->Momentum(refittedMomentum_electron);
1275 refittedMomentum = refittedMomentum_electron;
1282 if (motherID == -1)
continue;
1284 int motherpdg = TMath::Abs(mothermcTrack1->
GetPdgCode());
1285 if (motherpdg != 22)
continue;
1286 int grandmotherID = mothermcTrack1->
GetMotherId();
1287 if (grandmotherID != -1)
continue;
1301 cout <<
"CbmAnaConversionPhotons: time spent (Exec) " <<
timer.RealTime()
1308 Int_t nof_photons = 0;
1311 for (
int iG = 0; iG < nofGlobalTracks; iG++) {
1313 if (NULL == gTrack)
continue;
1316 if (richInd < 0)
continue;
1317 if (stsInd < 0)
continue;
1320 if (stsTrack == NULL)
continue;
1324 if (stsMatch == NULL)
continue;
1326 if (stsMcTrackId < 0)
continue;
1328 if (mcTrack1 == NULL)
continue;
1332 if (richMatch == NULL)
continue;
1334 if (richMcTrackId < 0)
continue;
1336 if (mcTrack2 == NULL)
continue;
1340 if (stsMcTrackId != richMcTrackId)
continue;
1342 int pdg = TMath::Abs(
1348 if (motherID == -1)
continue;
1350 int motherpdg = TMath::Abs(mothermcTrack1->
GetPdgCode());
1351 if (motherpdg != 22)
continue;
1352 int grandmotherID = mothermcTrack1->
GetMotherId();
1353 if (grandmotherID != -1)
continue;
1372 cout <<
"CbmAnaConversionPhotons: filling tracklist, pdg "
1373 << mctrack->
GetPdgCode() <<
" - motherpdg " << motherpdg
1374 <<
" - motherID " << motherID << endl;
1381 TVector3 startvertex;
1383 if (startvertex.Z() > 0.1)
return;
1389 if (motherpdg == 22) {
1398 TVector3 startvertex;
1400 if (startvertex.Z() > 0.1)
return;
1414 TVector3 refittedMom) {
1416 TVector3 startvertex;
1418 if (startvertex.Z() > 0.1)
return;
1424 if (motherpdg == 22) {
1428 if (motherpdg == 111) {
1437 TH1I* zwischenhisto =
1438 new TH1I(
"zwischenhisto",
"zwischenhisto", 1000000, 0, 1000000);
1443 if (zwischenhisto->GetMaximum() >= 2) {
1444 cout <<
"CbmAnaConversionPhotons: photon found, mother ids "
1445 << zwischenhisto->GetMaximumBin() - 1 << endl;
1448 cout <<
"CbmAnaConversionPhotons: additional data: pdg "
1452 zwischenhisto->Delete();
1455 int photoncounter = 0;
1456 std::multimap<int, int> electronMap;
1458 electronMap.insert(std::pair<int, int>(
fMCTracklist[
i]->GetMotherId(),
i));
1462 for (std::map<int, int>::iterator it = electronMap.begin();
1463 it != electronMap.end();
1465 if (it == electronMap.begin()) check = 1;
1466 if (it != electronMap.begin()) {
1467 std::map<int, int>::iterator zwischen = it;
1470 int id_old = zwischen->first;
1474 cout <<
"CbmAnaConversionPhotons: map - photon found " <<
id << endl;
1489 int nofDirectPhotons = 0;
1499 Double_t pt = mctrack->
GetPt();
1502 if (pdg == 22 && motherId == -1) {
1509 if (pdg == 22 && motherId != -1) {
1527 return nofDirectPhotons;
1538 Double_t energyP = TMath::Sqrt(momP.Mag2() +
M2E);
1539 TLorentzVector lorVecP(momP, energyP);
1543 Double_t energyM = TMath::Sqrt(momM.Mag2() +
M2E);
1544 TLorentzVector lorVecM(momM, energyM);
1546 TVector3 momPair = momP + momM;
1547 Double_t energyPair = energyP + energyM;
1548 Double_t ptPair = momPair.Perp();
1549 Double_t pzPair = momPair.Pz();
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();
1555 2. * TMath::Sin(anglePair / 2.) * TMath::Sqrt(momM.Mag() * momP.Mag());
1558 params.
fPt = ptPair;
1560 params.
fMinv = minv;
1568 const TVector3 electron1,
1569 const TVector3 electron2) {
1572 Double_t energyP = TMath::Sqrt(electron1.Mag2() +
M2E);
1573 TLorentzVector lorVecP(electron1, energyP);
1575 Double_t energyM = TMath::Sqrt(electron2.Mag2() +
M2E);
1576 TLorentzVector lorVecM(electron2, energyM);
1578 TVector3 momPair = electron1 + electron2;
1579 Double_t energyPair = energyP + energyM;
1580 Double_t ptPair = momPair.Perp();
1581 Double_t pzPair = momPair.Pz();
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());
1590 params.
fPt = ptPair;
1592 params.
fMinv = minv;
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++) {
1618 int grandmotherID_i = mothermctrack_i->
GetMotherId();
1630 if (motherID_i != motherID_j) {
1633 mothermctrack_i->
GetPt());
1640 TVector3 startvertex;
1661 if (grandmotherID_i == -1) {
1679 int grandmotherpdg_i = grandmothermctrack_i->
GetPdgCode();
1680 if (grandmotherpdg_i == 111) {
1694 if (grandmotherpdg_i == 221) {
1718 cout <<
"CbmAnaConversionPhotons::AnalyseElectronsFromGammaReco() - array "
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++) {
1737 Double_t OpeningAngleCut =
1747 if (paramSet.
fAngle < OpeningAngleCut) {
1755 if (motherID_i != motherID_j) {
1760 if (paramSet.
fAngle < OpeningAngleCut) {
1794 if (paramSet.
fAngle < OpeningAngleCut) {
1820 int grandmotherID_i = mothermctrack_i->
GetMotherId();
1850 int grandmotherpdg_i = grandmothermctrack_i->
GetPdgCode();
1852 if (grandmotherpdg_i == 111) {
1860 if (grandmotherpdg_i == 221) {
1878 cout <<
"CbmAnaConversionPhotons::AnalyseElectronsFromGammaPi0() - array "
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++) {
1901 if (motherID_i != motherID_j) {
continue; }
1910 cout <<
"CbmAnaConversionPhotons: array size in AnalyseGammas(): " << number
1912 for (
int i = 0;
i < number - 1;
i++) {
1913 for (
int j =
i; j < number; j++) {
1918 Double_t energy1 = TMath::Sqrt(gamma1.Mag2());
1919 TLorentzVector lorVec1(gamma1, energy1);
1922 Double_t energy2 = TMath::Sqrt(gamma2.Mag2());
1923 TLorentzVector lorVec2(gamma2, energy2);
1925 sum = lorVec1 + lorVec2;
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++) {
1941 Double_t energy1 = TMath::Sqrt(gamma1.Mag2());
1942 TLorentzVector lorVec1(gamma1, energy1);
1945 Double_t energy2 = TMath::Sqrt(gamma2.Mag2());
1946 TLorentzVector lorVec2(gamma2, energy2);
1948 sum = lorVec1 + lorVec2;