CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionPhotons.cxx
Go to the documentation of this file.
1/* Copyright (C) 2017-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Ievgenii Kres, Florian Uhlig [committer] */
4
19
21
22#include "CbmGlobalTrack.h"
24#include "CbmKresConversionBG.h"
25#include "CbmKresFunctions.h"
26#include "CbmMCTrack.h"
27#include "CbmMvdHit.h"
28#include "CbmRichHit.h"
29#include "CbmRichRing.h"
30#include "CbmRichRingLight.h"
31#include "CbmRichUtil.h"
32#include "CbmStsHit.h"
33#include "CbmStsTrack.h"
34#include "CbmTrackMatchNew.h"
35#include "FairRootManager.h"
36#include "KFParticle/KFParticle.h"
37
38#include <iostream>
39
40using namespace std;
41
43 : fTrainPhotons(nullptr)
45 , fAnnPhotonsSelection(nullptr)
46 , UseAnnPhotons(0)
47 , fMcTracks(nullptr)
48 , fGlobalTracks(nullptr)
49 , fStsTracks(nullptr)
50 , fStsTrackMatches(nullptr)
51 , fRichProjections(nullptr)
52 , fRichRings(nullptr)
53 , fRichRingMatches(nullptr)
54 , fRichHits(nullptr)
55 , fArrayMvdHit(nullptr)
56 , fArrayStsHit(nullptr)
57 , fPrimVertex(nullptr)
58 , fKFVertex()
59 , fTauFit(nullptr)
82 , frefmomenta()
83 , frefId()
84 , fMCtracks()
163 , Mother_PDG_Target(nullptr)
164 , GrandMother_PDG_Target(nullptr)
166 , Mother_PDG_Outside(nullptr)
167 , GrandMother_PDG_Outside(nullptr)
169 , Pdg_vs_Distance_for_dp(nullptr)
170 , P_vs_Distance_for_dp(nullptr)
171 , DP_AnnTruePairs(nullptr)
172 , DP_AnnFalsePairs(nullptr)
177 , DP_InvMass_vs_OA_Both(nullptr)
179 , DP_InvMass_Both(nullptr)
180 , DP_candidates_OA_Both(nullptr)
181 , DP_OA_Both(nullptr)
183 , DP_PlaneAngles_last_Both(nullptr)
188 , DP_InvMass_vs_OA_Target(nullptr)
190 , DP_InvMass_Target(nullptr)
191 , DP_candidates_OA_Target(nullptr)
192 , DP_OA_Target(nullptr)
199 , DP_InvMass_vs_OA_Outside(nullptr)
201 , DP_InvMass_Outside(nullptr)
202 , DP_candidates_OA_Outside(nullptr)
203 , DP_OA_Outside(nullptr)
211 , DP_Pdg_all_Target(nullptr)
212 , DP_P_reco_all_Target(nullptr)
213 , DP_Pt_reco_all_Target(nullptr)
221 , DP_Pdg_zero_Target(nullptr)
222 , DP_P_reco_zero_Target(nullptr)
223 , DP_Pt_reco_zero_Target(nullptr)
231 , DP_Pdg_one_Target(nullptr)
232 , DP_P_reco_one_Target(nullptr)
233 , DP_Pt_reco_one_Target(nullptr)
241 , DP_Pdg_two_Target(nullptr)
242 , DP_P_reco_two_Target(nullptr)
243 , DP_Pt_reco_two_Target(nullptr)
257 , Electrons_two_Target(nullptr)
258 , Pions_two_Target(nullptr)
259 , PionElectron_two_Target(nullptr)
270 , DP_Pdg_onetwo_Target(nullptr)
271 , DP_P_reco_onetwo_Target(nullptr)
272 , DP_Pt_reco_onetwo_Target(nullptr)
286 , Electrons_onetwo_Target(nullptr)
287 , Pions_onetwo_Target(nullptr)
299 , DP_Pdg_all_Outside(nullptr)
300 , DP_P_reco_all_Outside(nullptr)
301 , DP_Pt_reco_all_Outside(nullptr)
309 , DP_Pdg_zero_Outside(nullptr)
310 , DP_P_reco_zero_Outside(nullptr)
311 , DP_Pt_reco_zero_Outside(nullptr)
319 , DP_Pdg_one_Outside(nullptr)
320 , DP_P_reco_one_Outside(nullptr)
321 , DP_Pt_reco_one_Outside(nullptr)
329 , DP_Pdg_two_Outside(nullptr)
330 , DP_P_reco_two_Outside(nullptr)
331 , DP_Pt_reco_two_Outside(nullptr)
345 , Electrons_two_Outside(nullptr)
346 , Pions_two_Outside(nullptr)
347 , PionElectron_two_Outside(nullptr)
358 , DP_Pdg_onetwo_Outside(nullptr)
359 , DP_P_reco_onetwo_Outside(nullptr)
374 , Electrons_onetwo_Outside(nullptr)
375 , Pions_onetwo_Outside(nullptr)
385 , DP_InvMassReco_all_Both(nullptr)
387 , DP_Pdg_all_Both(nullptr)
388 , DP_P_reco_all_Both(nullptr)
389 , DP_Pt_reco_all_Both(nullptr)
396 , DP_InvMassReco_zero_Both(nullptr)
398 , DP_Pdg_zero_Both(nullptr)
399 , DP_P_reco_zero_Both(nullptr)
400 , DP_Pt_reco_zero_Both(nullptr)
407 , DP_InvMassReco_one_Both(nullptr)
409 , DP_Pdg_one_Both(nullptr)
410 , DP_P_reco_one_Both(nullptr)
411 , DP_Pt_reco_one_Both(nullptr)
418 , DP_InvMassReco_two_Both(nullptr)
420 , DP_Pdg_two_Both(nullptr)
421 , DP_P_reco_two_Both(nullptr)
422 , DP_Pt_reco_two_Both(nullptr)
434 , DP_Pdg_onetwo_Both(nullptr)
435 , DP_P_reco_onetwo_Both(nullptr)
436 , DP_Pt_reco_onetwo_Both(nullptr)
445 , DP_EMT_Pt_all_Target(nullptr)
446 , DP_EMT_Pt_zero_Target(nullptr)
447 , DP_EMT_Pt_one_Target(nullptr)
448 , DP_EMT_Pt_two_Target(nullptr)
449 , DP_EMT_Pt_onetwo_Target(nullptr)
450 , DP_EMT_Pt_all_Outside(nullptr)
451 , DP_EMT_Pt_zero_Outside(nullptr)
452 , DP_EMT_Pt_one_Outside(nullptr)
453 , DP_EMT_Pt_two_Outside(nullptr)
454 , DP_EMT_Pt_onetwo_Outside(nullptr)
455 , DP_EMT_Pt_all_Both(nullptr)
456 , DP_EMT_Pt_zero_Both(nullptr)
457 , DP_EMT_Pt_one_Both(nullptr)
458 , DP_EMT_Pt_two_Both(nullptr)
459 , DP_EMT_Pt_onetwo_Both(nullptr)
470 , DP_LK_EMT_Pt_all_Target(nullptr)
471 , DP_LK_EMT_Pt_zero_Target(nullptr)
472 , DP_LK_EMT_Pt_one_Target(nullptr)
473 , DP_LK_EMT_Pt_two_Target(nullptr)
485 , DP_LK_EMT_Pt_all_Outside(nullptr)
487 , DP_LK_EMT_Pt_one_Outside(nullptr)
488 , DP_LK_EMT_Pt_two_Outside(nullptr)
490{
491}
492
494
496{
497 FairRootManager* ioman = FairRootManager::Instance();
498 if (nullptr == ioman) { Fatal("CbmKresConversionPhotons::Init", "RootManager not instantised!"); }
499
500 fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
501 if (nullptr == fMcTracks) { Fatal("CbmKresConversionPhotons::Init", "No MCTrack array!"); }
502
503 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
504 if (nullptr == fPrimVertex) { fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex")); }
505 if (nullptr == fPrimVertex) { LOG(fatal) << "CbmKresConversionPhotons::Init No PrimaryVertex array!"; }
506
507 fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
508 if (nullptr == fGlobalTracks) { Fatal("CbmKresConversionPhotons::Init", "No GlobalTrack array!"); }
509
510 fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
511 if (nullptr == fStsTracks) { Fatal("CbmKresConversionPhotons::Init", "No StsTrack array!"); }
512
513 fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
514 if (nullptr == fStsTrackMatches) { Fatal("CbmKresConversionPhotons::Init", "No StsTrackMatch array!"); }
515
516 fRichProjections = (TClonesArray*) ioman->GetObject("RichProjection");
517 if (nullptr == fRichProjections) { Fatal("CbmKresConversionPhotons::Init", "No RichProjection array!"); }
518
519 fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
520 if (nullptr == fRichRings) { Fatal("CbmKresConversionPhotons::Init", "No RichRing array!"); }
521
522 fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
523 if (nullptr == fRichRingMatches) { Fatal("CbmKresConversionPhotons::Init", "No RichRingMatch array!"); }
524
525 fRichHits = (TClonesArray*) ioman->GetObject("RichHit");
526 if (nullptr == fRichHits) { Fatal("CbmKresConversionPhotons::Init", "No RichHit array!"); }
527
528 fArrayMvdHit = (TClonesArray*) ioman->GetObject("MvdHit");
529 if (nullptr == fArrayMvdHit) { Fatal("CbmKresConversionPhotons::Init", "No MvdHit array!"); }
530
531 fArrayStsHit = (TClonesArray*) ioman->GetObject("StsHit");
532 if (nullptr == fArrayStsHit) { Fatal("CbmKresConversionPhotons::Init", "No StsHit array!"); }
533
534
536
538
539 AnnTrainPhotons = 0;
540
542
543 if (AnnTrainPhotons == 1) {
545 fTrainPhotons->Init();
546 cout << endl;
547 cout << "\t *** CbmKresTrainAnnDirectPhotons ==> is "
548 "activated"
549 << endl;
550 }
551
552
553 if (UseAnnPhotons == 1) {
555 fAnnPhotonsSelection->Init();
556 cout << endl;
557 cout << "\t *** CbmKresSelectAnnPhotons ==> is "
558 "activated"
559 << endl;
560 }
561}
562
563
564void CbmKresConversionPhotons::Exec(int fEventNumDP, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
565{
566 cout << "CbmKresConversionPhotons, event No. " << fEventNumDP << endl;
567
568 if (fPrimVertex != nullptr) { fKFVertex = CbmKFVertex(*fPrimVertex); }
569 else {
570 Fatal("CbmKresConversionPhotons::Exec", "No PrimaryVertex array!");
571 }
572
573
574 Gammas_all_Target.clear();
575 Gammas_one_Target.clear();
576 Gammas_two_Target.clear();
577 Gammas_zero_Target.clear();
578 Gammas_onetwo_Target.clear();
584 Gammas_MC_all_Target.clear();
585 Gammas_MC_one_Target.clear();
586 Gammas_MC_two_Target.clear();
587 Gammas_MC_zero_Target.clear();
589 Gammas_all_Outside.clear();
590 Gammas_one_Outside.clear();
591 Gammas_two_Outside.clear();
592 Gammas_zero_Outside.clear();
593 Gammas_onetwo_Outside.clear();
599 Gammas_MC_all_Outside.clear();
600 Gammas_MC_one_Outside.clear();
601 Gammas_MC_two_Outside.clear();
604 Gammas_all_Both.clear();
605 Gammas_one_Both.clear();
606 Gammas_two_Both.clear();
607 Gammas_zero_Both.clear();
608 Gammas_onetwo_Both.clear();
614 Gammas_MC_all_Both.clear();
615 Gammas_MC_one_Both.clear();
616 Gammas_MC_two_Both.clear();
617 Gammas_MC_zero_Both.clear();
618 Gammas_MC_onetwo_Both.clear();
619
620
623 VRings_minus_Outside.clear();
628 VRings_plus_Outside.clear();
631
633 VMomenta_minus_Target.clear();
635 VRings_minus_Target.clear();
638 VMCtracks_plus_Target.clear();
639 VStsTrack_plus_Target.clear();
640 VMomenta_plus_Target.clear();
641 VRings_plus_Target.clear();
642 VStsIndex_plus_Target.clear();
643 VRichRing_plus_Target.clear();
644
645
646 Int_t ngTracks = fGlobalTracks->GetEntriesFast();
647 for (Int_t i = 0; i < ngTracks; i++) {
648 CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(i);
649 if (nullptr == gTrack) continue;
650 Int_t stsInd = gTrack->GetStsTrackIndex();
651 Int_t richInd = gTrack->GetRichRingIndex();
652
653 if (stsInd < 0) continue;
654 CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
655 if (stsTrack == nullptr) continue;
656 CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
657 if (stsMatch == nullptr) continue;
658 if (stsMatch->GetNofLinks() <= 0) continue;
659 Int_t stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
660 if (stsMcTrackId < 0) continue;
661 CbmMCTrack* mcTrack = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
662 if (mcTrack == nullptr) continue;
663
664
665 FairTrackParam* proj = (FairTrackParam*) fRichProjections->At(i);
666 if (richInd < 0 && proj->GetX() > -115 && proj->GetX() < 115
667 && ((proj->GetY() < -120 && proj->GetY() > -200) || (proj->GetY() > 120 && proj->GetY() < 200)))
668 continue;
669 CbmRichRing* Ring = nullptr;
670 if (richInd > -1) {
671 Ring = static_cast<CbmRichRing*>(fRichRings->At(richInd));
673 if (TMath::Abs(mcTrack->GetPdgCode()) == 11)
675 }
676
677 // Doing fit with Fit To primary Vertex and calculate chi2 to primary vertex
678 double chi2 = 0;
679 TVector3 Momentum = CbmKresFunctions::FitToVertexAndGetChi(stsTrack, fKFVertex.GetRefX(), fKFVertex.GetRefY(),
680 fKFVertex.GetRefZ(), chi2);
681 const FairTrackParam* track_par = stsTrack->GetParamFirst();
682 double charge = track_par->GetQp();
683
684
685 if (chi2 != chi2) continue;
686 if (chi2 == 0) continue;
687
688 if (chi2 > 3) { SaveOutsideTracks(mcTrack, stsTrack, charge, stsInd, richInd, stsMcTrackId, Ring); }
689 if (chi2 > 3) continue;
690
691 SaveTargetTracks(mcTrack, stsTrack, Momentum, charge, stsInd, richInd, stsMcTrackId, Ring);
692 }
693
694
695 FindGammasTarget(fEventNumDP, OpeningAngleCut, GammaInvMassCut, RealPID, VMCtracks_minus_Target,
699
700 FindGammasOutside(fEventNumDP, OpeningAngleCut, GammaInvMassCut, RealPID, VMCtracks_minus_Outside,
704
706
707
708 if (UseAnnPhotons == 1) {
709 int numformix = 1000;
710 if (fEventNumDP % numformix == 0) {
711 DP_Mixing_Target(OpeningAngleCut, GammaInvMassCut);
716
721 }
722
723 if (fEventNumDP % numformix == 0) {
724 DP_Mixing_Outside(OpeningAngleCut, GammaInvMassCut);
730
736 }
737
738 // DP_LK_EMT Target
739 DP_likesign_Mixing_Target(OpeningAngleCut, GammaInvMassCut);
748
749 // DP_LK_EMT Outside
750 DP_likesign_Mixing_Outside(OpeningAngleCut, GammaInvMassCut);
757 }
758}
759
760
761void CbmKresConversionPhotons::SaveOutsideTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, double charge, int stsInd,
762 int richInd, int stsMcTrackId, CbmRichRing* RING)
763{
764 int InRich = FindInRich(richInd, stsMcTrackId);
765 if (charge < 0) {
766 VMCtracks_minus_Outside.push_back(mcTrack1);
767 VStsTrack_minus_Outside.push_back(stsTrack);
768 VRings_minus_Outside.push_back(InRich);
769 VStsIndex_minus_Outside.push_back(stsInd);
770 VRichRing_minus_Outside.push_back(RING);
771 }
772 if (charge > 0) {
773 VMCtracks_plus_Outside.push_back(mcTrack1);
774 VStsTrack_plus_Outside.push_back(stsTrack);
775 VRings_plus_Outside.push_back(InRich);
776 VStsIndex_plus_Outside.push_back(stsInd);
777 VRichRing_plus_Outside.push_back(RING);
778 }
779}
780
781void CbmKresConversionPhotons::SaveTargetTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, TVector3 refmom,
782 double charge, int stsInd, int richInd, int stsMcTrackId,
783 CbmRichRing* RING)
784{
785 int InRich = FindInRich(richInd, stsMcTrackId);
786 if (charge < 0) {
787 VMCtracks_minus_Target.push_back(mcTrack1);
788 VStsTrack_minus_Target.push_back(stsTrack);
789 VMomenta_minus_Target.push_back(refmom);
790 VRings_minus_Target.push_back(InRich);
791 VStsIndex_minus_Target.push_back(stsInd);
792 VRichRing_minus_Target.push_back(RING);
793 }
794 if (charge > 0) {
795 VMCtracks_plus_Target.push_back(mcTrack1);
796 VStsTrack_plus_Target.push_back(stsTrack);
797 VMomenta_plus_Target.push_back(refmom);
798 VRings_plus_Target.push_back(InRich);
799 VStsIndex_plus_Target.push_back(stsInd);
800 VRichRing_plus_Target.push_back(RING);
801 }
802}
803
804
805void CbmKresConversionPhotons::FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID,
806 vector<CbmMCTrack*> MCtracks_minus, vector<CbmMCTrack*> MCtracks_plus,
807 vector<CbmStsTrack*> StsTrack_minus, vector<CbmStsTrack*> StsTrack_plus,
808 vector<TVector3> Momenta_minus, vector<TVector3> Momenta_plus,
809 std::vector<int> Rings_minus, std::vector<int> Rings_plus,
810 std::vector<int> stsIndex_minus, std::vector<int> stsIndex_plus,
811 vector<CbmRichRing*> richRing_minus, vector<CbmRichRing*> richRing_plus)
812{
813 for (size_t i = 0; i < Momenta_minus.size(); i++) {
814 for (size_t j = 0; j < Momenta_plus.size(); j++) {
815
816 CbmStsTrack* sts1 = StsTrack_minus.at(i);
817 CbmStsTrack* sts2 = StsTrack_plus.at(j);
818
819 TVector3 part1 = Momenta_minus[i];
820 TVector3 part2 = Momenta_plus[j];
821 CbmMCTrack* part1MC = MCtracks_minus[i];
822 CbmMCTrack* part2MC = MCtracks_plus[j];
823 int sts1_index = stsIndex_minus[i];
824 int sts2_index = stsIndex_plus[j];
825
826 int richcheck_0 = 0;
827 int richcheck_1 = 0;
828 if (RealPID == 1) {
829 // Real PID
830 richcheck_0 = CheckIfElectron(richRing_minus[i], Momenta_minus[i].Mag());
831 richcheck_1 = CheckIfElectron(richRing_plus[j], Momenta_plus[j].Mag());
832 }
833 else {
834 // MC PID
835 richcheck_0 = Rings_minus[i];
836 richcheck_1 = Rings_plus[j];
837 }
838 int richcheck = richcheck_0 + richcheck_1;
839
840 Double_t InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(part1, part2);
841 Double_t OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(part1, part2);
843
844 DP_candidates_InvMass_vs_OA_Target->Fill(InvmassReco, OpeningAngle);
845 DP_candidates_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
846 DP_candidates_InvMass_Target->Fill(InvmassReco);
847 DP_candidates_InvMass_Both->Fill(InvmassReco);
848 DP_candidates_OA_Target->Fill(OpeningAngle);
849 DP_candidates_OA_Both->Fill(OpeningAngle);
850
851 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
852 double PlaneAngle_first = CalculatePlaneAngle_first(sts1, sts2);
853
854 int IdForANN = 0; // 0 - means wrong pair combination; 1 - means correct pair
855 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
856 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
857 if (mcTrackmama->GetMotherId() == -1 && mcTrackmama->GetPdgCode() == 22) {
858 IdForANN = 1;
859 DP_InvMass_Target->Fill(InvmassReco);
860 DP_InvMass_Both->Fill(InvmassReco);
861 DP_OA_Target->Fill(OpeningAngle);
862 DP_OA_Both->Fill(OpeningAngle);
863 DP_InvMass_vs_OA_Target->Fill(InvmassReco, OpeningAngle);
864 DP_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
865 DP_PlaneAngles_last_Target->Fill(PlaneAngle_last);
866 DP_PlaneAngles_last_Both->Fill(PlaneAngle_last);
867 DP_PlaneAngles_first_Target->Fill(PlaneAngle_first);
868 DP_PlaneAngles_first_Both->Fill(PlaneAngle_first);
869 }
870 }
871
872 // run ANN
873 if (AnnTrainPhotons == 1) {
874 fTrainPhotons->Exec(EventNumMan, IdForANN, InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(),
875 part1, part2);
876 continue;
877 }
878
879 double AnnValue = 999;
880 if (UseAnnPhotons == 1) {
881 AnnValue =
882 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), part1, part2);
883 if (IdForANN == 1) DP_AnnTruePairs->Fill(AnnValue);
884 if (IdForANN == 0) DP_AnnFalsePairs->Fill(AnnValue);
885 }
886
887
888 DP_candidates_PlaneAngles_last_Target->Fill(PlaneAngle_last);
889 DP_candidates_PlaneAngles_last_Both->Fill(PlaneAngle_last);
890 DP_candidates_PlaneAngles_first_Target->Fill(PlaneAngle_first);
891 DP_candidates_PlaneAngles_first_Both->Fill(PlaneAngle_first);
892
893
894 // cuts
895 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
896 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
897 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
898
899 int fromPions = 0;
900 int fromEta = 0;
901 int fromFireball = 0;
902 int fromDalitz = 0;
903 int fromXi = 0;
904 int fromOther = 0;
905 int fromCombinatorial = 0;
906 int fromConversion = 0;
907 int twoFromTarget = 0;
908 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
909 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
910 if (mcTrackmama->GetPdgCode() == 22) {
911 if (mcTrackmama->GetMotherId() == -1) { fromFireball = 1; }
912 else {
913 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
914 if (mcTrackGrmama->GetPdgCode() == 111) fromPions = 1;
915 if (mcTrackGrmama->GetPdgCode() == 221) fromEta = 1;
916 if (mcTrackGrmama->GetPdgCode() == 3212) fromXi = 1;
917 fromConversion = 1;
918 }
919 }
920 else {
921 if (mcTrackmama->GetPdgCode() == 111) fromDalitz = 1;
922 if (mcTrackmama->GetPdgCode() != 111) fromOther = 1;
923 }
924 }
925 else if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() == -1) {
926 twoFromTarget = 1;
927 }
928 else {
929 fromCombinatorial = 1;
930 }
931
932
933 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
934 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
935 Mother_PDG_Target->Fill(mcTrackmama->GetPdgCode());
936 if (mcTrackmama->GetPdgCode() == 22) {
937 if (mcTrackmama->GetMotherId() == -1) { GrandMother_PDG_Target->Fill(mcTrackmama->GetMotherId()); }
938 else {
939 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
940 GrandMother_PDG_Target->Fill(TMath::Abs(mcTrackGrmama->GetPdgCode()));
941 }
942 }
943 }
944
945
946 if (IdForANN == 1) DP_AnnTruePairs_AfterCuts->Fill(AnnValue);
947 if (IdForANN == 0) DP_AnnFalsePairs_AfterCuts->Fill(AnnValue);
948
949 frefmomenta.clear();
950 frefmomenta.push_back(part1);
951 frefmomenta.push_back(part2);
952 frefId.clear();
953 frefId.push_back(stsIndex_minus[i]);
954 frefId.push_back(stsIndex_plus[j]);
955 fMCtracks.clear();
956 fMCtracks.push_back(part1MC);
957 fMCtracks.push_back(part2MC);
958
959
960 // for event mixing DP
961 std::vector<TVector3> minusTrack = SaveAllHits(sts1);
962 std::vector<TVector3> plusTrack = SaveAllHits(sts2);
963
964 DP_EMT_Event_minus_Target.push_back(EventNumMan);
965 DP_EMT_momenta_minus_Target.push_back(part1);
966 DP_EMT_NofRings_minus_Target.push_back(richcheck_0);
967 DP_EMT_Hits_minus_Target.push_back(minusTrack);
968
969 DP_EMT_Event_plus_Target.push_back(EventNumMan);
970 DP_EMT_momenta_plus_Target.push_back(part2);
971 DP_EMT_NofRings_plus_Target.push_back(richcheck_1);
972 DP_EMT_Hits_plus_Target.push_back(plusTrack);
973
974 // DP_LK_EMT
975 DP_LK_EMT_momenta_minus_Target.push_back(part1);
976 DP_LK_EMT_NofRings_minus_Target.push_back(richcheck_0);
977 DP_LK_EMT_STS_minus_Target.push_back(sts1);
978 DP_LK_EMT_STS_minus_index_Target.push_back(sts1_index);
979
980 DP_LK_EMT_momenta_plus_Target.push_back(part2);
981 DP_LK_EMT_NofRings_plus_Target.push_back(richcheck_1);
982 DP_LK_EMT_STS_plus_Target.push_back(sts2);
983 DP_LK_EMT_STS_plus_index_Target.push_back(sts2_index);
984
985
986 // everything (RICH == 0, RICH == 1, RICH == 2) together
987 if (richcheck == 0 || richcheck == 1 || richcheck == 2) {
991 DP_InvMassReco_all_Target->Fill(InvmassReco);
992 DP_OpeningAngleReco_all_Target->Fill(OpeningAngle);
993 DP_Pdg_all_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
994 DP_Pdg_all_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
996 DP_Pt_reco_all_Target->Fill(params.fPt);
997 DP_InvMassReco_all_Both->Fill(InvmassReco);
998 DP_OpeningAngleReco_all_Both->Fill(OpeningAngle);
999 DP_Pdg_all_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1000 DP_Pdg_all_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1001 DP_P_reco_all_Both->Fill(params.fMomentumMag);
1002 DP_Pt_reco_all_Both->Fill(params.fPt);
1003 if (fromFireball == 1) {
1005 Ph_fromTarget_Pt_reco_all_Both->Fill(params.fPt);
1006 Ph_pt_vs_rap_est_all_Both->Fill(params.fRapidity, params.fPt);
1007 }
1008 if (fromPions == 1) {
1010 Ph_fromPions_Pt_reco_all_Both->Fill(params.fPt);
1011 }
1012 if (fromEta == 1) {
1013 Ph_fromEtas_Pt_reco_all_Target->Fill(params.fPt);
1014 Ph_fromEtas_Pt_reco_all_Both->Fill(params.fPt);
1015 }
1016 if (fromDalitz == 1) {
1018 Ph_fromDalitz_Pt_reco_all_Both->Fill(params.fPt);
1019 }
1020 }
1021
1022 // only cases, when RICH == 0
1023 if (richcheck == 0) {
1027 DP_InvMassReco_zero_Target->Fill(InvmassReco);
1028 DP_OpeningAngleReco_zero_Target->Fill(OpeningAngle);
1029 DP_Pdg_zero_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1030 DP_Pdg_zero_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1031 DP_P_reco_zero_Target->Fill(params.fMomentumMag);
1032 DP_Pt_reco_zero_Target->Fill(params.fPt);
1033 DP_InvMassReco_zero_Both->Fill(InvmassReco);
1034 DP_OpeningAngleReco_zero_Both->Fill(OpeningAngle);
1035 DP_Pdg_zero_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1036 DP_Pdg_zero_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1037 DP_P_reco_zero_Both->Fill(params.fMomentumMag);
1038 DP_Pt_reco_zero_Both->Fill(params.fPt);
1039 if (fromFireball == 1) {
1042 Ph_pt_vs_rap_est_zero_Both->Fill(params.fRapidity, params.fPt);
1043 }
1044 if (fromPions == 1) {
1046 Ph_fromPions_Pt_reco_zero_Both->Fill(params.fPt);
1047 }
1048 if (fromEta == 1) {
1050 Ph_fromEtas_Pt_reco_zero_Both->Fill(params.fPt);
1051 }
1052 if (fromDalitz == 1) {
1055 }
1056 }
1057
1058 // only cases, when RICH == 1
1059 if (richcheck == 1) {
1060 Gammas_one_Target.push_back(frefmomenta);
1063 DP_InvMassReco_one_Target->Fill(InvmassReco);
1064 DP_OpeningAngleReco_one_Target->Fill(OpeningAngle);
1065 DP_Pdg_one_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1066 DP_Pdg_one_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1067 DP_P_reco_one_Target->Fill(params.fMomentumMag);
1068 DP_Pt_reco_one_Target->Fill(params.fPt);
1069 DP_InvMassReco_one_Both->Fill(InvmassReco);
1070 DP_OpeningAngleReco_one_Both->Fill(OpeningAngle);
1071 DP_Pdg_one_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1072 DP_Pdg_one_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1073 DP_P_reco_one_Both->Fill(params.fMomentumMag);
1074 DP_Pt_reco_one_Both->Fill(params.fPt);
1075 if (fromFireball == 1) {
1077 Ph_fromTarget_Pt_reco_one_Both->Fill(params.fPt);
1078 Ph_pt_vs_rap_est_one_Both->Fill(params.fRapidity, params.fPt);
1079 }
1080 if (fromPions == 1) {
1082 Ph_fromPions_Pt_reco_one_Both->Fill(params.fPt);
1083 }
1084 if (fromEta == 1) {
1085 Ph_fromEtas_Pt_reco_one_Target->Fill(params.fPt);
1086 Ph_fromEtas_Pt_reco_one_Both->Fill(params.fPt);
1087 }
1088 if (fromDalitz == 1) {
1090 Ph_fromDalitz_Pt_reco_one_Both->Fill(params.fPt);
1091 }
1092 }
1093
1094 // only cases, when RICH == 2
1095 if (richcheck == 2) {
1096 Gammas_two_Target.push_back(frefmomenta);
1099 DP_InvMassReco_two_Target->Fill(InvmassReco);
1100 DP_OpeningAngleReco_two_Target->Fill(OpeningAngle);
1101 DP_Pdg_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1102 DP_Pdg_two_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1103 DP_P_reco_two_Target->Fill(params.fMomentumMag);
1104 DP_Pt_reco_two_Target->Fill(params.fPt);
1105 DP_InvMassReco_two_Both->Fill(InvmassReco);
1106 DP_OpeningAngleReco_two_Both->Fill(OpeningAngle);
1107 DP_Pdg_two_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1108 DP_Pdg_two_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1109 DP_P_reco_two_Both->Fill(params.fMomentumMag);
1110 DP_Pt_reco_two_Both->Fill(params.fPt);
1111 if (fromFireball == 1) {
1113 Ph_fromTarget_Pt_reco_two_Both->Fill(params.fPt);
1114 Ph_pt_vs_rap_est_two_Both->Fill(params.fRapidity, params.fPt);
1115 fromFireball_P_two_Target->Fill(part1.Mag());
1116 fromFireball_P_two_Target->Fill(part2.Mag());
1117 }
1118 if (fromPions == 1) {
1120 Ph_fromPions_Pt_reco_two_Both->Fill(params.fPt);
1121 }
1122 if (fromEta == 1) {
1123 Ph_fromEtas_Pt_reco_two_Target->Fill(params.fPt);
1124 Ph_fromEtas_Pt_reco_two_Both->Fill(params.fPt);
1125 }
1126 if (fromDalitz == 1) {
1128 Ph_fromDalitz_Pt_reco_two_Both->Fill(params.fPt);
1129 }
1130 if (fromXi == 1) { Ph_fromXi_Pt_reco_two_Target->Fill(params.fPt); }
1131 if (fromOther == 1) { Ph_fromOther_Pt_reco_two_Target->Fill(params.fPt); }
1132 if (fromCombinatorial == 1) {
1133
1134 // particle 1
1135 if (part1MC->GetMotherId() != -1) {
1136 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1137 CombinatorialMotherPdg_two_Target->Fill(TMath::Abs(mama1->GetPdgCode()));
1138 if (mama1->GetMotherId() != -1) {
1139 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1140 CombinatorialGrMotherPdg_two_Target->Fill(TMath::Abs(grmama1->GetPdgCode()));
1141 }
1142 else {
1144 }
1145 }
1146 else {
1148 }
1149
1150 // particle 2
1151 if (part2MC->GetMotherId() != -1) {
1152 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1153 CombinatorialMotherPdg_two_Target->Fill(TMath::Abs(mama2->GetPdgCode()));
1154 if (mama2->GetMotherId() != -1) {
1155 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1156 CombinatorialGrMotherPdg_two_Target->Fill(TMath::Abs(grmama2->GetPdgCode()));
1157 }
1158 else {
1160 }
1161 }
1162 else {
1164 }
1165
1166 // Check sources of BG
1167 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1168 Electrons_two_Target->Fill(params.fPt);
1169 }
1170 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1171 Pions_two_Target->Fill(params.fPt);
1172 }
1173 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1174 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1175 PionElectron_two_Target->Fill(params.fPt);
1176 }
1177 else {
1178 elsePionOrElectron_two_Target->Fill(params.fPt);
1179 }
1180
1181 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1182 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1183 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1184 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1185 int mama1PDG = mama1->GetPdgCode();
1186 int mama2PDG = mama2->GetPdgCode();
1187 if (
1188 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1189 || (mama1PDG == 111 && mama2PDG == 22
1190 && mama2->GetMotherId()
1191 == part1MC
1192 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1194 }
1195 if (
1196 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1197 && part1MC->GetMotherId()
1198 != part2MC
1199 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1200 DoubleConversion_Pt_two_Target->Fill(params.fPt);
1201 }
1202 }
1203
1206 fromCombinatorial_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1207 fromCombinatorial_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1208 if (TMath::Abs(part1MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Target->Fill(part1.Mag()); }
1209 else {
1211 }
1212 if (TMath::Abs(part2MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Target->Fill(part2.Mag()); }
1213 else {
1215 }
1216 }
1217 if (fromConversion == 1) {
1220 }
1221 if (twoFromTarget == 1) {
1224 twoFromTarget_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1225 twoFromTarget_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1226 twoFromTarget_P_two_Target->Fill(TMath::Abs(part1.Mag()));
1227 twoFromTarget_P_two_Target->Fill(TMath::Abs(part2.Mag()));
1228 }
1229 }
1230
1231 // cases, when RICH == 1 or RICH == 2 together
1232 if (richcheck == 1 || richcheck == 2) {
1236 DP_InvMassReco_onetwo_Target->Fill(InvmassReco);
1237 DP_OpeningAngleReco_onetwo_Target->Fill(OpeningAngle);
1238 DP_Pdg_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1239 DP_Pdg_onetwo_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1241 DP_Pt_reco_onetwo_Target->Fill(params.fPt);
1242 DP_InvMassReco_onetwo_Both->Fill(InvmassReco);
1243 DP_OpeningAngleReco_onetwo_Both->Fill(OpeningAngle);
1244 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1245 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1246 DP_P_reco_onetwo_Both->Fill(params.fMomentumMag);
1247 DP_Pt_reco_onetwo_Both->Fill(params.fPt);
1248 if (fromFireball == 1) {
1251 Ph_pt_vs_rap_est_onetwo_Both->Fill(params.fRapidity, params.fPt);
1252 fromFireball_P_onetwo_Target->Fill(part1.Mag());
1253 fromFireball_P_onetwo_Target->Fill(part2.Mag());
1254 }
1255 if (fromPions == 1) {
1258 }
1259 if (fromEta == 1) {
1262 }
1263 if (fromDalitz == 1) {
1266 }
1267 if (fromXi == 1) { Ph_fromXi_Pt_reco_onetwo_Target->Fill(params.fPt); }
1268 if (fromOther == 1) { Ph_fromOther_Pt_reco_onetwo_Target->Fill(params.fPt); }
1269 if (fromCombinatorial == 1) {
1270
1271 // particle 1
1272 if (part1MC->GetMotherId() != -1) {
1273 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1274 CombinatorialMotherPdg_onetwo_Target->Fill(TMath::Abs(mama1->GetPdgCode()));
1275 if (mama1->GetMotherId() != -1) {
1276 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1277 CombinatorialGrMotherPdg_onetwo_Target->Fill(TMath::Abs(grmama1->GetPdgCode()));
1278 }
1279 else {
1281 }
1282 }
1283 else {
1285 }
1286
1287 // particle 2
1288 if (part2MC->GetMotherId() != -1) {
1289 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1290 CombinatorialMotherPdg_onetwo_Target->Fill(TMath::Abs(mama2->GetPdgCode()));
1291 if (mama2->GetMotherId() != -1) {
1292 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1293 CombinatorialGrMotherPdg_onetwo_Target->Fill(TMath::Abs(grmama2->GetPdgCode()));
1294 }
1295 else {
1297 }
1298 }
1299 else {
1301 }
1302
1303 // Check sources of BG
1304 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1305 Electrons_onetwo_Target->Fill(params.fPt);
1306 }
1307 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1308 Pions_onetwo_Target->Fill(params.fPt);
1309 }
1310 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1311 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1312 PionElectron_onetwo_Target->Fill(params.fPt);
1313 }
1314 else {
1316 }
1317
1318 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1319 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1320 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1321 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1322 int mama1PDG = mama1->GetPdgCode();
1323 int mama2PDG = mama2->GetPdgCode();
1324 if (
1325 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1326 || (mama1PDG == 111 && mama2PDG == 22
1327 && mama2->GetMotherId()
1328 == part1MC
1329 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1331 }
1332 if (
1333 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1334 && part1MC->GetMotherId()
1335 != part2MC
1336 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1338 }
1339 }
1340
1343 fromCombinatorial_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1344 fromCombinatorial_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1345 if (TMath::Abs(part1MC->GetPdgCode() == 11)) {
1347 }
1348 else {
1350 }
1351 if (TMath::Abs(part2MC->GetPdgCode() == 11)) {
1353 }
1354 else {
1356 }
1357 }
1358 if (fromConversion == 1) {
1361 }
1362 if (twoFromTarget == 1) {
1365 twoFromTarget_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1366 twoFromTarget_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1367 twoFromTarget_P_onetwo_Target->Fill(TMath::Abs(part1.Mag()));
1368 twoFromTarget_P_onetwo_Target->Fill(TMath::Abs(part2.Mag()));
1369 }
1370 }
1371 }
1372 }
1373}
1374
1375
1377 int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector<CbmMCTrack*> MCtracks_minus_Outside,
1378 vector<CbmMCTrack*> MCtracks_plus_Outside, vector<CbmStsTrack*> StsTrack_minus_Outside,
1379 vector<CbmStsTrack*> StsTrack_plus_Outside, std::vector<int> Rings_minus_Outside, std::vector<int> Rings_plus_Outside,
1380 std::vector<int> stsIndex_minus_Outside, std::vector<int> stsIndex_plus_Outside,
1381 vector<CbmRichRing*> richRing_minus_Outside, vector<CbmRichRing*> richRing_plus_Outside)
1382{
1383 for (size_t i = 0; i < StsTrack_minus_Outside.size(); i++) {
1384 for (size_t j = 0; j < StsTrack_plus_Outside.size(); j++) {
1385
1386 CbmStsTrack* part1STS = StsTrack_minus_Outside[i];
1387 CbmStsTrack* part2STS = StsTrack_plus_Outside[j];
1388 CbmMCTrack* part1MC = MCtracks_minus_Outside[i];
1389 CbmMCTrack* part2MC = MCtracks_plus_Outside[j];
1390 int sts1_index = stsIndex_minus_Outside[i];
1391 // int sts2_index = stsIndex_plus_Outside[j];
1392
1393 KFParticle electron;
1395 KFParticle positron;
1396 CbmKFParticleInterface::SetKFParticleFromStsTrack(part2STS, &positron, -11);
1397 const KFParticle* daughters[2] = {&electron, &positron};
1398 KFParticle intersection;
1399 intersection.Construct(daughters, 2);
1400
1401 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
1402
1403 // fit to the vertex fitter
1404 TVector3 part1 =
1405 CbmKresFunctions::FitToVertex(part1STS, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1406 TVector3 part2 =
1407 CbmKresFunctions::FitToVertex(part2STS, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1408
1409 // TVector3 part1(electron.KFParticleBase::Px(), electron.KFParticleBase::Py(), electron.KFParticleBase::Pz());
1410 // TVector3 part2(positron.KFParticleBase::Px(), positron.KFParticleBase::Py(), positron.KFParticleBase::Pz());
1411
1412 int richcheck = 0;
1413 int richcheck_0 = 0;
1414 int richcheck_1 = 0;
1415 if (RealPID == 1) {
1416 // Real PID
1417 richcheck_0 = CheckIfElectron(richRing_minus_Outside[i], part1.Mag());
1418 richcheck_1 = CheckIfElectron(richRing_plus_Outside[j], part2.Mag());
1419 richcheck = richcheck_0 + richcheck_1;
1420 }
1421 else {
1422 // MC PID
1423 richcheck = Rings_minus_Outside[i] + Rings_plus_Outside[j];
1424 }
1425
1426
1427 Double_t InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(part1, part2);
1428 Double_t OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(part1, part2);
1430
1431 DP_candidates_InvMass_vs_OA_Outside->Fill(InvmassReco, OpeningAngle);
1432 DP_candidates_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
1433 DP_candidates_InvMass_Outside->Fill(InvmassReco);
1434 DP_candidates_InvMass_Both->Fill(InvmassReco);
1435 DP_candidates_OA_Outside->Fill(OpeningAngle);
1436 DP_candidates_OA_Both->Fill(OpeningAngle);
1437
1438 double PlaneAngle_last = CalculatePlaneAngle_last(part1STS, part2STS);
1439 double PlaneAngle_first = CalculatePlaneAngle_first(part1STS, part2STS);
1440
1441 int IdForANN = 0; // 0 - means wrong pair combination; 1 - means correct pair
1442 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1443 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1444 if (mcTrackmama->GetMotherId() == -1 && mcTrackmama->GetPdgCode() == 22) {
1445 IdForANN = 1;
1446 DP_InvMass_Outside->Fill(InvmassReco);
1447 DP_InvMass_Both->Fill(InvmassReco);
1448 DP_OA_Outside->Fill(OpeningAngle);
1449 DP_OA_Both->Fill(OpeningAngle);
1450 DP_InvMass_vs_OA_Outside->Fill(InvmassReco, OpeningAngle);
1451 DP_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
1452 DP_PlaneAngles_last_Outside->Fill(PlaneAngle_last);
1453 DP_PlaneAngles_last_Both->Fill(PlaneAngle_last);
1454 DP_PlaneAngles_first_Outside->Fill(PlaneAngle_first);
1455 DP_PlaneAngles_first_Both->Fill(PlaneAngle_first);
1456 }
1457 }
1458
1459 // run ANN
1460 if (AnnTrainPhotons == 1) {
1461 fTrainPhotons->Exec(EventNumMan, IdForANN, InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(),
1462 part1, part2);
1463 continue;
1464 }
1465
1466 double AnnValue = 999;
1467 if (UseAnnPhotons == 1) {
1468 AnnValue =
1469 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), part1, part2);
1470 if (IdForANN == 1) DP_AnnTruePairs->Fill(AnnValue);
1471 if (IdForANN == 0) DP_AnnFalsePairs->Fill(AnnValue);
1472 }
1473
1474 DP_candidates_PlaneAngles_last_Outside->Fill(PlaneAngle_last);
1475 DP_candidates_PlaneAngles_last_Both->Fill(PlaneAngle_last);
1476 DP_candidates_PlaneAngles_first_Outside->Fill(PlaneAngle_first);
1477 DP_candidates_PlaneAngles_first_Both->Fill(PlaneAngle_first);
1478
1479 // cuts
1480 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1481 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1482 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1483
1484
1485 int fromPions = 0;
1486 int fromEta = 0;
1487 int fromFireball = 0;
1488 int fromDalitz = 0;
1489 int fromXi = 0;
1490 int fromOther = 0;
1491 int fromCombinatorial = 0;
1492 int fromConversion = 0;
1493 int twoFromTarget = 0;
1494 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1495 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1496 if (mcTrackmama->GetPdgCode() == 22) {
1497 if (mcTrackmama->GetMotherId() == -1) { fromFireball = 1; }
1498 else {
1499 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
1500 if (mcTrackGrmama->GetPdgCode() == 111) fromPions = 1;
1501 if (mcTrackGrmama->GetPdgCode() == 221) fromEta = 1;
1502 if (mcTrackGrmama->GetPdgCode() == 3212) fromXi = 1;
1503 fromConversion = 1;
1504 }
1505 }
1506 else {
1507 if (mcTrackmama->GetPdgCode() == 111) fromDalitz = 1;
1508 if (mcTrackmama->GetPdgCode() != 111) fromOther = 1;
1509 }
1510 }
1511 else if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() == -1) {
1512 twoFromTarget = 1;
1513 }
1514 else {
1515 fromCombinatorial = 1;
1516 }
1517
1518
1519 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1520 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1521 if (mcTrackmama->GetPdgCode() == 22) {
1522 if (mcTrackmama->GetMotherId() == -1) { GrandMother_PDG_Outside->Fill(mcTrackmama->GetMotherId()); }
1523 else {
1524 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
1525 GrandMother_PDG_Outside->Fill(TMath::Abs(mcTrackGrmama->GetPdgCode()));
1526 }
1527 }
1528 else {
1529 Mother_PDG_Outside->Fill(TMath::Abs(mcTrackmama->GetPdgCode()));
1530 }
1531 }
1532
1533 if (IdForANN == 1) DP_AnnTruePairs_AfterCuts->Fill(AnnValue);
1534 if (IdForANN == 0) DP_AnnFalsePairs_AfterCuts->Fill(AnnValue);
1535
1536 frefmomenta.clear();
1537 frefmomenta.push_back(part1);
1538 frefmomenta.push_back(part2);
1539
1540 frefId.clear();
1541 frefId.push_back(stsIndex_minus_Outside[i]);
1542 frefId.push_back(stsIndex_plus_Outside[j]);
1543 fMCtracks.clear();
1544 fMCtracks.push_back(part1MC);
1545 fMCtracks.push_back(part2MC);
1546
1547
1548 // for event mixing DP
1549 std::vector<TVector3> minusTrack = SaveAllHits(part1STS);
1550 std::vector<TVector3> plusTrack = SaveAllHits(part2STS);
1551
1552
1553 DP_EMT_Event_minus_Outside.push_back(EventNumMan);
1554 DP_EMT_STS_minus_Outside.push_back(part1STS);
1555 DP_EMT_KFTrack_minus_Outside.push_back(electron);
1556 DP_EMT_NofRings_minus_Outside.push_back(richcheck_0);
1557 DP_EMT_Hits_minus_Outside.push_back(minusTrack);
1558
1559 DP_EMT_Event_plus_Outside.push_back(EventNumMan);
1560 DP_EMT_STS_plus_Outside.push_back(part2STS);
1561 DP_EMT_KFTrack_plus_Outside.push_back(positron);
1562 DP_EMT_NofRings_plus_Outside.push_back(richcheck_1);
1563 DP_EMT_Hits_plus_Outside.push_back(plusTrack);
1564
1565 // DP_LK_EMT
1566 DP_LK_EMT_NofRings_minus_Outside.push_back(richcheck_0);
1567 DP_LK_EMT_STS_minus_Outside.push_back(part1STS);
1568 DP_LK_EMT_STS_minus_index_Outside.push_back(sts1_index);
1569
1570 DP_LK_EMT_NofRings_plus_Outside.push_back(richcheck_1);
1571 DP_LK_EMT_STS_plus_Outside.push_back(part2STS);
1572 DP_LK_EMT_STS_plus_index_Outside.push_back(sts1_index);
1573
1574
1575 // everything (RICH == 0, RICH == 1, RICH == 2) together
1576 if (richcheck == 0 || richcheck == 1 || richcheck == 2) {
1580 DP_InvMassReco_all_Outside->Fill(InvmassReco);
1581 DP_OpeningAngleReco_all_Outside->Fill(OpeningAngle);
1582 DP_Pdg_all_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1583 DP_Pdg_all_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1584 DP_P_reco_all_Outside->Fill(params.fMomentumMag);
1585 DP_Pt_reco_all_Outside->Fill(params.fPt);
1586 DP_InvMassReco_all_Both->Fill(InvmassReco);
1587 DP_OpeningAngleReco_all_Both->Fill(OpeningAngle);
1588 DP_Pdg_all_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1589 DP_Pdg_all_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1590 DP_P_reco_all_Both->Fill(params.fMomentumMag);
1591 DP_Pt_reco_all_Both->Fill(params.fPt);
1592 if (fromFireball == 1) {
1594 Ph_fromTarget_Pt_reco_all_Both->Fill(params.fPt);
1595 Ph_pt_vs_rap_est_all_Both->Fill(params.fRapidity, params.fPt);
1596 }
1597 if (fromPions == 1) {
1599 Ph_fromPions_Pt_reco_all_Both->Fill(params.fPt);
1600 }
1601 if (fromEta == 1) {
1603 Ph_fromEtas_Pt_reco_all_Both->Fill(params.fPt);
1604 }
1605 if (fromDalitz == 1) {
1607 Ph_fromDalitz_Pt_reco_all_Both->Fill(params.fPt);
1608 }
1609 }
1610
1611 // only cases, when RICH == 0
1612 if (richcheck == 0) {
1616 DP_InvMassReco_zero_Outside->Fill(InvmassReco);
1617 DP_OpeningAngleReco_zero_Outside->Fill(OpeningAngle);
1618 DP_Pdg_zero_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1619 DP_Pdg_zero_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1621 DP_Pt_reco_zero_Outside->Fill(params.fPt);
1622 DP_InvMassReco_zero_Both->Fill(InvmassReco);
1623 DP_OpeningAngleReco_zero_Both->Fill(OpeningAngle);
1624 DP_Pdg_zero_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1625 DP_Pdg_zero_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1626 DP_P_reco_zero_Both->Fill(params.fMomentumMag);
1627 DP_Pt_reco_zero_Both->Fill(params.fPt);
1628 if (fromFireball == 1) {
1631 Ph_pt_vs_rap_est_zero_Both->Fill(params.fRapidity, params.fPt);
1632 }
1633 if (fromPions == 1) {
1635 Ph_fromPions_Pt_reco_zero_Both->Fill(params.fPt);
1636 }
1637 if (fromEta == 1) {
1639 Ph_fromEtas_Pt_reco_zero_Both->Fill(params.fPt);
1640 }
1641 if (fromDalitz == 1) {
1644 }
1645 }
1646
1647 // only cases, when RICH == 1
1648 if (richcheck == 1) {
1652 DP_InvMassReco_one_Outside->Fill(InvmassReco);
1653 DP_OpeningAngleReco_one_Outside->Fill(OpeningAngle);
1654 DP_Pdg_one_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1655 DP_Pdg_one_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1656 DP_P_reco_one_Outside->Fill(params.fMomentumMag);
1657 DP_Pt_reco_one_Outside->Fill(params.fPt);
1658 DP_InvMassReco_one_Both->Fill(InvmassReco);
1659 DP_OpeningAngleReco_one_Both->Fill(OpeningAngle);
1660 DP_Pdg_one_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1661 DP_Pdg_one_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1662 DP_P_reco_one_Both->Fill(params.fMomentumMag);
1663 DP_Pt_reco_one_Both->Fill(params.fPt);
1664 if (fromFireball == 1) {
1666 Ph_fromTarget_Pt_reco_one_Both->Fill(params.fPt);
1667 Ph_pt_vs_rap_est_one_Both->Fill(params.fRapidity, params.fPt);
1668 }
1669 if (fromPions == 1) {
1671 Ph_fromPions_Pt_reco_one_Both->Fill(params.fPt);
1672 }
1673 if (fromEta == 1) {
1675 Ph_fromEtas_Pt_reco_one_Both->Fill(params.fPt);
1676 }
1677 if (fromDalitz == 1) {
1679 Ph_fromDalitz_Pt_reco_one_Both->Fill(params.fPt);
1680 }
1681 }
1682
1683 // only cases, when RICH == 2
1684 if (richcheck == 2) {
1688 DP_InvMassReco_two_Outside->Fill(InvmassReco);
1689 DP_OpeningAngleReco_two_Outside->Fill(OpeningAngle);
1690 DP_Pdg_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1691 DP_Pdg_two_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1692 DP_P_reco_two_Outside->Fill(params.fMomentumMag);
1693 DP_Pt_reco_two_Outside->Fill(params.fPt);
1694 DP_InvMassReco_two_Both->Fill(InvmassReco);
1695 DP_OpeningAngleReco_two_Both->Fill(OpeningAngle);
1696 DP_Pdg_two_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1697 DP_Pdg_two_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1698 DP_P_reco_two_Both->Fill(params.fMomentumMag);
1699 DP_Pt_reco_two_Both->Fill(params.fPt);
1700 if (fromFireball == 1) {
1702 Ph_fromTarget_Pt_reco_two_Both->Fill(params.fPt);
1703 Ph_pt_vs_rap_est_two_Both->Fill(params.fRapidity, params.fPt);
1704 fromFireball_P_two_Outside->Fill(part1.Mag());
1705 fromFireball_P_two_Outside->Fill(part2.Mag());
1706 }
1707 if (fromPions == 1) {
1709 Ph_fromPions_Pt_reco_two_Both->Fill(params.fPt);
1710 }
1711 if (fromEta == 1) {
1713 Ph_fromEtas_Pt_reco_two_Both->Fill(params.fPt);
1714 }
1715 if (fromDalitz == 1) {
1717 Ph_fromDalitz_Pt_reco_two_Both->Fill(params.fPt);
1718 }
1719 if (fromXi == 1) { Ph_fromXi_Pt_reco_two_Outside->Fill(params.fPt); }
1720 if (fromOther == 1) { Ph_fromOther_Pt_reco_two_Outside->Fill(params.fPt); }
1721 if (fromCombinatorial == 1) {
1722
1723 // particle 1
1724 if (part1MC->GetMotherId() != -1) {
1725 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1726 CombinatorialMotherPdg_two_Outside->Fill(TMath::Abs(mama1->GetPdgCode()));
1727 if (mama1->GetMotherId() != -1) {
1728 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1729 CombinatorialGrMotherPdg_two_Outside->Fill(TMath::Abs(grmama1->GetPdgCode()));
1730 }
1731 else {
1733 }
1734 }
1735 else {
1737 }
1738
1739 // particle 2
1740 if (part2MC->GetMotherId() != -1) {
1741 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1742 CombinatorialMotherPdg_two_Outside->Fill(TMath::Abs(mama2->GetPdgCode()));
1743 if (mama2->GetMotherId() != -1) {
1744 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1745 CombinatorialGrMotherPdg_two_Outside->Fill(TMath::Abs(grmama2->GetPdgCode()));
1746 }
1747 else {
1749 }
1750 }
1751 else {
1753 }
1754
1755 // Check sources of BG
1756 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1757 Electrons_two_Outside->Fill(params.fPt);
1758 }
1759 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1760 Pions_two_Outside->Fill(params.fPt);
1761 }
1762 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1763 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1764 PionElectron_two_Outside->Fill(params.fPt);
1765 }
1766 else {
1767 elsePionOrElectron_two_Outside->Fill(params.fPt);
1768 }
1769
1770 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1771 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1772 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1773 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1774 int mama1PDG = mama1->GetPdgCode();
1775 int mama2PDG = mama2->GetPdgCode();
1776 if (
1777 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1778 || (mama1PDG == 111 && mama2PDG == 22
1779 && mama2->GetMotherId()
1780 == part1MC
1781 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1783 }
1784 if (
1785 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1786 && part1MC->GetMotherId()
1787 != part2MC
1788 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1790 }
1791 }
1792
1795 fromCombinatorial_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1796 fromCombinatorial_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1797 if (TMath::Abs(part1MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Outside->Fill(part1.Mag()); }
1798 else {
1800 }
1801 if (TMath::Abs(part2MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Outside->Fill(part2.Mag()); }
1802 else {
1804 }
1805 }
1806 if (fromConversion == 1) {
1809 }
1810 if (twoFromTarget == 1) {
1813 twoFromTarget_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1814 twoFromTarget_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1815 twoFromTarget_P_two_Outside->Fill(TMath::Abs(part1.Mag()));
1816 twoFromTarget_P_two_Outside->Fill(TMath::Abs(part2.Mag()));
1817 }
1818 }
1819
1820 // cases, when RICH == 1 or RICH == 2 together
1821 if (richcheck == 1 || richcheck == 2) {
1825 DP_InvMassReco_onetwo_Outside->Fill(InvmassReco);
1826 DP_OpeningAngleReco_onetwo_Outside->Fill(OpeningAngle);
1827 DP_Pdg_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1828 DP_Pdg_onetwo_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1830 DP_Pt_reco_onetwo_Outside->Fill(params.fPt);
1831 DP_InvMassReco_onetwo_Both->Fill(InvmassReco);
1832 DP_OpeningAngleReco_onetwo_Both->Fill(OpeningAngle);
1833 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1834 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1835 DP_P_reco_onetwo_Both->Fill(params.fMomentumMag);
1836 DP_Pt_reco_onetwo_Both->Fill(params.fPt);
1837 if (fromFireball == 1) {
1840 Ph_pt_vs_rap_est_onetwo_Both->Fill(params.fRapidity, params.fPt);
1841 fromFireball_P_onetwo_Outside->Fill(part1.Mag());
1842 fromFireball_P_onetwo_Outside->Fill(part2.Mag());
1843 }
1844 if (fromPions == 1) {
1847 }
1848 if (fromEta == 1) {
1851 }
1852 if (fromDalitz == 1) {
1855 }
1856 if (fromXi == 1) { Ph_fromXi_Pt_reco_onetwo_Outside->Fill(params.fPt); }
1857 if (fromOther == 1) { Ph_fromOther_Pt_reco_onetwo_Outside->Fill(params.fPt); }
1858 if (fromCombinatorial == 1) {
1859
1860 // particle 1
1861 if (part1MC->GetMotherId() != -1) {
1862 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1863 CombinatorialMotherPdg_onetwo_Outside->Fill(TMath::Abs(mama1->GetPdgCode()));
1864 if (mama1->GetMotherId() != -1) {
1865 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1866 CombinatorialGrMotherPdg_onetwo_Outside->Fill(TMath::Abs(grmama1->GetPdgCode()));
1867 }
1868 else {
1870 }
1871 }
1872 else {
1874 }
1875
1876 // particle 2
1877 if (part2MC->GetMotherId() != -1) {
1878 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1879 CombinatorialMotherPdg_onetwo_Outside->Fill(TMath::Abs(mama2->GetPdgCode()));
1880 if (mama2->GetMotherId() != -1) {
1881 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1882 CombinatorialGrMotherPdg_onetwo_Outside->Fill(TMath::Abs(grmama2->GetPdgCode()));
1883 }
1884 else {
1886 }
1887 }
1888 else {
1890 }
1891
1892 // Check sources of BG
1893 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1894 Electrons_onetwo_Outside->Fill(params.fPt);
1895 }
1896 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1897 Pions_onetwo_Outside->Fill(params.fPt);
1898 }
1899 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1900 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1901 PionElectron_onetwo_Outside->Fill(params.fPt);
1902 }
1903 else {
1905 }
1906
1907 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1908 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1909 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1910 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1911 int mama1PDG = mama1->GetPdgCode();
1912 int mama2PDG = mama2->GetPdgCode();
1913 if (
1914 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1915 || (mama1PDG == 111 && mama2PDG == 22
1916 && mama2->GetMotherId()
1917 == part1MC
1918 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1920 }
1921 if (
1922 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1923 && part1MC->GetMotherId()
1924 != part2MC
1925 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1927 }
1928 }
1929
1932 fromCombinatorial_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1933 fromCombinatorial_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1934 if (TMath::Abs(part1MC->GetPdgCode() == 11)) {
1936 }
1937 else {
1939 }
1940 if (TMath::Abs(part2MC->GetPdgCode() == 11)) {
1942 }
1943 else {
1945 }
1946 }
1947 if (fromConversion == 1) {
1950 }
1951 if (twoFromTarget == 1) {
1954 twoFromTarget_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1955 twoFromTarget_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1956 twoFromTarget_P_onetwo_Outside->Fill(TMath::Abs(part1.Mag()));
1957 twoFromTarget_P_onetwo_Outside->Fill(TMath::Abs(part2.Mag()));
1958 }
1959 }
1960 }
1961 }
1962}
1963
1965{
1976
1997
2010}
2011
2012
2013int CbmKresConversionPhotons::FindInRich(int richInd, int stsMcTrackId)
2014{
2015 int RingsInRich = 0;
2016 if (richInd > -1) {
2017 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
2018 if (richMatch != nullptr && richMatch->GetNofLinks() > 0) {
2019 int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
2020 if (richMcTrackId > 0) {
2021 if (stsMcTrackId == richMcTrackId) { // check that global track was matched correctly for STS and RICH together
2022 CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
2023 if (mcTrack2 != nullptr) {
2024 int pdgRICH = mcTrack2->GetPdgCode();
2025 if (TMath::Abs(pdgRICH) == 11) RingsInRich++;
2026 }
2027 }
2028 }
2029 }
2030 }
2031 return RingsInRich;
2032}
2033
2034
2036{
2037 int identified = 0;
2038
2039 if (nullptr != ring) {
2040 CbmRichRingLight ringHit;
2041 int nofHits = ring->GetNofHits();
2042 for (int i = 0; i < nofHits; i++) {
2043 int hitInd = ring->GetHit(i);
2044 CbmRichHit* hit = (CbmRichHit*) fRichHits->At(hitInd);
2045 if (nullptr == hit) continue;
2046 CbmRichHitLight hl(hit->GetX(), hit->GetY());
2047 ringHit.AddHit(hl);
2048 }
2049 fTauFit->DoFit(&ringHit);
2050 if (ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6
2051 && momentum > 0.2 && momentum < 4.)
2052 identified++;
2053 //if (ring->GetDistance() < 2 && ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6 && momentum > 0.2 && momentum < 4.) identified ++;
2054 }
2055
2056 return identified;
2057}
2058
2060{
2061 std::vector<TVector3> AllHitsOfTrack;
2062 AllHitsOfTrack.clear();
2063
2064 Int_t hitsMVD = track->GetNofMvdHits();
2065 Int_t hitsSTS = track->GetNofStsHits();
2066
2067 for (int i = 0; i < hitsMVD; i++) {
2068 Int_t mvdHitIndex = track->GetMvdHitIndex(i);
2069 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2070 TVector3 position;
2071 mvdHit->Position(position);
2072 AllHitsOfTrack.push_back(position);
2073 }
2074 for (int i = 0; i < hitsSTS; i++) {
2075 Int_t stsHitIndex = track->GetStsHitIndex(i);
2076 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2077 TVector3 position;
2078 stsHit->Position(position);
2079 AllHitsOfTrack.push_back(position);
2080 }
2081
2082 return AllHitsOfTrack;
2083}
2084
2086 std::vector<TVector3> track_2)
2087{
2088 double FinalAngle = 400;
2089
2090 int hits_1 = track_1.size();
2091 int hits_2 = track_2.size();
2092
2093 double Xpart1 = 0;
2094 double Ypart1 = 0;
2095 double Zpart1 = 0;
2096 double Xpart2 = 0;
2097 double Ypart2 = 0;
2098 double Zpart2 = 0;
2099
2100 TVector3 last1 = track_1[hits_1 - 1];
2101 TVector3 last2 = track_2[hits_2 - 1];
2102
2103 // // check difference in 2 cm, because of two slices of every STS and Mvd stations
2104 if (TMath::Abs(last1.Z() - last2.Z()) > 2
2105 && last1.Z() > last2.Z()) { // if last hits are in different stations --> try to find the latest common station
2106 for (int i = hits_1 - 2; i > -1; i--) { // start from second last station
2107 if (TMath::Abs(last1.Z() - last2.Z()) < 2) continue;
2108 last1 = track_1[i];
2109 Xpart1 = last1.X();
2110 Ypart1 = last1.Y();
2111 Zpart1 = last1.Z();
2112 }
2113 }
2114
2115 if (TMath::Abs(last1.Z() - last2.Z()) > 2
2116 && last1.Z() < last2.Z()) { // if last hits are in different stations --> try to find the latest common station
2117 for (int i = hits_2 - 2; i > -1; i--) { // start from second last station
2118 if (TMath::Abs(last1.Z() - last2.Z()) < 2) continue;
2119 last2 = track_2[i];
2120 Xpart2 = last2.X();
2121 Ypart2 = last2.Y();
2122 Zpart2 = last2.Z();
2123 }
2124 }
2125
2126 // calculate angle if we have found common station
2127 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
2128 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
2129 }
2130
2131 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
2132}
2133
2134
2136{
2137 double FinalAngle = 400;
2138 Int_t hits1sts = Sts_1->GetNofStsHits();
2139 Int_t hits2sts = Sts_2->GetNofStsHits();
2140 Int_t hits1mvd = Sts_1->GetNofMvdHits();
2141 Int_t hits2mvd = Sts_2->GetNofMvdHits();
2142
2143 double Xpart1 = 0;
2144 double Ypart1 = 0;
2145 double Zpart1 = 0;
2146 double Xpart2 = 0;
2147 double Ypart2 = 0;
2148 double Zpart2 = 0;
2149 if (hits1sts > 0) {
2150 Int_t stsHitIndex1 = Sts_1->GetStsHitIndex(hits1sts - 1);
2151 CbmStsHit* stsHit1 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex1);
2152 Xpart1 = stsHit1->GetX();
2153 Ypart1 = stsHit1->GetY();
2154 Zpart1 = stsHit1->GetZ();
2155 }
2156 else {
2157 Int_t mvdHitIndex1 = Sts_1->GetMvdHitIndex(hits1mvd - 1);
2158 CbmMvdHit* mvdHit1 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex1);
2159 Xpart1 = mvdHit1->GetX();
2160 Ypart1 = mvdHit1->GetY();
2161 Zpart1 = mvdHit1->GetZ();
2162 }
2163
2164 if (hits2sts > 0) {
2165 Int_t stsHitIndex2 = Sts_2->GetStsHitIndex(hits2sts - 1);
2166 CbmStsHit* stsHit2 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex2);
2167 Xpart2 = stsHit2->GetX();
2168 Ypart2 = stsHit2->GetY();
2169 Zpart2 = stsHit2->GetZ();
2170 }
2171 else {
2172 Int_t mvdHitIndex2 = Sts_2->GetMvdHitIndex(hits2mvd - 1);
2173 CbmMvdHit* mvdHit2 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex2);
2174 Xpart2 = mvdHit2->GetX();
2175 Ypart2 = mvdHit2->GetY();
2176 Zpart2 = mvdHit2->GetZ();
2177 }
2178
2179 // check difference in 2 cm, because of two slices of every STS and Mvd stations
2180 if (TMath::Abs(Zpart1 - Zpart2) > 2
2181 && Zpart1 > Zpart2) { // if last hits are in different stations --> try to find the latest common station
2182 for (int i = hits1sts - 2; i > -1; i--) { // start from second last station
2183 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2184 Int_t stsHitIndex = Sts_1->GetStsHitIndex(i);
2185 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2186 Xpart1 = stsHit->GetX();
2187 Ypart1 = stsHit->GetY();
2188 Zpart1 = stsHit->GetZ();
2189 }
2190 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 > Zpart2) {
2191 for (int i = hits1mvd - 2; i > -1; i--) {
2192 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2193 Int_t mvdHitIndex = Sts_1->GetMvdHitIndex(i);
2194 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2195 Xpart1 = mvdHit->GetX();
2196 Ypart1 = mvdHit->GetY();
2197 Zpart1 = mvdHit->GetZ();
2198 }
2199 }
2200 }
2201
2202 if (TMath::Abs(Zpart1 - Zpart2) > 2
2203 && Zpart1 < Zpart2) { // if last hits are in different stations --> try to find the latest common station
2204 for (int i = hits2sts - 2; i > -1; i--) { // start from second last station
2205 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2206 Int_t stsHitIndex = Sts_2->GetStsHitIndex(i);
2207 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2208 Xpart2 = stsHit->GetX();
2209 Ypart2 = stsHit->GetY();
2210 Zpart2 = stsHit->GetZ();
2211 }
2212 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 < Zpart2) {
2213 for (int i = hits2mvd - 2; i > -1; i--) {
2214 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2215 Int_t mvdHitIndex = Sts_2->GetMvdHitIndex(i);
2216 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2217 Xpart2 = mvdHit->GetX();
2218 Ypart2 = mvdHit->GetY();
2219 Zpart2 = mvdHit->GetZ();
2220 }
2221 }
2222 }
2223
2224 // calculate angle if we found common station
2225 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
2226 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
2227 }
2228
2229 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
2230}
2231
2233{
2234 double FinalAngle = 400;
2235 Int_t hits1sts = Sts_1->GetNofStsHits();
2236 Int_t hits2sts = Sts_2->GetNofStsHits();
2237 Int_t hits1mvd = Sts_1->GetNofMvdHits();
2238 Int_t hits2mvd = Sts_2->GetNofMvdHits();
2239
2240 double Xpart1 = 0;
2241 double Ypart1 = 0;
2242 double Zpart1 = 0;
2243 double Xpart2 = 0;
2244 double Ypart2 = 0;
2245 double Zpart2 = 0;
2246 if (hits1mvd > 0) {
2247 Int_t mvdHitIndex1 = Sts_1->GetMvdHitIndex(0);
2248 CbmMvdHit* mvdHit1 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex1);
2249 Xpart1 = mvdHit1->GetX();
2250 Ypart1 = mvdHit1->GetY();
2251 Zpart1 = mvdHit1->GetZ();
2252 }
2253 else {
2254 Int_t stsHitIndex1 = Sts_1->GetStsHitIndex(0);
2255 CbmStsHit* stsHit1 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex1);
2256 Xpart1 = stsHit1->GetX();
2257 Ypart1 = stsHit1->GetY();
2258 Zpart1 = stsHit1->GetZ();
2259 }
2260
2261 if (hits2mvd > 0) {
2262 Int_t mvdHitIndex2 = Sts_2->GetMvdHitIndex(0);
2263 CbmMvdHit* mvdHit2 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex2);
2264 Xpart2 = mvdHit2->GetX();
2265 Ypart2 = mvdHit2->GetY();
2266 Zpart2 = mvdHit2->GetZ();
2267 }
2268 else {
2269 Int_t stsHitIndex2 = Sts_2->GetStsHitIndex(0);
2270 CbmStsHit* stsHit2 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex2);
2271 Xpart2 = stsHit2->GetX();
2272 Ypart2 = stsHit2->GetY();
2273 Zpart2 = stsHit2->GetZ();
2274 }
2275
2276 // check difference in 2 cm, because of two slices of every STS and Mvd stations
2277 if (TMath::Abs(Zpart1 - Zpart2) > 2
2278 && Zpart1 < Zpart2) { // if first hits are in different stations --> try to find the earliest common station
2279 for (int i = 1; i < hits1mvd; i++) { // start from second hit
2280 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2281 Int_t mvdHitIndex = Sts_1->GetMvdHitIndex(i);
2282 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2283 Xpart1 = mvdHit->GetX();
2284 Ypart1 = mvdHit->GetY();
2285 Zpart1 = mvdHit->GetZ();
2286 }
2287 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 < Zpart2) {
2288 for (int i = 0; i < hits1sts; i++) {
2289 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2290 Int_t stsHitIndex = Sts_1->GetStsHitIndex(i);
2291 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2292 Xpart1 = stsHit->GetX();
2293 Ypart1 = stsHit->GetY();
2294 Zpart1 = stsHit->GetZ();
2295 }
2296 }
2297 }
2298
2299 if (TMath::Abs(Zpart1 - Zpart2) > 2
2300 && Zpart1 > Zpart2) { // if first hits are in different stations --> try to find the earliest common station
2301 for (int i = 1; i < hits2mvd; i++) { // start from second hit
2302 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2303 Int_t mvdHitIndex = Sts_2->GetMvdHitIndex(i);
2304 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2305 Xpart2 = mvdHit->GetX();
2306 Ypart2 = mvdHit->GetY();
2307 Zpart2 = mvdHit->GetZ();
2308 }
2309 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 > Zpart2) {
2310 for (int i = 0; i < hits2sts; i++) {
2311 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2312 Int_t stsHitIndex = Sts_2->GetStsHitIndex(i);
2313 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2314 Xpart2 = stsHit->GetX();
2315 Ypart2 = stsHit->GetY();
2316 Zpart2 = stsHit->GetZ();
2317 }
2318 }
2319 }
2320
2321 // calculate angle if we found common station
2322 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
2323 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
2324 }
2325
2326 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
2327}
2328
2329void CbmKresConversionPhotons::DP_likesign_Mixing_Target(double AngleCut, double InvMassCut)
2330// mix particles with the same charge TARGET
2331{
2332 int nof_minus = DP_LK_EMT_momenta_minus_Target.size();
2333 for (int a = 0; a < nof_minus - 1; a++) {
2334 for (int b = a + 1; b < nof_minus; b++) {
2336 TVector3 e1 = DP_LK_EMT_momenta_minus_Target[a];
2337 TVector3 e2 = DP_LK_EMT_momenta_minus_Target[b];
2340
2341 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2342 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2343 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2344
2345 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2346 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2347
2348 // cuts
2349 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2350 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2351 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2352
2354
2356
2357 DP_LK_EMT_neg_Pt_all_Target->Fill(params.fPt);
2358 if (rings_amount == 0) DP_LK_EMT_neg_Pt_zero_Target->Fill(params.fPt);
2359 if (rings_amount == 1) DP_LK_EMT_neg_Pt_one_Target->Fill(params.fPt);
2360 if (rings_amount == 2) DP_LK_EMT_neg_Pt_two_Target->Fill(params.fPt);
2361 if ((rings_amount == 1 || rings_amount == 2)) { DP_LK_EMT_neg_Pt_onetwo_Target->Fill(params.fPt); }
2362 DP_LK_EMT_Pt_all_Target->Fill(params.fPt);
2363 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Target->Fill(params.fPt);
2364 if (rings_amount == 1) DP_LK_EMT_Pt_one_Target->Fill(params.fPt);
2365 if (rings_amount == 2) DP_LK_EMT_Pt_two_Target->Fill(params.fPt);
2366 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Target->Fill(params.fPt);
2367 }
2368 }
2369
2370
2371 int nof_plus = DP_LK_EMT_momenta_plus_Target.size();
2372 for (int a = 0; a < nof_plus - 1; a++) {
2373 for (int b = a + 1; b < nof_plus; b++) {
2375 TVector3 e1 = DP_LK_EMT_momenta_plus_Target[a];
2376 TVector3 e2 = DP_LK_EMT_momenta_plus_Target[b];
2379
2380 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2381 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2382 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2383
2384 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2385 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2386
2387 // cuts
2388 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2389 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2390 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2391
2393
2395
2396 DP_LK_EMT_pos_Pt_all_Target->Fill(params.fPt);
2397 if (rings_amount == 0) DP_LK_EMT_pos_Pt_zero_Target->Fill(params.fPt);
2398 if (rings_amount == 1) DP_LK_EMT_pos_Pt_one_Target->Fill(params.fPt);
2399 if (rings_amount == 2) DP_LK_EMT_pos_Pt_two_Target->Fill(params.fPt);
2400 if ((rings_amount == 1 || rings_amount == 2)) { DP_LK_EMT_pos_Pt_onetwo_Target->Fill(params.fPt); }
2401 DP_LK_EMT_Pt_all_Target->Fill(params.fPt);
2402 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Target->Fill(params.fPt);
2403 if (rings_amount == 1) DP_LK_EMT_Pt_one_Target->Fill(params.fPt);
2404 if (rings_amount == 2) DP_LK_EMT_Pt_two_Target->Fill(params.fPt);
2405 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Target->Fill(params.fPt);
2406 }
2407 }
2408}
2409
2410void CbmKresConversionPhotons::DP_likesign_Mixing_Outside(double AngleCut, double InvMassCut)
2411// mix particles with the same charge OUTSIDE
2412{
2413 int nof_minus = DP_LK_EMT_NofRings_minus_Outside.size();
2414 for (int a = 0; a < nof_minus - 1; a++) {
2415 for (int b = a + 1; b < nof_minus; b++) {
2419
2420 KFParticle electron;
2422 KFParticle positron;
2424 const KFParticle* daughters[2] = {&electron, &positron};
2425 KFParticle intersection;
2426 intersection.Construct(daughters, 2);
2427
2428 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
2429
2430 TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2431 TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2432
2433 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2434 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2435 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2436
2437 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2438 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2439
2440 // cuts
2441 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2442 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2443 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2444
2446
2448
2449 DP_LK_EMT_neg_Pt_all_Outside->Fill(params.fPt);
2450 if (rings_amount == 0) DP_LK_EMT_neg_Pt_zero_Outside->Fill(params.fPt);
2451 if (rings_amount == 1) DP_LK_EMT_neg_Pt_one_Outside->Fill(params.fPt);
2452 if (rings_amount == 2) DP_LK_EMT_neg_Pt_two_Outside->Fill(params.fPt);
2453 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_neg_Pt_onetwo_Outside->Fill(params.fPt);
2454 DP_LK_EMT_Pt_all_Outside->Fill(params.fPt);
2455 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Outside->Fill(params.fPt);
2456 if (rings_amount == 1) DP_LK_EMT_Pt_one_Outside->Fill(params.fPt);
2457 if (rings_amount == 2) DP_LK_EMT_Pt_two_Outside->Fill(params.fPt);
2458 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Outside->Fill(params.fPt);
2459 }
2460 }
2461
2462
2463 int nof_plus = DP_LK_EMT_NofRings_plus_Outside.size();
2464 for (int a = 0; a < nof_plus - 1; a++) {
2465 for (int b = a + 1; b < nof_plus; b++) {
2469
2470 KFParticle electron;
2472 KFParticle positron;
2474 const KFParticle* daughters[2] = {&electron, &positron};
2475 KFParticle intersection;
2476 intersection.Construct(daughters, 2);
2477
2478 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
2479
2480 TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2481 TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2482
2483 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2484 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2485 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2486
2487 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2488 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2489
2490 // cuts
2491 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2492 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2493 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2494
2496
2498
2499 DP_LK_EMT_pos_Pt_all_Outside->Fill(params.fPt);
2500 if (rings_amount == 0) DP_LK_EMT_pos_Pt_zero_Outside->Fill(params.fPt);
2501 if (rings_amount == 1) DP_LK_EMT_pos_Pt_one_Outside->Fill(params.fPt);
2502 if (rings_amount == 2) DP_LK_EMT_pos_Pt_two_Outside->Fill(params.fPt);
2503 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_pos_Pt_onetwo_Outside->Fill(params.fPt);
2504 DP_LK_EMT_Pt_all_Outside->Fill(params.fPt);
2505 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Outside->Fill(params.fPt);
2506 if (rings_amount == 1) DP_LK_EMT_Pt_one_Outside->Fill(params.fPt);
2507 if (rings_amount == 2) DP_LK_EMT_Pt_two_Outside->Fill(params.fPt);
2508 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Outside->Fill(params.fPt);
2509 }
2510 }
2511}
2512
2513
2514void CbmKresConversionPhotons::DP_Mixing_Target(double AngleCut, double InvMassCut)
2515// TARGET
2516{
2517 int nof_Target = DP_EMT_Event_minus_Target.size();
2518 cout << "Mixing for direct photons in Target - nof entries " << nof_Target << endl;
2519
2520 for (size_t a = 0; a < DP_EMT_Event_minus_Target.size(); a++) {
2521 for (size_t b = 0; b < DP_EMT_Event_plus_Target.size(); b++) {
2523 continue; // to make sure that two particles are from two different events
2524 TVector3 e1 = DP_EMT_momenta_minus_Target[a];
2525 TVector3 e2 = DP_EMT_momenta_plus_Target[b];
2526 std::vector<TVector3> hits1 = DP_EMT_Hits_minus_Target[a];
2527 std::vector<TVector3> hits2 = DP_EMT_Hits_plus_Target[b];
2528
2529 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2530 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2531 double PlaneAngle_last = CalculatePlaneAngle_last_fromHits(hits1, hits2);
2532
2533 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2534 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2535
2536 // cuts
2537 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2538 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2539 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2540
2543
2544 DP_EMT_Pt_all_Target->Fill(params.fPt);
2545 DP_EMT_Pt_all_Both->Fill(params.fPt);
2546 if (rings_amount == 0) {
2547 DP_EMT_Pt_zero_Target->Fill(params.fPt);
2548 DP_EMT_Pt_zero_Both->Fill(params.fPt);
2549 }
2550 if (rings_amount == 1) {
2551 DP_EMT_Pt_one_Target->Fill(params.fPt);
2552 DP_EMT_Pt_one_Both->Fill(params.fPt);
2553 }
2554 if (rings_amount == 2) {
2555 DP_EMT_Pt_two_Target->Fill(params.fPt);
2556 DP_EMT_Pt_two_Both->Fill(params.fPt);
2557 }
2558 if ((rings_amount == 1 || rings_amount == 2)) {
2559 DP_EMT_Pt_onetwo_Target->Fill(params.fPt);
2560 DP_EMT_Pt_onetwo_Both->Fill(params.fPt);
2561 }
2562 }
2563 }
2564}
2565
2566
2567void CbmKresConversionPhotons::DP_Mixing_Outside(double AngleCut, double InvMassCut)
2568// OUTSIDE
2569{
2570 int nof_Outside = DP_EMT_Event_minus_Outside.size();
2571 cout << "Mixing for direct photons in Outside - nof entries " << nof_Outside << endl;
2572
2573 for (size_t a = 0; a < DP_EMT_Event_minus_Outside.size(); a++) {
2574 for (size_t b = 0; b < DP_EMT_Event_plus_Outside.size(); b++) {
2576 continue; // to make sure that two particles are from two different events
2577
2578 KFParticle electron = DP_EMT_KFTrack_minus_Outside[a];
2579 KFParticle positron = DP_EMT_KFTrack_plus_Outside[b];
2580
2581 const KFParticle* daughters[2] = {&electron, &positron};
2582 KFParticle intersection;
2583 intersection.Construct(daughters, 2);
2584
2585 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
2586
2587 // TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2588 // TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2589
2590 TVector3 e1(electron.KFParticleBase::Px(), electron.KFParticleBase::Py(), electron.KFParticleBase::Pz());
2591 TVector3 e2(positron.KFParticleBase::Px(), positron.KFParticleBase::Py(), positron.KFParticleBase::Pz());
2592
2593 std::vector<TVector3> hits1 = DP_EMT_Hits_minus_Outside[a];
2594 std::vector<TVector3> hits2 = DP_EMT_Hits_plus_Outside[b];
2595
2596 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2597 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2598 double PlaneAngle_last = CalculatePlaneAngle_last_fromHits(hits1, hits2);
2599
2600 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), e1, e2);
2601 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), e1, e2);
2602
2603 // cuts
2604 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2605 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2606 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2607
2610
2611 DP_EMT_Pt_all_Outside->Fill(params.fPt);
2612 DP_EMT_Pt_all_Both->Fill(params.fPt);
2613 if (rings_amount == 0) {
2614 DP_EMT_Pt_zero_Outside->Fill(params.fPt);
2615 DP_EMT_Pt_zero_Both->Fill(params.fPt);
2616 }
2617 if (rings_amount == 1) {
2618 DP_EMT_Pt_one_Outside->Fill(params.fPt);
2619 DP_EMT_Pt_one_Both->Fill(params.fPt);
2620 }
2621 if (rings_amount == 2) {
2622 DP_EMT_Pt_two_Outside->Fill(params.fPt);
2623 DP_EMT_Pt_two_Both->Fill(params.fPt);
2624 }
2625 if ((rings_amount == 1 || rings_amount == 2)) {
2626 DP_EMT_Pt_onetwo_Outside->Fill(params.fPt);
2627 DP_EMT_Pt_onetwo_Both->Fill(params.fPt);
2628 }
2629 }
2630 }
2631}
2632
2633
2635{
2636 gDirectory->mkdir("direct photons");
2637 gDirectory->cd("direct photons");
2638
2639
2640 gDirectory->mkdir("Target");
2641 gDirectory->cd("Target");
2642 gDirectory->mkdir("CheckCuts_Target");
2643 gDirectory->cd("CheckCuts_Target");
2644 for (UInt_t i = 0; i < fHistoList_dp_cuts_Target.size(); i++) {
2645 fHistoList_dp_cuts_Target[i]->Write();
2646 }
2647 gDirectory->cd("..");
2648 gDirectory->mkdir("all");
2649 gDirectory->cd("all");
2650 for (UInt_t i = 0; i < fHistoList_dp_all_Target.size(); i++) {
2651 fHistoList_dp_all_Target[i]->Write();
2652 }
2653 gDirectory->cd("..");
2654 gDirectory->mkdir("zero");
2655 gDirectory->cd("zero");
2656 for (UInt_t i = 0; i < fHistoList_dp_zero_Target.size(); i++) {
2657 fHistoList_dp_zero_Target[i]->Write();
2658 }
2659 gDirectory->cd("..");
2660 gDirectory->mkdir("one");
2661 gDirectory->cd("one");
2662 for (UInt_t i = 0; i < fHistoList_dp_one_Target.size(); i++) {
2663 fHistoList_dp_one_Target[i]->Write();
2664 }
2665 gDirectory->cd("..");
2666 gDirectory->mkdir("two");
2667 gDirectory->cd("two");
2668 for (UInt_t i = 0; i < fHistoList_dp_two_Target.size(); i++) {
2669 fHistoList_dp_two_Target[i]->Write();
2670 }
2671 gDirectory->cd("..");
2672 gDirectory->mkdir("onetwo");
2673 gDirectory->cd("onetwo");
2674 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Target.size(); i++) {
2675 fHistoList_dp_onetwo_Target[i]->Write();
2676 }
2677 gDirectory->cd("..");
2678 for (UInt_t i = 0; i < fHistoList_dp_Target.size(); i++) {
2679 fHistoList_dp_Target[i]->Write();
2680 }
2681 gDirectory->cd("..");
2682
2683
2684 gDirectory->mkdir("Outside");
2685 gDirectory->cd("Outside");
2686 gDirectory->mkdir("CheckCuts_Outside");
2687 gDirectory->cd("CheckCuts_Outside");
2688 for (UInt_t i = 0; i < fHistoList_dp_cuts_Outside.size(); i++) {
2689 fHistoList_dp_cuts_Outside[i]->Write();
2690 }
2691 gDirectory->cd("..");
2692 gDirectory->mkdir("all");
2693 gDirectory->cd("all");
2694 for (UInt_t i = 0; i < fHistoList_dp_all_Outside.size(); i++) {
2695 fHistoList_dp_all_Outside[i]->Write();
2696 }
2697 gDirectory->cd("..");
2698 gDirectory->mkdir("zero");
2699 gDirectory->cd("zero");
2700 for (UInt_t i = 0; i < fHistoList_dp_zero_Outside.size(); i++) {
2701 fHistoList_dp_zero_Outside[i]->Write();
2702 }
2703 gDirectory->cd("..");
2704 gDirectory->mkdir("one");
2705 gDirectory->cd("one");
2706 for (UInt_t i = 0; i < fHistoList_dp_one_Outside.size(); i++) {
2707 fHistoList_dp_one_Outside[i]->Write();
2708 }
2709 gDirectory->cd("..");
2710 gDirectory->mkdir("two");
2711 gDirectory->cd("two");
2712 for (UInt_t i = 0; i < fHistoList_dp_two_Outside.size(); i++) {
2713 fHistoList_dp_two_Outside[i]->Write();
2714 }
2715 gDirectory->cd("..");
2716 gDirectory->mkdir("onetwo");
2717 gDirectory->cd("onetwo");
2718 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Outside.size(); i++) {
2719 fHistoList_dp_onetwo_Outside[i]->Write();
2720 }
2721 gDirectory->cd("..");
2722 for (UInt_t i = 0; i < fHistoList_dp_Outside.size(); i++) {
2723 fHistoList_dp_Outside[i]->Write();
2724 }
2725 gDirectory->cd("..");
2726
2727
2728 gDirectory->mkdir("Both");
2729 gDirectory->cd("Both");
2730 gDirectory->mkdir("CheckCuts_Both");
2731 gDirectory->cd("CheckCuts_Both");
2732 for (UInt_t i = 0; i < fHistoList_dp_cuts_Both.size(); i++) {
2733 fHistoList_dp_cuts_Both[i]->Write();
2734 }
2735 gDirectory->cd("..");
2736 gDirectory->mkdir("all");
2737 gDirectory->cd("all");
2738 for (UInt_t i = 0; i < fHistoList_dp_all_Both.size(); i++) {
2739 fHistoList_dp_all_Both[i]->Write();
2740 }
2741 gDirectory->cd("..");
2742 gDirectory->mkdir("zero");
2743 gDirectory->cd("zero");
2744 for (UInt_t i = 0; i < fHistoList_dp_zero_Both.size(); i++) {
2745 fHistoList_dp_zero_Both[i]->Write();
2746 }
2747 gDirectory->cd("..");
2748 gDirectory->mkdir("one");
2749 gDirectory->cd("one");
2750 for (UInt_t i = 0; i < fHistoList_dp_one_Both.size(); i++) {
2751 fHistoList_dp_one_Both[i]->Write();
2752 }
2753 gDirectory->cd("..");
2754 gDirectory->mkdir("two");
2755 gDirectory->cd("two");
2756 for (UInt_t i = 0; i < fHistoList_dp_two_Both.size(); i++) {
2757 fHistoList_dp_two_Both[i]->Write();
2758 }
2759 gDirectory->cd("..");
2760 gDirectory->mkdir("onetwo");
2761 gDirectory->cd("onetwo");
2762 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Both.size(); i++) {
2763 fHistoList_dp_onetwo_Both[i]->Write();
2764 }
2765 gDirectory->cd("..");
2766 for (UInt_t i = 0; i < fHistoList_dp_Both.size(); i++) {
2767 fHistoList_dp_Both[i]->Write();
2768 }
2769 gDirectory->cd("..");
2770
2771
2772 gDirectory->cd("..");
2773}
2774
2775
2777{
2778 // Target
2779 Mother_PDG_Target = new TH1D("Mother_PDG_Target", "Mother_PDG_Target; Id;#", 1000, -10, 490);
2781 GrandMother_PDG_Target = new TH1D("GrandMother_PDG_Target", "GrandMother_PDG_Target; Id;#", 1000, -10, 490);
2783
2784 // Outside
2785 Mother_PDG_Outside = new TH1D("Mother_PDG_Outside", "Mother_PDG_Outside; Id;#", 1000, -10, 490);
2787 GrandMother_PDG_Outside = new TH1D("GrandMother_PDG_Outside", "GrandMother_PDG_Outside; Id;#", 1000, -10, 490);
2789
2790 // Both
2792 new TH2D("Pdg_vs_Distance_for_dp", "Pdg_vs_Distance_for_dp; pdg; distance in cm", 2500, 0, 2499, 500, 0, 50);
2794 P_vs_Distance_for_dp = new TH2D("P_vs_Distance_for_dp",
2795 "Distance between projected track and center of the ring (for e+ "
2796 "and e-); P in GeV/c^{2}; distance in cm",
2797 300, 0, 3, 300, 0, 15);
2799 DP_AnnTruePairs = new TH1D("DP_AnnTruePairs", "DP_AnnTruePairs; Ann value ;#", 100, -1.2, 1.2);
2801 DP_AnnFalsePairs = new TH1D("DP_AnnFalsePairs", "DP_AnnFalsePairs; Ann value ;#", 100, -1.2, 1.2);
2804 new TH1D("DP_AnnTruePairs_AfterCuts", "DP_AnnTruePairs_AfterCuts; Ann value ;#", 100, -1.2, 1.2);
2807 new TH1D("DP_AnnFalsePairs_AfterCuts", "DP_AnnFalsePairs_AfterCuts; Ann value ;#", 100, -1.2, 1.2);
2809
2810
2813 DP_candidates_InvMass_vs_OA_Both = new TH2D("DP_candidates_InvMass_vs_OA_Both",
2814 "DP_candidates_InvMass_vs_OA_Both; invariant mass in GeV/c^{2}; "
2815 "opening angle in degree",
2816 500, 0, 0.5, 500, 0, 50);
2818 DP_InvMass_vs_OA_Both = new TH2D("DP_InvMass_vs_OA_Both",
2819 "DP_InvMass_vs_OA_Both; invariant mass in "
2820 "GeV/c^{2}; opening angle in degree",
2821 500, 0, 0.5, 500, 0, 50);
2823 DP_candidates_InvMass_Both = new TH1D("DP_candidates_InvMass_Both",
2824 "DP_candidates_InvMass_Both; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2826 DP_InvMass_Both = new TH1D("DP_InvMass_Both", "DP_InvMass_Both; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2829 new TH1D("DP_candidates_OA_Both", "DP_candidates_OA_Both; opening angle in degree;#", 300, -0.1, 29.9);
2831 DP_OA_Both = new TH1D("DP_OA_Both", "DP_OA_Both; opening angle in degree;#", 300, -0.1, 29.9);
2834 new TH1D("DP_candidates_PlaneAngles_last_Both", "DP_candidates_PlaneAngles_last_Both; #theta angle in degree;#",
2835 720, -1., 179.);
2838 new TH1D("DP_PlaneAngles_last_Both", "DP_PlaneAngles_last_Both; #theta angle in degree;#", 720, -1., 179.);
2841 new TH1D("DP_candidates_PlaneAngles_first_Both", "DP_candidates_PlaneAngles_first_Both; #theta angle in degree;#",
2842 720, -1., 179.);
2845 new TH1D("DP_PlaneAngles_first_Both", "DP_PlaneAngles_first_Both; #theta angle in degree;#", 720, -1., 179.);
2847
2849 DP_candidates_InvMass_vs_OA_Target = new TH2D("DP_candidates_InvMass_vs_OA_Target",
2850 "DP_candidates_InvMass_vs_OA_Target; invariant mass in GeV/c^{2}; "
2851 "opening angle in degree",
2852 500, 0, 0.5, 500, 0, 50);
2854 DP_InvMass_vs_OA_Target = new TH2D("DP_InvMass_vs_OA_Target",
2855 "DP_InvMass_vs_OA_Target; invariant mass "
2856 "in GeV/c^{2}; opening angle in degree",
2857 500, 0, 0.5, 500, 0, 50);
2860 "DP_candidates_InvMass_Target", "DP_candidates_InvMass_Target; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2863 new TH1D("DP_InvMass_Target", "DP_InvMass_Target; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2866 new TH1D("DP_candidates_OA_Target", "DP_candidates_OA_Target; opening angle in degree;#", 300, -0.1, 29.9);
2868 DP_OA_Target = new TH1D("DP_OA_Target", "DP_OA_Target; opening angle in degree;#", 300, -0.1, 29.9);
2871 new TH1D("DP_candidates_PlaneAngles_last_Target", "DP_candidates_PlaneAngles_last_Target; #theta angle in degree;#",
2872 720, -1., 179.);
2875 new TH1D("DP_PlaneAngles_last_Target", "DP_PlaneAngles_last_Target; #theta angle in degree;#", 720, -1., 179.);
2878 new TH1D("DP_candidates_PlaneAngles_first_Target",
2879 "DP_candidates_PlaneAngles_first_Target; #theta angle in degree;#", 720, -1., 179.);
2882 new TH1D("DP_PlaneAngles_first_Target", "DP_PlaneAngles_first_Target; #theta angle in degree;#", 720, -1., 179.);
2884
2886 DP_candidates_InvMass_vs_OA_Outside = new TH2D("DP_candidates_InvMass_vs_OA_Outside",
2887 "DP_candidates_InvMass_vs_OA_Outside; invariant mass in "
2888 "GeV/c^{2}; opening angle in degree",
2889 500, 0, 0.5, 500, 0, 50);
2891 DP_InvMass_vs_OA_Outside = new TH2D("DP_InvMass_vs_OA_Outside",
2892 "DP_InvMass_vs_OA_Outside; invariant mass in GeV/c^{2}; opening "
2893 "angle in degree",
2894 500, 0, 0.5, 500, 0, 50);
2897 "DP_candidates_InvMass_Outside", "DP_candidates_InvMass_Outside; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2900 new TH1D("DP_InvMass_Outside", "DP_InvMass_Outside; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2903 new TH1D("DP_candidates_OA_Outside", "DP_candidates_OA_Outside; opening angle in degree;#", 300, -0.1, 29.9);
2905 DP_OA_Outside = new TH1D("DP_OA_Outside", "DP_OA_Outside; opening angle in degree;#", 300, -0.1, 29.9);
2908 new TH1D("DP_candidates_PlaneAngles_last_Outside",
2909 "DP_candidates_PlaneAngles_last_Outside; #theta angle in degree;#", 720, -1., 179.);
2912 new TH1D("DP_PlaneAngles_last_Outside", "DP_PlaneAngles_last_Outside; #theta angle in degree;#", 720, -1., 179.);
2915 new TH1D("DP_candidates_PlaneAngles_first_Outside",
2916 "DP_candidates_PlaneAngles_first_Outside; #theta angle in degree;#", 720, -1., 179.);
2919 new TH1D("DP_PlaneAngles_first_Outside", "DP_PlaneAngles_first_Outside; #theta angle in degree;#", 720, -1., 179.);
2921
2922
2923 // Target => all
2924 DP_InvMassReco_all_Target = new TH1D("DP_InvMassReco_all_Target",
2925 "DP_InvMassReco_all_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2928 new TH1D("DP_OpeningAngleReco_all_Target", "DP_OpeningAngleReco_all_Target; angle [deg];#", 45, -0.5, 4.);
2930 DP_Pdg_all_Target = new TH1D("DP_Pdg_all_Target", "DP_Pdg_all_Target; Id;#", 1000, -10, 490);
2932 DP_P_reco_all_Target = new TH1D("DP_P_reco_all_Target", "DP_P_reco_all_Target; P in GeV/c^{2};#", 200, 0, 10);
2934 DP_Pt_reco_all_Target = new TH1D("DP_Pt_reco_all_Target", "DP_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2937 new TH1D("Ph_fromTarget_Pt_reco_all_Target", "Ph_fromTarget_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2940 new TH1D("Ph_fromPions_Pt_reco_all_Target", "Ph_fromPions_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2943 new TH1D("Ph_fromEtas_Pt_reco_all_Target", "Ph_fromEtas_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2946 new TH1D("Ph_fromDalitz_Pt_reco_all_Target", "Ph_fromDalitz_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2948
2949 // Target => zero
2950 DP_InvMassReco_zero_Target = new TH1D("DP_InvMassReco_zero_Target",
2951 "DP_InvMassReco_zero_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2954 new TH1D("DP_OpeningAngleReco_zero_Target", "DP_OpeningAngleReco_zero_Target; angle [deg];#", 45, -0.5, 4.);
2956 DP_Pdg_zero_Target = new TH1D("DP_Pdg_zero_Target", "DP_Pdg_zero_Target; Id;#", 1000, -10, 490);
2958 DP_P_reco_zero_Target = new TH1D("DP_P_reco_zero_Target", "DP_P_reco_zero_Target; P in GeV/c^{2};#", 200, 0, 10);
2960 DP_Pt_reco_zero_Target = new TH1D("DP_Pt_reco_zero_Target", "DP_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2963 new TH1D("Ph_fromTarget_Pt_reco_zero_Target", "Ph_fromTarget_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2966 new TH1D("Ph_fromPions_Pt_reco_zero_Target", "Ph_fromPions_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2969 new TH1D("Ph_fromEtas_Pt_reco_zero_Target", "Ph_fromEtas_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2972 new TH1D("Ph_fromDalitz_Pt_reco_zero_Target", "Ph_fromDalitz_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2974
2975 // Target => one
2976 DP_InvMassReco_one_Target = new TH1D("DP_InvMassReco_one_Target",
2977 "DP_InvMassReco_one_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2980 new TH1D("DP_OpeningAngleReco_one_Target", "DP_OpeningAngleReco_one_Target; angle [deg];#", 45, -0.5, 4.);
2982 DP_Pdg_one_Target = new TH1D("DP_Pdg_one_Target", "DP_Pdg_one_Target; Id;#", 1000, -10, 490);
2984 DP_P_reco_one_Target = new TH1D("DP_P_reco_one_Target", "DP_P_reco_one_Target; P in GeV/c^{2};#", 200, 0, 10);
2986 DP_Pt_reco_one_Target = new TH1D("DP_Pt_reco_one_Target", "DP_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2989 new TH1D("Ph_fromTarget_Pt_reco_one_Target", "Ph_fromTarget_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2992 new TH1D("Ph_fromPions_Pt_reco_one_Target", "Ph_fromPions_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2995 new TH1D("Ph_fromEtas_Pt_reco_one_Target", "Ph_fromEtas_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2998 new TH1D("Ph_fromDalitz_Pt_reco_one_Target", "Ph_fromDalitz_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3000
3001 // Target => two
3002 DP_InvMassReco_two_Target = new TH1D("DP_InvMassReco_two_Target",
3003 "DP_InvMassReco_two_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3006 new TH1D("DP_OpeningAngleReco_two_Target", "DP_OpeningAngleReco_two_Target; angle [deg];#", 45, -0.5, 4.);
3008 DP_Pdg_two_Target = new TH1D("DP_Pdg_two_Target", "DP_Pdg_two_Target; Id;#", 1000, -10, 490);
3010 DP_P_reco_two_Target = new TH1D("DP_P_reco_two_Target", "DP_P_reco_two_Target; P in GeV/c^{2};#", 200, 0, 10);
3012 DP_Pt_reco_two_Target = new TH1D("DP_Pt_reco_two_Target", "DP_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3015 new TH1D("Ph_fromTarget_Pt_reco_two_Target", "Ph_fromTarget_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3018 new TH1D("Ph_fromPions_Pt_reco_two_Target", "Ph_fromPions_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3021 new TH1D("Ph_fromEtas_Pt_reco_two_Target", "Ph_fromEtas_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3024 new TH1D("Ph_fromXi_Pt_reco_two_Target", "Ph_fromXi_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3027 new TH1D("Ph_fromDalitz_Pt_reco_two_Target", "Ph_fromDalitz_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3030 new TH1D("Ph_fromOther_Pt_reco_two_Target", "Ph_fromOther_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3032 Ph_twoFromTarget_Pt_reco_two_Target = new TH1D("Ph_twoFromTarget_Pt_reco_two_Target",
3033 "Ph_twoFromTarget_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3036 new TH1D("Ph_fromCombinatorial_Pt_reco_two_Target", "Ph_fromCombinatorial_Pt_reco_two_Target; P_{t} in GeV/c^{2};#",
3037 30, 0, 3);
3040 "Ph_fromConversion_Pt_reco_two_Target", "Ph_fromConversion_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3042
3044 new TH1D("twoFromTarget_PDG_two_Target", "twoFromTarget_PDG_two_Target; Id;#", 1000, -10, 490);
3047 new TH1D("fromCombinatorial_PDG_two_Target", "fromCombinatorial_PDG_two_Target; Id;#", 1000, -10, 490);
3050 new TH1D("CombinatorialMotherPdg_two_Target", "CombinatorialMotherPdg_two_Target; Id;#", 1000, -10, 490);
3053 new TH1D("CombinatorialGrMotherPdg_two_Target", "CombinatorialGrMotherPdg_two_Target; Id;#", 1000, -10, 490);
3055 Electrons_two_Target = new TH1D("Electrons_two_Target", "Electrons_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3057 Pions_two_Target = new TH1D("Pions_two_Target", "Pions_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3060 new TH1D("PionElectron_two_Target", "PionElectron_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3063 new TH1D("elsePionOrElectron_two_Target", "elsePionOrElectron_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3066 new TH1D("DalitzAndConversion_Pt_two_Target", "DalitzAndConversion_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3069 new TH1D("DoubleConversion_Pt_two_Target", "DoubleConversion_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3072 new TH1D("fromFireball_P_two_Target", "fromFireball_P_two_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3075 new TH1D("twoFromTarget_P_two_Target", "twoFromTarget_P_two_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3078 new TH1D("fromCombinatorial_electron_P_two_Target", "fromCombinatorial_electron_P_two_Target; P_{t} in GeV/c^{2};#",
3079 120, 0, 6);
3082 new TH1D("fromCombinatorial_NOTelectron_P_two_Target",
3083 "fromCombinatorial_NOTelectron_P_two_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3085
3086 // Target => onetwo
3088 "DP_InvMassReco_onetwo_Target", "DP_InvMassReco_onetwo_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3091 new TH1D("DP_OpeningAngleReco_onetwo_Target", "DP_OpeningAngleReco_onetwo_Target; angle [deg];#", 45, -0.5, 4.);
3093 DP_Pdg_onetwo_Target = new TH1D("DP_Pdg_onetwo_Target", "DP_Pdg_onetwo_Target; Id;#", 1000, -10, 490);
3096 new TH1D("DP_P_reco_onetwo_Target", "DP_P_reco_onetwo_Target; P in GeV/c^{2};#", 200, 0, 10);
3099 new TH1D("DP_Pt_reco_onetwo_Target", "DP_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3101 Ph_fromTarget_Pt_reco_onetwo_Target = new TH1D("Ph_fromTarget_Pt_reco_onetwo_Target",
3102 "Ph_fromTarget_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3104 Ph_fromPions_Pt_reco_onetwo_Target = new TH1D("Ph_fromPions_Pt_reco_onetwo_Target",
3105 "Ph_fromPions_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3108 new TH1D("Ph_fromEtas_Pt_reco_onetwo_Target", "Ph_fromEtas_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3111 new TH1D("Ph_fromXi_Pt_reco_onetwo_Target", "Ph_fromXi_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3113 Ph_fromDalitz_Pt_reco_onetwo_Target = new TH1D("Ph_fromDalitz_Pt_reco_onetwo_Target",
3114 "Ph_fromDalitz_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3116 Ph_fromOther_Pt_reco_onetwo_Target = new TH1D("Ph_fromOther_Pt_reco_onetwo_Target",
3117 "Ph_fromOther_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3120 "Ph_twoFromTarget_Pt_reco_onetwo_Target", "Ph_twoFromTarget_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3123 new TH1D("Ph_fromCombinatorial_Pt_reco_onetwo_Target",
3124 "Ph_fromCombinatorial_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3127 new TH1D("Ph_fromConversion_Pt_reco_onetwo_Target", "Ph_fromConversion_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#",
3128 30, 0, 3);
3130
3132 new TH1D("twoFromTarget_PDG_onetwo_Target", "twoFromTarget_PDG_onetwo_Target; Id;#", 1000, -10, 490);
3135 new TH1D("fromCombinatorial_PDG_onetwo_Target", "fromCombinatorial_PDG_onetwo_Target; Id;#", 1000, -10, 490);
3138 new TH1D("CombinatorialMotherPdg_onetwo_Target", "CombinatorialMotherPdg_onetwo_Target; Id;#", 1000, -10, 490);
3141 new TH1D("CombinatorialGrMotherPdg_onetwo_Target", "CombinatorialGrMotherPdg_onetwo_Target; Id;#", 1000, -10, 490);
3144 new TH1D("Electrons_onetwo_Target", "Electrons_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3146 Pions_onetwo_Target = new TH1D("Pions_onetwo_Target", "Pions_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3149 new TH1D("PionElectron_onetwo_Target", "PionElectron_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3152 new TH1D("elsePionOrElectron_onetwo_Target", "elsePionOrElectron_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3155 "DalitzAndConversion_Pt_onetwo_Target", "DalitzAndConversion_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3158 new TH1D("DoubleConversion_Pt_onetwo_Target", "DoubleConversion_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3161 new TH1D("fromFireball_P_onetwo_Target", "fromFireball_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3164 new TH1D("twoFromTarget_P_onetwo_Target", "twoFromTarget_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3167 new TH1D("fromCombinatorial_electron_P_onetwo_Target",
3168 "fromCombinatorial_electron_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3171 new TH1D("fromCombinatorial_NOTelectron_P_onetwo_Target",
3172 "fromCombinatorial_NOTelectron_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3174
3175
3176 // Outside => all
3177 DP_InvMassReco_all_Outside = new TH1D("DP_InvMassReco_all_Outside",
3178 "DP_InvMassReco_all_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3181 new TH1D("DP_OpeningAngleReco_all_Outside", "DP_OpeningAngleReco_all_Outside; angle [deg];#", 45, -0.5, 4.);
3183 DP_Pdg_all_Outside = new TH1D("DP_Pdg_all_Outside", "DP_Pdg_all_Outside; Id;#", 1000, -10, 490);
3185 DP_P_reco_all_Outside = new TH1D("DP_P_reco_all_Outside", "DP_P_reco_all_Outside; P in GeV/c^{2};#", 200, 0, 10);
3187 DP_Pt_reco_all_Outside = new TH1D("DP_Pt_reco_all_Outside", "DP_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3190 new TH1D("Ph_fromTarget_Pt_reco_all_Outside", "Ph_fromTarget_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3193 new TH1D("Ph_fromPions_Pt_reco_all_Outside", "Ph_fromPions_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3196 new TH1D("Ph_fromEtas_Pt_reco_all_Outside", "Ph_fromEtas_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3199 new TH1D("Ph_fromDalitz_Pt_reco_all_Outside", "Ph_fromDalitz_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3201
3202 // Outside => zero
3203 DP_InvMassReco_zero_Outside = new TH1D(
3204 "DP_InvMassReco_zero_Outside", "DP_InvMassReco_zero_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3207 new TH1D("DP_OpeningAngleReco_zero_Outside", "DP_OpeningAngleReco_zero_Outside; angle [deg];#", 45, -0.5, 4.);
3209 DP_Pdg_zero_Outside = new TH1D("DP_Pdg_zero_Outside", "DP_Pdg_zero_Outside; Id;#", 1000, -10, 490);
3211 DP_P_reco_zero_Outside = new TH1D("DP_P_reco_zero_Outside", "DP_P_reco_zero_Outside; P in GeV/c^{2};#", 200, 0, 10);
3214 new TH1D("DP_Pt_reco_zero_Outside", "DP_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3216 Ph_fromTarget_Pt_reco_zero_Outside = new TH1D("Ph_fromTarget_Pt_reco_zero_Outside",
3217 "Ph_fromTarget_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3220 new TH1D("Ph_fromPions_Pt_reco_zero_Outside", "Ph_fromPions_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3223 new TH1D("Ph_fromEtas_Pt_reco_zero_Outside", "Ph_fromEtas_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3225 Ph_fromDalitz_Pt_reco_zero_Outside = new TH1D("Ph_fromDalitz_Pt_reco_zero_Outside",
3226 "Ph_fromDalitz_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3228
3229 // Outside => one
3230 DP_InvMassReco_one_Outside = new TH1D("DP_InvMassReco_one_Outside",
3231 "DP_InvMassReco_one_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3234 new TH1D("DP_OpeningAngleReco_one_Outside", "DP_OpeningAngleReco_one_Outside; angle [deg];#", 45, -0.5, 4.);
3236 DP_Pdg_one_Outside = new TH1D("DP_Pdg_one_Outside", "DP_Pdg_one_Outside; Id;#", 1000, -10, 490);
3238 DP_P_reco_one_Outside = new TH1D("DP_P_reco_one_Outside", "DP_P_reco_one_Outside; P in GeV/c^{2};#", 200, 0, 10);
3240 DP_Pt_reco_one_Outside = new TH1D("DP_Pt_reco_one_Outside", "DP_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3243 new TH1D("Ph_fromTarget_Pt_reco_one_Outside", "Ph_fromTarget_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3246 new TH1D("Ph_fromPions_Pt_reco_one_Outside", "Ph_fromPions_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3249 new TH1D("Ph_fromEtas_Pt_reco_one_Outside", "Ph_fromEtas_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3252 new TH1D("Ph_fromDalitz_Pt_reco_one_Outside", "Ph_fromDalitz_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3254
3255 // Outside => two
3256 DP_InvMassReco_two_Outside = new TH1D("DP_InvMassReco_two_Outside",
3257 "DP_InvMassReco_two_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3260 new TH1D("DP_OpeningAngleReco_two_Outside", "DP_OpeningAngleReco_two_Outside; angle [deg];#", 45, -0.5, 4.);
3262 DP_Pdg_two_Outside = new TH1D("DP_Pdg_two_Outside", "DP_Pdg_two_Outside; Id;#", 1000, -10, 490);
3264 DP_P_reco_two_Outside = new TH1D("DP_P_reco_two_Outside", "DP_P_reco_two_Outside; P in GeV/c^{2};#", 200, 0, 10);
3266 DP_Pt_reco_two_Outside = new TH1D("DP_Pt_reco_two_Outside", "DP_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3269 new TH1D("Ph_fromTarget_Pt_reco_two_Outside", "Ph_fromTarget_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3272 new TH1D("Ph_fromPions_Pt_reco_two_Outside", "Ph_fromPions_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3275 new TH1D("Ph_fromEtas_Pt_reco_two_Outside", "Ph_fromEtas_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3278 new TH1D("Ph_fromXi_Pt_reco_two_Outside", "Ph_fromXi_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3281 new TH1D("Ph_fromDalitz_Pt_reco_two_Outside", "Ph_fromDalitz_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3284 new TH1D("Ph_fromOther_Pt_reco_two_Outside", "Ph_fromOther_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3287 "Ph_twoFromTarget_Pt_reco_two_Outside", "Ph_twoFromTarget_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3290 new TH1D("Ph_fromCombinatorial_Pt_reco_two_Outside",
3291 "Ph_fromCombinatorial_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3294 "Ph_fromConversion_Pt_reco_two_Outside", "Ph_fromConversion_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3297 new TH1D("twoFromTarget_PDG_two_Outside", "twoFromTarget_PDG_two_Outside; Id;#", 1000, -10, 490);
3300 new TH1D("fromCombinatorial_PDG_two_Outside", "fromCombinatorial_PDG_two_Outside; Id;#", 1000, -10, 490);
3303 new TH1D("CombinatorialMotherPdg_two_Outside", "CombinatorialMotherPdg_two_Outside; Id;#", 1000, -10, 490);
3306 new TH1D("CombinatorialGrMotherPdg_two_Outside", "CombinatorialGrMotherPdg_two_Outside; Id;#", 1000, -10, 490);
3308 Electrons_two_Outside = new TH1D("Electrons_two_Outside", "Electrons_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3310 Pions_two_Outside = new TH1D("Pions_two_Outside", "Pions_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3313 new TH1D("PionElectron_two_Outside", "PionElectron_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3316 new TH1D("elsePionOrElectron_two_Outside", "elsePionOrElectron_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3318 DalitzAndConversion_Pt_two_Outside = new TH1D("DalitzAndConversion_Pt_two_Outside",
3319 "DalitzAndConversion_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3322 new TH1D("DoubleConversion_Pt_two_Outside", "DoubleConversion_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3325 new TH1D("fromFireball_P_two_Outside", "fromFireball_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3328 new TH1D("twoFromTarget_P_two_Outside", "twoFromTarget_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3331 new TH1D("fromCombinatorial_electron_P_two_Outside",
3332 "fromCombinatorial_electron_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3335 new TH1D("fromCombinatorial_NOTelectron_P_two_Outside",
3336 "fromCombinatorial_NOTelectron_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3338
3339 // Outside => onetwo
3341 "DP_InvMassReco_onetwo_Outside", "DP_InvMassReco_onetwo_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3344 new TH1D("DP_OpeningAngleReco_onetwo_Outside", "DP_OpeningAngleReco_onetwo_Outside; angle [deg];#", 45, -0.5, 4.);
3346 DP_Pdg_onetwo_Outside = new TH1D("DP_Pdg_onetwo_Outside", "DP_Pdg_onetwo_Outside; Id;#", 1000, -10, 490);
3349 new TH1D("DP_P_reco_onetwo_Outside", "DP_P_reco_onetwo_Outside; P in GeV/c^{2};#", 200, 0, 10);
3352 new TH1D("DP_Pt_reco_onetwo_Outside", "DP_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3355 "Ph_fromTarget_Pt_reco_onetwo_Outside", "Ph_fromTarget_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3357 Ph_fromPions_Pt_reco_onetwo_Outside = new TH1D("Ph_fromPions_Pt_reco_onetwo_Outside",
3358 "Ph_fromPions_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3360 Ph_fromEtas_Pt_reco_onetwo_Outside = new TH1D("Ph_fromEtas_Pt_reco_onetwo_Outside",
3361 "Ph_fromEtas_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3364 new TH1D("Ph_fromXi_Pt_reco_onetwo_Outside", "Ph_fromXi_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3367 "Ph_fromDalitz_Pt_reco_onetwo_Outside", "Ph_fromDalitz_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3369 Ph_fromOther_Pt_reco_onetwo_Outside = new TH1D("Ph_fromOther_Pt_reco_onetwo_Outside",
3370 "Ph_fromOther_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3373 new TH1D("Ph_twoFromTarget_Pt_reco_onetwo_Outside", "Ph_twoFromTarget_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#",
3374 30, 0, 3);
3377 new TH1D("Ph_fromCombinatorial_Pt_reco_onetwo_Outside",
3378 "Ph_fromCombinatorial_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3381 new TH1D("Ph_fromConversion_Pt_reco_onetwo_Outside",
3382 "Ph_fromConversion_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3385 new TH1D("twoFromTarget_PDG_onetwo_Outside", "twoFromTarget_PDG_onetwo_Outside; Id;#", 1000, -10, 490);
3388 new TH1D("fromCombinatorial_PDG_onetwo_Outside", "fromCombinatorial_PDG_onetwo_Outside; Id;#", 1000, -10, 490);
3391 new TH1D("CombinatorialMotherPdg_onetwo_Outside", "CombinatorialMotherPdg_onetwo_Outside; Id;#", 1000, -10, 490);
3393 CombinatorialGrMotherPdg_onetwo_Outside = new TH1D("CombinatorialGrMotherPdg_onetwo_Outside",
3394 "CombinatorialGrMotherPdg_onetwo_Outside; Id;#", 1000, -10, 490);
3397 new TH1D("Electrons_onetwo_Outside", "Electrons_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3399 Pions_onetwo_Outside = new TH1D("Pions_onetwo_Outside", "Pions_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3402 new TH1D("PionElectron_onetwo_Outside", "PionElectron_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3405 new TH1D("elsePionOrElectron_onetwo_Outside", "elsePionOrElectron_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3408 "DalitzAndConversion_Pt_onetwo_Outside", "DalitzAndConversion_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3410 DoubleConversion_Pt_onetwo_Outside = new TH1D("DoubleConversion_Pt_onetwo_Outside",
3411 "DoubleConversion_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3414 new TH1D("fromFireball_P_onetwo_Outside", "fromFireball_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3417 new TH1D("twoFromTarget_P_onetwo_Outside", "twoFromTarget_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3420 new TH1D("fromCombinatorial_electron_P_onetwo_Outside",
3421 "fromCombinatorial_electron_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3424 new TH1D("fromCombinatorial_NOTelectron_P_onetwo_Outside",
3425 "fromCombinatorial_NOTelectron_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3427
3428
3429 // Both => all
3431 new TH1D("DP_InvMassReco_all_Both", "DP_InvMassReco_all_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3434 new TH1D("DP_OpeningAngleReco_all_Both", "DP_OpeningAngleReco_all_Both; angle [deg];#", 45, -0.5, 4.);
3436 DP_Pdg_all_Both = new TH1D("DP_Pdg_all_Both", "DP_Pdg_all_Both; Id;#", 1000, -10, 490);
3438 DP_P_reco_all_Both = new TH1D("DP_P_reco_all_Both", "DP_P_reco_all_Both; P in GeV/c^{2};#", 200, 0, 10);
3440 DP_Pt_reco_all_Both = new TH1D("DP_Pt_reco_all_Both", "DP_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3443 new TH1D("Ph_fromTarget_Pt_reco_all_Both", "Ph_fromTarget_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3446 new TH1D("Ph_fromPions_Pt_reco_all_Both", "Ph_fromPions_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3449 new TH1D("Ph_fromEtas_Pt_reco_all_Both", "Ph_fromEtas_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3452 new TH1D("Ph_fromDalitz_Pt_reco_all_Both", "Ph_fromDalitz_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3454 Ph_pt_vs_rap_est_all_Both = new TH2D(
3455 "Ph_pt_vs_rap_est_all_Both", "Ph_pt_vs_rap_est_all_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3457
3458 // Both => zero
3460 new TH1D("DP_InvMassReco_zero_Both", "DP_InvMassReco_zero_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3463 new TH1D("DP_OpeningAngleReco_zero_Both", "DP_OpeningAngleReco_zero_Both; angle [deg];#", 45, -0.5, 4.);
3465 DP_Pdg_zero_Both = new TH1D("DP_Pdg_zero_Both", "DP_Pdg_zero_Both; Id;#", 1000, -10, 490);
3467 DP_P_reco_zero_Both = new TH1D("DP_P_reco_zero_Both", "DP_P_reco_zero_Both; P in GeV/c^{2};#", 200, 0, 10);
3469 DP_Pt_reco_zero_Both = new TH1D("DP_Pt_reco_zero_Both", "DP_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3472 new TH1D("Ph_fromTarget_Pt_reco_zero_Both", "Ph_fromTarget_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3475 new TH1D("Ph_fromPions_Pt_reco_zero_Both", "Ph_fromPions_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3478 new TH1D("Ph_fromEtas_Pt_reco_zero_Both", "Ph_fromEtas_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3481 new TH1D("Ph_fromDalitz_Pt_reco_zero_Both", "Ph_fromDalitz_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3483 Ph_pt_vs_rap_est_zero_Both = new TH2D(
3484 "Ph_pt_vs_rap_est_zero_Both", "Ph_pt_vs_rap_est_zero_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3486
3487 // Both => one
3489 new TH1D("DP_InvMassReco_one_Both", "DP_InvMassReco_one_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3492 new TH1D("DP_OpeningAngleReco_one_Both", "DP_OpeningAngleReco_one_Both; angle [deg];#", 45, -0.5, 4.);
3494 DP_Pdg_one_Both = new TH1D("DP_Pdg_one_Both", "DP_Pdg_one_Both; Id;#", 1000, -10, 490);
3496 DP_P_reco_one_Both = new TH1D("DP_P_reco_one_Both", "DP_P_reco_one_Both; P in GeV/c^{2};#", 200, 0, 10);
3498 DP_Pt_reco_one_Both = new TH1D("DP_Pt_reco_one_Both", "DP_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3501 new TH1D("Ph_fromTarget_Pt_reco_one_Both", "Ph_fromTarget_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3504 new TH1D("Ph_fromPions_Pt_reco_one_Both", "Ph_fromPions_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3507 new TH1D("Ph_fromEtas_Pt_reco_one_Both", "Ph_fromEtas_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3510 new TH1D("Ph_fromDalitz_Pt_reco_one_Both", "Ph_fromDalitz_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3512 Ph_pt_vs_rap_est_one_Both = new TH2D(
3513 "Ph_pt_vs_rap_est_one_Both", "Ph_pt_vs_rap_est_one_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3515
3516 // Both => two
3518 new TH1D("DP_InvMassReco_two_Both", "DP_InvMassReco_two_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3521 new TH1D("DP_OpeningAngleReco_two_Both", "DP_OpeningAngleReco_two_Both; angle [deg];#", 45, -0.5, 4.);
3523 DP_Pdg_two_Both = new TH1D("DP_Pdg_two_Both", "DP_Pdg_two_Both; Id;#", 1000, -10, 490);
3525 DP_P_reco_two_Both = new TH1D("DP_P_reco_two_Both", "DP_P_reco_two_Both; P in GeV/c^{2};#", 200, 0, 10);
3527 DP_Pt_reco_two_Both = new TH1D("DP_Pt_reco_two_Both", "DP_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3530 new TH1D("Ph_fromTarget_Pt_reco_two_Both", "Ph_fromTarget_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3533 new TH1D("Ph_fromPions_Pt_reco_two_Both", "Ph_fromPions_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3536 new TH1D("Ph_fromEtas_Pt_reco_two_Both", "Ph_fromEtas_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3539 new TH1D("Ph_fromDalitz_Pt_reco_two_Both", "Ph_fromDalitz_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3542 new TH1D("Ph_twoFromTarget_Pt_reco_two_Both", "Ph_twoFromTarget_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3545 "Ph_fromCombinatorial_Pt_reco_two_Both", "Ph_fromCombinatorial_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3547 Ph_fromConversion_Pt_reco_two_Both = new TH1D("Ph_fromConversion_Pt_reco_two_Both",
3548 "Ph_fromConversion_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3550 Ph_pt_vs_rap_est_two_Both = new TH2D(
3551 "Ph_pt_vs_rap_est_two_Both", "Ph_pt_vs_rap_est_two_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3553
3554 // Both => onetwo
3555 DP_InvMassReco_onetwo_Both = new TH1D("DP_InvMassReco_onetwo_Both",
3556 "DP_InvMassReco_onetwo_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3559 new TH1D("DP_OpeningAngleReco_onetwo_Both", "DP_OpeningAngleReco_onetwo_Both; angle [deg];#", 45, -0.5, 4.);
3561 DP_Pdg_onetwo_Both = new TH1D("DP_Pdg_onetwo_Both", "DP_Pdg_onetwo_Both; Id;#", 1000, -10, 490);
3563 DP_P_reco_onetwo_Both = new TH1D("DP_P_reco_onetwo_Both", "DP_P_reco_onetwo_Both; P in GeV/c^{2};#", 200, 0, 10);
3565 DP_Pt_reco_onetwo_Both = new TH1D("DP_Pt_reco_onetwo_Both", "DP_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3568 new TH1D("Ph_fromTarget_Pt_reco_onetwo_Both", "Ph_fromTarget_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3571 new TH1D("Ph_fromPions_Pt_reco_onetwo_Both", "Ph_fromPions_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3574 new TH1D("Ph_fromEtas_Pt_reco_onetwo_Both", "Ph_fromEtas_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3577 new TH1D("Ph_fromDalitz_Pt_reco_onetwo_Both", "Ph_fromDalitz_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3580 "Ph_twoFromTarget_Pt_reco_onetwo_Both", "Ph_twoFromTarget_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3583 new TH1D("Ph_fromCombinatorial_Pt_reco_onetwo_Both",
3584 "Ph_fromCombinatorial_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3587 "Ph_fromConversion_Pt_reco_onetwo_Both", "Ph_fromConversion_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3590 new TH2D("Ph_pt_vs_rap_est_onetwo_Both", "Ph_pt_vs_rap_est_onetwo_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4.,
3591 40, 0., 4.);
3593
3594
3595 DP_EMT_Pt_all_Target = new TH1D("DP_EMT_Pt_all_Target", "DP_EMT_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3597 DP_EMT_Pt_zero_Target = new TH1D("DP_EMT_Pt_zero_Target", "DP_EMT_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3599 DP_EMT_Pt_one_Target = new TH1D("DP_EMT_Pt_one_Target", "DP_EMT_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3601 DP_EMT_Pt_two_Target = new TH1D("DP_EMT_Pt_two_Target", "DP_EMT_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3604 new TH1D("DP_EMT_Pt_onetwo_Target", "DP_EMT_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3606
3607
3608 DP_EMT_Pt_all_Outside = new TH1D("DP_EMT_Pt_all_Outside", "DP_EMT_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3610 DP_EMT_Pt_zero_Outside = new TH1D("DP_EMT_Pt_zero_Outside", "DP_EMT_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3612 DP_EMT_Pt_one_Outside = new TH1D("DP_EMT_Pt_one_Outside", "DP_EMT_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3614 DP_EMT_Pt_two_Outside = new TH1D("DP_EMT_Pt_two_Outside", "DP_EMT_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3617 new TH1D("DP_EMT_Pt_onetwo_Outside", "DP_EMT_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3619
3620
3621 DP_EMT_Pt_all_Both = new TH1D("DP_EMT_Pt_all_Both", "DP_EMT_Pt_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3623 DP_EMT_Pt_zero_Both = new TH1D("DP_EMT_Pt_zero_Both", "DP_EMT_Pt_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3625 DP_EMT_Pt_one_Both = new TH1D("DP_EMT_Pt_one_Both", "DP_EMT_Pt_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3627 DP_EMT_Pt_two_Both = new TH1D("DP_EMT_Pt_two_Both", "DP_EMT_Pt_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3629 DP_EMT_Pt_onetwo_Both = new TH1D("DP_EMT_Pt_onetwo_Both", "DP_EMT_Pt_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3631
3632
3633 // DP_LK_EMT Target
3635 new TH1D("DP_LK_EMT_neg_Pt_all_Target", "DP_LK_EMT_neg_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3638 new TH1D("DP_LK_EMT_neg_Pt_zero_Target", "DP_LK_EMT_neg_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3641 new TH1D("DP_LK_EMT_neg_Pt_one_Target", "DP_LK_EMT_neg_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3644 new TH1D("DP_LK_EMT_neg_Pt_two_Target", "DP_LK_EMT_neg_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3647 new TH1D("DP_LK_EMT_neg_Pt_onetwo_Target", "DP_LK_EMT_neg_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3649
3651 new TH1D("DP_LK_EMT_pos_Pt_all_Target", "DP_LK_EMT_pos_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3654 new TH1D("DP_LK_EMT_pos_Pt_zero_Target", "DP_LK_EMT_pos_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3657 new TH1D("DP_LK_EMT_pos_Pt_one_Target", "DP_LK_EMT_pos_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3660 new TH1D("DP_LK_EMT_pos_Pt_two_Target", "DP_LK_EMT_pos_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3663 new TH1D("DP_LK_EMT_pos_Pt_onetwo_Target", "DP_LK_EMT_pos_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3665
3667 new TH1D("DP_LK_EMT_Pt_all_Target", "DP_LK_EMT_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3670 new TH1D("DP_LK_EMT_Pt_zero_Target", "DP_LK_EMT_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3673 new TH1D("DP_LK_EMT_Pt_one_Target", "DP_LK_EMT_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3676 new TH1D("DP_LK_EMT_Pt_two_Target", "DP_LK_EMT_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3679 new TH1D("DP_LK_EMT_Pt_onetwo_Target", "DP_LK_EMT_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3681
3682
3683 // DP_LK_EMT Outside
3685 new TH1D("DP_LK_EMT_neg_Pt_all_Outside", "DP_LK_EMT_neg_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3688 new TH1D("DP_LK_EMT_neg_Pt_zero_Outside", "DP_LK_EMT_neg_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3691 new TH1D("DP_LK_EMT_neg_Pt_one_Outside", "DP_LK_EMT_neg_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3694 new TH1D("DP_LK_EMT_neg_Pt_two_Outside", "DP_LK_EMT_neg_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3697 new TH1D("DP_LK_EMT_neg_Pt_onetwo_Outside", "DP_LK_EMT_neg_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3699
3701 new TH1D("DP_LK_EMT_pos_Pt_all_Outside", "DP_LK_EMT_pos_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3704 new TH1D("DP_LK_EMT_pos_Pt_zero_Outside", "DP_LK_EMT_pos_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3707 new TH1D("DP_LK_EMT_pos_Pt_one_Outside", "DP_LK_EMT_pos_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3710 new TH1D("DP_LK_EMT_pos_Pt_two_Outside", "DP_LK_EMT_pos_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3713 new TH1D("DP_LK_EMT_pos_Pt_onetwo_Outside", "DP_LK_EMT_pos_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3715
3717 new TH1D("DP_LK_EMT_Pt_all_Outside", "DP_LK_EMT_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3720 new TH1D("DP_LK_EMT_Pt_zero_Outside", "DP_LK_EMT_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3723 new TH1D("DP_LK_EMT_Pt_one_Outside", "DP_LK_EMT_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3726 new TH1D("DP_LK_EMT_Pt_two_Outside", "DP_LK_EMT_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3729 new TH1D("DP_LK_EMT_Pt_onetwo_Outside", "DP_LK_EMT_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3731}
Data class for a reconstructed hit in the STS.
Data class for STS tracks.
int Int_t
int32_t GetStsTrackIndex() const
int32_t GetRichRingIndex() const
double GetZ() const
Definition CbmHit.h:74
static void SetKFParticleFromStsTrack(CbmStsTrack *track, KFParticle *particle, Int_t pdg=211, Bool_t firstPoint=kTRUE)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Both
void DP_Mixing_Outside(double AngleCut, double InvMassCut)
vector< CbmMCTrack * > VMCtracks_minus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Both
std::vector< std::vector< int > > Gammas_stsIndex_zero_Both
vector< CbmStsTrack * > VStsTrack_minus_Outside
std::vector< CbmStsTrack * > DP_LK_EMT_STS_minus_Outside
double CalculatePlaneAngle_last_fromHits(std::vector< TVector3 > track_1, std::vector< TVector3 > track_2)
std::vector< std::vector< TVector3 > > Gammas_two_Outside
std::vector< std::vector< int > > Gammas_stsIndex_all_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Both
std::vector< std::vector< int > > Gammas_stsIndex_all_Target
std::vector< std::vector< int > > Gammas_stsIndex_one_Outside
std::vector< std::vector< TVector3 > > Gammas_zero_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Both
std::vector< std::vector< TVector3 > > Gammas_one_Outside
std::vector< std::vector< int > > Gammas_stsIndex_one_Both
void DP_Mixing_Target(double AngleCut, double InvMassCut)
std::vector< TVector3 > DP_EMT_momenta_minus_Target
std::vector< int > DP_EMT_Event_plus_Target
std::vector< std::vector< TVector3 > > Gammas_all_Target
void Exec(int fEventNumDP, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
int CheckIfElectron(CbmRichRing *ring, double momentum)
std::vector< std::vector< TVector3 > > Gammas_onetwo_Target
std::vector< std::vector< int > > Gammas_stsIndex_two_Target
double CalculatePlaneAngle_first(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
void SaveTargetTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< std::vector< TVector3 > > Gammas_zero_Target
vector< CbmRichRing * > VRichRing_minus_Outside
vector< CbmMCTrack * > VMCtracks_plus_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Target
vector< CbmRichRing * > VRichRing_minus_Target
std::vector< std::vector< TVector3 > > DP_EMT_Hits_plus_Target
std::vector< std::vector< int > > Gammas_stsIndex_zero_Target
std::vector< std::vector< TVector3 > > DP_EMT_Hits_plus_Outside
std::vector< int > DP_EMT_Event_minus_Target
CbmKresTrainAnnDirectPhotons * fTrainPhotons
void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus_Outside, vector< CbmMCTrack * > MCtracks_plus_Outside, vector< CbmStsTrack * > StsTrack_minus_Outside, vector< CbmStsTrack * > StsTrack_plus_Outside, std::vector< int > Rings_minus_Outside, std::vector< int > Rings_plus_Outside, std::vector< int > stsIndex_minus_Outside, std::vector< int > stsIndex_plus_Outside, vector< CbmRichRing * > richRing_minus_Outside, vector< CbmRichRing * > richRing_plus_Outside)
vector< CbmStsTrack * > VStsTrack_plus_Outside
std::vector< CbmStsTrack * > DP_LK_EMT_STS_plus_Target
std::vector< std::vector< int > > Gammas_stsIndex_all_Both
std::vector< CbmStsTrack * > DP_EMT_STS_plus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_one_Target
std::vector< std::vector< TVector3 > > Gammas_two_Both
double CalculatePlaneAngle_last(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< TVector3 > > Gammas_all_Both
void FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus, vector< CbmMCTrack * > MCtracks_plus, vector< CbmStsTrack * > StsTrack_minus, vector< CbmStsTrack * > StsTrack_plus, vector< TVector3 > Momenta_minus, vector< TVector3 > Momenta_plus, std::vector< int > Rings_minus, std::vector< int > Rings_plus, std::vector< int > stsIndex_minus, std::vector< int > stsIndex_plus, vector< CbmRichRing * > richRing_minus, vector< CbmRichRing * > richRing_plus)
std::vector< int > DP_LK_EMT_STS_plus_index_Target
std::vector< std::vector< int > > Gammas_stsIndex_two_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Target
std::vector< int > DP_EMT_NofRings_minus_Target
std::vector< std::vector< TVector3 > > Gammas_one_Both
std::vector< int > DP_EMT_Event_minus_Outside
vector< CbmMCTrack * > VMCtracks_plus_Target
std::vector< std::vector< TVector3 > > Gammas_one_Target
std::vector< int > DP_LK_EMT_NofRings_plus_Target
std::vector< TVector3 > DP_LK_EMT_momenta_minus_Target
vector< CbmStsTrack * > VStsTrack_minus_Target
std::vector< TVector3 > DP_EMT_momenta_plus_Target
std::vector< int > DP_EMT_NofRings_minus_Outside
std::vector< std::vector< TVector3 > > Gammas_onetwo_Both
std::vector< CbmStsTrack * > DP_LK_EMT_STS_minus_Target
std::vector< std::vector< TVector3 > > Gammas_zero_Both
std::vector< int > DP_LK_EMT_STS_minus_index_Target
std::vector< TVector3 > DP_LK_EMT_momenta_plus_Target
vector< CbmMCTrack * > VMCtracks_minus_Target
std::vector< int > DP_EMT_NofRings_plus_Target
std::vector< std::vector< TVector3 > > Gammas_onetwo_Outside
std::vector< int > DP_EMT_NofRings_plus_Outside
std::vector< TVector3 > SaveAllHits(CbmStsTrack *track)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Both
std::vector< int > VStsIndex_minus_Target
vector< CbmRichRing * > VRichRing_plus_Target
CbmRichRingFitterEllipseTau * fTauFit
std::vector< int > VStsIndex_minus_Outside
std::vector< int > DP_LK_EMT_STS_minus_index_Outside
CbmKresSelectAnnPhotons * fAnnPhotonsSelection
std::vector< std::vector< TVector3 > > DP_EMT_Hits_minus_Target
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Outside
std::vector< std::vector< TVector3 > > Gammas_all_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Target
void DP_likesign_Mixing_Outside(double AngleCut, double InvMassCut)
std::vector< int > VStsIndex_plus_Outside
vector< CbmStsTrack * > VStsTrack_plus_Target
std::vector< int > DP_EMT_Event_plus_Outside
vector< CbmRichRing * > VRichRing_plus_Outside
void DP_likesign_Mixing_Target(double AngleCut, double InvMassCut)
std::vector< CbmMCTrack * > fMCtracks
std::vector< std::vector< TVector3 > > Gammas_two_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Target
std::vector< KFParticle > DP_EMT_KFTrack_minus_Outside
int FindInRich(int richInd, int stsMcTrackId)
std::vector< std::vector< TVector3 > > DP_EMT_Hits_minus_Outside
std::vector< int > DP_LK_EMT_NofRings_minus_Outside
void SaveOutsideTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< int > DP_LK_EMT_NofRings_plus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_two_Both
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Outside
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Both
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Outside
std::vector< int > DP_LK_EMT_STS_plus_index_Outside
std::vector< int > DP_LK_EMT_NofRings_minus_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Outside
std::vector< CbmStsTrack * > DP_LK_EMT_STS_plus_Outside
std::vector< CbmStsTrack * > DP_EMT_STS_minus_Outside
std::vector< KFParticle > DP_EMT_KFTrack_plus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_zero_Outside
static TVector3 FitToVertexAndGetChi(CbmStsTrack *stsTrack, double x, double y, double z, double &chi)
static Double_t CalculateOpeningAngle_Reco(TVector3 electron1, TVector3 electron2)
static double Invmass_2particles_RECO(const TVector3 part1, const TVector3 part2)
static TVector3 FitToVertex(CbmStsTrack *stsTrack, double x, double y, double z)
static LmvmKinePar CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
double GetP() const
Definition CbmMCTrack.h:97
int32_t GetMotherId() const
Definition CbmMCTrack.h:68
int32_t GetPdgCode() const
Definition CbmMCTrack.h:67
int32_t GetNofLinks() const
Definition CbmMatch.h:42
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
void Position(TVector3 &pos) const
Copies hit position to pos.
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
float GetAaxis() const
float GetBaxis() const
void AddHit(CbmRichHitLight hit)
Add new hit to the ring.
uint32_t GetHit(int32_t i) const
Definition CbmRichRing.h:39
int32_t GetNofHits() const
Definition CbmRichRing.h:37
static double GetRingTrackDistance(int globalTrackId)
data class for a reconstructed 3-d hit in the STS
Definition CbmStsHit.h:35
int32_t GetNofMvdHits() const
Definition CbmStsTrack.h:87
int32_t GetMvdHitIndex(int32_t iHit) const
Definition CbmStsTrack.h:75
int32_t GetStsHitIndex(int32_t iHit) const
int32_t GetNofStsHits() const
Definition CbmStsTrack.h:93
const FairTrackParam * GetParamFirst() const
Definition CbmTrack.h:68
Double_t fPt
Definition LmvmKinePar.h:18
Double_t fMomentumMag
Definition LmvmKinePar.h:17
Double_t fRapidity
Definition LmvmKinePar.h:19
Hash for CbmL1LinkKey.