24 #include "FairRootManager.h"
29 #include "TProfile2D.h"
38 , fGlobalTracks(nullptr)
40 , fStsTrackMatches(nullptr)
42 , fRichRingMatches(nullptr)
46 , STS_and_RICH_refmomentum()
47 , STS_and_RICH_MCtrack()
50 , ConversionPoints2D(nullptr)
51 , ConversionPoints3D(nullptr)
52 , fHistoList_reco_STS_gg()
53 , fHistoList_reco_STS_and_RICH_gg()
54 , fHistoList_reco_STS_gee()
55 , fHistoList_reco_STS_and_RICH_gee()
56 , fHistoList_reco_STS_eeee()
57 , fHistoList_reco_STS_and_RICH_eeee()
58 , STS_InvMass_eeee_mc(nullptr)
59 , STS_InvMass_eeee_refitted(nullptr)
60 , STSRICH_InvMass_eeee_mc(nullptr)
61 , STSRICH_InvMass_eeee_refitted(nullptr)
62 , STS_InvMass_gee_mc(nullptr)
63 , STS_InvMass_gee_refitted(nullptr)
64 , STS_InvMass_realg_gee_reffited(nullptr)
65 , STS_InvMass_img_gee_refitted(nullptr)
66 , STS_OpeningAngle_realg_gee_mc(nullptr)
67 , STS_OpeningAngle_realg_gee_reffited(nullptr)
68 , STS_OpeningAngle_img_gee_mc(nullptr)
69 , STS_OpeningAngle_img_gee_reffited(nullptr)
70 , STSRICH_InvMass_gee_mc(nullptr)
71 , STSRICH_InvMass_gee_refitted(nullptr)
72 , STSRICH_InvMass_realg_gee_reffited(nullptr)
73 , STSRICH_InvMass_img_gee_refitted(nullptr)
74 , STSRICH_OpeningAngle_realg_gee_mc(nullptr)
75 , STSRICH_OpeningAngle_realg_gee_reffited(nullptr)
76 , STSRICH_OpeningAngle_img_gee_mc(nullptr)
77 , STSRICH_OpeningAngle_img_gee_reffited(nullptr)
78 , STS_InvMass_gg_mc(nullptr)
79 , STS_InvMass_gg_reffited(nullptr)
80 , STS_InvMass_realg_gg_mc(nullptr)
81 , STS_InvMass_realg_gg_reffited(nullptr)
82 , STS_OpeningAngle_realg_gg_mc(nullptr)
83 , STS_OpeningAngle_realg_gg_reffited(nullptr)
84 , STS_OpeningAngle_between_gg_mc(nullptr)
85 , STS_OpeningAngle_between_gg_reffited(nullptr)
86 , STSRICH_InvMass_gg_mc(nullptr)
87 , STSRICH_InvMass_gg_reffited(nullptr)
88 , STSRICH_InvMass_realg_gg_mc(nullptr)
89 , STSRICH_InvMass_realg_gg_reffited(nullptr)
90 , STSRICH_OpeningAngle_realg_gg_mc(nullptr)
91 , STSRICH_OpeningAngle_realg_gg_reffited(nullptr)
92 , STSRICH_OpeningAngle_between_gg_mc(nullptr)
93 , STSRICH_OpeningAngle_between_gg_reffited(nullptr) {}
100 FairRootManager* ioman = FairRootManager::Instance();
101 if (
nullptr == ioman) {
102 Fatal(
"CbmKresConversionReconstruction::Init",
103 "RootManager not instantised!");
106 fMcTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
108 Fatal(
"CbmKresConversionReconstruction::Init",
"No MCTrack array!");
111 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
113 Fatal(
"CbmKresConversionReconstruction::Init",
"No GlobalTrack array!");
116 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
118 Fatal(
"CbmKresConversionReconstruction::Init",
"No StsTrack array!");
123 Fatal(
"CbmKresConversionReconstruction::Init",
"No StsTrackMatch array!");
126 fRichRings = (TClonesArray*) ioman->GetObject(
"RichRing");
128 Fatal(
"CbmKresConversionReconstruction::Init",
"No RichRing array!");
133 Fatal(
"CbmKresConversionReconstruction::Init",
"No RichRingMatch array!");
150 for (Int_t iTr = 0; iTr < ngTracks; iTr++) {
152 if (
nullptr == gTrack)
continue;
158 if (stsInd < 0)
continue;
160 if (stsTrack ==
nullptr)
continue;
163 if (stsMatch ==
nullptr)
continue;
166 if (stsMcTrackId < 0)
continue;
168 if (mcTrackSTS ==
nullptr)
continue;
171 if (TMath::Abs(pdgSTS) != 11)
continue;
176 if (motherIdSTS == -1)
continue;
178 if (mcTrackMotherSTS ==
nullptr)
continue;
182 }
else if (mcTrackMotherSTS->
GetPdgCode() == 22) {
183 if (mcTrackMotherSTS->
GetMotherId() == -1)
continue;
186 if (mcTrackMotherOfGammaSTS->
GetPdgCode() != 111)
continue;
196 TVector3 refmomentum =
204 STS_Id.push_back(stsMcTrackId);
209 if (richInd < 0)
continue;
211 if (richRing ==
nullptr)
continue;
214 if (richMatch ==
nullptr)
continue;
217 if (richMcTrackId < 0)
continue;
219 if (mcTrackRICH ==
nullptr)
continue;
221 if (TMath::Abs(pdgRICH) != 11)
continue;
225 if (stsMcTrackId != richMcTrackId)
continue;
249 vector<CbmMCTrack*> MC,
254 Int_t fDecayedParticlePdg = 111;
256 if (MC.size() < 4)
return;
258 for (
size_t i = 0;
i < MC.size();
i++) {
259 for (
size_t j =
i + 1; j < MC.size(); j++) {
260 for (
size_t k = j + 1; k < MC.size(); k++) {
261 for (
size_t l = k + 1; l < MC.size(); l++) {
263 if (MC.at(
i)->GetPdgCode() + MC.at(j)->GetPdgCode()
264 + MC.at(k)->GetPdgCode() + MC.at(l)->GetPdgCode()
268 int motherId1 = MC.at(
i)->GetMotherId();
269 int motherId2 = MC.at(j)->GetMotherId();
270 int motherId3 = MC.at(k)->GetMotherId();
271 int motherId4 = MC.at(l)->GetMotherId();
273 int STSmcId1 = Id.at(
i);
274 int STSmcId2 = Id.at(j);
275 int STSmcId3 = Id.at(k);
276 int STSmcId4 = Id.at(l);
277 if (STSmcId1 == STSmcId2 || STSmcId1 == STSmcId3
278 || STSmcId1 == STSmcId4 || STSmcId2 == STSmcId3
279 || STSmcId2 == STSmcId4 || STSmcId3 == STSmcId4)
283 if (motherId1 == motherId2 && motherId1 == motherId3
284 && motherId1 == motherId4) {
285 if (motherId1 != -1) {
287 if (
nullptr == mother1)
continue;
289 if (mcMotherPdg1 == fDecayedParticlePdg) {
291 MC.at(
i), MC.at(j), MC.at(k), MC.at(l));
292 Double_t InvMass_reco =
294 RefMom.at(
i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
295 cout <<
"Decay pi0 -> e+e-e+e- detected!\t\t mc mass: "
296 << InvMass_true <<
" \t reco mass: " << InvMass_reco
298 cout <<
"motherIds: " << motherId1 <<
"/" << motherId2 <<
"/"
299 << motherId3 <<
"/" << motherId4
300 <<
"\t motherpdg: " << mcMotherPdg1
301 <<
"\t mctrack mass: " << mother1->
GetMass() << endl;
302 cout <<
"pdgs: " << MC.at(
i)->GetPdgCode() <<
"/"
303 << MC.at(j)->GetPdgCode() <<
"/" << MC.at(k)->GetPdgCode()
304 <<
"/" << MC.at(l)->GetPdgCode() << endl;
305 eeee[0]->Fill(InvMass_true);
306 eeee[1]->Fill(InvMass_reco);
313 if ((motherId1 == motherId2 && motherId3 == motherId4)
314 || (motherId1 == motherId3 && motherId2 == motherId4)
315 || (motherId1 == motherId4 && motherId2 == motherId3)) {
317 int grandmotherId1 = -1;
318 int grandmotherId2 = -1;
319 int grandmotherId3 = -1;
320 int grandmotherId4 = -1;
322 int mcMotherPdg1 = -1;
323 int mcMotherPdg2 = -1;
324 int mcMotherPdg3 = -1;
326 int mcGrandmotherPdg1 = -1;
333 if (motherId1 == -1 || motherId2 == -1 || motherId3 == -1
337 if (
nullptr != mother1) mcMotherPdg1 = mother1->
GetPdgCode();
339 if (grandmotherId1 != -1) {
341 if (
nullptr != grandmother1)
342 mcGrandmotherPdg1 = grandmother1->
GetPdgCode();
345 if (
nullptr != mother2) mcMotherPdg2 = mother2->
GetPdgCode();
348 if (
nullptr != mother3) mcMotherPdg3 = mother3->
GetPdgCode();
354 if (motherId1 == motherId2 && motherId3 == motherId4) {
358 if ((grandmotherId1 == motherId3
359 && mcMotherPdg3 == fDecayedParticlePdg)
360 || (motherId1 == grandmotherId3
361 && mcMotherPdg1 == fDecayedParticlePdg)) {
363 MC.at(
i), MC.at(j), MC.at(k), MC.at(l));
364 Double_t InvMass_reco =
366 RefMom.at(
i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
367 cout <<
"Decay pi0 -> gamma(e+e-) e+e- detected!\t\t mc mass: "
368 << InvMass_true <<
"\t, reco mass: " << InvMass_reco
370 cout <<
"motherids: " << motherId1 <<
"/" << motherId2 <<
"/"
371 << motherId3 <<
"/" << motherId4 << endl;
372 cout <<
"pdgs " << MC.at(
i)->GetPdgCode() <<
"/"
373 << MC.at(j)->GetPdgCode() <<
"/" << MC.at(k)->GetPdgCode()
374 <<
"/" << MC.at(l)->GetPdgCode() << endl;
376 gee[0]->Fill(InvMass_true);
377 gee[1]->Fill(InvMass_reco);
380 MC.at(
i)->GetStartVertex(start1);
382 MC.at(j)->GetStartVertex(start2);
384 MC.at(k)->GetStartVertex(start3);
386 MC.at(l)->GetStartVertex(start4);
387 cout <<
"start: " << start1.Z() <<
"/" << start2.Z() <<
"/"
388 << start3.Z() <<
"/" << start4.Z() << endl;
392 == fDecayedParticlePdg) {
393 Double_t InvMass_realg =
396 Double_t InvMass_img =
399 gee[2]->Fill(InvMass_realg);
400 gee[3]->Fill(InvMass_img);
402 Double_t OpeningAngle_realg_mc =
405 Double_t OpeningAngle_realg_refitted =
408 gee[4]->Fill(OpeningAngle_realg_mc);
409 gee[5]->Fill(OpeningAngle_realg_refitted);
411 Double_t OpeningAngle_img_mc =
414 Double_t OpeningAngle_img_refitted =
417 gee[6]->Fill(OpeningAngle_img_mc);
418 gee[7]->Fill(OpeningAngle_img_refitted);
422 == fDecayedParticlePdg) {
423 Double_t InvMass_realg =
426 Double_t InvMass_img =
429 gee[2]->Fill(InvMass_realg);
430 gee[3]->Fill(InvMass_img);
432 Double_t OpeningAngle_realg_mc =
435 Double_t OpeningAngle_realg_refitted =
438 gee[4]->Fill(OpeningAngle_realg_mc);
439 gee[5]->Fill(OpeningAngle_realg_refitted);
441 Double_t OpeningAngle_img_mc =
444 Double_t OpeningAngle_img_refitted =
447 gee[6]->Fill(OpeningAngle_img_mc);
448 gee[7]->Fill(OpeningAngle_img_refitted);
453 if (motherId1 == motherId3 && motherId2 == motherId4) {
457 if ((grandmotherId1 == motherId2
458 && mcMotherPdg2 == fDecayedParticlePdg)
459 || (motherId1 == grandmotherId2
460 && mcMotherPdg1 == fDecayedParticlePdg)) {
462 MC.at(
i), MC.at(j), MC.at(k), MC.at(l));
463 Double_t InvMass_reco =
465 RefMom.at(
i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
466 cout <<
"Decay pi0 -> gamma(e+e-) e+e- detected!\t\t mc mass: "
467 << InvMass_true <<
"\t, reco mass: " << InvMass_reco
469 cout <<
"motherids: " << motherId1 <<
"/" << motherId2 <<
"/"
470 << motherId3 <<
"/" << motherId4 << endl;
471 cout <<
"pdgs " << MC.at(
i)->GetPdgCode() <<
"/"
472 << MC.at(j)->GetPdgCode() <<
"/" << MC.at(k)->GetPdgCode()
473 <<
"/" << MC.at(l)->GetPdgCode() << endl;
475 gee[0]->Fill(InvMass_true);
476 gee[1]->Fill(InvMass_reco);
479 MC.at(
i)->GetStartVertex(start1);
481 MC.at(j)->GetStartVertex(start2);
483 MC.at(k)->GetStartVertex(start3);
485 MC.at(l)->GetStartVertex(start4);
486 cout <<
"start: " << start1.Z() <<
"/" << start2.Z() <<
"/"
487 << start3.Z() <<
"/" << start4.Z() << endl;
491 == fDecayedParticlePdg) {
492 Double_t InvMass_realg =
495 Double_t InvMass_img =
498 gee[2]->Fill(InvMass_realg);
499 gee[3]->Fill(InvMass_img);
501 Double_t OpeningAngle_realg_mc =
504 Double_t OpeningAngle_realg_refitted =
507 gee[4]->Fill(OpeningAngle_realg_mc);
508 gee[5]->Fill(OpeningAngle_realg_refitted);
510 Double_t OpeningAngle_img_mc =
513 Double_t OpeningAngle_img_refitted =
516 gee[6]->Fill(OpeningAngle_img_mc);
517 gee[7]->Fill(OpeningAngle_img_refitted);
521 == fDecayedParticlePdg) {
522 Double_t InvMass_realg =
525 Double_t InvMass_img =
528 gee[2]->Fill(InvMass_realg);
529 gee[3]->Fill(InvMass_img);
531 Double_t OpeningAngle_realg_mc =
534 Double_t OpeningAngle_realg_refitted =
537 gee[4]->Fill(OpeningAngle_realg_mc);
538 gee[5]->Fill(OpeningAngle_realg_refitted);
540 Double_t OpeningAngle_img_mc =
543 Double_t OpeningAngle_img_refitted =
546 gee[6]->Fill(OpeningAngle_img_mc);
547 gee[7]->Fill(OpeningAngle_img_refitted);
552 if (motherId1 == motherId4 && motherId2 == motherId3) {
556 if ((grandmotherId1 == motherId2
557 && mcMotherPdg2 == fDecayedParticlePdg)
558 || (motherId1 == grandmotherId2
559 && mcMotherPdg1 == fDecayedParticlePdg)) {
561 MC.at(
i), MC.at(j), MC.at(k), MC.at(l));
562 Double_t InvMass_reco =
564 RefMom.at(
i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
565 cout <<
"Decay pi0 -> gamma(e+e-) e+e- detected!\t\t mc mass: "
566 << InvMass_true <<
"\t, reco mass: " << InvMass_reco
568 cout <<
"motherids: " << motherId1 <<
"/" << motherId2 <<
"/"
569 << motherId3 <<
"/" << motherId4 << endl;
570 cout <<
"pdgs " << MC.at(
i)->GetPdgCode() <<
"/"
571 << MC.at(j)->GetPdgCode() <<
"/" << MC.at(k)->GetPdgCode()
572 <<
"/" << MC.at(l)->GetPdgCode() << endl;
574 gee[0]->Fill(InvMass_true);
575 gee[1]->Fill(InvMass_reco);
578 MC.at(
i)->GetStartVertex(start1);
580 MC.at(j)->GetStartVertex(start2);
582 MC.at(k)->GetStartVertex(start3);
584 MC.at(l)->GetStartVertex(start4);
585 cout <<
"start: " << start1.Z() <<
"/" << start2.Z() <<
"/"
586 << start3.Z() <<
"/" << start4.Z() << endl;
590 == fDecayedParticlePdg) {
591 Double_t InvMass_realg =
594 Double_t InvMass_img =
597 gee[2]->Fill(InvMass_realg);
598 gee[3]->Fill(InvMass_img);
600 Double_t OpeningAngle_realg_mc =
603 Double_t OpeningAngle_realg_refitted =
606 gee[4]->Fill(OpeningAngle_realg_mc);
607 gee[5]->Fill(OpeningAngle_realg_refitted);
609 Double_t OpeningAngle_img_mc =
612 Double_t OpeningAngle_img_refitted =
615 gee[6]->Fill(OpeningAngle_img_mc);
616 gee[7]->Fill(OpeningAngle_img_refitted);
620 == fDecayedParticlePdg) {
621 Double_t InvMass_realg =
624 Double_t InvMass_img =
627 gee[2]->Fill(InvMass_realg);
628 gee[3]->Fill(InvMass_img);
630 Double_t OpeningAngle_realg_mc =
633 Double_t OpeningAngle_realg_refitted =
636 gee[4]->Fill(OpeningAngle_realg_mc);
637 gee[5]->Fill(OpeningAngle_realg_refitted);
639 Double_t OpeningAngle_img_mc =
642 Double_t OpeningAngle_img_refitted =
645 gee[6]->Fill(OpeningAngle_img_mc);
646 gee[7]->Fill(OpeningAngle_img_refitted);
653 if (grandmotherId1 == grandmotherId2
654 && grandmotherId1 == grandmotherId3
655 && grandmotherId1 == grandmotherId4) {
656 if (mcGrandmotherPdg1 != fDecayedParticlePdg)
continue;
658 MC.at(
i), MC.at(j), MC.at(k), MC.at(l));
660 RefMom.at(
i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
661 cout <<
"Decay pi0 -> gamma gamma -> e+e- e+e- detected!\t\t mc "
663 << InvMass_true <<
"\t, reco mass: " << InvMass_reco << endl;
664 cout <<
"motherids: " << motherId1 <<
"/" << motherId2 <<
"/"
665 << motherId3 <<
"/" << motherId4 << endl;
666 cout <<
"grandmotherid: " << grandmotherId1 <<
"/"
667 << grandmotherId2 <<
"/" << grandmotherId3 <<
"/"
668 << grandmotherId4 << endl;
669 cout <<
"pdgs " << MC.at(
i)->GetPdgCode() <<
"/"
670 << MC.at(j)->GetPdgCode() <<
"/" << MC.at(k)->GetPdgCode()
671 <<
"/" << MC.at(l)->GetPdgCode() << endl;
673 gg[0]->Fill(InvMass_true);
674 gg[1]->Fill(InvMass_reco);
676 cout <<
"\t \t mc true info: " << endl;
677 cout <<
"particle 1: \t" << MC.at(
i)->GetPdgCode()
678 <<
";\t pt = " << MC.at(
i)->GetPt()
679 <<
";\t X = " << MC.at(
i)->GetStartX()
680 <<
";\t Y = " << MC.at(
i)->GetStartY()
681 <<
";\t Z = " << MC.at(
i)->GetStartZ()
682 <<
";\t E = " << MC.at(
i)->GetEnergy() << endl;
683 cout <<
"particle 2: \t" << MC.at(j)->GetPdgCode()
684 <<
";\t pt = " << MC.at(j)->GetPt()
685 <<
";\t X = " << MC.at(j)->GetStartX()
686 <<
";\t Y = " << MC.at(j)->GetStartY()
687 <<
";\t Z = " << MC.at(j)->GetStartZ()
688 <<
";\t E = " << MC.at(j)->GetEnergy() << endl;
689 cout <<
"particle 3: \t" << MC.at(k)->GetPdgCode()
690 <<
";\t pt = " << MC.at(k)->GetPt()
691 <<
";\t X = " << MC.at(k)->GetStartX()
692 <<
";\t Y = " << MC.at(k)->GetStartY()
693 <<
";\t Z = " << MC.at(k)->GetStartZ()
694 <<
";\t E = " << MC.at(k)->GetEnergy() << endl;
695 cout <<
"particle 4: \t" << MC.at(l)->GetPdgCode()
696 <<
";\t pt = " << MC.at(l)->GetPt()
697 <<
";\t X = " << MC.at(l)->GetStartX()
698 <<
";\t Y = " << MC.at(l)->GetStartY()
699 <<
";\t Z = " << MC.at(l)->GetStartZ()
700 <<
";\t E = " << MC.at(l)->GetEnergy() << endl;
702 Double_t OpeningAngle1_mc = 0;
703 Double_t OpeningAngle2_mc = 0;
704 Double_t OpeningAngle1_refitted = 0;
705 Double_t OpeningAngle2_refitted = 0;
706 Double_t InvMass_realg1_mc = 0;
707 Double_t InvMass_realg2_mc = 0;
708 Double_t InvMass_realg1_refitted = 0;
709 Double_t InvMass_realg2_refitted = 0;
711 if (motherId1 == motherId2) {
716 gg[4]->Fill(OpeningAngle1_mc);
717 gg[4]->Fill(OpeningAngle2_mc);
718 OpeningAngle1_refitted =
721 OpeningAngle2_refitted =
724 gg[5]->Fill(OpeningAngle1_refitted);
725 gg[5]->Fill(OpeningAngle2_refitted);
731 gg[2]->Fill(InvMass_realg1_mc);
732 gg[2]->Fill(InvMass_realg2_mc);
733 InvMass_realg1_refitted =
736 InvMass_realg2_refitted =
739 gg[3]->Fill(InvMass_realg1_refitted);
740 gg[3]->Fill(InvMass_realg2_refitted);
742 if (motherId1 == motherId3) {
747 gg[4]->Fill(OpeningAngle1_mc);
748 gg[4]->Fill(OpeningAngle2_mc);
749 OpeningAngle1_refitted =
752 OpeningAngle2_refitted =
755 gg[5]->Fill(OpeningAngle1_refitted);
756 gg[5]->Fill(OpeningAngle2_refitted);
762 gg[2]->Fill(InvMass_realg1_mc);
763 gg[2]->Fill(InvMass_realg2_mc);
764 InvMass_realg1_refitted =
767 InvMass_realg2_refitted =
770 gg[3]->Fill(InvMass_realg1_refitted);
771 gg[3]->Fill(InvMass_realg2_refitted);
773 if (motherId1 == motherId4) {
778 gg[4]->Fill(OpeningAngle1_mc);
779 gg[4]->Fill(OpeningAngle2_mc);
780 OpeningAngle1_refitted =
783 OpeningAngle2_refitted =
786 gg[5]->Fill(OpeningAngle1_refitted);
787 gg[5]->Fill(OpeningAngle2_refitted);
793 gg[2]->Fill(InvMass_realg1_mc);
794 gg[2]->Fill(InvMass_realg2_mc);
795 InvMass_realg1_refitted =
798 InvMass_realg2_refitted =
801 gg[3]->Fill(InvMass_realg1_refitted);
802 gg[3]->Fill(InvMass_realg2_refitted);
804 Double_t openingAngleBetweenGammas =
806 MC.at(
i), MC.at(j), MC.at(k), MC.at(l));
807 gg[6]->Fill(openingAngleBetweenGammas);
808 Double_t openingAngleBetweenGammasReco =
810 RefMom.at(
i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
811 gg[7]->Fill(openingAngleBetweenGammasReco);
826 Double_t openingAngle;
827 TLorentzVector gamma1;
828 TLorentzVector gamma2;
852 Double_t angle = gamma1.Angle(gamma2.Vect());
853 openingAngle = 180. * angle /
TMath::Pi();
864 TVector3 electron4) {
865 Double_t energy1 = TMath::Sqrt(electron1.Mag2() +
M2E);
866 TLorentzVector lorVec1(electron1, energy1);
868 Double_t energy2 = TMath::Sqrt(electron2.Mag2() +
M2E);
869 TLorentzVector lorVec2(electron2, energy2);
871 Double_t energy3 = TMath::Sqrt(electron3.Mag2() +
M2E);
872 TLorentzVector lorVec3(electron3, energy3);
874 Double_t energy4 = TMath::Sqrt(electron4.Mag2() +
M2E);
875 TLorentzVector lorVec4(electron4, energy4);
877 TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
878 TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
880 Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
881 Double_t theta = 180. * angleBetweenPhotons /
TMath::Pi();
888 gDirectory->mkdir(
"Reconstruction");
889 gDirectory->cd(
"Reconstruction");
891 gDirectory->mkdir(
"STS");
892 gDirectory->cd(
"STS");
894 gDirectory->mkdir(
"STS_gg");
895 gDirectory->cd(
"STS_gg");
899 gDirectory->cd(
"..");
901 gDirectory->mkdir(
"STS_gee");
902 gDirectory->cd(
"STS_gee");
906 gDirectory->cd(
"..");
908 gDirectory->mkdir(
"STS_eeee");
909 gDirectory->cd(
"STS_eeee");
913 gDirectory->cd(
"..");
914 gDirectory->cd(
"..");
916 gDirectory->mkdir(
"STS_and_RICH");
917 gDirectory->cd(
"STS_and_RICH");
919 gDirectory->mkdir(
"STS_and_RICH_gg");
920 gDirectory->cd(
"STS_and_RICH_gg");
924 gDirectory->cd(
"..");
926 gDirectory->mkdir(
"STS_and_RICH_gee");
927 gDirectory->cd(
"STS_and_RICH_gee");
931 gDirectory->cd(
"..");
933 gDirectory->mkdir(
"STS_and_RICH_eeee");
934 gDirectory->cd(
"STS_and_RICH_eeee");
938 gDirectory->cd(
"..");
939 gDirectory->cd(
"..");
944 gDirectory->cd(
"..");
950 "Conversion Points 2D ; z [cm]; y [cm]",
959 "Conversion Points 3D ; z [cm]; x [cm]; y [cm]",
973 new TH1D(
"STS_InvMass_eeee_mc",
974 "STS_InvMass_eeee_mc; invariant mass in GeV/c^{2};#",
980 new TH1D(
"STS_InvMass_eeee_refitted",
981 "STS_InvMass_eeee_refitted; invariant mass in GeV/c^{2};#",
989 new TH1D(
"STSRICH_InvMass_eeee_mc",
990 "STSRICH_InvMass_eeee_mc; invariant mass in GeV/c^{2};#",
996 new TH1D(
"STSRICH_InvMass_eeee_refitted",
997 "STSRICH_InvMass_eeee_refitted; invariant mass in GeV/c^{2};#",
1005 new TH1D(
"STS_InvMass_gee_mc",
1006 "STS_InvMass_gee_mc; invariant mass in GeV/c^{2};#",
1012 new TH1D(
"STS_InvMass_gee_refitted",
1013 "STS_InvMass_gee_refitted; invariant mass in GeV/c^{2};#",
1019 new TH1D(
"STS_InvMass_realg_gee_reffited",
1020 "STS_InvMass_realg_gee_reffited; invariant mass in GeV/c^{2};#",
1026 new TH1D(
"STS_InvMass_img_gee_refitted",
1027 "STS_InvMass_img_gee_refitted; invariant mass in GeV/c^{2};#",
1033 "STS_OpeningAngle_realg_gee_mc",
1034 "STS_OpeningAngle_realg_gee_mc (between e+e- from #gamma); angle [deg];#",
1040 new TH1D(
"STS_OpeningAngle_realg_gee_reffited",
1041 "STS_OpeningAngle_realg_gee_reffited (between e+e- from #gamma); "
1048 new TH1D(
"STS_OpeningAngle_img_gee_mc",
1049 "STS_OpeningAngle_img_gee_mc (between e+e- from imaginary "
1050 "#gamma); angle [deg];#",
1056 new TH1D(
"STS_OpeningAngle_img_gee_reffited",
1057 "STS_OpeningAngle_img_gee_reffited (between e+e- from imaginary "
1058 "#gamma); angle [deg];#",
1066 new TH1D(
"STSRICH_InvMass_gee_mc",
1067 "STSRICH_InvMass_gee_mc; invariant mass in GeV/c^{2};#",
1073 new TH1D(
"STSRICH_InvMass_gee_refitted",
1074 "STSRICH_InvMass_gee_refitted; invariant mass in GeV/c^{2};#",
1080 "STSRICH_InvMass_realg_gee_reffited",
1081 "STSRICH_InvMass_realg_gee_reffited; invariant mass in GeV/c^{2};#",
1088 new TH1D(
"STSRICH_InvMass_img_gee_refitted",
1089 "STSRICH_InvMass_img_gee_refitted; invariant mass in GeV/c^{2};#",
1095 new TH1D(
"STSRICH_OpeningAngle_realg_gee_mc",
1096 "STSRICH_OpeningAngle_realg_gee_mc (between e+e- from #gamma); "
1103 new TH1D(
"STSRICH_OpeningAngle_realg_gee_reffited",
1104 "STSRICH_OpeningAngle_realg_gee_reffited (between e+e- from "
1105 "#gamma); angle [deg];#",
1112 new TH1D(
"STSRICH_OpeningAngle_img_gee_mc",
1113 "STSRICH_OpeningAngle_img_gee_mc (between e+e- from imaginary "
1114 "#gamma); angle [deg];#",
1120 new TH1D(
"STSRICH_OpeningAngle_img_gee_reffited",
1121 "STSRICH_OpeningAngle_img_gee_reffited (between e+e- from "
1122 "imaginary #gamma); angle [deg];#",
1131 new TH1D(
"STS_InvMass_gg_mc",
1132 "STS_InvMass_gg_mc; invariant mass in GeV/c^{2};#",
1138 new TH1D(
"STS_InvMass_gg_reffited",
1139 "STS_InvMass_gg_reffited; invariant mass in GeV/c^{2};#",
1145 new TH1D(
"STS_InvMass_realg_gg_mc",
1146 "STS_InvMass_realg_gg_mc; invariant mass in GeV/c^{2};#",
1152 new TH1D(
"STS_InvMass_realg_gg_reffited",
1153 "STS_InvMass_realg_gg_reffited; invariant mass in GeV/c^{2};#",
1159 "STS_OpeningAngle_realg_gg_mc",
1160 "STS_OpeningAngle_realg_gg_mc (between e+e- from #gamma); angle [deg];#",
1166 new TH1D(
"STS_OpeningAngle_realg_gg_reffited",
1167 "STS_OpeningAngle_realg_gg_reffited (between e+e- from #gamma); "
1174 new TH1D(
"STS_OpeningAngle_between_gg_mc",
1175 "STS_OpeningAngle_between_gg_mc (between #gamma#gamma from "
1176 "#pi^{0}); angle [deg];#",
1182 new TH1D(
"STS_OpeningAngle_between_gg_reffited",
1183 "STS_OpeningAngle_between_gg_reffited (between #gamma#gamma from "
1184 "#pi^{0}); angle [deg];#",
1192 new TH1D(
"STSRICH_InvMass_gg_mc",
1193 "STSRICH_InvMass_gg_mc; invariant mass in GeV/c^{2};#",
1199 new TH1D(
"STSRICH_InvMass_gg_reffited",
1200 "STSRICH_InvMass_gg_reffited; invariant mass in GeV/c^{2};#",
1206 new TH1D(
"STSRICH_InvMass_realg_gg_mc",
1207 "STSRICH_InvMass_realg_gg_mc; invariant mass in GeV/c^{2};#",
1213 new TH1D(
"STSRICH_InvMass_realg_gg_reffited",
1214 "STSRICH_InvMass_realg_gg_reffited; invariant mass in GeV/c^{2};#",
1220 new TH1D(
"STSRICH_OpeningAngle_realg_gg_mc",
1221 "STSRICH_OpeningAngle_realg_gg_mc (between e+e- from #gamma); "
1228 new TH1D(
"STSRICH_OpeningAngle_realg_gg_reffited",
1229 "STSRICH_OpeningAngle_realg_gg_reffited (between e+e- from "
1230 "#gamma); angle [deg];#",
1237 new TH1D(
"STSRICH_OpeningAngle_between_gg_mc",
1238 "STSRICH_OpeningAngle_between_gg_mc (between #gamma#gamma from "
1239 "#pi^{0}); angle [deg];#",
1245 new TH1D(
"STSRICH_OpeningAngle_between_gg_reffited",
1246 "STSRICH_OpeningAngle_between_gg_reffited (between #gamma#gamma "
1247 "from #pi^{0}); angle [deg];#",