72 : FairTask(
"CbmAnaConversion")
85 , fhElectronSources(NULL)
86 , fhNofPi0_perEvent(NULL)
87 , fhNofPi0_perEvent_cut(NULL)
88 , fhNofPi0_perEvent_cut2(NULL)
89 , fhNofPi0_perEvent_cut3(NULL)
90 , fhNofEta_perEvent(NULL)
91 , fhNofEta_perEvent_cut(NULL)
92 , fhNofEta_perEvent_cut2(NULL)
96 , fhPi0_pt_vs_rap(NULL)
98 , fhPi0_theta_vs_rap(NULL)
100 , fhEta_pt_vs_rap(NULL)
102 , fhEta_theta_vs_rap(NULL)
104 , fhRho_pt_vs_rap(NULL)
106 , fhRho_theta_vs_rap(NULL)
108 , fhOmega_pt_vs_rap(NULL)
109 , fhOmega_theta(NULL)
110 , fhOmega_theta_vs_rap(NULL)
111 , fhElectronsFromPi0_z(NULL)
112 , fhNofTracks_mctrack(NULL)
113 , fhNofTracks_globaltrack(NULL)
114 , fhInvariantMass_test(NULL)
115 , fhInvariantMass_test2(NULL)
116 , fhInvariantMass_test3(NULL)
117 , fhInvariantMassReco_test(NULL)
118 , fhInvariantMassReco_test2(NULL)
119 , fhInvariantMassReco_test3(NULL)
120 , fhInvariantMassReco_pi0(NULL)
121 , fhMomentum_MCvsReco(NULL)
122 , fhMomentum_MCvsReco_diff(NULL)
123 , fhSearchGammas(NULL)
128 , fRichRingMatches(NULL)
131 , fStsTrackMatches(NULL)
132 , fGlobalTracks(NULL)
133 , fhANN_output_electrons(NULL)
134 , fhANN_output_electrons2(NULL)
135 , fhANN_output_electrons_chiCut(NULL)
136 , fhANN_output_electrons_vs_p(NULL)
137 , fhANN_output_else(NULL)
138 , fhANN_output_else2(NULL)
139 , fhANN_output_else_chiCut(NULL)
140 , fhANN_output_else_vs_p(NULL)
146 , fKFparticleFinderQA(NULL)
150 , particlecounter_2daughters(0)
151 , particlecounter_3daughters(0)
152 , particlecounter_4daughters(0)
153 , particlecounter_all(0)
154 , fNofGeneratedPi0_allEvents(0)
155 , fNofPi0_kfparticle_allEvents(0)
156 , fNofGeneratedPi0(0)
157 , fNofPi0_kfparticle(0)
160 , fhPi0_NDaughters(NULL)
163 , fHistoList_tomography()
165 , fHistoList_reco_mom()
166 , fHistoList_kfparticle()
167 , fHistoList_richrings()
168 , fHistoList_furtherAnalyses()
172 , fRecoTracklistEPEM()
173 , fRecoTracklistEPEM_id()
174 , fRecoTracklistEPEM_chi()
175 , fRecoTracklistEPEM_gtid()
177 , fTestTracklist_momentum()
178 , fTestTracklist_chi()
179 , fTestTracklist_richInd()
180 , fTestTracklist_ndf()
181 , fTestTracklist_nofhits()
182 , fTestTracklist_noRichInd()
183 , fTestTracklist_noRichInd_MCindex()
184 , fTestTracklist_noRichInd_momentum()
185 , fTestTracklist_noRichInd_chi()
186 , fTestTracklist_noRichInd_richInd()
187 , fTestTracklist_noRichInd_gTrackId()
188 , fTestTracklist_noRichInd_ndf()
189 , fTestTracklist_noRichInd_nofhits()
191 , fRecoRefittedMomentum()
192 , fhNofElectrons_4epem(NULL)
193 , fhPi0_MC_occurence(NULL)
194 , fhPi0_MC_occurence2(NULL)
195 , fhPi0_Reco_occurence(NULL)
196 , fhPi0_Reco_occurence2(NULL)
197 , fhPi0_Reco_angles(NULL)
198 , fhPi0_Reco_chi(NULL)
199 , fhPi0_Reco_ndf(NULL)
200 , fhPi0_Reco_ndf_vs_chi(NULL)
201 , fhPi0_Reco_ndf_vs_startvertex(NULL)
202 , fhPi0_Reco_startvertex_vs_chi(NULL)
203 , fhPi0_Reco_startvertex_vs_nofhits(NULL)
204 , fhPi0_noRichInd_diffPhi(NULL)
205 , fhPi0_noRichInd_diffTheta(NULL)
206 , fhPi0_Reco_invmass_cases(NULL)
207 , fhPi0_Reco_noRichInd_invmass_cases(NULL)
208 , fhPi0_Reco_invmass(NULL)
209 , fhPi0_Reco_invmass_mc(NULL)
210 , fhPi0_Reco_noRichInd_invmass(NULL)
211 , fhPi0_Reco_noRichInd_invmass_mc(NULL)
212 , fhPi0_Reco_noRichInd_ndf_vs_nofhits(NULL)
213 , fhPi0_Reco_noRichInd_ndf_vs_nofhits_withChi(NULL)
214 , fhPi0_Reco_ndf_vs_nofhits(NULL)
215 , fhPi0_Reco_ndf_vs_nofhits_withChi(NULL)
216 , fhPi0_Reco_noRichInd_chi_vs_momentum(NULL)
217 , fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0(NULL)
218 , fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0_Target(NULL)
219 , fhPi0_Reco_noRichInd_chi_vs_momentum_eRest(NULL)
220 , fhPi0_Reco_noRichInd_chi_vs_pt(NULL)
221 , fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0(NULL)
222 , fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0_Target(NULL)
223 , fhPi0_Reco_noRichInd_chi_vs_pt_eRest(NULL)
224 , fhPi0_Reco_chi_vs_momentum(NULL)
225 , fhPi0_Reco_chi_vs_momentum_eFromPi0(NULL)
226 , fhPi0_Reco_chi_vs_momentum_eFromPi0_Target(NULL)
227 , fhPi0_Reco_chi_vs_pt(NULL)
228 , fhPi0_Reco_chi_vs_pt_eFromPi0(NULL)
229 , fhPi0_Reco_chi_vs_pt_eFromPi0_Target(NULL)
238 , fAnaTomography(NULL)
358 fhPdgCodes =
new TH1D(
"fhPdfCodes",
"fhPdgCodes;pdg code;#", 1000, 0, 1000);
359 fhNofElPrim =
new TH1D(
"fhNofElPrim",
"fhNofElPrim;Nof prim El;Entries", 10., -0.5, 9.5);
360 fhNofElSec =
new TH1D(
"fhNofElSec",
"fhNofElSec;Nof Sec El;Entries", 20., -0.5, 19.5);
361 fhNofElAll =
new TH1D(
"fhNofElAll",
"fhNofElAll;Nof All El;Entries", 30., -0.5, 29.5);
362 fhNofPi0_perEvent =
new TH1D(
"fhNofPi0_perEvent",
"fhNofPi0_perEvent;Nof pi0;Entries", 1000., -0.5, 999.5);
364 new TH1D(
"fhNofPi0_perEvent_cut",
"fhNofPi0_perEvent_cut (Z<10cm);Nof pi0;Entries", 800., -0.5, 799.5);
366 new TH1D(
"fhNofPi0_perEvent_cut2",
"fhNofPi0_perEvent_cut2 (motherId = -1);Nof pi0;Entries", 800., -0.5, 799.5);
368 "fhNofPi0_perEvent_cut3",
"fhNofPi0_perEvent_cut3 (conversion before 70cm);Nof pi0;Entries", 100., -0.5, 99.5);
369 fhNofEta_perEvent =
new TH1D(
"fhNofEta_perEvent",
"fhNofEta_perEvent;Nof eta;Entries", 100., -0.5, 99.5);
371 new TH1D(
"fhNofEta_perEvent_cut",
"fhNofEta_perEvent_cut (Z<4cm);Nof eta;Entries", 100., -0.5, 99.5);
373 new TH1D(
"fhNofEta_perEvent_cut2",
"fhNofEta_perEvent_cut2 (motherId = -1);Nof eta;Entries", 100., -0.5, 99.5);
374 fhPi0_z =
new TH1D(
"fhPi0_z",
"fhPi0_z;z in cm;Entries", 600., -0.5, 599.5);
375 fhPi0_z_cut =
new TH1D(
"fhPi0_z_cut",
"fhPi0_z_cut;z in cm;Entries", 600., -0.5, 599.5);
376 fhPi0_pt =
new TH1D(
"fhPi0_pt",
"fhPi0_pt;p_{t} in GeV/c;Entries", 200., 0., 10.);
378 new TH2D(
"fhPi0_pt_vs_rap",
"fhPi0_pt_vs_rap;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
379 fhPi0_theta =
new TH1D(
"fhPi0_theta",
"fhPi0_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
381 new TH2D(
"fhPi0_theta_vs_rap",
"fhPi0_theta_vs_rap;theta in deg;rapidity y", 180., 0., 180., 270, -2., 7.);
382 fhEta_pt =
new TH1D(
"fhEta_pt",
"fhEta_pt;p_{t} in GeV;Entries", 200., 0., 10.);
384 new TH2D(
"fhEta_pt_vs_rap",
"fhEta_pt_vs_rap;p_{t} in GeV; rapidity y", 240, -2., 10., 270, -2., 7.);
385 fhEta_theta =
new TH1D(
"fhEta_theta",
"fhEta_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
386 fhEta_theta_vs_rap =
new TH2D(
"fhEta_theta_vs_rap",
"fhEta_theta_vs_rap;emission angle #theta in deg;rapidity y",
387 180., 0., 180., 270, -2., 7.);
388 fhRho_pt =
new TH1D(
"fhRho_pt",
"fhRho_pt;p_{t} in GeV/c;Entries", 200., 0., 10.);
390 new TH2D(
"fhRho_pt_vs_rap",
"fhRho_pt_vs_rap;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
391 fhRho_theta =
new TH1D(
"fhRho_theta",
"fhRho_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
392 fhRho_theta_vs_rap =
new TH2D(
"fhRho_theta_vs_rap",
"fhRho_theta_vs_rap;emission angle #theta in deg;rapidity y",
393 180., 0., 180., 270, -2., 7.);
394 fhOmega_pt =
new TH1D(
"fhOmega_pt",
"fhOmega_pt;p_{t} in GeV/c;Entries", 200., 0., 10.);
396 new TH2D(
"fhOmega_pt_vs_rap",
"fhOmega_pt_vs_rap;p_{t} in GeV; rapidity y", 240, -2., 10., 270, -2., 7.);
397 fhOmega_theta =
new TH1D(
"fhOmega_theta",
"fhOmega_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
399 new TH2D(
"fhOmega_theta_vs_rap",
"fhOmega_theta_vs_rap;emission angle #theta in deg;rapidity y", 180., 0., 180.,
403 fhElectronSources =
new TH1D(
"fhElectronSources",
"fhElectronSources;Source;Entries", 6., 0., 6.);
405 "fhElectronsFromPi0_z",
"fhElectronsFromPi0_z (= pos. of gamma conversion);z [cm];Entries", 600., -0.5, 599.5);
443 fhNofTracks_mctrack =
new TH1D(
"fhNofTracks_mctrack",
"fhNofTracks_mctrack;nof;#", 1000., 0., 1000.);
445 fhNofTracks_globaltrack =
new TH1D(
"fhNofTracks_globaltrack",
"fhNofTracks_globaltrack;nof;#", 1000., 0., 1000.);
450 fhInvariantMass_test =
new TH1D(
"fhInvariant",
"fhInvariant;mass in GeV/c^{2}];#", 2000, 0., 2.);
464 fhInvariantMassReco_pi0 =
new TH1D(
"fhInvariantReco_pi0",
"fhInvariantReco_pi0;mass [GeV/c^2];#", 2000, 0., 2.);
469 fhMomentum_MCvsReco =
new TH2D(
"fhMomentum_MCvsReco",
"fhMomentum_MCvsReco;MC;Reco", 400, 0., 40., 400, 0., 40.);
471 new TH1D(
"fhMomentum_MCvsReco_diff",
"fhMomentum_MCvsReco_diff;(MC-Reco)/MC", 500, -0.01, 4.);
476 fhSearchGammas =
new TH1D(
"fhSearchGammas",
"fhSearchGammas;mass;#", 100, -0.005, 0.995);
480 fhANN_output_electrons =
new TH1D(
"fhANN_output_electrons",
"fhANN_output_electrons;ann output", 400, -2, 2.);
481 fhANN_output_electrons2 =
new TH1D(
"fhANN_output_electrons2",
"fhANN_output_electrons2;ann output", 400, -2, 2.);
483 new TH1D(
"fhANN_output_electrons_chiCut",
"fhANN_output_electrons_chiCut;ann output", 400, -2, 2.);
485 new TH2D(
"fhANN_output_electrons_vs_p",
"fhANN_output_electrons_vs_p;momentum in GeV/c; ann output", 100, 0., 10.,
487 fhANN_output_else =
new TH1D(
"fhANN_output_else",
"fhANN_output_else;ann output", 400, -2, 2.);
488 fhANN_output_else2 =
new TH1D(
"fhANN_output_else2",
"fhANN_output_else2;ann output", 400, -2, 2.);
489 fhANN_output_else_chiCut =
new TH1D(
"fhANN_output_else_chiCut",
"fhANN_output_else_chiCut;ann output", 400, -2, 2.);
490 fhANN_output_else_vs_p =
new TH2D(
"fhANN_output_else_vs_p",
"fhANN_output_else_vs_p;momentum in GeV/c; ann output",
491 100, 0., 10., 400, -2, 2.);
504 fhPi0_NDaughters =
new TH1D(
"fhPi0_NDaughters",
"fhPi0_NDaughters;number of daughers;#", 4, 0.5, 4.5);
505 fhPi0Ratio =
new TH1D(
"fhPi0Ratio",
"fhPi0Ratio; ratio;#", 1000, 0., 0.02);
506 fhPi0_mass =
new TH1D(
"fhPi0_mass",
"fhPi0_mass;mass;#", 500, 0., 0.5);
513 new TH1D(
"fhNofElectrons_4epem",
"fhNofElectrons_4epem;number of electrons per event;#", 101, -0.5, 100.5);
516 fhPi0_MC_occurence =
new TH1D(
"fhPi0_MC_occurence",
"fhPi0_MC_occurence;;#", 20, 0, 20);
537 fhPi0_MC_occurence2 =
new TH1D(
"fhPi0_MC_occurence2",
"fhPi0_MC_occurence2;;#", 20, 0, 20);
585 fhPi0_Reco_angles =
new TH1D(
"fhPi0_Reco_angles",
"fhPi0_Reco_angles;angle;#", 500, 0, 50);
587 fhPi0_Reco_chi =
new TH1D(
"fhPi0_Reco_chi",
"fhPi0_Reco_chi;chi;#", 500, 0, 500);
589 fhPi0_Reco_ndf =
new TH1D(
"fhPi0_Reco_ndf",
"fhPi0_Reco_ndf;ndf;#", 500, 0, 50);
592 new TH2D(
"fhPi0_Reco_ndf_vs_chi",
"fhPi0_Reco_ndf_vs_chi;ndf;chi", 51, -0.5, 50.5, 500, 0, 50);
595 "fhPi0_Reco_ndf_vs_startvertex",
"fhPi0_Reco_ndf_vs_startvertex;ndf;startvertex", 51, -0.5, 50.5, 101, -0.5, 100.5);
598 "fhPi0_Reco_startvertex_vs_chi",
"fhPi0_Reco_startvertex_vs_chi;startvertex;chi", 101, -0.5, 100.5, 100, 0, 100);
601 new TH2D(
"fhPi0_Reco_startvertex_vs_nofhits",
"fhPi0_Reco_startvertex_vs_nofhits;startvertex;nofhits", 101, -0.5,
602 100.5, 21, -0.5, 20.5);
605 new TH1D(
"fhPi0_noRichInd_diffPhi",
"fhPi0_noRichInd_diffPhi;phi difference;#", 150, 0, 150);
608 new TH1D(
"fhPi0_noRichInd_diffTheta",
"fhPi0_noRichInd_diffTheta;theta difference;#", 150, 0, 150);
612 new TH2D(
"fhPi0_Reco_invmass_cases",
"fhPi0_Reco_invmass_cases;cases;invmass [GeV]", 6, 0, 6, 300, 0, 3);
621 new TH2D(
"fhPi0_Reco_noRichInd_invmass_cases",
"fhPi0_Reco_noRichInd_invmass_cases;cases;invmass in GeV^{2}", 11, 0,
636 fhPi0_Reco_invmass =
new TH1D(
"fhPi0_Reco_invmass",
"fhPi0_Reco_invmass;invmass [GeV];#", 300, 0, 3);
638 fhPi0_Reco_invmass_mc =
new TH1D(
"fhPi0_Reco_invmass_mc",
"fhPi0_Reco_invmass_mc;invmass_mc [GeV];#", 300, 0, 3);
641 new TH1D(
"fhPi0_Reco_noRichInd_invmass",
"fhPi0_Reco_noRichInd_invmass;invmass_noRichInd [GeV];#", 300, 0, 3);
644 "fhPi0_Reco_noRichInd_invmass_mc;invmass_noRichInd_mc [GeV];#", 300, 0, 3);
648 new TH2D(
"fhPi0_Reco_noRichInd_ndf_vs_nofhits",
"fhPi0_Reco_noRichInd_ndf_vs_nofhits;ndf;nofhits", 31, -0.5, 30.5,
652 new TH2D(
"fhPi0_Reco_ndf_vs_nofhits",
"fhPi0_Reco_ndf_vs_nofhits;ndf;nofhits", 31, -0.5, 30.5, 21, -0.5, 20.5);
655 new TH2D(
"fhPi0_Reco_noRichInd_ndf_vs_nofhits_withChi",
"fhPi0_Reco_noRichInd_ndf_vs_nofhits_withChi;ndf;nofhits",
656 31, -0.5, 30.5, 21, -0.5, 20.5);
659 new TH2D(
"fhPi0_Reco_ndf_vs_nofhits_withChi",
"fhPi0_Reco_ndf_vs_nofhits_withChi;ndf;nofhits", 31, -0.5, 30.5, 21,
667 "fhPi0_Reco_noRichInd_chi_vs_momentum;momentum [GeV];#chi^{2} of "
669 200, 0., 10., 1000, 0., 100.);
672 "fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0;momentum "
673 "[GeV];#chi^{2} of momentum fit",
674 200, 0., 10., 1000, 0., 100.);
677 new TH2D(
"fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0_Target",
678 "fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0_Target;momentum "
679 "[GeV];#chi^{2} of momentum fit",
680 200, 0., 10., 1000, 0., 100.);
683 "fhPi0_Reco_noRichInd_chi_vs_momentum_eRest;momentum "
684 "[GeV];#chi^{2} of momentum fit",
685 200, 0., 10., 1000, 0., 100.);
689 new TH2D(
"fhPi0_Reco_noRichInd_chi_vs_pt",
"fhPi0_Reco_noRichInd_chi_vs_pt;pt [GeV];#chi^{2} of momentum fit", 200,
690 0., 10., 1000, 0., 100.);
693 new TH2D(
"fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0",
694 "fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0;pt [GeV];#chi^{2} of momentum fit", 200, 0., 10., 1000, 0., 100.);
697 new TH2D(
"fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0_Target",
698 "fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0_Target;pt [GeV];#chi^{2} "
700 200, 0., 10., 1000, 0., 100.);
703 new TH2D(
"fhPi0_Reco_noRichInd_chi_vs_pt_eRest",
704 "fhPi0_Reco_noRichInd_chi_vs_pt_eRest;pt [GeV];#chi^{2} of momentum fit", 200, 0., 10., 1000, 0., 100.);
711 new TH2D(
"fhPi0_Reco_chi_vs_momentum",
"fhPi0_Reco_chi_vs_momentum;momentum [GeV];#chi^{2} of momentum fit", 200,
712 0., 10., 1000, 0., 100.);
715 "fhPi0_Reco_chi_vs_momentum_eFromPi0;momentum [GeV];#chi^{2} of "
717 200, 0., 10., 1000, 0., 100.);
720 "fhPi0_Reco_chi_vs_momentum_eFromPi0_Target;momentum "
721 "[GeV];#chi^{2} of momentum fit",
722 200, 0., 10., 1000, 0., 100.);
725 fhPi0_Reco_chi_vs_pt =
new TH2D(
"fhPi0_Reco_chi_vs_pt",
"fhPi0_Reco_chi_vs_pt;pt [GeV];#chi^{2} of momentum fit", 200,
726 0., 10., 1000, 0., 100.);
729 new TH2D(
"fhPi0_Reco_chi_vs_pt_eFromPi0",
"fhPi0_Reco_chi_vs_pt_eFromPi0;pt [GeV];#chi^{2} of momentum fit", 200,
730 0., 10., 1000, 0., 100.);
733 new TH2D(
"fhPi0_Reco_chi_vs_pt_eFromPi0_Target",
734 "fhPi0_Reco_chi_vs_pt_eFromPi0_Target;pt [GeV];#chi^{2} of momentum fit", 200, 0., 10., 1000, 0., 100.);
745 cout <<
"=======================================================================" << endl;
746 cout <<
"========== CbmAnaConversion, event No. " <<
fEventNum << endl;
747 cout <<
"=======================================================================" << endl;
788 int countPrimPart = 0;
790 int countPi0MC_cut = 0;
791 int countPi0MC_fromPrimary = 0;
792 int countPi0MC_reconstructible = 0;
794 int countEtaMC_cut = 0;
795 int countEtaMC_fromPrimary = 0;
799 Fatal(
"CbmAnaConversion::Exec",
"No PrimaryVertex array!");
829 Int_t nofMcTracks =
fMcTracks->GetEntriesFast();
831 for (
int i = 0; i < nofMcTracks; i++) {
833 if (mctrack == NULL)
continue;
839 if (mctrack->
GetMotherId() == -1) { countPrimPart++; }
842 if (TMath::Abs(mctrack->
GetPdgCode()) == 11) { countAllEl++; }
849 if (
v.Z() <= 4) { countPi0MC_cut++; }
861 if (motherId == -1) {
862 countPi0MC_fromPrimary++;
865 fhPi0_theta->Fill(momentum.Theta() * 180. / TMath::Pi());
871 if (reconstructible) countPi0MC_reconstructible++;
875 if (TMath::Abs(mctrack->
GetPdgCode()) == 221) {
877 TVector3
v, momentum;
881 if (
v.Z() <= 4) { countEtaMC_cut++; }
883 if (motherId == -1) {
884 countEtaMC_fromPrimary++;
887 fhEta_theta->Fill(momentum.Theta() * 180. / TMath::Pi());
894 || TMath::Abs(mctrack->
GetPdgCode()) == 213) {
895 TVector3
v, momentum;
902 fhRho_theta->Fill(momentum.Theta() * 180. / TMath::Pi());
909 || TMath::Abs(mctrack->
GetPdgCode()) == 3334) {
910 TVector3
v, momentum;
922 if (TMath::Abs(mctrack->
GetPdgCode()) == 11) {
928 cout <<
"CbmAnaConversion::Exec - Number of pi0 in MC sample: " << countPi0MC << endl;
929 cout <<
"CbmAnaConversion::Exec - Number of pi0 from primary: " << countPi0MC_fromPrimary << endl;
968 Int_t nofElectrons4epem = 0;
972 for (Int_t iGTrack = 0; iGTrack < ngTracks; iGTrack++) {
974 if (NULL == gTrack)
continue;
980 if (stsInd < 0)
continue;
982 if (stsTrack == NULL)
continue;
984 if (stsMatch == NULL)
continue;
987 if (stsMcTrackId < 0)
continue;
989 if (mcTrack1 == NULL)
continue;
993 TVector3 refittedMomentum;
995 vector<CbmStsTrack> stsTracks;
997 stsTracks[0] = *stsTrack;
998 vector<CbmL1PFFitter::PFFieldRegion> vField;
999 vector<float> chiPrim;
1003 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
1004 vtxTrack->Momentum(refittedMomentum);
1005 float result_chi = chiPrim[0];
1010 vector<CbmStsTrack> stsTracks_electron;
1011 stsTracks_electron.resize(1);
1012 stsTracks_electron[0] = *stsTrack;
1013 vector<CbmL1PFFitter::PFFieldRegion> vField_electron;
1014 vector<float> chiPrim_electron;
1015 vector<int> pidHypo_electron;
1016 pidHypo_electron.push_back(11);
1017 fPFFitter_electron.
Fit(stsTracks_electron, pidHypo_electron);
1020 TVector3 refittedMomentum_electron;
1021 const FairTrackParam* vtxTrack_electron = stsTracks_electron[0].GetParamFirst();
1022 vtxTrack_electron->Momentum(refittedMomentum_electron);
1023 float result_chi_electron = chiPrim_electron[0];
1024 float result_ndf_electron = stsTracks_electron[0].GetNDF();
1027 Double_t startvertexZ = vtxTrack_electron->GetZ();
1050 if (richInd < 0)
continue;
1058 if (TMath::Abs(pdg) == 11) {
1064 if (TMath::Abs(pdg) != 11) {
1073 TVector3 stsMomentumVec;
1075 Double_t stsMomentum = stsMomentumVec.Mag();
1077 TVector3 mcMomentumVec;
1079 Double_t mcMomentum = mcMomentumVec.Mag();
1083 TVector3 bothtogether;
1084 bothtogether.SetX(mcMomentumVec.X());
1085 bothtogether.SetY(stsMomentumVec.Y());
1086 bothtogether.SetZ(stsMomentumVec.Z());
1091 FillRecoTracklistEPEM(mcTrack1, stsMomentumVec, refittedMomentum, stsMcTrackId, result_chi, iGTrack);
1092 if (isFilled) nofElectrons4epem++;
1096 if (richMatch == NULL)
continue;
1098 if (richMcTrackId < 0)
continue;
1100 if (mcTrack2 == NULL)
continue;
1105 if (stsMcTrackId == richMcTrackId) {
1109 if (TMath::Abs(pdg) == 11) {
1113 if (TMath::Abs(pdg) != 11) {
1750 Bool_t reconstructible =
false;
1754 Int_t daughters = 0;
1755 Int_t gammaDaughters = 0;
1756 Int_t electronDaughters = 0;
1757 Int_t electronDaughtersBeforeRICH = 0;
1758 Int_t electronDaughtersInTarget = 0;
1759 vector<int> gammaDaughterIDs;
1760 gammaDaughterIDs.clear();
1761 vector<int> electronDaughterIDs;
1762 electronDaughterIDs.clear();
1764 Int_t nofMcTracks =
fMcTracks->GetEntriesFast();
1765 for (
int i = 0; i < nofMcTracks; i++) {
1767 if (mctrack_switch == NULL)
continue;
1770 if (motherID == trackid && pdg == 22) {
1772 gammaDaughterIDs.push_back(i);
1774 if (motherID == trackid) { daughters++; }
1786 if (gammaDaughters == 2) {
1789 for (
int i = 0; i < nofMcTracks; i++) {
1791 if (mctrack_switch == NULL)
continue;
1794 if (TMath::Abs(pdg) == 11 && (motherID == gammaDaughterIDs[0] || motherID == gammaDaughterIDs[1])) {
1795 electronDaughters++;
1796 electronDaughterIDs.push_back(i);
1798 TVector3 startvertex;
1800 if (startvertex.Z() <= 70) { electronDaughtersBeforeRICH++; }
1801 if (startvertex.Z() <= 4) { electronDaughtersInTarget++; }
1806 if (electronDaughtersBeforeRICH == 4) {
1808 reconstructible =
true;
1815 Int_t daughters = 0;
1816 Int_t gammaDaughters = 0;
1817 Int_t electronDaughters = 0;
1818 Int_t electronDaughtersBeforeRICH = 0;
1819 Int_t electronDaughtersInTarget = 0;
1820 vector<int> gammaDaughterIDs;
1821 gammaDaughterIDs.clear();
1822 vector<int> electronDaughterIDs;
1823 electronDaughterIDs.clear();
1825 Int_t nofMcTracks =
fMcTracks->GetEntriesFast();
1826 for (
int i = 0; i < nofMcTracks; i++) {
1828 if (mctrack_switch == NULL)
continue;
1831 if (motherID == trackid && pdg == 22) {
1833 gammaDaughterIDs.push_back(i);
1835 if (motherID == trackid) { daughters++; }
1838 if (gammaDaughters == 2) {
1840 for (
int i = 0; i < nofMcTracks; i++) {
1842 if (mctrack_switch == NULL)
continue;
1845 if (TMath::Abs(pdg) == 11 && (motherID == gammaDaughterIDs[0] || motherID == gammaDaughterIDs[1])) {
1846 electronDaughters++;
1847 electronDaughterIDs.push_back(i);
1849 TVector3 startvertex;
1851 if (startvertex.Z() <= 70) { electronDaughtersBeforeRICH++; }
1852 if (startvertex.Z() <= 4) { electronDaughtersInTarget++; }
1861 return reconstructible;
1867 Int_t electrons = 0;
1868 std::multimap<int, int> electronPi0ID_map;
1869 std::multimap<int, int> electronPi0ID_map_richInd;
1872 for (
int i = 0; i < nof; i++) {
1876 if (TMath::Abs(pdg) == 11 && motherID != -1) {
1878 if (mctrack_mother == NULL)
continue;
1879 Int_t grandmotherID = mctrack_mother->
GetMotherId();
1880 Int_t motherPdg = mctrack_mother->
GetPdgCode();
1882 if (motherPdg == 22 && grandmotherID != -1) {
1884 if (mctrack_grandmother == NULL)
continue;
1885 Int_t grandmotherPdg = mctrack_grandmother->
GetPdgCode();
1887 if (grandmotherPdg == 111) {
1889 electronPi0ID_map.insert(std::pair<int, int>(grandmotherID, i));
1891 electronPi0ID_map_richInd.insert(std::pair<int, int>(grandmotherID, i));
1896 TVector3 startvertex;
1898 if (startvertex.Z() < 1) {
1907 if (electrons >= 4) {
1912 int samePi0counter = 0;
1914 for (std::map<int, int>::iterator it = electronPi0ID_map.begin(); it != electronPi0ID_map.end(); ++it) {
1915 if (it == electronPi0ID_map.begin()) check = 1;
1916 if (it != electronPi0ID_map.begin()) {
1917 std::map<int, int>::iterator zwischen = it;
1920 int id_old = zwischen->first;
1936 std::map<int, int>::iterator alt3 = zwischen;
1938 std::map<int, int>::iterator alt4 = alt3;
1940 std::map<int, int>::iterator alt5 = alt4;
1942 cout <<
"CbmAnaConversion: AnalysePi0_Reco: " << alt5->first <<
"/" << zwischen->first <<
"/" << alt3->first
1943 <<
"/" << alt4->first << endl;
1944 cout <<
"CbmAnaConversion: AnalysePi0_Reco: " << alt5->second <<
"/" << zwischen->second <<
"/"
1945 << alt3->second <<
"/" << alt4->second << endl;
1946 Bool_t IsWithinCuts =
AnalysePi0_Reco_calc(alt5->second, zwischen->second, alt3->second, alt4->second);
1965 std::map<int, int>::iterator temp = zwischen;
1966 for (
int i = 0; i < 4; i++) {
1974 if (chi_e1 <= 3 && chi_e2 <= 3 && chi_e3 <= 3 && chi_e4 <= 3) {
1982 std::map<int, int>::iterator temp2 = zwischen;
1983 for (
int i = 0; i < 4; i++) {
2003 if (samePi0counter >= 4) {
2008 int samePi0counter2 = 0;
2010 cout <<
"CbmAnaConversion: RecoPi0: electronmapsize: " << electronPi0ID_map_richInd.size() << endl;
2011 for (std::map<int, int>::iterator it = electronPi0ID_map_richInd.begin(); it != electronPi0ID_map_richInd.end();
2013 if (it == electronPi0ID_map_richInd.begin()) check = 1;
2014 if (it != electronPi0ID_map_richInd.begin()) {
2015 std::map<int, int>::iterator zwischen = it;
2018 int id_old = zwischen->first;
2129 Int_t electrons = 0;
2130 std::multimap<int, int> electronPi0ID_map;
2131 std::multimap<int, int>
2132 electronPi0ID_map_richInd;
2135 for (
int i = 0; i < nof; i++) {
2139 if (TMath::Abs(pdg) == 11 && motherID != -1) {
2141 if (mctrack_mother == NULL)
continue;
2142 Int_t grandmotherID = mctrack_mother->
GetMotherId();
2143 Int_t motherPdg = mctrack_mother->
GetPdgCode();
2145 if (motherPdg == 22 && grandmotherID != -1) {
2147 if (mctrack_grandmother == NULL)
continue;
2148 Int_t grandmotherPdg = mctrack_grandmother->
GetPdgCode();
2150 if (grandmotherPdg == 111) {
2152 electronPi0ID_map.insert(std::pair<int, int>(grandmotherID, i));
2154 electronPi0ID_map_richInd.insert(std::pair<int, int>(grandmotherID, i));
2161 TVector3 startvertex;
2163 if (startvertex.Z() < 1) {
2185 if (TMath::Abs(pdg) != 11)
continue;
2193 if (electrons >= 4) {
2198 int samePi0counter = 0;
2200 int check_withRichInd = 0;
2201 for (std::map<int, int>::iterator it = electronPi0ID_map.begin(); it != electronPi0ID_map.end(); ++it) {
2202 if (it == electronPi0ID_map.begin()) check = 1;
2203 if (it != electronPi0ID_map.begin()) {
2204 std::map<int, int>::iterator zwischen = it;
2207 int id_old = zwischen->first;
2224 std::map<int, int>::iterator alt3 = zwischen;
2226 std::map<int, int>::iterator alt4 = alt3;
2228 std::map<int, int>::iterator alt5 = alt4;
2230 cout <<
"CbmAnaConversion: AnalysePi0_Reco_noRichInd: " << alt5->first <<
"/" << zwischen->first <<
"/"
2231 << alt3->first <<
"/" << alt4->first << endl;
2232 cout <<
"CbmAnaConversion: AnalysePi0_Reco_noRichInd: " << alt5->second <<
"/" << zwischen->second <<
"/"
2233 << alt3->second <<
"/" << alt4->second << endl;
2234 Bool_t IsWithinCuts =
2253 Double_t invmass_mc =
2260 std::map<int, int>::iterator temp = zwischen;
2261 for (
int i = 0; i < 4; i++) {
2268 if (chi_e1 <= 3 && chi_e2 <= 3 && chi_e3 <= 3 && chi_e4 <= 3) {
2276 std::map<int, int>::iterator temp2 = zwischen;
2277 for (
int i = 0; i < 4; i++) {
2287 if (richInd_e1 >= 0 && richInd_e2 >= 0 && richInd_e3 >= 0 && richInd_e4 >= 0) {
2291 if (chi_e1 <= 3 && chi_e2 <= 3 && chi_e3 <= 3 && chi_e4 <= 3) {
2299 std::map<int, int>::iterator temp = zwischen;
2300 cout <<
"CbmAnaConversion: AnalysePi0_Reco_noRichInd, check>4: ";
2301 for (
int i = 0; i < check; i++) {
2302 TVector3 momentum_mc;
2304 Double_t theta_mc = 180.0 * momentum_mc.Theta() / TMath::Pi();
2305 Double_t phi_mc = 180.0 * momentum_mc.Phi() / TMath::Pi();
2307 Double_t theta_reco = 180.0 * momentum_reco.Theta() / TMath::Pi();
2308 Double_t phi_reco = 180.0 * momentum_reco.Phi() / TMath::Pi();
2310 <<
"/" << momentum_reco.Mag() <<
"/" << theta_mc <<
"-" << phi_mc <<
"/" << theta_reco <<
"-"
2311 << phi_reco <<
") \t";
2331 check_withRichInd = 0;
2337 if (samePi0counter >= 4) {