26 #include "CbmRichUtil.h"
27 #include "FairRootManager.h"
32 #define M2E 2.6112004954086e-7
42 , fRecoTracklistEPEM()
43 , fRecoTracklistEPEM_ids()
44 , fRecoTracklistEPEM_chi()
45 , fRecoTracklistEPEM_gtid()
47 , fRecoRefittedMomentum()
50 , fHistoList_reco_mom()
56 , fhInvariantMass_MC_all(NULL)
57 , fhInvariantMass_MC_pi0(NULL)
58 , fhInvariantMass_MC_pi0_epem(NULL)
59 , fhInvariantMass_MC_pi0_gepem(NULL)
60 , fhInvariantMass_MC_pi0_gg(NULL)
61 , fhInvariantMass_MC_eta(NULL)
62 , fhInvariantMass_MC_etaPrime(NULL)
63 , fhMC_electrons_theta(NULL)
64 , fhMC_electrons_p(NULL)
65 , fhMC_electrons_theta_vs_p(NULL)
66 , fhEta_openingAngleGG(NULL)
67 , fhMC_grandmotherPDGs(NULL)
68 , fhInvariantMassReco_pi0(NULL)
70 , fhEPEM_invmass_gg_mc(NULL)
71 , fhEPEM_invmass_gg_refitted(NULL)
72 , fhEPEM_invmass_gee_mc(NULL)
73 , fhEPEM_invmass_gee_refitted(NULL)
74 , fhEPEM_invmass_eeee_mc(NULL)
75 , fhEPEM_invmass_eeee_refitted(NULL)
76 , fhEPEM_invmass_all_mc(NULL)
77 , fhEPEM_invmass_all_refitted(NULL)
78 , fhEPEM_openingAngle_gg_mc(NULL)
79 , fhEPEM_openingAngle_gg_refitted(NULL)
80 , fhEPEM_openingAngle_gee_mc(NULL)
81 , fhEPEM_openingAngle_gee_refitted(NULL)
82 , fhEPEM_openingAngle_gee_mc_dalitz(NULL)
83 , fhEPEM_openingAngle_gee_refitted_dalitz(NULL)
84 , fhEPEM_openingAngle_vs_pt_gg_mc(NULL)
85 , fhEPEM_openingAngle_vs_pt_gg_reco(NULL)
86 , fhEPEM_openingAngle_betweenGammas_mc(NULL)
87 , fhEPEM_openingAngle_betweenGammas_reco(NULL)
88 , fhPi0_pt_vs_rap_gg(NULL)
89 , fhPi0_pt_vs_rap_gee(NULL)
90 , fhPi0_pt_vs_rap_all(NULL)
94 , fhEPEM_efficiencyCuts(NULL)
95 , fhEPEM_efficiencyCuts2(NULL)
96 , fhEPEM_pi0_nofLeptons_ann(NULL)
97 , fhEPEM_pi0_ANNvalues_noCuts(NULL)
98 , fhEPEM_pi0_ANNvalues_angleCut(NULL)
99 , fhEPEM_pi0_ANNefficiencies(NULL)
100 , fhEPEM_rap_vs_chi(NULL)
101 , fhEPEM_rap_vs_invmass(NULL)
102 , fhInvMass_EPEM_mc(NULL)
103 , fhInvMass_EPEM_stsMomVec(NULL)
104 , fhInvMass_EPEM_refitted(NULL)
105 , fhInvMass_EPEM_error_stsMomVec(NULL)
106 , fhInvMass_EPEM_error_refitted(NULL)
107 , fhInvMass_EPEM_openingAngleRef(NULL)
108 , fhUsedMomenta_stsMomVec(NULL)
109 , fhUsedMomenta_mc(NULL)
110 , fhUsedMomenta_error_stsMomVec(NULL)
111 , fhUsedMomenta_error_refitted(NULL)
112 , fhUsedMomenta_errorX_stsMomVec(NULL)
113 , fhUsedMomenta_vsX_stsMomVec(NULL)
114 , fhUsedMomenta_errorY_stsMomVec(NULL)
115 , fhUsedMomenta_vsY_stsMomVec(NULL)
116 , fhUsedMomenta_errorZ_stsMomVec(NULL)
117 , fhUsedMomenta_vsZ_stsMomVec(NULL)
118 , fhUsedMomenta_errorX_refitted(NULL)
119 , fhUsedMomenta_vsX_refitted(NULL)
120 , fhUsedMomenta_errorY_refitted(NULL)
121 , fhUsedMomenta_vsY_refitted(NULL)
122 , fhUsedMomenta_errorZ_refitted(NULL)
123 , fhUsedMomenta_vsZ_refitted(NULL)
124 , fhInvariantMass_pi0epem(NULL)
125 , fhPi0_startvertex(NULL)
126 , fhPi0_startvertexElectrons_all(NULL)
127 , fhPi0_startvertexElectrons_gg(NULL)
128 , fhPi0_startvertexElectrons_gee(NULL)
129 , fhPi0_startvertex_vs_chi(NULL)
130 , fhPi0_startvertex_vs_momentum(NULL)
131 , fhInvMassWithFullRecoCuts(NULL)
132 , fhEPEM_InDetector_invmass_gg_mc(NULL)
133 , fhEPEM_InDetector_invmass_gg_refitted(NULL)
134 , fhEPEM_InDetector_invmass_gee_mc(NULL)
135 , fhEPEM_InDetector_invmass_gee_refitted(NULL)
136 , fhEPEM_InDetector_invmass_all_mc(NULL)
137 , fhEPEM_InDetector_invmass_all_refitted(NULL)
138 , fhEPEM_pt_vs_p_all_mc(NULL)
139 , fhEPEM_pt_vs_p_all_refitted(NULL)
140 , fhEPEM_missingLepton_nofRingHits(NULL)
141 , fhEPEM_missingLepton_ringMid(NULL)
142 , fhEPEM_missingLepton_ringRadius(NULL)
143 , fhEPEM_missingLepton_distance(NULL)
144 , fhEPEM_missingLepton_selectionNN(NULL)
145 , fhEPEM_missingLepton_rings(NULL)
146 , fhEPEM_missingLepton_radius_vs_p(NULL)
147 , fhEPEM_missingLepton_ANNvalue(NULL)
148 , fhEPEM_identifiedLepton_nofRingHits(NULL)
149 , fhEPEM_identifiedLepton_ringMid(NULL)
150 , fhEPEM_identifiedLepton_ringRadius(NULL)
151 , fhEPEM_identifiedLepton_distance(NULL)
152 , fhEPEM_identifiedLepton_selectionNN(NULL)
153 , fhEPEM_identifiedLepton_rings(NULL)
154 , fhEPEM_identifiedLepton_radius_vs_p(NULL)
155 , fhEPEM_identifiedLepton_ANNvalue(NULL)
156 , fhEPEM_invmass_eta_mc(NULL)
157 , fhEPEM_invmass_eta_refitted(NULL)
158 , fhEPEM_efficiencyCuts_eta(NULL)
166 FairRootManager* ioman = FairRootManager::Instance();
168 Fatal(
"CbmAnaConversion::Init",
"RootManager not instantised!");
171 fMcTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
173 Fatal(
"CbmAnaConversion::Init",
"No MCTrack array!");
176 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
178 Fatal(
"CbmAnaConversion::Init",
"No GlobalTrack array!");
181 fRichRings = (TClonesArray*) ioman->GetObject(
"RichRing");
183 Fatal(
"CbmAnaConversion::Init",
"No RichRing array!");
186 fRichHits = (TClonesArray*) ioman->GetObject(
"RichHit");
188 Fatal(
"CbmAnaConversion::Init",
"No RichHit array!");
209 Double_t invmassSpectra_nof = 800;
210 Double_t invmassSpectra_start = -0.00125;
211 Double_t invmassSpectra_end = 1.99875;
215 new TH1D(
"fhInvariantMass_MC_all",
216 "fhInvariantMass_MC_all;invariant mass in GeV/c^{2};#",
221 new TH1D(
"fhInvariantMass_MC_pi0",
222 "fhInvariantMass_MC_pi0;invariant mass in GeV/c^{2};#",
227 new TH1D(
"fhInvariantMass_MC_pi0_epem",
228 "fhInvariantMass_MC_pi0_epem;invariant mass in GeV/c^{2};#",
233 new TH1D(
"fhInvariantMass_MC_pi0_gepem",
234 "fhInvariantMass_MC_pi0_gepem;invariant mass in GeV/c^{2};#",
239 new TH1D(
"fhInvariantMass_MC_pi0_gg",
240 "fhInvariantMass_MC_pi0_gg;invariant mass in GeV/c^{2};#",
245 new TH1D(
"fhInvariantMass_MC_eta",
246 "fhInvariantMass_MC_eta;invariant mass in GeV/c^{2};#",
251 new TH1D(
"fhInvariantMass_MC_etaPrime",
252 "fhInvariantMass_MC_etaPrime;invariant mass in GeV/c^{2};#",
266 "fhMC_electrons_theta",
"fhMC_electrons_theta;theta in deg;#", 90, 0., 90.);
268 "fhMC_electrons_p",
"fhMC_electrons_p;momentum p in GeV/c;#", 100, 0., 10.);
270 new TH2D(
"fhMC_electrons_theta_vs_p",
271 "fhMC_electrons_theta_vs_p;theta in deg;momentum p in GeV/c",
283 "fhEta_openingAngleGG;theta in deg;#",
290 "fhMC_grandmotherPDGs;particle pdg;#",
297 "fhMCtest",
"fhMCtest;invariant mass in GeV/c^{2};#", 2000, 0., 2.);
302 new TH1D(
"fhEPEM_invmass_gg_mc",
303 "fhEPEM_invmass_gg_mc;invariant mass in GeV/c^{2};#",
305 invmassSpectra_start,
308 new TH1D(
"fhEPEM_invmass_gg_refitted",
309 "fhEPEM_invmass_gg_refitted;invariant mass in GeV/c^{2};#",
311 invmassSpectra_start,
314 new TH1D(
"fhEPEM_invmass_gee_mc",
315 "fhEPEM_invmass_gee_mc;invariant mass in GeV/c^{2};#",
317 invmassSpectra_start,
320 new TH1D(
"fhEPEM_invmass_gee_refitted",
321 "fhEPEM_invmass_gee_refitted;invariant mass in GeV/c^{2};#",
323 invmassSpectra_start,
326 new TH1D(
"fhEPEM_invmass_eeee_mc",
327 "fhEPEM_invmass_eeee_mc;invariant mass in GeV/c^{2};#",
329 invmassSpectra_start,
332 new TH1D(
"fhEPEM_invmass_eeee_refitted",
333 "fhEPEM_invmass_eeee_refitted;invariant mass in GeV/c^{2};#",
335 invmassSpectra_start,
338 new TH1D(
"fhEPEM_invmass_all_mc",
339 "fhEPEM_invmass_all_mc;invariant mass in GeV/c^{2};#",
341 invmassSpectra_start,
344 new TH1D(
"fhEPEM_invmass_all_refitted",
345 "fhEPEM_invmass_all_refitted;invariant mass in GeV/c^{2};#",
347 invmassSpectra_start,
359 new TH1D(
"fhEPEM_openingAngle_gg_mc",
360 "fhEPEM_openingAngle_gg_mc (between e+e- from g);angle [deg];#",
365 "fhEPEM_openingAngle_gg_refitted",
366 "fhEPEM_openingAngle_gg_refitted (between e+e- from g);angle [deg];#",
371 new TH1D(
"fhEPEM_openingAngle_gee_mc",
372 "fhEPEM_openingAngle_gee_mc (between e+e- from g);angle [deg];#",
377 "fhEPEM_openingAngle_gee_refitted",
378 "fhEPEM_openingAngle_gee_refitted (between e+e- from g);angle [deg];#",
387 "fhEPEM_openingAngle_gee_mc_dalitz",
388 "fhEPEM_openingAngle_gee_mc_dalitz (between e+e- from pi0);angle [deg];#",
393 new TH1D(
"fhEPEM_openingAngle_gee_refitted_dalitz",
394 "fhEPEM_openingAngle_gee_refitted_dalitz (between e+e- from "
395 "pi0);angle [deg];#",
403 new TH2D(
"fhEPEM_openingAngle_vs_pt_gg_mc",
404 "fhEPEM_openingAngle_vs_pt_gg_mc;pt [GeV]; opening angle [deg]",
413 new TH2D(
"fhEPEM_openingAngle_vs_pt_gg_reco",
414 "fhEPEM_openingAngle_vs_pt_gg_reco;pt [GeV]; opening angle [deg]",
424 new TH1D(
"fhEPEM_openingAngle_betweenGammas_mc",
425 "fhEPEM_openingAngle_betweenGammas_mc;angle [deg];#",
430 new TH1D(
"fhEPEM_openingAngle_betweenGammas_reco",
431 "fhEPEM_openingAngle_betweenGammas_reco;angle [deg];#",
440 "fhPi0_pt_vs_rap_gg;pt [GeV]; rap [GeV]",
448 "fhPi0_pt_vs_rap_gee;pt [GeV]; rap [GeV]",
456 "fhPi0_pt_vs_rap_all;pt [GeV]; rap [GeV]",
467 fhPi0_pt_gg =
new TH1D(
"fhPi0_pt_gg",
"fhPi0_pt_gg;pt [GeV];#", 200, 0., 10.);
469 new TH1D(
"fhPi0_pt_gee",
"fhPi0_pt_gee;pt [GeV];#", 200, 0., 10.);
471 new TH1D(
"fhPi0_pt_all",
"fhPi0_pt_all;pt [GeV];#", 200, 0., 10.);
477 new TH1D(
"fhEPEM_efficiencyCuts",
"fhEPEM_efficiencyCuts;;#", 13, 0., 13.);
483 4,
"ANN: #theta of e^{+}e^{-} pairs");
485 5,
"ANN: m_{inv} of e^{+}e^{-} pairs");
489 8,
"Normal: #theta of e^{+}e^{-} pairs");
491 9,
"Normal: m_{inv} of e^{+}e^{-} pairs");
495 12,
"MC: #theta of e^{+}e^{-} pairs");
497 13,
"MC: m_{inv} of e^{+}e^{-} pairs");
500 "fhEPEM_efficiencyCuts2",
"fhEPEM_efficiencyCuts2;;#", 10, 0., 10.);
504 "fhEPEM_pi0_nofLeptons_ann",
"fhEPEM_pi0_nofLeptons_ann;;#", 5, -0.5, 4.5);
506 "fhEPEM_pi0_ANNvalues_noCuts;;#",
511 "fhEPEM_pi0_ANNvalues_angleCut;;#",
516 "fhEPEM_pi0_ANNefficiencies",
"fhEPEM_pi0_ANNefficiencies;;#", 15, 0, 15);
536 "fhEPEM_rap_vs_chi; rap [GeV]; chi of electrons",
545 "fhEPEM_rap_vs_invmass; rap [GeV]; invmass",
556 new TH1D(
"fhInvMass_EPEM_mc",
557 "fhInvariantMass_recoMomentum1 (mc);mass [GeV/c^2];#",
559 invmassSpectra_start,
562 new TH1D(
"fhInvMass_EPEM_stsMomVec",
563 "fhInvariantMass_recoMomentum2 (stsMomentumVec);mass [GeV/c^2];#",
565 invmassSpectra_start,
568 "fhInvMass_EPEM_refitted",
569 "fhInvariantMass_recoMomentum3 (refitted at primary);mass [GeV/c^2];#",
571 invmassSpectra_start,
574 "fhInvMass_EPEM_error_stsMomVec",
575 "fhInvariantMass_recoMomentum4 (error, stsMomentumVec);(mc-reco)/mc;#",
580 new TH1D(
"fhInvMass_EPEM_error_refitted",
581 "fhInvariantMass_recoMomentum5 (error, refitted);(mc-reco)/mc;#",
586 new TH1D(
"fhInvMass_EPEM_openingAngleRef",
587 "fhInvariantMass_openingAngleRef;angle [deg];#",
592 "fhUsedMomenta_stsMomVec",
"fhMomentumtest1;momentum;#", 100, 0., 2.);
594 new TH1D(
"fhUsedMomenta_mc",
"fhMomentumtest2;momentum;#", 100, 0., 2.);
596 new TH1D(
"fhUsedMomenta_error_stsMomVec",
597 "fhMomentumtest3 (error);(mc-reco)/mc;#",
602 new TH1D(
"fhUsedMomenta_error_refitted",
603 "fhMomentumtest4 (error);(mc-reco_refitted)/mc;#",
609 new TH1D(
"fhUsedMomenta_errorX_stsMomVec",
610 "fhMomentumtest5 (error of x-momentum);(mc-reco_reco)/mc;#",
615 new TH2D(
"fhUsedMomenta_vsX_stsMomVec",
616 "fhMomentumtest5vs (error of x-momentum);mc;reco",
624 new TH1D(
"fhUsedMomenta_errorY_stsMomVec",
625 "fhMomentumtest6 (error of y-momentum);(mc-reco_reco)/mc;#",
630 new TH2D(
"fhUsedMomenta_vsY_stsMomVec",
631 "fhMomentumtest6vs (error of y-momentum);mc;reco",
639 new TH1D(
"fhUsedMomenta_errorZ_stsMomVec",
640 "fhMomentumtest7 (error of z-momentum);(mc-reco_reco)/mc;#",
645 new TH2D(
"fhUsedMomenta_vsZ_stsMomVec",
646 "fhMomentumtest7vs (error of z-momentum);mc;reco",
654 new TH1D(
"fhUsedMomenta_errorX_refitted",
655 "fhMomentumtest5 (error of x-momentum);(mc-reco_reco)/mc;#",
660 new TH2D(
"fhUsedMomenta_vsX_refitted",
661 "fhMomentumtest5vs (error of x-momentum);mc;reco",
669 new TH1D(
"fhUsedMomenta_errorY_refitted",
670 "fhMomentumtest6 (error of y-momentum);(mc-reco_reco)/mc;#",
675 new TH2D(
"fhUsedMomenta_vsY_refitted",
676 "fhMomentumtest6vs (error of y-momentum);mc;reco",
684 new TH1D(
"fhUsedMomenta_errorZ_refitted",
685 "fhMomentumtest7 (error of z-momentum);(mc-reco_reco)/mc;#",
690 new TH2D(
"fhUsedMomenta_vsZ_refitted",
691 "fhMomentumtest7vs (error of z-momentum);mc;reco",
734 "fhInvariantMass_pi0epem;mass [GeV/c^2];#",
741 "fhPi0_startvertex",
"fhPi0_startvertex;z in cm;#", 210, -5., 100.);
745 new TH1D(
"fhPi0_startvertexElectrons_all",
746 "fhPi0_startvertexElectrons_all;z in cm;#",
753 new TH1D(
"fhPi0_startvertexElectrons_gg",
754 "fhPi0_startvertexElectrons_gg;z in cm;#",
761 new TH1D(
"fhPi0_startvertexElectrons_gee",
762 "fhPi0_startvertexElectrons_gee;z in cm;#",
769 "fhPi0_startvertex_vs_chi;z[cm];chi",
779 new TH2D(
"fhPi0_startvertex_vs_momentum",
780 "fhPi0_startvertex_vs_momentum;z in cm;momentum (MC-true)",
790 new TH1D(
"fhInvMassWithFullRecoCuts",
791 "fhInvMassWithFullRecoCuts;mass [GeV/c^2];#",
799 new TH1D(
"fhEPEM_InDetector_invmass_gg_mc",
800 "fhEPEM_InDetector_invmass_gg_mc;mass [GeV/c^2];#",
802 invmassSpectra_start,
805 new TH1D(
"fhEPEM_InDetector_invmass_gg_refitted",
806 "fhEPEM_InDetector_invmass_gg_refitted;mass [GeV/c^2];#",
808 invmassSpectra_start,
811 new TH1D(
"fhEPEM_InDetector_invmass_gee_mc",
812 "fhEPEM_InDetector_invmass_gee_mc;mass [GeV/c^2];#",
814 invmassSpectra_start,
817 new TH1D(
"fhEPEM_InDetector_invmass_gee_refitted",
818 "fhEPEM_InDetector_invmass_gee_refitted;mass [GeV/c^2];#",
820 invmassSpectra_start,
823 new TH1D(
"fhEPEM_InDetector_invmass_all_mc",
824 "fhEPEM_InDetector_invmass_all_mc;mass [GeV/c^2];#",
826 invmassSpectra_start,
829 new TH1D(
"fhEPEM_InDetector_invmass_all_refitted",
830 "fhEPEM_InDetector_invmass_all_refitted;mass [GeV/c^2];#",
832 invmassSpectra_start,
843 new TH2D(
"fhEPEM_pt_vs_p_all_mc",
844 "fhEPEM_pt_vs_p_all_mc;p_{t} in GeV/c; p in GeV/c",
853 new TH2D(
"fhEPEM_pt_vs_p_all_refitted",
854 "fhTest2_electrons_pt_vs_p;p_{t} in GeV/c; p in GeV/c",
864 new TH1D(
"fhEPEM_missingLepton_nofRingHits",
865 "fhEPEM_missingLepton_nofRingHits;nofringhits;#",
870 "fhEPEM_missingLepton_ringMid;X;Y",
878 new TH1D(
"fhEPEM_missingLepton_ringRadius",
879 "fhEPEM_missingLepton_ringRadius;ringRadius;#",
884 new TH1D(
"fhEPEM_missingLepton_distance",
885 "fhEPEM_missingLepton_distance;distance;#",
890 new TH1D(
"fhEPEM_missingLepton_selectionNN",
891 "fhEPEM_missingLepton_selectionNN;selectionNN;#",
896 new TH2D(
"fhEPEM_missingLepton_rings",
897 "fhEPEM_missingLepton_rings;selectionNN;#",
905 "fhEPEM_missingLepton_radius_vs_p",
906 "fhEPEM_missingLepton_radius_vs_p;momentum p in GeV/c;ring radius in cm",
914 new TH1D(
"fhEPEM_missingLepton_ANNvalue",
915 "fhEPEM_missingLepton_ANNvalue;ANNvalue;#",
930 new TH1D(
"fhEPEM_identifiedLepton_nofRingHits",
931 "fhEPEM_identifiedLepton_nofRingHits;nofringhits;#",
936 new TH2D(
"fhEPEM_identifiedLepton_ringMid",
937 "fhEPEM_identifiedLepton_ringMid;X;Y",
945 new TH1D(
"fhEPEM_identifiedLepton_ringRadius",
946 "fhEPEM_identifiedLepton_ringRadius;ringRadius;#",
951 new TH1D(
"fhEPEM_identifiedLepton_distance",
952 "fhEPEM_identifiedLepton_distance;distance;#",
957 new TH1D(
"fhEPEM_identifiedLepton_selectionNN",
958 "fhEPEM_identifiedLepton_selectionNN;selectionNN;#",
963 new TH2D(
"fhEPEM_identifiedLepton_rings",
964 "fhEPEM_identifiedLepton_rings;selectionNN;#",
972 "fhEPEM_identifiedLepton_radius_vs_p",
973 "fhEPEM_identifiedLepton_radius_vs_p;momentum p in GeV/c;ring radius in cm",
981 new TH1D(
"fhEPEM_identifiedLepton_ANNvalue",
982 "fhEPEM_identifiedLepton_ANNvalue;ANNvalue;#",
998 "fhEPEM_Iinvmass_eta_mc;mass [GeV/c^2];#",
1000 invmassSpectra_start,
1001 invmassSpectra_end);
1003 new TH1D(
"fhEPEM_invmass_eta_refitted",
1004 "fhEPEM_Iinvmass_eta_refitted;mass [GeV/c^2];#",
1006 invmassSpectra_start,
1007 invmassSpectra_end);
1012 "fhEPEM_efficiencyCuts_eta",
"fhEPEM_efficiencyCuts_eta;;#", 13, 0., 13.);
1016 "ANN: 4 rich electrons");
1019 4,
"ANN: #theta of e^{+}e^{-} pairs");
1021 5,
"ANN: m_{inv} of e^{+}e^{-} pairs");
1023 6,
"Normal: 4 rich electrons");
1026 8,
"Normal: #theta of e^{+}e^{-} pairs");
1028 9,
"Normal: m_{inv} of e^{+}e^{-} pairs");
1030 "MC: 4 rich electrons");
1033 12,
"MC: #theta of e^{+}e^{-} pairs");
1035 13,
"MC: m_{inv} of e^{+}e^{-} pairs");
1041 gDirectory->mkdir(
"MCreco");
1042 gDirectory->cd(
"MCreco");
1046 gDirectory->cd(
"..");
1048 gDirectory->mkdir(
"Reconstruction2");
1049 gDirectory->cd(
"Reconstruction2");
1051 gDirectory->mkdir(
"pi0 -> gg");
1052 gDirectory->cd(
"pi0 -> gg");
1056 gDirectory->cd(
"..");
1058 gDirectory->mkdir(
"pi0 -> ge+e-");
1059 gDirectory->cd(
"pi0 -> ge+e-");
1063 gDirectory->cd(
"..");
1065 gDirectory->mkdir(
"pi0 -> e+e-e+e-");
1066 gDirectory->cd(
"pi0 -> e+e-e+e-");
1070 gDirectory->cd(
"..");
1072 gDirectory->mkdir(
"pi0 -> all");
1073 gDirectory->cd(
"pi0 -> all");
1077 gDirectory->cd(
"..");
1079 gDirectory->mkdir(
"eta");
1080 gDirectory->cd(
"eta");
1084 gDirectory->cd(
"..");
1089 gDirectory->mkdir(
"Momenta2");
1090 gDirectory->cd(
"Momenta2");
1094 gDirectory->cd(
"../..");
1096 cout <<
"CbmAnaConversionReco: Realtime - " <<
fTime << endl;
1107 vector<TVector3> RecoTracklist1,
1108 vector<TVector3> RecoTracklist2,
1110 vector<Double_t> chi,
1111 vector<Int_t> GlobalTrackId) {
1127 cout <<
"CbmAnaConversionReco: InvariantMassTestMC - Start..." << endl;
1128 cout <<
"CbmAnaConversionReco: InvariantMassTestMC - Size of "
1129 "fTracklistMC_all:\t "
1134 cout <<
"CbmAnaConversionReco: InvariantMassTestMC - iteration i = "
1147 if (
i == j ||
i == k ||
i == l || j == k || j == l || k == l)
1155 TVector3 momentum1, momentum2, momentum3, momentum4;
1163 if (motherId1 == motherId2 && motherId1 == motherId3
1164 && motherId1 == motherId4) {
1165 cout <<
"testxyz" << endl;
1172 if (motherId1 != -1) {
1173 int mcMotherPdg1 = -1;
1175 if (NULL != mother1) mcMotherPdg1 = mother1->
GetPdgCode();
1176 if (mcMotherPdg1 == 111) {
1177 Double_t invmass2 = 0;
1185 cout <<
"####################################### Decay pi0 "
1186 "-> e+e-e+e- detected!\t\t"
1187 << invmass2 << endl;
1195 int grandmotherId1 = -1;
1196 int grandmotherId2 = -1;
1197 int grandmotherId3 = -1;
1198 int grandmotherId4 = -1;
1200 int mcMotherPdg1 = -1;
1201 int mcMotherPdg2 = -1;
1202 int mcMotherPdg3 = -1;
1204 int mcGrandmotherPdg1 = -1;
1210 if (motherId1 != -1) {
1212 if (NULL != mother1) mcMotherPdg1 = mother1->
GetPdgCode();
1214 if (grandmotherId1 != -1) {
1217 if (NULL != grandmother1)
1218 mcGrandmotherPdg1 = grandmother1->
GetPdgCode();
1221 if (motherId2 != -1) {
1223 if (NULL != mother2) mcMotherPdg2 = mother2->
GetPdgCode();
1225 if (grandmotherId2 != -1) {
1230 if (motherId3 != -1) {
1232 if (NULL != mother3) mcMotherPdg3 = mother3->
GetPdgCode();
1234 if (grandmotherId3 != -1) {
1239 if (motherId4 != -1) {
1243 if (grandmotherId4 != -1) {
1250 if (motherId1 == motherId2 && motherId1 == motherId3) {}
1251 if (motherId1 == motherId2 && motherId1 == motherId4) {}
1252 if (motherId1 == motherId3 && motherId1 == motherId4) {}
1253 if (motherId2 == motherId3 && motherId2 == motherId4) {}
1260 if (((motherId1 == motherId2 && motherId3 == motherId4)
1261 && (mcMotherPdg1 == 22) && (mcMotherPdg3 == 22)
1262 && grandmotherId1 == grandmotherId3)
1263 || ((motherId1 == motherId3 && motherId2 == motherId4)
1264 && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 22)
1265 && grandmotherId1 == grandmotherId2)
1266 || ((motherId1 == motherId4 && motherId2 == motherId3)
1267 && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 22)
1268 && grandmotherId1 == grandmotherId2)) {
1275 if (mcGrandmotherPdg1 == 111) {
1291 momentum1.Theta() * 180. /
TMath::Pi(), momentum1.Mag());
1293 momentum2.Theta() * 180. /
TMath::Pi(), momentum2.Mag());
1295 momentum3.Theta() * 180. /
TMath::Pi(), momentum3.Mag());
1297 momentum4.Theta() * 180. /
TMath::Pi(), momentum4.Mag());
1299 if (mcGrandmotherPdg1 == 221) {
1302 Double_t opening_angle_gg = 0;
1303 if (motherId1 == motherId2) {
1306 momentum1, momentum2, momentum3, momentum4);
1308 if (motherId1 == motherId3) {
1311 momentum1, momentum3, momentum2, momentum4);
1313 if (motherId1 == motherId4) {
1316 momentum1, momentum4, momentum2, momentum3);
1321 if (TMath::Abs(mcGrandmotherPdg1) == 331) {
1329 if (((motherId1 == motherId2 && motherId3 == motherId4)
1330 && (mcMotherPdg1 == 22) && (mcMotherPdg3 == 111)
1331 && grandmotherId1 == motherId3)
1332 || ((motherId1 == motherId2 && motherId3 == motherId4)
1333 && (mcMotherPdg1 == 111) && (mcMotherPdg3 == 22)
1334 && grandmotherId3 == motherId1)
1335 || ((motherId1 == motherId3 && motherId2 == motherId4)
1336 && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 111)
1337 && grandmotherId1 == motherId2)
1338 || ((motherId1 == motherId3 && motherId2 == motherId4)
1339 && (mcMotherPdg1 == 111) && (mcMotherPdg2 == 22)
1340 && grandmotherId2 == motherId1)
1341 || ((motherId1 == motherId4 && motherId2 == motherId3)
1342 && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 111)
1343 && grandmotherId1 == motherId2)
1344 || ((motherId1 == motherId4 && motherId2 == motherId3)
1345 && (mcMotherPdg1 == 111) && (mcMotherPdg2 == 22)
1346 && grandmotherId2 == motherId1)) {
1367 momentum1.Theta() * 180. /
TMath::Pi(), momentum1.Mag());
1369 momentum2.Theta() * 180. /
TMath::Pi(), momentum2.Mag());
1371 momentum3.Theta() * 180. /
TMath::Pi(), momentum3.Mag());
1373 momentum4.Theta() * 180. /
TMath::Pi(), momentum4.Mag());
1376 if (((motherId1 == motherId2 && motherId3 == motherId4)
1377 && (mcMotherPdg1 == 22) && (mcMotherPdg3 == 221)
1378 && grandmotherId1 == motherId3)
1379 || ((motherId1 == motherId2 && motherId3 == motherId4)
1380 && (mcMotherPdg1 == 221) && (mcMotherPdg3 == 22)
1381 && grandmotherId3 == motherId1)
1382 || ((motherId1 == motherId3 && motherId2 == motherId4)
1383 && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 221)
1384 && grandmotherId1 == motherId2)
1385 || ((motherId1 == motherId3 && motherId2 == motherId4)
1386 && (mcMotherPdg1 == 221) && (mcMotherPdg2 == 22)
1387 && grandmotherId2 == motherId1)
1388 || ((motherId1 == motherId4 && motherId2 == motherId3)
1389 && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 221)
1390 && grandmotherId1 == motherId2)
1391 || ((motherId1 == motherId4 && motherId2 == motherId3)
1392 && (mcMotherPdg1 == 221) && (mcMotherPdg2 == 22)
1393 && grandmotherId2 == motherId1)) {
1405 cout <<
"CbmAnaConversionReco: InvariantMassTestMC - End!" << endl;
1454 TLorentzVector lorVec1;
1457 TLorentzVector lorVec2;
1460 TLorentzVector lorVec3;
1463 TLorentzVector lorVec4;
1468 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1477 TRandom3 generator(0);
1478 Double_t result = 0;
1480 Int_t plusminus = 0;
1481 while (plusminus == 0) {
1482 plusminus = generator.Uniform(-2, 2);
1495 const TVector3 part2,
1496 const TVector3 part3,
1497 const TVector3 part4)
1500 Double_t energy1 = TMath::Sqrt(part1.Mag2() +
M2E);
1501 TLorentzVector lorVec1(part1, energy1);
1503 Double_t energy2 = TMath::Sqrt(part2.Mag2() +
M2E);
1504 TLorentzVector lorVec2(part2, energy2);
1506 Double_t energy3 = TMath::Sqrt(part3.Mag2() +
M2E);
1507 TLorentzVector lorVec3(part3, energy3);
1509 Double_t energy4 = TMath::Sqrt(part4.Mag2() +
M2E);
1510 TLorentzVector lorVec4(part4, energy4);
1513 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1527 cout <<
"CbmAnaConversionReco: InvariantMassTest_4epem - Start..." << endl;
1528 cout <<
"CbmAnaConversionReco: InvariantMassTest_4epem - "
1534 cout <<
"CbmAnaConversionReco: InvariantMassTest_4epem - iteration i = "
1548 cout <<
"CbmAnaConversionReco: InvariantMassTest_4epem - not "
1549 "matching number of entries!"
1556 TVector3 pi0start_i;
1558 TVector3 pi0start_j;
1560 TVector3 pi0start_k;
1562 TVector3 pi0start_l;
1572 if (motherId1 == motherId2 && motherId1 == motherId3
1573 && motherId1 == motherId4) {
1574 if (motherId1 != -1) {
1575 int mcMotherPdg1 = -1;
1577 if (NULL != mother1) mcMotherPdg1 = mother1->
GetPdgCode();
1578 if ((mcMotherPdg1 == 111
1581 Double_t invmass1 = 0;
1583 Double_t invmass3 = 0;
1595 cout <<
"Decay pi0 -> e+e-e+e- detected!\t\t mc mass: "
1596 << invmass1 <<
"\t, reco mass: " << invmass3 << endl;
1597 cout <<
"motherids: " << motherId1 <<
"/" << motherId2 <<
"/"
1598 << motherId3 <<
"/" << motherId4
1599 <<
"\t motherpdg: " << mcMotherPdg1
1600 <<
"\t mctrack mass: " << mother1->
GetMass()
1601 <<
"\t nofdaughters: " <<
NofDaughters(motherId1) << endl;
1614 cout <<
"start: " << start1.Z() <<
"/" << start2.Z() <<
"/"
1615 << start3.Z() <<
"/" << start4.Z() << endl;
1627 if ((motherId1 == motherId2 && motherId3 == motherId4)
1628 || (motherId1 == motherId3 && motherId2 == motherId4)
1629 || (motherId1 == motherId4 && motherId2 == motherId3)) {
1632 int grandmotherId1 = -1;
1633 int grandmotherId2 = -1;
1634 int grandmotherId3 = -1;
1635 int grandmotherId4 = -1;
1637 int mcMotherPdg1 = -1;
1638 int mcMotherPdg2 = -1;
1639 int mcMotherPdg3 = -1;
1640 int mcMotherPdg4 = -1;
1641 int mcGrandmotherPdg1 = -1;
1648 if (motherId1 != -1) {
1650 if (NULL != mother1) mcMotherPdg1 = mother1->
GetPdgCode();
1652 if (grandmotherId1 != -1) {
1654 if (NULL != grandmother1)
1655 mcGrandmotherPdg1 = grandmother1->
GetPdgCode();
1658 if (motherId2 != -1) {
1660 if (NULL != mother2) mcMotherPdg2 = mother2->
GetPdgCode();
1662 if (grandmotherId2 != -1) {
1667 if (motherId3 != -1) {
1669 if (NULL != mother3) mcMotherPdg3 = mother3->
GetPdgCode();
1671 if (grandmotherId3 != -1) {
1676 if (motherId4 != -1) {
1678 if (NULL != mother4) mcMotherPdg4 = mother4->
GetPdgCode();
1680 if (grandmotherId4 != -1) {
1688 if (motherId1 == motherId2 && motherId3 == motherId4) {
1691 if ((grandmotherId1 == motherId3 && mcMotherPdg3 == 111)
1692 || (motherId1 == grandmotherId3 && mcMotherPdg1 == 111)) {
1703 Double_t invmass1 = 0;
1704 Double_t invmass3 = 0;
1716 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1
1717 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1) {
1726 cout <<
"HURRAY! .-.-.-.-.-.-..-.-.-.-.-.-.-.-.-.-.-.-."
1729 i, j, k, l, motherId1, motherId2, motherId3, motherId4);
1771 Double_t opening_angle1_mc = 0;
1772 Double_t opening_angle1_refitted = 0;
1779 opening_angle1_refitted);
1781 Double_t opening_angle1_mc_dalitz = 0;
1782 Double_t opening_angle1_refitted_dalitz = 0;
1788 opening_angle1_mc_dalitz);
1790 opening_angle1_refitted_dalitz);
1796 Double_t opening_angle1_mc = 0;
1797 Double_t opening_angle1_refitted = 0;
1804 opening_angle1_refitted);
1806 Double_t opening_angle1_mc_dalitz = 0;
1807 Double_t opening_angle1_refitted_dalitz = 0;
1813 opening_angle1_mc_dalitz);
1815 opening_angle1_refitted_dalitz);
1819 if (motherId1 == motherId3 && motherId2 == motherId4) {
1822 if ((grandmotherId1 == motherId2 && mcMotherPdg2 == 111)
1823 || (motherId1 == grandmotherId2 && mcMotherPdg1 == 111)) {
1834 Double_t invmass1 = 0;
1835 Double_t invmass3 = 0;
1847 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1
1848 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1) {
1857 cout <<
"HURRAY! .-.-.-.-.-.-..-.-.-.-.-.-.-.-.-.-.-.-."
1860 i, j, k, l, motherId1, motherId2, motherId3, motherId4);
1899 if (mcGrandmotherPdg1 == 111) {
1900 Double_t opening_angle1_mc = 0;
1901 Double_t opening_angle1_refitted = 0;
1908 opening_angle1_refitted);
1910 Double_t opening_angle1_mc_dalitz = 0;
1911 Double_t opening_angle1_refitted_dalitz = 0;
1917 opening_angle1_mc_dalitz);
1919 opening_angle1_refitted_dalitz);
1922 if (mcMotherPdg1 == 111) {
1923 Double_t opening_angle1_mc = 0;
1924 Double_t opening_angle1_refitted = 0;
1931 opening_angle1_refitted);
1933 Double_t opening_angle1_mc_dalitz = 0;
1934 Double_t opening_angle1_refitted_dalitz = 0;
1940 opening_angle1_mc_dalitz);
1942 opening_angle1_refitted_dalitz);
1946 if (motherId1 == motherId4 && motherId2 == motherId3) {
1949 if ((grandmotherId1 == motherId2 && mcMotherPdg2 == 111)
1950 || (motherId1 == grandmotherId2 && mcMotherPdg1 == 111)) {
1961 Double_t invmass1 = 0;
1962 Double_t invmass3 = 0;
1974 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1
1975 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1) {
1984 cout <<
"HURRAY! .-.-.-.-.-.-..-.-.-.-.-.-.-.-.-.-.-.-."
1987 i, j, k, l, motherId1, motherId2, motherId3, motherId4);
2026 if (mcGrandmotherPdg1 == 111) {
2027 Double_t opening_angle1_mc = 0;
2028 Double_t opening_angle1_refitted = 0;
2035 opening_angle1_refitted);
2037 Double_t opening_angle1_mc_dalitz = 0;
2038 Double_t opening_angle1_refitted_dalitz = 0;
2044 opening_angle1_mc_dalitz);
2046 opening_angle1_refitted_dalitz);
2049 if (mcMotherPdg1 == 111) {
2050 Double_t opening_angle1_mc = 0;
2051 Double_t opening_angle1_refitted = 0;
2058 opening_angle1_refitted);
2060 Double_t opening_angle1_mc_dalitz = 0;
2061 Double_t opening_angle1_refitted_dalitz = 0;
2067 opening_angle1_mc_dalitz);
2069 opening_angle1_refitted_dalitz);
2077 if (grandmotherId1 == grandmotherId2
2078 && grandmotherId1 == grandmotherId3
2079 && grandmotherId1 == grandmotherId4) {
2083 if (pi0start_i.Z() <= 1 && pi0start_j.Z() <= 1
2084 && pi0start_k.Z() <= 1 && pi0start_l.Z() <= 1
2085 && mcGrandmotherPdg1 == 221) {
2086 Double_t invmass_eta_mc =
2091 Double_t invmass_eta_reco =
2101 i, j, k, l, motherId1, motherId2, motherId3, motherId4, 1);
2105 if (mcGrandmotherPdg1 != 111)
continue;
2138 Double_t invmass1 = 0;
2143 Double_t invmass2 = 0;
2148 Double_t invmass3 = 0;
2155 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1
2156 || pi0start_l.Z() > 1) {
2181 cout <<
"########################################################"
2196 cout <<
"########################################################"
2199 cout <<
"index: " <<
i <<
"\t" << j <<
"\t" << k <<
"\t" << l
2205 cout <<
"motherid: " << motherId1 <<
"\t" << motherId2 <<
"\t"
2206 << motherId3 <<
"\t" << motherId4 << endl;
2207 cout <<
"motherpdg: " << mcMotherPdg1 <<
"\t" << mcMotherPdg2
2208 <<
"\t" << mcMotherPdg3 <<
"\t" << mcMotherPdg4 << endl;
2209 cout <<
"grandmotherid: " << grandmotherId1 <<
"\t"
2210 << grandmotherId2 <<
"\t" << grandmotherId3 <<
"\t"
2211 << grandmotherId4 << endl;
2216 cout <<
"invmass reco: " << invmass2
2217 <<
"\t invmass mc: " << invmass1 << endl;
2223 1.0 * TMath::Abs(invmass1 - invmass2) / invmass1);
2225 1.0 * TMath::Abs(invmass1 - invmass3) / invmass1);
2277 TVector3 momentumtest5a;
2281 / momentumtest5a.X());
2284 / momentumtest5a.Y());
2287 / momentumtest5a.Z());
2296 / momentumtest5a.X());
2299 / momentumtest5a.Y());
2302 / momentumtest5a.Z());
2310 TVector3 momentumtest5b;
2314 / momentumtest5b.X());
2317 / momentumtest5b.Y());
2320 / momentumtest5b.Z());
2329 / momentumtest5b.X());
2332 / momentumtest5b.Y());
2335 / momentumtest5b.Z());
2343 TVector3 momentumtest5c;
2347 / momentumtest5c.X());
2350 / momentumtest5c.Y());
2353 / momentumtest5c.Z());
2362 / momentumtest5c.X());
2365 / momentumtest5c.Y());
2368 / momentumtest5c.Z());
2376 TVector3 momentumtest5d;
2380 / momentumtest5d.X());
2383 / momentumtest5d.Y());
2386 / momentumtest5d.Z());
2395 / momentumtest5d.X());
2398 / momentumtest5d.Y());
2401 / momentumtest5d.Z());
2410 Double_t opening_angle1_mc = 0;
2411 Double_t opening_angle2_mc = 0;
2412 Double_t opening_angle1_refitted = 0;
2413 Double_t opening_angle2_refitted = 0;
2415 if (motherId1 == motherId2) {
2425 if (motherId1 == motherId3) {
2435 if (motherId1 == motherId4) {
2460 Double_t openingAngleBetweenGammas =
2466 openingAngleBetweenGammas);
2467 Double_t openingAngleBetweenGammasReco =
2474 openingAngleBetweenGammasReco);
2489 opening_angle1_refitted);
2491 opening_angle2_refitted);
2515 i, j, k, l, motherId1, motherId2, motherId3, motherId4);
2540 Bool_t IsRichElectron1MC =
2542 Bool_t IsRichElectron2MC =
2544 Bool_t IsRichElectron3MC =
2546 Bool_t IsRichElectron4MC =
2552 if (motherId1 == motherId2) {
2558 if (motherId1 == motherId3) {
2564 if (motherId1 == motherId4) {
2572 Double_t Value_invariantMassCut = 0.03;
2573 Double_t Value_openingAngleCut1 = 1.8 - 0.6 * paramsCut1.
fPt;
2574 Double_t Value_openingAngleCut2 = 1.8 - 0.6 * paramsCut2.
fPt;
2576 Bool_t OpeningAngleCut1 =
2577 (opening_angle1_refitted < Value_openingAngleCut1);
2578 Bool_t OpeningAngleCut2 =
2579 (opening_angle2_refitted < Value_openingAngleCut2);
2580 Bool_t InvariantMassCut1 =
2581 (paramsCut1.
fMinv < Value_invariantMassCut);
2582 Bool_t InvariantMassCut2 =
2583 (paramsCut2.
fMinv < Value_invariantMassCut);
2589 IsRichElectron1ann && IsRichElectron2ann && IsRichElectron3ann
2590 && IsRichElectron4ann) {
2594 && OpeningAngleCut2) {
2596 if (InvariantMassCut1 && InvariantMassCut2) {
2603 IsRichElectron1normal && IsRichElectron2normal
2604 && IsRichElectron3normal
2605 && IsRichElectron4normal) {
2609 && OpeningAngleCut2) {
2611 if (InvariantMassCut1 && InvariantMassCut2) {
2618 IsRichElectron1MC && IsRichElectron2MC && IsRichElectron3MC
2619 && IsRichElectron4MC) {
2623 && OpeningAngleCut2) {
2625 if (InvariantMassCut1 && InvariantMassCut2) {
2648 cout <<
"CbmAnaConversionReco: InvariantMassTest_4epem - Filled events: "
2650 cout <<
"CbmAnaConversionReco: InvariantMassTest_4epem - End!" << endl;
2675 Double_t opening_angle1_refitted = 0;
2676 Double_t opening_angle2_refitted = 0;
2678 if (motherE1 == motherE2) {
2684 if (motherE1 == motherE3) {
2690 if (motherE1 == motherE4) {
2698 Bool_t IsWithinChiCut1 =
2701 Bool_t IsWithinChiCut2 =
2704 Bool_t IsWithinChiCut3 =
2707 Bool_t IsWithinChiCut4 =
2711 Bool_t AllWithinChiCut =
2712 (IsWithinChiCut1 && IsWithinChiCut2 && IsWithinChiCut3 && IsWithinChiCut4);
2738 Bool_t IsRichElectron1MC =
2740 Bool_t IsRichElectron2MC =
2742 Bool_t IsRichElectron3MC =
2744 Bool_t IsRichElectron4MC =
2759 if (motherE1 == motherE2) {
2765 if (motherE1 == motherE3) {
2771 if (motherE1 == motherE4) {
2779 Double_t Value_invariantMassCut = 0.03;
2780 Double_t Value_openingAngleCut1 = 1.8 - 0.6 * paramsCut1.
fPt;
2781 Double_t Value_openingAngleCut2 = 1.8 - 0.6 * paramsCut2.
fPt;
2783 Bool_t OpeningAngleCut1 = (opening_angle1_refitted < Value_openingAngleCut1);
2784 Bool_t OpeningAngleCut2 = (opening_angle2_refitted < Value_openingAngleCut2);
2785 Bool_t InvariantMassCut1 = (paramsCut1.
fMinv < Value_invariantMassCut);
2786 Bool_t InvariantMassCut2 = (paramsCut2.
fMinv < Value_invariantMassCut);
2791 + IsRichElectron3ann + IsRichElectron4ann);
2793 if (IsRichElectron1ann + IsRichElectron2ann + IsRichElectron3ann
2794 + IsRichElectron4ann
2797 if (IsRichElectron1ann == 0)
2800 if (IsRichElectron2ann == 0)
2803 if (IsRichElectron3ann == 0)
2806 if (IsRichElectron4ann == 0)
2820 if (IsRichElectron1ann == 0) {
2825 if (IsRichElectron2ann == 0) {
2830 if (IsRichElectron3ann == 0) {
2835 if (IsRichElectron4ann == 0) {
2841 for (
int i = 0;
i < nofringhits;
i++) {
2842 Int_t hitInd = richRing->
GetHit(
i);
2844 if (NULL == hit)
continue;
2851 if (IsRichElectron1ann > 0) {
2869 if (IsRichElectron2ann > 0) {
2887 if (IsRichElectron3ann > 0) {
2905 if (IsRichElectron4ann > 0) {
2929 if (OpeningAngleCut1 && OpeningAngleCut2) {
2937 if (ANNvalueE1 > -1 && ANNvalueE2 > -1 && ANNvalueE3 > -1
2938 && ANNvalueE4 > -1) {
2941 if (ANNvalueE1 > -0.9 && ANNvalueE2 > -0.9 && ANNvalueE3 > -0.9
2942 && ANNvalueE4 > -0.9) {
2945 if (ANNvalueE1 > -0.8 && ANNvalueE2 > -0.8 && ANNvalueE3 > -0.8
2946 && ANNvalueE4 > -0.8) {
2949 if (ANNvalueE1 > -0.7 && ANNvalueE2 > -0.7 && ANNvalueE3 > -0.7
2950 && ANNvalueE4 > -0.7) {
2953 if (ANNvalueE1 > -0.6 && ANNvalueE2 > -0.6 && ANNvalueE3 > -0.6
2954 && ANNvalueE4 > -0.6) {
2957 if (ANNvalueE1 > -0.5 && ANNvalueE2 > -0.5 && ANNvalueE3 > -0.5
2958 && ANNvalueE4 > -0.5) {
2961 if (ANNvalueE1 > -0.4 && ANNvalueE2 > -0.4 && ANNvalueE3 > -0.4
2962 && ANNvalueE4 > -0.4) {
2965 if (ANNvalueE1 > -0.3 && ANNvalueE2 > -0.3 && ANNvalueE3 > -0.3
2966 && ANNvalueE4 > -0.3) {
2969 if (ANNvalueE1 > -0.2 && ANNvalueE2 > -0.2 && ANNvalueE3 > -0.2
2970 && ANNvalueE4 > -0.2) {
2973 if (ANNvalueE1 > -0.1 && ANNvalueE2 > -0.1 && ANNvalueE3 > -0.1
2974 && ANNvalueE4 > -0.1) {
2977 if (ANNvalueE1 > -0.0 && ANNvalueE2 > -0.0 && ANNvalueE3 > -0.0
2978 && ANNvalueE4 > -0.0) {
2985 IsRichElectron1ann && IsRichElectron2ann && IsRichElectron3ann
2986 && IsRichElectron4ann) {
2988 if (AllWithinChiCut) {
2990 if (OpeningAngleCut1
2991 && OpeningAngleCut2) {
2993 if (InvariantMassCut1 && InvariantMassCut2) {
3001 IsRichElectron1normal && IsRichElectron2normal && IsRichElectron3normal
3002 && IsRichElectron4normal) {
3004 if (AllWithinChiCut) {
3006 if (OpeningAngleCut1
3007 && OpeningAngleCut2) {
3009 if (InvariantMassCut1 && InvariantMassCut2) {
3017 IsRichElectron1MC && IsRichElectron2MC && IsRichElectron3MC
3018 && IsRichElectron4MC) {
3020 if (AllWithinChiCut) {
3022 if (OpeningAngleCut1
3023 && OpeningAngleCut2) {
3025 if (InvariantMassCut1 && InvariantMassCut2) {
3037 IsRichElectron1ann && IsRichElectron2ann && IsRichElectron3ann
3038 && IsRichElectron4ann) {
3040 if (AllWithinChiCut) {
3042 if (OpeningAngleCut1
3043 && OpeningAngleCut2) {
3045 if (InvariantMassCut1 && InvariantMassCut2) {
3053 IsRichElectron1normal && IsRichElectron2normal && IsRichElectron3normal
3054 && IsRichElectron4normal) {
3056 if (AllWithinChiCut) {
3058 if (OpeningAngleCut1
3059 && OpeningAngleCut2) {
3061 if (InvariantMassCut1 && InvariantMassCut2) {
3069 IsRichElectron1MC && IsRichElectron2MC && IsRichElectron3MC
3070 && IsRichElectron4MC) {
3072 if (AllWithinChiCut) {
3074 if (OpeningAngleCut1
3075 && OpeningAngleCut2) {
3077 if (InvariantMassCut1 && InvariantMassCut2) {
3088 Int_t nofDaughters = 0;
3091 if (motherId == motherId_temp) nofDaughters++;
3095 return nofDaughters;
3100 TVector3 electron2) {
3101 Double_t energyP = TMath::Sqrt(electron1.Mag2() +
M2E);
3102 TLorentzVector lorVecP(electron1, energyP);
3104 Double_t energyM = TMath::Sqrt(electron2.Mag2() +
M2E);
3105 TLorentzVector lorVecM(electron2, energyM);
3107 Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
3108 Double_t theta = 180. * anglePair /
TMath::Pi();
3118 Double_t energyP = TMath::Sqrt(electron1.Mag2() +
M2E);
3119 TLorentzVector lorVecP(electron1, energyP);
3123 Double_t energyM = TMath::Sqrt(electron2.Mag2() +
M2E);
3124 TLorentzVector lorVecM(electron2, energyM);
3126 Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
3127 Double_t theta = 180. * anglePair /
TMath::Pi();
3138 Double_t openingAngle;
3139 TLorentzVector gamma1;
3140 TLorentzVector gamma2;
3164 Double_t angle = gamma1.Angle(gamma2.Vect());
3165 openingAngle = 180. * angle /
TMath::Pi();
3167 return openingAngle;
3175 TVector3 electron4) {
3176 Double_t energy1 = TMath::Sqrt(electron1.Mag2() +
M2E);
3177 TLorentzVector lorVec1(electron1, energy1);
3179 Double_t energy2 = TMath::Sqrt(electron2.Mag2() +
M2E);
3180 TLorentzVector lorVec2(electron2, energy2);
3182 Double_t energy3 = TMath::Sqrt(electron3.Mag2() +
M2E);
3183 TLorentzVector lorVec3(electron3, energy3);
3185 Double_t energy4 = TMath::Sqrt(electron4.Mag2() +
M2E);
3186 TLorentzVector lorVec4(electron4, energy4);
3188 TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
3189 TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
3191 Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
3192 Double_t theta = 180. * angleBetweenPhotons /
TMath::Pi();
3201 <<
"CbmAnaConversionReco::CalculateInvMassWithFullRecoCuts: nof entries - "
3204 for (
int a = 0; a < nof - 3; a++) {
3205 for (
int b = a + 1; b < nof - 2; b++) {
3206 for (
int c = b + 1; c < nof - 1; c++) {
3207 for (
int d = c + 1;
d < nof;
d++) {
3212 Int_t test = check1 + check2 + check3 + check4;
3213 if (test != 2)
continue;
3236 Double_t openingAngleCut = 1;
3237 Int_t IsPhoton_openingAngle1 = (params1.
fAngle < openingAngleCut);
3238 Int_t IsPhoton_openingAngle2 = (params2.
fAngle < openingAngleCut);
3239 Int_t IsPhoton_openingAngle3 = (params3.
fAngle < openingAngleCut);
3240 Int_t IsPhoton_openingAngle4 = (params4.
fAngle < openingAngleCut);
3241 Int_t IsPhoton_openingAngle5 = (params5.
fAngle < openingAngleCut);
3242 Int_t IsPhoton_openingAngle6 = (params6.
fAngle < openingAngleCut);
3244 Double_t invMassCut = 0.03;
3245 Int_t IsPhoton_invMass1 = (params1.
fMinv < invMassCut);
3246 Int_t IsPhoton_invMass2 = (params2.
fMinv < invMassCut);
3247 Int_t IsPhoton_invMass3 = (params3.
fMinv < invMassCut);
3248 Int_t IsPhoton_invMass4 = (params4.
fMinv < invMassCut);
3249 Int_t IsPhoton_invMass5 = (params5.
fMinv < invMassCut);
3250 Int_t IsPhoton_invMass6 = (params6.
fMinv < invMassCut);
3252 if (IsPhoton_openingAngle1 && IsPhoton_openingAngle6
3253 && IsPhoton_invMass1 && IsPhoton_invMass6
3254 && (check1 + check2 == 1) && (check3 + check4 == 1)) {
3257 if (IsPhoton_openingAngle2 && IsPhoton_openingAngle5
3258 && IsPhoton_invMass2 && IsPhoton_invMass5
3259 && (check1 + check3 == 1) && (check2 + check4 == 1)) {
3262 if (IsPhoton_openingAngle3 && IsPhoton_openingAngle4
3263 && IsPhoton_invMass3 && IsPhoton_invMass4
3264 && (check1 + check4 == 1) && (check2 + check3 == 1)) {
3277 const TVector3 electron2) {
3280 Double_t energyP = TMath::Sqrt(electron1.Mag2() +
M2E);
3281 TLorentzVector lorVecP(electron1, energyP);
3283 Double_t energyM = TMath::Sqrt(electron2.Mag2() +
M2E);
3284 TLorentzVector lorVecM(electron2, energyM);
3286 TVector3 momPair = electron1 + electron2;
3287 Double_t energyPair = energyP + energyM;
3288 Double_t ptPair = momPair.Perp();
3289 Double_t pzPair = momPair.Pz();
3291 0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
3292 Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
3293 Double_t theta = 180. * anglePair /
TMath::Pi();
3294 Double_t minv = 2. * TMath::Sin(anglePair / 2.)
3295 * TMath::Sqrt(electron1.Mag() * electron2.Mag());
3298 params.
fPt = ptPair;
3300 params.
fMinv = minv;
3308 const TVector3 part1,
3309 const TVector3 part2,
3310 const TVector3 part3,
3311 const TVector3 part4) {
3314 Double_t energy1 = TMath::Sqrt(part1.Mag2() +
M2E);
3315 TLorentzVector lorVec1(part1, energy1);
3317 Double_t energy2 = TMath::Sqrt(part2.Mag2() +
M2E);
3318 TLorentzVector lorVec2(part2, energy2);
3320 Double_t energy3 = TMath::Sqrt(part3.Mag2() +
M2E);
3321 TLorentzVector lorVec3(part3, energy3);
3323 Double_t energy4 = TMath::Sqrt(part4.Mag2() +
M2E);
3324 TLorentzVector lorVec4(part4, energy4);
3327 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
3329 TVector3 momPair = part1 + part2 + part3 + part4;
3330 Double_t energyPair = energy1 + energy2 + energy3 + energy4;
3331 Double_t ptPair = momPair.Perp();
3332 Double_t pzPair = momPair.Pz();
3334 0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
3337 Double_t minv = sum.Mag();
3340 params.
fPt = ptPair;
3342 params.
fMinv = minv;
3349 Double_t momentum) {
3355 if (richId < 0)
return false;
3357 if (NULL == ring)
return false;
3359 Double_t fRichAnnCut = -0.8;
3361 globalTrackIndex, momentum);
3362 if (ann > fRichAnnCut)
3370 Double_t momentum) {
3376 if (richId < 0)
return -2;
3378 if (NULL == ring)
return -2;
3381 globalTrackIndex, momentum);
3387 Double_t momentum) {
3392 if (richId < 0)
return false;
3394 if (NULL == ring)
return false;
3400 Double_t fMeanA = 4.95;
3401 Double_t fMeanB = 4.54;
3402 Double_t fRmsA = 0.30;
3403 Double_t fRmsB = 0.22;
3404 Double_t fRmsCoeff = 4.5;
3405 Double_t fDistCut = 1.;
3407 Bool_t isElectronRICH = 0;
3409 if (momentum < 5.5) {
3410 if (
fabs(axisA - fMeanA) < fRmsCoeff * fRmsA
3411 &&
fabs(axisB - fMeanB) < fRmsCoeff * fRmsB && dist < fDistCut)
3419 Double_t polAaxis = 5.64791 - 4.24077 / (momentum - 3.65494);
3420 Double_t polBaxis = 5.41106 - 4.49902 / (momentum - 3.52450);
3422 if (axisA < (fMeanA + fRmsCoeff * fRmsA) && axisA > polAaxis
3423 && axisB < (fMeanB + fRmsCoeff * fRmsB) && axisB > polBaxis
3427 return isElectronRICH;