38 , fRichRingMatches(NULL)
41 , fStsTrackMatches(NULL)
46 , fhTest2_invmass_RICHindex0(NULL)
47 , fhTest2_invmass_RICHindex1(NULL)
48 , fhTest2_invmass_RICHindex2(NULL)
49 , fhTest2_invmass_RICHindex3(NULL)
50 , fhTest2_invmass_RICHindex4(NULL)
56 , fhTest2_invmass_gee_mc(NULL)
57 , fhTest2_invmass_gee_refitted(NULL)
58 , fhTest2_invmass_gg_mc(NULL)
59 , fhTest2_invmass_gg_refitted(NULL)
60 , fhTest2_invmass_all_mc(NULL)
61 , fhTest2_invmass_all_refitted(NULL)
62 , fhTest2_pt_vs_rap_gee(NULL)
63 , fhTest2_pt_vs_rap_gg(NULL)
64 , fhTest2_pt_vs_rap_all(NULL)
65 , fhTest2_startvertexElectrons_gee(NULL)
66 , fhTest2_startvertexElectrons_gg(NULL)
67 , fhTest2_startvertexElectrons_all(NULL)
68 , fhTest2_2rich_invmass_gee_mc(NULL)
69 , fhTest2_2rich_invmass_gee_refitted(NULL)
70 , fhTest2_2rich_invmass_gg_mc(NULL)
71 , fhTest2_2rich_invmass_gg_refitted(NULL)
72 , fhTest2_2rich_invmass_all_mc(NULL)
73 , fhTest2_2rich_invmass_all_refitted(NULL)
74 , fhTest2_2rich_pt_vs_rap_gee(NULL)
75 , fhTest2_2rich_pt_vs_rap_gg(NULL)
76 , fhTest2_2rich_pt_vs_rap_all(NULL)
77 , fhTest2_electrons_pt_vs_p(NULL)
78 , fhTest2_electrons_pt_vs_p_withRICH(NULL)
79 , fhTest2_electrons_pt_vs_p_noRICH(NULL)
80 , fhTest2_3rich_electrons_theta_included(NULL)
81 , fhTest2_3rich_electrons_theta_missing(NULL)
82 , fhTest2_3rich_electrons_thetaVSp_included(NULL)
83 , fhTest2_3rich_electrons_thetaVSp_missing(NULL)
131 Double_t invmassSpectra_nof = 800;
132 Double_t invmassSpectra_start = -0.00125;
133 Double_t invmassSpectra_end = 1.99875;
137 new TH1D(
"fhTest2_invmass_RICHindex0",
"fhTest2_invmass_RICHindex0; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
138 600, -0.0025, 2.9975);
141 new TH1D(
"fhTest2_invmass_RICHindex1",
"fhTest2_invmass_RICHindex1; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
142 600, -0.0025, 2.9975);
145 new TH1D(
"fhTest2_invmass_RICHindex2",
"fhTest2_invmass_RICHindex2; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
146 600, -0.0025, 2.9975);
149 new TH1D(
"fhTest2_invmass_RICHindex3",
"fhTest2_invmass_RICHindex3; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
150 600, -0.0025, 2.9975);
153 new TH1D(
"fhTest2_invmass_RICHindex4",
"fhTest2_invmass_RICHindex4; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
154 600, -0.0025, 2.9975);
159 new TH1D(
"fhTest2_invmass_gee_mc",
"fhTest2_invmass_gee_mc;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
160 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
162 new TH1D(
"fhTest2_invmass_gee_refitted",
"fhTest2_invmass_gee_refitted;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
163 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
165 new TH1D(
"fhTest2_invmass_gg_mc",
"fhTest2_invmass_gg_mc;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
166 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
168 new TH1D(
"fhTest2_invmass_gg_refitted",
"fhTest2_invmass_gg_refitted;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
169 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
171 new TH1D(
"fhTest2_invmass_all_mc",
"fhTest2_invmass_all_mc;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
172 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
174 new TH1D(
"fhTest2_invmass_all_refitted",
"fhTest2_invmass_all_refitted;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
175 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
184 new TH2D(
"fhTest2_pt_vs_rap_gee",
"fhTest2_pt_vs_rap_gee;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
186 new TH2D(
"fhTest2_pt_vs_rap_gg",
"fhTest2_pt_vs_rap_gg;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
188 new TH2D(
"fhTest2_pt_vs_rap_all",
"fhTest2_pt_vs_rap_all;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
194 new TH1D(
"fhTest2_startvertexElectrons_gee",
"fhTest2_startvertexElectrons_gee;z in cm;#", 411, -5.25, 200.25);
196 new TH1D(
"fhTest2_startvertexElectrons_gg",
"fhTest2_startvertexElectrons_gg;z in cm;#", 411, -5.25, 200.25);
198 new TH1D(
"fhTest2_startvertexElectrons_all",
"fhTest2_startvertexElectrons_all;z in cm;#", 411, -5.25, 200.25);
206 new TH1D(
"fhTest2_2rich_invmass_gee_mc",
"fhTest2_2rich_invmass_gee_mc;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
207 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
209 "fhTest2_2rich_invmass_gee_refitted;invariant mass of 4 e^{#pm} "
211 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
213 new TH1D(
"fhTest2_2rich_invmass_gg_mc",
"fhTest2_2rich_invmass_gg_mc;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
214 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
216 "fhTest2_2rich_invmass_gg_refitted;invariant mass of 4 e^{#pm} in "
218 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
220 new TH1D(
"fhTest2_2rich_invmass_all_mc",
"fhTest2_2rich_invmass_all_mc;invariant mass of 4 e^{#pm} in GeV/c^{2};#",
221 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
223 "fhTest2_2rich_invmass_all_refitted;invariant mass of 4 e^{#pm} "
225 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
235 new TH2D(
"fhTest2_2rich_pt_vs_rap_gee",
"fhTest2_2rich_pt_vs_rap_gee;p_{t} in GeV/c; rapidity y", 240, -2., 10.,
238 "fhTest2_2rich_pt_vs_rap_gg",
"fhTest2_2rich_pt_vs_rap_gg;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
240 new TH2D(
"fhTest2_2rich_pt_vs_rap_all",
"fhTest2_2rich_pt_vs_rap_all;p_{t} in GeV/c; rapidity y", 240, -2., 10.,
249 "fhTest2_electrons_pt_vs_p",
"fhTest2_electrons_pt_vs_p;p_{t} in GeV/c; p in GeV/c", 240, -2., 10., 360, -2., 16.);
252 new TH2D(
"fhTest2_electrons_pt_vs_p_withRICH",
"fhTest2_electrons_pt_vs_p_withRICH;p_{t} in GeV/c; p in GeV/c", 240,
253 -2., 10., 360, -2., 16.);
256 new TH2D(
"fhTest2_electrons_pt_vs_p_noRICH",
"fhTest2_electrons_pt_vs_p_noRICH;p_{t} in GeV/c; p in GeV/c", 240,
257 -2., 10., 360, -2., 16.);
261 "fhTest2_3rich_electrons_theta_included",
"fhTest2_3rich_electrons_theta_included;theta angle [deg];#", 90, 0, 90);
264 "fhTest2_3rich_electrons_theta_missing",
"fhTest2_3rich_electrons_theta_missing;theta angle [deg];#", 90, 0, 90);
267 new TH2D(
"fhTest2_3rich_electrons_thetaVSp_included",
268 "fhTest2_3rich_electrons_thetaVSp_included;theta angle [deg];p in GeV/c", 90, 0, 90, 540, -2., 16.);
271 new TH2D(
"fhTest2_3rich_electrons_thetaVSp_missing",
272 "fhTest2_3rich_electrons_thetaVSp_missing;theta angle [deg];p in GeV/c", 90, 0, 90, 540, -2., 16.);
299 for (Int_t i = 0; i < ngTracks; i++) {
301 if (NULL == gTrack)
continue;
305 if (stsInd < 0)
continue;
307 if (stsTrack == NULL)
continue;
309 if (stsMatch == NULL)
continue;
312 if (stsMcTrackId < 0)
continue;
314 if (mcTrack1 == NULL)
continue;
318 TVector3 refittedMomentum;
320 vector<CbmStsTrack> stsTracks;
322 stsTracks[0] = *stsTrack;
323 vector<CbmL1PFFitter::PFFieldRegion> vField;
324 vector<float> chiPrim;
328 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
329 vtxTrack->Momentum(refittedMomentum);
335 vector<CbmStsTrack> stsTracks_electron;
336 stsTracks_electron.resize(1);
337 stsTracks_electron[0] = *stsTrack;
338 vector<CbmL1PFFitter::PFFieldRegion> vField_electron;
339 vector<float> chiPrim_electron;
340 vector<int> pidHypo_electron;
341 pidHypo_electron.push_back(11);
342 fPFFitter_electron.
Fit(stsTracks_electron, pidHypo_electron);
345 TVector3 refittedMomentum_electron;
346 const FairTrackParam* vtxTrack_electron = stsTracks_electron[0].GetParamFirst();
347 vtxTrack_electron->Momentum(refittedMomentum_electron);
355 if (TMath::Abs(pdg) == 11) {
375 if (richMatch == NULL) {
380 if (richMcTrackId < 0) {
385 if (mcTrack2 == NULL) {
402 cout <<
"CbmAnaConversionTest2: InvariantMassTest_3RICH - Start..." << endl;
403 cout <<
"CbmAnaConversionTest2: InvariantMassTest_3RICH - " <<
fVector_mctrack.size() << endl;
407 if (i % 10 == 0) cout <<
"CbmAnaConversionTest2: InvariantMassTest_3RICH - iteration i = " << i << endl;
417 cout <<
"CbmAnaConversionTest2: InvariantMassTest_4epem - not "
418 "matching number of entries!"
423 Bool_t IsPi0 =
false;
441 if (richIndex1 + richIndex2 + richIndex3 + richIndex4 != 3)
continue;
450 if ((motherId1 == motherId2 && motherId3 == motherId4) || (motherId1 == motherId3 && motherId2 == motherId4)
451 || (motherId1 == motherId4 && motherId2 == motherId3)) {
454 int grandmotherId1 = -1;
455 int grandmotherId2 = -1;
456 int grandmotherId3 = -1;
457 int grandmotherId4 = -1;
459 int mcMotherPdg1 = -1;
463 int mcGrandmotherPdg1 = -1;
470 if (motherId1 != -1) {
472 if (NULL != mother1) mcMotherPdg1 = mother1->
GetPdgCode();
474 if (grandmotherId1 != -1) {
476 if (NULL != grandmother1) mcGrandmotherPdg1 = grandmother1->
GetPdgCode();
479 if (motherId2 != -1) {
483 if (grandmotherId2 != -1) {
488 if (motherId3 != -1) {
492 if (grandmotherId3 != -1) {
497 if (motherId4 != -1) {
501 if (grandmotherId4 != -1) {
507 if (grandmotherId1 == -1)
continue;
509 if (motherId1 == motherId2 && motherId3 == motherId4) {
511 if ((grandmotherId1 == motherId3 && mcGrandmotherPdg1 == 111)
512 || (motherId1 == grandmotherId3 && mcMotherPdg1 == 111)) {
523 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
526 Double_t invmass_mc = 0;
527 Double_t invmass_reco = 0;
534 invmass_mc = params_mc.
fMinv;
535 invmass_reco = params_reco.
fMinv;
548 if (motherId1 == motherId3 && motherId2 == motherId4) {
550 if ((grandmotherId1 == motherId2 && mcGrandmotherPdg1 == 111)
551 || (motherId1 == grandmotherId2 && mcMotherPdg1 == 111)) {
562 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
565 Double_t invmass_mc = 0;
566 Double_t invmass_reco = 0;
573 invmass_mc = params_mc.
fMinv;
574 invmass_reco = params_reco.
fMinv;
587 if (motherId1 == motherId4 && motherId2 == motherId3) {
589 if ((grandmotherId1 == motherId2 && mcGrandmotherPdg1 == 111)
590 || (motherId1 == grandmotherId2 && mcMotherPdg1 == 111)) {
601 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
604 Double_t invmass_mc = 0;
605 Double_t invmass_reco = 0;
612 invmass_mc = params_mc.
fMinv;
613 invmass_reco = params_reco.
fMinv;
630 if (grandmotherId1 == grandmotherId2 && grandmotherId1 == grandmotherId3
631 && grandmotherId1 == grandmotherId4) {
632 if (mcGrandmotherPdg1 != 111)
continue;
648 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
650 Double_t invmass_mc = 0;
651 Double_t invmass_reco = 0;
658 invmass_mc = params_mc.
fMinv;
659 invmass_reco = params_reco.
fMinv;
671 cout <<
"########################################################"
679 if (richIndex1 <= 0 && IsPi0) {
693 if (richIndex2 <= 0 && IsPi0) {
707 if (richIndex3 <= 0 && IsPi0) {
721 if (richIndex4 <= 0 && IsPi0) {
747 cout <<
"CbmAnaConversionTest2: InvariantMassTest_2RICH - Start..." << endl;
748 cout <<
"CbmAnaConversionTest2: InvariantMassTest_2RICH - " <<
fVector_mctrack.size() << endl;
752 if (i % 10 == 0) cout <<
"CbmAnaConversionTest2: InvariantMassTest_2RICH - iteration i = " << i << endl;
762 cout <<
"CbmAnaConversionTest2: InvariantMassTest_4epem - not "
763 "matching number of entries!"
785 if (richIndex1 + richIndex2 + richIndex3 + richIndex4 != 2)
continue;
793 if ((motherId1 == motherId2 && motherId3 == motherId4) || (motherId1 == motherId3 && motherId2 == motherId4)
794 || (motherId1 == motherId4 && motherId2 == motherId3)) {
797 int grandmotherId1 = -1;
798 int grandmotherId2 = -1;
799 int grandmotherId3 = -1;
800 int grandmotherId4 = -1;
802 int mcMotherPdg1 = -1;
806 int mcGrandmotherPdg1 = -1;
813 if (motherId1 != -1) {
815 if (NULL != mother1) mcMotherPdg1 = mother1->
GetPdgCode();
817 if (grandmotherId1 != -1) {
819 if (NULL != grandmother1) mcGrandmotherPdg1 = grandmother1->
GetPdgCode();
822 if (motherId2 != -1) {
826 if (grandmotherId2 != -1) {
831 if (motherId3 != -1) {
835 if (grandmotherId3 != -1) {
840 if (motherId4 != -1) {
844 if (grandmotherId4 != -1) {
850 if (grandmotherId1 == -1)
continue;
852 if (motherId1 == motherId2 && motherId3 == motherId4) {
854 if ((grandmotherId1 == motherId3 && mcGrandmotherPdg1 == 111)
855 || (motherId1 == grandmotherId3 && mcMotherPdg1 == 111)) {
867 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
870 Double_t invmass_mc = 0;
871 Double_t invmass_reco = 0;
878 invmass_mc = params_mc.
fMinv;
879 invmass_reco = params_reco.
fMinv;
890 if (motherId1 == motherId3 && motherId2 == motherId4) {
892 if ((grandmotherId1 == motherId2 && mcGrandmotherPdg1 == 111)
893 || (motherId1 == grandmotherId2 && mcMotherPdg1 == 111)) {
905 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
908 Double_t invmass_mc = 0;
909 Double_t invmass_reco = 0;
916 invmass_mc = params_mc.
fMinv;
917 invmass_reco = params_reco.
fMinv;
928 if (motherId1 == motherId4 && motherId2 == motherId3) {
930 if ((grandmotherId1 == motherId2 && mcGrandmotherPdg1 == 111)
931 || (motherId1 == grandmotherId2 && mcMotherPdg1 == 111)) {
943 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
946 Double_t invmass_mc = 0;
947 Double_t invmass_reco = 0;
954 invmass_mc = params_mc.
fMinv;
955 invmass_reco = params_reco.
fMinv;
970 if (grandmotherId1 == grandmotherId2 && grandmotherId1 == grandmotherId3
971 && grandmotherId1 == grandmotherId4) {
972 if (mcGrandmotherPdg1 != 111)
continue;
988 if (pi0start_i.Z() > 1 || pi0start_j.Z() > 1 || pi0start_k.Z() > 1 || pi0start_l.Z() > 1)
continue;
990 Double_t invmass_mc = 0;
991 Double_t invmass_reco = 0;
998 invmass_mc = params_mc.
fMinv;
999 invmass_reco = params_reco.
fMinv;
1009 cout <<
"########################################################"