21 #include "FairLogger.h"
22 #include "FairRootManager.h"
35 , fRichRingMatches(NULL)
38 , fStsTrackMatches(NULL)
45 , fElectrons_richInd()
46 , fElectrons_pi0mcid()
48 , fElectrons_nofPerPi0(NULL)
49 , fElectrons_nofPerPi0_withRichInd(NULL)
50 , fhElectronsTest_invmass(NULL)
51 , fhTest_ParticlesPerEvent(NULL)
52 , fhTest_RICHelectronsPerEvent(NULL)
53 , fhTest_PhotonsPerEvent_RICHonly(NULL)
54 , fhTest_PhotonsPerEvent_STSandRICH(NULL)
55 , fhTest_ReconstructedPi0PerEvent(NULL)
56 , fhTest_invmass(NULL)
57 , fhTest_invmass_pCut(NULL)
58 , fhTest_invmass_GGcut(NULL)
59 , fhTest_invmass_RICHindex0(NULL)
60 , fhTest_invmass_RICHindex1(NULL)
61 , fhTest_invmass_RICHindex2(NULL)
62 , fhTest_invmass_RICHindex3(NULL)
63 , fhTest_invmass_RICHindex4(NULL)
64 , fhTest_invmass_MCcutAll(NULL)
65 , fhTest_peakCheck1(NULL)
66 , fhTest_peakCheck2(NULL)
67 , fhTest_peakCheck3(NULL)
68 , fhTest_invmass_ANNcuts(NULL)
69 , fhTest_phaseSpace_pi0(NULL)
70 , fhTest_phaseSpace_eta(NULL)
71 , fVector_AllMomenta()
78 , fVector_withRichSignal()
79 , fVector_reconstructedPhotons_FromSTSandRICH()
80 , fVector_electronRICH_gt()
81 , fVector_electronRICH_gtIndex()
82 , fVector_electronRICH_mcIndex()
83 , fVector_electronRICH_momenta()
84 , fVector_electronRICH_reconstructedPhotons()
85 , fVector_reconstructedPhotons_STSonly()
87 , fMixedTest_STSonly_photons()
88 , fMixedTest_STSonly_eventno()
89 , fMixedTest_STSonly_hasRichInd()
90 , fhTest_eventMixing_STSonly_2p2(NULL)
91 , fhTest_eventMixing_STSonly_3p1(NULL)
92 , fhTest_eventMixing_STSonly_4p0(NULL)
93 , fMixedTest_3p1_photons()
94 , fMixedTest_3p1_eventno()
95 , fMixedTest_3p1_combined()
96 , fMixedTest_3p1_ann()
97 , fhTest_eventMixing_3p1(NULL)
98 , fhTest_eventMixing_3p1_pCut(NULL)
99 , fhTest_eventMixing_3p1_GGcut(NULL)
100 , fhTest_eventMixing_3p1_ANNcuts(NULL) {}
106 FairRootManager* ioman = FairRootManager::Instance();
108 Fatal(
"CbmAnaConversion::Init",
"RootManager not instantised!");
111 fRichPoints = (TClonesArray*) ioman->GetObject(
"RichPoint");
113 Fatal(
"CbmAnaConversion::Init",
"No RichPoint array!");
116 fMcTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
118 Fatal(
"CbmAnaConversion::Init",
"No MCTrack array!");
121 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
123 Fatal(
"CbmAnaConversion::Init",
"No StsTrack array!");
128 Fatal(
"CbmAnaConversion::Init",
"No StsTrackMatch array!");
131 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
133 Fatal(
"CbmAnaConversion::Init",
"No GlobalTrack array!");
143 if (
nullptr ==
fPrimVertex) { LOG(fatal) <<
"No PrimaryVertex array!"; }
145 fRichRings = (TClonesArray*) ioman->GetObject(
"RichRing");
147 Fatal(
"CbmAnaConversion::Init",
"No RichRing array!");
152 Fatal(
"CbmAnaConversion::Init",
"No RichRingMatch array!");
166 Double_t invmassSpectra_nof = 800;
167 Double_t invmassSpectra_start = -0.00125;
168 Double_t invmassSpectra_end = 1.99875;
172 "fElectrons_nofPerPi0",
"fElectrons_nofPerPi0; nof; #", 7, -0.5, 6.5);
175 new TH1I(
"fElectrons_nofPerPi0_withRichInd",
176 "fElectrons_nofPerPi0_withRichInd; nof; #",
183 "fhElectronsTest_invmass",
184 "fhElectronsTest_invmass; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
186 invmassSpectra_start,
192 new TH1I(
"fhTest_PhotonsPerEvent_RICHonly",
193 "fhTest_PhotonsPerEvent_RICHonly; nof; #",
199 new TH1I(
"fhTest_PhotonsPerEvent_STSandRICH",
200 "fhTest_PhotonsPerEvent_STSandRICH; nof; #",
206 "fhTest_ParticlesPerEvent; nof; #",
212 new TH1I(
"fhTest_ReconstructedPi0PerEvent",
213 "fhTest_ReconstructedPi0PerEvent; nof; #",
219 new TH1I(
"fhTest_RICHelectronsPerEvent",
220 "fhTest_RICHelectronsPerEvent; nof; #",
228 "fhTest_invmass; invariant mass of 3 e^{#pm} + 1 particle in GeV/c^{2}; #",
230 invmassSpectra_start,
234 "fhTest_invmass_pCut; invariant mass of 3 "
235 "e^{#pm} + 1 particle in GeV/c^{2}; #",
237 invmassSpectra_start,
241 "fhTest_invmass_GGcut; invariant mass of 3 "
242 "e^{#pm} + 1 particle in GeV/c^{2}; #",
244 invmassSpectra_start,
250 "fhTest_invmass_RICHindex0",
251 "fhTest_invmass_RICHindex0; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
253 invmassSpectra_start,
257 "fhTest_invmass_RICHindex1",
258 "fhTest_invmass_RICHindex1; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
260 invmassSpectra_start,
264 "fhTest_invmass_RICHindex2",
265 "fhTest_invmass_RICHindex2; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
267 invmassSpectra_start,
271 "fhTest_invmass_RICHindex3",
272 "fhTest_invmass_RICHindex3; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
274 invmassSpectra_start,
278 "fhTest_invmass_RICHindex4",
279 "fhTest_invmass_RICHindex4; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
281 invmassSpectra_start,
286 new TH2D(
"fhTest_invmass_MCcutAll",
287 "fhTest_invmass_MCcutAll; case; invariant mass",
292 invmassSpectra_start,
295 new TH1D(
"fhTest_peakCheck1",
"fhTest_peakCheck1; sum; #", 15, -0.5, 14.5);
297 new TH1D(
"fhTest_peakCheck2",
"fhTest_peakCheck2; sum; #", 15, -0.5, 14.5);
299 new TH1D(
"fhTest_peakCheck3",
"fhTest_peakCheck3; sum; #", 20, -5.5, 14.5);
306 "fhTest_invmass_ANNcuts;ann;invariant mass "
307 "of 3 e^{#pm} + 1 particle in GeV/c^{2}",
312 invmassSpectra_start,
317 new TH2D(
"fhTest_phaseSpace_pi0",
318 "fhTest_phaseSpace_pi0;p_{t} in GeV/c;rapidity y",
326 new TH2D(
"fhTest_phaseSpace_eta",
327 "fhTest_phaseSpace_eta;p_{t} in GeV/c;rapidity y",
338 new TH1D(
"fhTest_eventMixing_STSonly_2p2",
339 "fhTest_eventMixing_STSonly_2p2; invariant mass of 4 e^{#pm} in "
342 invmassSpectra_start,
346 new TH1D(
"fhTest_eventMixing_STSonly_3p1",
347 "fhTest_eventMixing_STSonly_3p1; invariant mass of 4 e^{#pm} in "
350 invmassSpectra_start,
354 new TH1D(
"fhTest_eventMixing_STSonly_4p0",
355 "fhTest_eventMixing_STSonly_4p0; invariant mass of 4 e^{#pm} in "
358 invmassSpectra_start,
363 "fhTest_eventMixing_3p1",
364 "fhTest_eventMixing_3p1; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
366 invmassSpectra_start,
370 "fhTest_eventMixing_3p1_pCut",
371 "fhTest_eventMixing_3p1_pCut; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
373 invmassSpectra_start,
377 "fhTest_eventMixing_3p1_GGcut",
378 "fhTest_eventMixing_3p1_GGcut; invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
380 invmassSpectra_start,
385 new TH2D(
"fhTest_eventMixing_3p1_ANNcuts",
386 "fhTest_eventMixing_3p1_ANNcuts;ann;invariant mass of 4 e^{#pm} "
392 invmassSpectra_start,
400 gDirectory->mkdir(
"Test");
401 gDirectory->cd(
"Test");
405 gDirectory->cd(
"..");
410 cout <<
"CbmAnaConversionTest: Exec()" << endl;
417 Fatal(
"CbmAnaConversionTest::Exec",
"No PrimaryVertex array!");
428 for (Int_t
i = 0;
i < nGTracks;
i++) {
430 if (NULL == gTrack)
continue;
433 if (stsInd < 0)
continue;
434 if (richInd < 0)
continue;
437 if (stsTrack == NULL)
continue;
441 if (stsMatch == NULL)
continue;
443 if (stsMcTrackId < 0)
continue;
445 if (mcTrack1 == NULL)
continue;
449 if (richMatch == NULL)
continue;
451 if (richMcTrackId < 0)
continue;
453 if (mcTrack2 == NULL)
continue;
458 if (motherId < 0)
continue;
460 if (mcTrack1mother == NULL)
continue;
462 if (grandmotherId < 0)
continue;
465 if (mcTrack1grandmother == NULL)
continue;
467 int pdg_mother = TMath::Abs(mcTrack1mother->
GetPdgCode());
468 int pdg_grandmother = TMath::Abs(mcTrack1grandmother->
GetPdgCode());
470 cout <<
"CbmAnaConversionTest: pdg particle/mother/grandmother: " << pdg
471 <<
" / " << pdg_mother <<
" / " << pdg_grandmother << endl;
473 Int_t sameRichSts = (stsMcTrackId == richMcTrackId);
475 if (TMath::Abs(pdg) == 11
476 && (pdg_mother == 111 || pdg_grandmother == 111)) {
495 std::multimap<int, int> electronMap;
502 for (std::map<int, int>::iterator it = electronMap.begin();
503 it != electronMap.end();
505 if (it == electronMap.begin()) {
509 if (it != electronMap.begin()) {
510 std::map<int, int>::iterator zwischen = it;
513 int id_old = zwischen->first;
518 std::map<int, int>::iterator zwischen2 = zwischen--;
519 std::map<int, int>::iterator zwischen3 = zwischen2--;
521 it->second, zwischen->second, zwischen2->second, zwischen3->second);
549 TLorentzVector lorentz1;
551 TLorentzVector lorentz2;
553 TLorentzVector lorentz3;
555 TLorentzVector lorentz4;
559 sum = lorentz1 + lorentz2 + lorentz3 + lorentz4;
602 Int_t nofRICHelectrons = 0;
606 for (Int_t
i = 0;
i < ngTracks;
i++) {
608 if (NULL == gTrack)
continue;
614 if (stsInd < 0)
continue;
616 if (stsTrack == NULL)
continue;
619 if (stsMatch == NULL)
continue;
622 if (stsMcTrackId < 0)
continue;
624 if (mcTrack1 == NULL)
continue;
628 TVector3 refittedMomentum;
630 vector<CbmStsTrack> stsTracks;
632 stsTracks[0] = *stsTrack;
633 vector<L1FieldRegion> vField;
634 vector<float> chiPrim;
638 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
639 vtxTrack->Momentum(refittedMomentum);
645 vector<CbmStsTrack> stsTracks_electron;
646 stsTracks_electron.resize(1);
647 stsTracks_electron[0] = *stsTrack;
648 vector<L1FieldRegion> vField_electron;
649 vector<float> chiPrim_electron;
650 vector<int> pidHypo_electron;
651 pidHypo_electron.push_back(11);
652 fPFFitter_electron.
Fit(stsTracks_electron, pidHypo_electron);
654 stsTracks_electron, vField_electron, chiPrim_electron,
fKFVertex, 3e6);
656 TVector3 refittedMomentum_electron;
657 const FairTrackParam* vtxTrack_electron =
658 stsTracks_electron[0].GetParamFirst();
659 vtxTrack_electron->Momentum(refittedMomentum_electron);
660 float result_chi_electron = chiPrim_electron[0];
671 if (result_chi_electron > chiCut)
continue;
683 Bool_t WithRichSignal =
false;
705 if (richMatch != NULL) {
707 if (richMcTrackId >= 0) {
709 if (mcTrack2 != NULL) {
712 Bool_t electron_rich =
714 i, refittedMomentum_electron.Mag());
721 WithRichSignal =
true;
747 <<
"CbmAnaConversionTest: CombineElectrons_FromSTSandRICH, nof sts/rich - "
748 << nof_sts <<
" / " << nof_rich << endl;
749 Int_t nofPhotons = 0;
750 if (nof_sts + nof_rich >= 2) {
751 for (
int a = 0; a < nof_sts; a++) {
752 for (
int b = 0; b < nof_rich; b++) {
758 Int_t test = check1 + check2;
759 if (test != 1)
continue;
770 Double_t openingAngleCut = 1.8 - 0.6 * paramsTest.
fPt;
773 Double_t invMassCut = 0.03;
775 Int_t IsPhoton_openingAngle1 = (paramsTest.
fAngle < openingAngleCut);
776 Int_t IsPhoton_invMass1 = (paramsTest.
fMinv < invMassCut);
779 if (IsPhoton_openingAngle1 && IsPhoton_invMass1) {
787 vector<TVector3> pairmomenta;
791 vector<Double_t> ann;
807 cout <<
"CbmAnaConversionTest: CombineElectronsFromSTSandRICH: Crosscheck - "
808 "nof reconstructed photons: "
809 << nofPhotons << endl;
815 cout <<
"CbmAnaConversionTest: CombineElectronsFromRICH, nof - " << nof
817 Int_t nofPhotons = 0;
819 for (
int a = 0; a < nof - 1; a++) {
820 for (
int b = a + 1; b < nof; b++) {
826 Int_t test = check1 + check2;
827 if (test != 1)
continue;
837 Double_t openingAngleCut = 1.8 - 0.6 * paramsTest.
fPt;
840 Double_t invMassCut = 0.03;
842 Int_t IsPhoton_openingAngle1 = (paramsTest.
fAngle < openingAngleCut);
843 Int_t IsPhoton_invMass1 = (paramsTest.
fMinv < invMassCut);
846 if (IsPhoton_openingAngle1 && IsPhoton_invMass1) {
854 vector<TVector3> pairmomenta;
858 vector<Double_t> ann;
875 cout <<
"CbmAnaConversionTest: CombineElectronsFromRICH: Crosscheck - nof "
876 "reconstructed photons: "
877 << nofPhotons << endl;
884 cout <<
"CbmAnaConversionTest: CombinePhotons, nof - " << nof_STSandRICH
885 <<
"/" << nof_RICH << endl;
887 if (nof_STSandRICH + nof_RICH >= 2) {
888 for (
int a = 0; a < nof_STSandRICH; a++) {
889 for (
int b = 0; b < nof_RICH; b++) {
904 if (gtIndex11 == gtIndex12 || gtIndex11 == gtIndex21
905 || gtIndex11 == gtIndex22 || gtIndex12 == gtIndex21
906 || gtIndex12 == gtIndex22 || gtIndex21 == gtIndex22) {
908 cout <<
"CbmAnaConversionTest: Test_DoubleIndex." << endl;
921 Double_t invmass = paramsTest.
fMinv;
929 Double_t OpeningAngleGG =
935 if (OpeningAngleGG > 15 && OpeningAngleGG < 45)
956 cout <<
"CbmAnaConversionTest: CombinePhotons, anns: " << ANNe11 <<
"/"
957 << ANNe12 <<
"/" << ANNe21 <<
"/" << ANNe22 << endl;
960 if (ANNe12 > -1 && ANNe21 > -1 && ANNe22 > -1)
962 if (ANNe12 > -0.9 && ANNe21 > -0.9 && ANNe22 > -0.9)
964 if (ANNe12 > -0.8 && ANNe21 > -0.8 && ANNe22 > -0.8)
966 if (ANNe12 > -0.7 && ANNe21 > -0.7 && ANNe22 > -0.7)
968 if (ANNe12 > -0.6 && ANNe21 > -0.6 && ANNe22 > -0.6)
970 if (ANNe12 > -0.5 && ANNe21 > -0.5 && ANNe22 > -0.5)
972 if (ANNe12 > 0.0 && ANNe21 > 0.0 && ANNe22 > 0.0)
976 cout <<
"CbmAnaConversionTest: CombinePhotons, photon combined! "
977 << invmass <<
"/" << gtIndex11 <<
"/" << gtIndex12 <<
"/"
978 << gtIndex21 <<
"/" << gtIndex22 << endl;
1017 Int_t motherpdg11 = -2;
1019 Int_t motherpdg21 = -2;
1021 if (mothermctrack11 != NULL)
1024 if (mothermctrack21 != NULL)
1028 Int_t grandmotherId11 = -2;
1029 Int_t grandmotherId12 = -2;
1030 Int_t grandmotherId21 = -2;
1031 Int_t grandmotherId22 = -2;
1032 if (mothermctrack11 != NULL)
1034 if (mothermctrack12 != NULL)
1036 if (mothermctrack21 != NULL)
1038 if (mothermctrack22 != NULL)
1042 Int_t sameGrandmothers1 = 0;
1043 Int_t sameGrandmothers2 = 0;
1044 Int_t sameGrandmothers3 = 0;
1045 Int_t sameGrandmothers4 = 0;
1046 if (grandmotherId11 == grandmotherId12) sameGrandmothers1++;
1047 if (grandmotherId11 == grandmotherId21) sameGrandmothers1++;
1048 if (grandmotherId11 == grandmotherId22) sameGrandmothers1++;
1049 if (grandmotherId12 == grandmotherId11) sameGrandmothers2++;
1050 if (grandmotherId12 == grandmotherId21) sameGrandmothers2++;
1051 if (grandmotherId12 == grandmotherId22) sameGrandmothers2++;
1052 if (grandmotherId21 == grandmotherId11) sameGrandmothers3++;
1053 if (grandmotherId21 == grandmotherId12) sameGrandmothers3++;
1054 if (grandmotherId21 == grandmotherId22) sameGrandmothers3++;
1055 if (grandmotherId22 == grandmotherId11) sameGrandmothers4++;
1056 if (grandmotherId22 == grandmotherId12) sameGrandmothers4++;
1057 if (grandmotherId22 == grandmotherId21) sameGrandmothers4++;
1058 Int_t sameGrandmothersSum = sameGrandmothers1 + sameGrandmothers2
1059 + sameGrandmothers3 + sameGrandmothers4;
1061 Int_t sameMothers1 = 0;
1062 Int_t sameMothers2 = 0;
1063 Int_t sameMothers3 = 0;
1064 Int_t sameMothers4 = 0;
1065 if (motherId11 == motherId12) sameMothers1++;
1066 if (motherId11 == motherId21) sameMothers1++;
1067 if (motherId11 == motherId22) sameMothers1++;
1068 if (motherId12 == motherId11) sameMothers2++;
1069 if (motherId12 == motherId21) sameMothers2++;
1070 if (motherId12 == motherId22) sameMothers2++;
1071 if (motherId21 == motherId11) sameMothers3++;
1072 if (motherId21 == motherId12) sameMothers3++;
1073 if (motherId21 == motherId22) sameMothers3++;
1074 if (motherId22 == motherId11) sameMothers4++;
1075 if (motherId22 == motherId12) sameMothers4++;
1076 if (motherId22 == motherId21) sameMothers4++;
1077 Int_t sameMothersSum =
1078 sameMothers1 + sameMothers2 + sameMothers3 + sameMothers4;
1082 motherId11 == motherId12
1086 if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22) {
1089 if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22
1090 && grandmotherId11 == grandmotherId21
1091 && grandmotherId11 > 0) {
1098 if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22
1099 && grandmotherId11 != grandmotherId21) {
1102 if ((TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 111)
1103 || (TMath::Abs(motherpdg11) == 111
1104 && TMath::Abs(motherpdg21) == 22)) {
1106 if (grandmotherId11 == motherId21
1107 || motherId11 == grandmotherId21) {
1112 if (TMath::Abs(motherpdg11) == 111
1113 && TMath::Abs(motherpdg21) == 111) {
1116 if ((TMath::Abs(motherpdg11) != 22 && TMath::Abs(motherpdg11) != 111)
1117 || (TMath::Abs(motherpdg21) != 22
1118 && TMath::Abs(motherpdg21) != 111)) {
1121 if (TMath::Abs(motherpdg11) != 22 && TMath::Abs(motherpdg11) != 111
1122 && TMath::Abs(motherpdg21) != 22
1123 && TMath::Abs(motherpdg21) != 111) {
1126 if (grandmotherId11 == grandmotherId21) {
1130 if ((motherId11 == motherId12 && motherId21 != motherId22)
1131 || (motherId11 != motherId12 && motherId21 == motherId22)) {
1134 if (motherId11 != motherId12 && motherId21 != motherId22) {
1136 if (sameGrandmothersSum == 12)
1138 if (sameGrandmothersSum == 6)
1140 if (sameGrandmothersSum == 4) {
1142 if (grandmotherId11 < 0 || grandmotherId12 < 0
1143 || grandmotherId21 < 0 || grandmotherId22 < 0) {
1146 if (grandmotherId11 == grandmotherId12) {
1149 if (grandmotherId11 != grandmotherId12) {
1153 if (sameGrandmothersSum == 2)
1155 if (sameGrandmothersSum == 0)
1159 if ((grandmotherId11 < 0 || grandmotherId12 < 0 || grandmotherId21 < 0
1160 || grandmotherId22 < 0)
1161 && sameGrandmothersSum == 12) {
1177 const TVector3 electron2) {
1180 Double_t energyP = TMath::Sqrt(electron1.Mag2() +
M2E);
1181 TLorentzVector lorVecP(electron1, energyP);
1183 Double_t energyM = TMath::Sqrt(electron2.Mag2() +
M2E);
1184 TLorentzVector lorVecM(electron2, energyM);
1186 TVector3 momPair = electron1 + electron2;
1187 Double_t energyPair = energyP + energyM;
1188 Double_t ptPair = momPair.Perp();
1189 Double_t pzPair = momPair.Pz();
1191 0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
1192 Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
1193 Double_t theta = 180. * anglePair /
TMath::Pi();
1194 Double_t minv = 2. * TMath::Sin(anglePair / 2.)
1195 * TMath::Sqrt(electron1.Mag() * electron2.Mag());
1198 params.
fPt = ptPair;
1200 params.
fMinv = minv;
1207 const TVector3 part2,
1208 const TVector3 part3,
1209 const TVector3 part4)
1212 Double_t energy1 = TMath::Sqrt(part1.Mag2() +
M2E);
1213 TLorentzVector lorVec1(part1, energy1);
1215 Double_t energy2 = TMath::Sqrt(part2.Mag2() +
M2E);
1216 TLorentzVector lorVec2(part2, energy2);
1218 Double_t energy3 = TMath::Sqrt(part3.Mag2() +
M2E);
1219 TLorentzVector lorVec3(part3, energy3);
1221 Double_t energy4 = TMath::Sqrt(part4.Mag2() +
M2E);
1222 TLorentzVector lorVec4(part4, energy4);
1225 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1233 cout <<
"CbmAnaConversionTest: CombineElectrons_STSonly, nof - " << nof
1235 Int_t nofPhotons = 0;
1237 for (
int a = 0; a < nof - 1; a++) {
1238 for (
int b = a + 1; b < nof; b++) {
1242 Int_t check2 = (
fVector_gt[b]->GetParamLast()->GetQp() > 0);
1243 Int_t test = check1 + check2;
1244 if (test != 1)
continue;
1253 Double_t openingAngleCut = 1.8 - 0.6 * paramsTest.
fPt;
1254 Double_t invMassCut = 0.03;
1256 Int_t IsPhoton_openingAngle1 = (paramsTest.
fAngle < openingAngleCut);
1257 Int_t IsPhoton_invMass1 = (paramsTest.
fMinv < invMassCut);
1260 if (IsPhoton_openingAngle1 && IsPhoton_invMass1) {
1269 vector<TVector3> pairmomenta;
1274 vector<bool> pair_hasRichInd;
1289 cout <<
"CbmAnaConversionTest: CombinePhotons_STSonly, nof - " << nof << endl;
1299 for (
int a = 0; a < nof - 1; a++) {
1300 for (
int b = a + 1; b < nof; b++) {
1320 if (gtIndex11 == gtIndex12 || gtIndex11 == gtIndex21
1321 || gtIndex11 == gtIndex22 || gtIndex12 == gtIndex21
1322 || gtIndex12 == gtIndex22 || gtIndex21 == gtIndex22) {
1336 Double_t invmass = paramsTest.
fMinv;
1345 if (nofRICHindices == 0) {
1349 if (nofRICHindices == 1) {
1353 if (nofRICHindices == 2) {
1357 if (nofRICHindices == 3) {
1362 if (nofRICHindices == 4) {
1371 cout <<
"CbmAnaConversionTest: CombinePhotons_STSonly, nofPi0 - " << nofPi0
1372 <<
"/" << nofPi0_0 <<
"/" << nofPi0_1 <<
"/" << nofPi0_2 <<
"/"
1373 << nofPi0_3 <<
"/" << nofPi0_4 << endl;
1379 if (NULL == gTrack)
return false;
1383 if (stsInd < 0)
return false;
1385 if (stsTrack == NULL)
return false;
1387 if (stsMatch == NULL)
return false;
1390 if (stsMcTrackId < 0)
return false;
1392 if (mcTrack1 == NULL)
return false;
1394 if (richInd < 0)
return false;
1397 if (richMatch == NULL)
return false;
1399 if (richMcTrackId < 0)
return false;
1401 if (mcTrack2 == NULL)
return false;
1441 return electron_rich;
1452 for (Int_t a = 0; a < nof - 1; a++) {
1453 for (Int_t b = a + 1; b < nof; b++) {
1467 e11, e12, e21, e22);
1477 Double_t OpeningAngleGG =
1479 e11, e12, e21, e22);
1480 if (OpeningAngleGG > 15 && OpeningAngleGG < 45)
1489 if (ANNe12 > -1 && ANNe21 > -1 && ANNe22 > -1)
1491 if (ANNe12 > -0.9 && ANNe21 > -0.9 && ANNe22 > -0.9)
1493 if (ANNe12 > -0.8 && ANNe21 > -0.8 && ANNe22 > -0.8)
1495 if (ANNe12 > -0.7 && ANNe21 > -0.7 && ANNe22 > -0.7)
1497 if (ANNe12 > -0.6 && ANNe21 > -0.6 && ANNe22 > -0.6)
1499 if (ANNe12 > -0.5 && ANNe21 > -0.5 && ANNe22 > -0.5)
1501 if (ANNe12 > -0.0 && ANNe21 > -0.0 && ANNe22 > -0.0)
1510 for (Int_t a = 0; a < nof - 1; a++) {
1511 for (Int_t b = a + 1; b < nof; b++) {
1524 Int_t IsRichSum = IsRich11 + IsRich12 + IsRich21 + IsRich22;
1529 e11, e12, e21, e22);
1531 if (IsRichSum == 2) {
1534 if (IsRichSum == 3) {
1537 if (IsRichSum == 4) {
1546 Double_t momentum) {
1552 if (richId < 0)
return -2;
1554 if (NULL == ring)
return -2;
1557 globalTrackIndex, momentum);