CbmRoot
CbmAnaConversionTest.h
Go to the documentation of this file.
1 
9 #ifndef CBM_ANA_CONVERSION_TEST
10 #define CBM_ANA_CONVERSION_TEST
11 
12 // included from ROOT
13 #include <TClonesArray.h>
14 #include <TH1.h>
15 #include <TH2.h>
16 #include <TH3.h>
17 #include <TStopwatch.h>
18 
19 // included from CbmRoot
20 #include "CbmGlobalTrack.h"
21 #include "CbmKFVertex.h"
22 #include "CbmLitGlobalElectronId.h"
23 #include "CbmLmvmKinematicParams.h"
24 #include "CbmMCTrack.h"
25 #include "CbmVertex.h"
26 
27 #include <vector>
28 
30 
31 public:
33  virtual ~CbmAnaConversionTest();
34 
35  void Init();
36  void InitHistos();
37  void Finish();
38 
39  void Exec();
40 
41  void GetNofRichElectrons();
42  Double_t CalcInvMass(Int_t e1, Int_t e2, Int_t e3, Int_t e4);
43 
44  void DoSTSonlyAnalysis();
46  void CombinePhotons();
49  const TVector3 electron2);
50  Double_t Invmass_4particlesRECO(const TVector3 part1,
51  const TVector3 part2,
52  const TVector3 part3,
53  const TVector3 part4);
54 
57 
58  Bool_t HasRichInd(Int_t gtIndex, Int_t arrayIndex);
59 
60  void MixedEventTest_3p1();
62  Double_t ElectronANNvalue(Int_t globalTrackIndex, Double_t momentum);
63 
64 
65 private:
66  TClonesArray* fRichPoints;
67  TClonesArray* fRichRings;
68  TClonesArray* fRichRingMatches;
69  TClonesArray* fMcTracks;
70  TClonesArray* fStsTracks;
71  TClonesArray* fStsTrackMatches;
72  TClonesArray* fGlobalTracks;
75 
76  std::vector<TH1*>
77  fHistoList_test; // list of all histograms related to rich rings
78 
79  std::vector<int> fElectrons_gtid;
80  std::vector<int> fElectrons_mcid;
81  std::vector<int> fElectrons_richInd;
82  std::vector<int> fElectrons_pi0mcid;
83  std::vector<int> fElectrons_same;
84 
87 
89 
90 
91  // histograms for STS only analysis
100 
101  // arrays for CombinePhotons_STSonly()
107 
113 
116 
117  // array with all refitted momenta
118  std::vector<TVector3> fVector_AllMomenta;
119 
120 
121  // arrays for STS only analysis (i.e. signal only in STS is required, not necessarily in RICH)
122  std::vector<CbmGlobalTrack*> fVector_gt;
123  std::vector<TVector3> fVector_momenta;
124  std::vector<double> fVector_chi;
125  std::vector<int> fVector_gtIndex;
126  std::vector<int> fVector_richIndex;
127  std::vector<int> fVector_mcIndex;
128  std::vector<bool> fVector_withRichSignal;
129  std::vector<std::vector<int>> fVector_reconstructedPhotons_FromSTSandRICH;
130 
131  // arrays for electrons, that have been identified in RICH as electrons
132  std::vector<CbmGlobalTrack*> fVector_electronRICH_gt;
135  std::vector<TVector3> fVector_electronRICH_momenta;
136  std::vector<std::vector<int>> fVector_electronRICH_reconstructedPhotons;
137 
138  // additional arrays, for CombineElectrons_STSonly() and CombinePhotons_STSonly()
139  std::vector<std::vector<int>> fVector_reconstructedPhotons_STSonly;
140 
141 
142  // EVENT MIXING
144  // for STS only mixed events creation
145  // TH1D * fhTest_eventMixing_RICHindex0;
146  // TH1D * fhTest_eventMixing_RICHindex1;
147  // TH1D * fhTest_eventMixing_RICHindex2;
148  // TH1D * fhTest_eventMixing_RICHindex3;
149  // TH1D * fhTest_eventMixing_RICHindex4;
150  std::vector<std::vector<TVector3>> fMixedTest_STSonly_photons;
151  std::vector<int> fMixedTest_STSonly_eventno;
152  std::vector<std::vector<bool>> fMixedTest_STSonly_hasRichInd;
156 
157  // for other event mixing (3 + 1)
158  std::vector<std::vector<TVector3>> fMixedTest_3p1_photons;
159  std::vector<int> fMixedTest_3p1_eventno;
160  std::vector<int> fMixedTest_3p1_combined;
161  std::vector<std::vector<Double_t>> fMixedTest_3p1_ann;
166 
167 
170 
171  ClassDef(CbmAnaConversionTest, 1)
172 };
173 
174 #endif
CbmAnaConversionTest::fElectrons_mcid
std::vector< int > fElectrons_mcid
Definition: CbmAnaConversionTest.h:80
CbmVertex.h
CbmAnaConversionTest::fhElectronsTest_invmass
TH1D * fhElectronsTest_invmass
Definition: CbmAnaConversionTest.h:88
CbmAnaConversionTest::fhTest_eventMixing_3p1
TH1D * fhTest_eventMixing_3p1
Definition: CbmAnaConversionTest.h:162
CbmAnaConversionTest::fMixedTest_STSonly_eventno
std::vector< int > fMixedTest_STSonly_eventno
Definition: CbmAnaConversionTest.h:151
CbmAnaConversionTest::fVector_electronRICH_gtIndex
std::vector< int > fVector_electronRICH_gtIndex
Definition: CbmAnaConversionTest.h:133
CbmAnaConversionTest::MixedEventTest_STSonly
void MixedEventTest_STSonly()
Definition: CbmAnaConversionTest.cxx:1508
CbmAnaConversionTest::fVector_momenta
std::vector< TVector3 > fVector_momenta
Definition: CbmAnaConversionTest.h:123
CbmAnaConversionTest::fElectrons_nofPerPi0_withRichInd
TH1I * fElectrons_nofPerPi0_withRichInd
Definition: CbmAnaConversionTest.h:86
CbmAnaConversionTest::CbmAnaConversionTest
CbmAnaConversionTest(const CbmAnaConversionTest &)
CbmAnaConversionTest::fMixedTest_3p1_photons
std::vector< std::vector< TVector3 > > fMixedTest_3p1_photons
Definition: CbmAnaConversionTest.h:158
CbmAnaConversionTest::Exec
void Exec()
Definition: CbmAnaConversionTest.cxx:409
CbmAnaConversionTest::fhTest_invmass
TH1D * fhTest_invmass
Definition: CbmAnaConversionTest.h:97
CbmAnaConversionTest::Invmass_4particlesRECO
Double_t Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
Definition: CbmAnaConversionTest.cxx:1206
CbmAnaConversionTest::fhTest_invmass_RICHindex2
TH1D * fhTest_invmass_RICHindex2
Definition: CbmAnaConversionTest.h:104
CbmAnaConversionTest::fVector_AllMomenta
std::vector< TVector3 > fVector_AllMomenta
Definition: CbmAnaConversionTest.h:118
CbmAnaConversionTest::fElectrons_pi0mcid
std::vector< int > fElectrons_pi0mcid
Definition: CbmAnaConversionTest.h:82
CbmAnaConversionTest::fhTest_phaseSpace_pi0
TH2D * fhTest_phaseSpace_pi0
Definition: CbmAnaConversionTest.h:114
CbmAnaConversionTest::Init
void Init()
Definition: CbmAnaConversionTest.cxx:105
CbmAnaConversionTest::fMixedTest_STSonly_hasRichInd
std::vector< std::vector< bool > > fMixedTest_STSonly_hasRichInd
Definition: CbmAnaConversionTest.h:152
CbmAnaConversionTest::~CbmAnaConversionTest
virtual ~CbmAnaConversionTest()
Definition: CbmAnaConversionTest.cxx:102
CbmAnaConversionTest::fVector_gt
std::vector< CbmGlobalTrack * > fVector_gt
Definition: CbmAnaConversionTest.h:122
CbmGlobalTrack.h
CbmAnaConversionTest::fMcTracks
TClonesArray * fMcTracks
Definition: CbmAnaConversionTest.h:69
CbmAnaConversionTest::fVector_withRichSignal
std::vector< bool > fVector_withRichSignal
Definition: CbmAnaConversionTest.h:128
CbmAnaConversionTest::fhTest_peakCheck1
TH1D * fhTest_peakCheck1
Definition: CbmAnaConversionTest.h:109
CbmAnaConversionTest::fhTest_invmass_ANNcuts
TH2D * fhTest_invmass_ANNcuts
Definition: CbmAnaConversionTest.h:112
CbmAnaConversionTest::fPrimVertex
CbmVertex * fPrimVertex
Definition: CbmAnaConversionTest.h:73
CbmAnaConversionTest::fElectrons_nofPerPi0
TH1I * fElectrons_nofPerPi0
Definition: CbmAnaConversionTest.h:85
CbmAnaConversionTest::fhTest_phaseSpace_eta
TH2D * fhTest_phaseSpace_eta
Definition: CbmAnaConversionTest.h:115
CbmAnaConversionTest::fhTest_peakCheck3
TH1D * fhTest_peakCheck3
Definition: CbmAnaConversionTest.h:111
CbmAnaConversionTest::fVector_reconstructedPhotons_STSonly
std::vector< std::vector< int > > fVector_reconstructedPhotons_STSonly
Definition: CbmAnaConversionTest.h:139
CbmAnaConversionTest::MixedEventTest_3p1
void MixedEventTest_3p1()
Definition: CbmAnaConversionTest.cxx:1447
CbmAnaConversionTest::fhTest_invmass_RICHindex4
TH1D * fhTest_invmass_RICHindex4
Definition: CbmAnaConversionTest.h:106
CbmAnaConversionTest::fVector_richIndex
std::vector< int > fVector_richIndex
Definition: CbmAnaConversionTest.h:126
CbmAnaConversionTest::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmAnaConversionTest.h:71
CbmAnaConversionTest::fVector_chi
std::vector< double > fVector_chi
Definition: CbmAnaConversionTest.h:124
CbmAnaConversionTest::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmAnaConversionTest.h:72
CbmAnaConversionTest::fVector_reconstructedPhotons_FromSTSandRICH
std::vector< std::vector< int > > fVector_reconstructedPhotons_FromSTSandRICH
Definition: CbmAnaConversionTest.h:129
CbmAnaConversionTest::CombinePhotons_STSonly
void CombinePhotons_STSonly()
Definition: CbmAnaConversionTest.cxx:1287
CbmAnaConversionTest::fVector_gtIndex
std::vector< int > fVector_gtIndex
Definition: CbmAnaConversionTest.h:125
CbmAnaConversionTest::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmAnaConversionTest.h:68
CbmAnaConversionTest::fhTest_eventMixing_STSonly_4p0
TH1D * fhTest_eventMixing_STSonly_4p0
Definition: CbmAnaConversionTest.h:155
CbmVertex
Definition: CbmVertex.h:26
CbmAnaConversionTest::CombinePhotons
void CombinePhotons()
Definition: CbmAnaConversionTest.cxx:881
CbmAnaConversionTest::fMixedTest_3p1_eventno
std::vector< int > fMixedTest_3p1_eventno
Definition: CbmAnaConversionTest.h:159
CbmAnaConversionTest::fhTest_invmass_pCut
TH1D * fhTest_invmass_pCut
Definition: CbmAnaConversionTest.h:98
CbmAnaConversionTest::fMixedTest_3p1_ann
std::vector< std::vector< Double_t > > fMixedTest_3p1_ann
Definition: CbmAnaConversionTest.h:161
CbmAnaConversionTest::CombineElectrons_FromSTSandRICH
void CombineElectrons_FromSTSandRICH()
Definition: CbmAnaConversionTest.cxx:743
CbmAnaConversionTest::fhTest_peakCheck2
TH1D * fhTest_peakCheck2
Definition: CbmAnaConversionTest.h:110
CbmAnaConversionTest::ElectronANNvalue
Double_t ElectronANNvalue(Int_t globalTrackIndex, Double_t momentum)
Definition: CbmAnaConversionTest.cxx:1545
CbmAnaConversionTest::fhTest_invmass_RICHindex0
TH1D * fhTest_invmass_RICHindex0
Definition: CbmAnaConversionTest.h:102
CbmAnaConversionTest::fhTest_ParticlesPerEvent
TH1I * fhTest_ParticlesPerEvent
Definition: CbmAnaConversionTest.h:92
CbmAnaConversionTest::fhTest_eventMixing_3p1_GGcut
TH1D * fhTest_eventMixing_3p1_GGcut
Definition: CbmAnaConversionTest.h:164
CbmAnaConversionTest::fhTest_invmass_MCcutAll
TH2D * fhTest_invmass_MCcutAll
Definition: CbmAnaConversionTest.h:108
CbmAnaConversionTest::fVector_electronRICH_gt
std::vector< CbmGlobalTrack * > fVector_electronRICH_gt
Definition: CbmAnaConversionTest.h:132
CbmAnaConversionTest::CombineElectrons_FromRICH
void CombineElectrons_FromRICH()
Definition: CbmAnaConversionTest.cxx:813
CbmAnaConversionTest::Finish
void Finish()
Definition: CbmAnaConversionTest.cxx:398
CbmAnaConversionTest::fElectrons_gtid
std::vector< int > fElectrons_gtid
Definition: CbmAnaConversionTest.h:79
CbmAnaConversionTest::operator=
CbmAnaConversionTest operator=(const CbmAnaConversionTest &)
CbmAnaConversionTest::InitHistos
void InitHistos()
Definition: CbmAnaConversionTest.cxx:163
CbmAnaConversionTest::fhTest_eventMixing_STSonly_2p2
TH1D * fhTest_eventMixing_STSonly_2p2
Definition: CbmAnaConversionTest.h:153
CbmAnaConversionTest::fVector_electronRICH_momenta
std::vector< TVector3 > fVector_electronRICH_momenta
Definition: CbmAnaConversionTest.h:135
CbmAnaConversionTest::globalEventNo
Int_t globalEventNo
Definition: CbmAnaConversionTest.h:143
CbmAnaConversionTest::HasRichInd
Bool_t HasRichInd(Int_t gtIndex, Int_t arrayIndex)
Definition: CbmAnaConversionTest.cxx:1377
CbmAnaConversionTest::fMixedTest_3p1_combined
std::vector< int > fMixedTest_3p1_combined
Definition: CbmAnaConversionTest.h:160
CbmAnaConversionTest::fRichPoints
TClonesArray * fRichPoints
Definition: CbmAnaConversionTest.h:66
CbmMCTrack.h
CbmAnaConversionTest::fVector_electronRICH_mcIndex
std::vector< int > fVector_electronRICH_mcIndex
Definition: CbmAnaConversionTest.h:134
CbmAnaConversionTest::fhTest_PhotonsPerEvent_STSandRICH
TH1I * fhTest_PhotonsPerEvent_STSandRICH
Definition: CbmAnaConversionTest.h:95
CbmAnaConversionTest::fMixedTest_STSonly_photons
std::vector< std::vector< TVector3 > > fMixedTest_STSonly_photons
Definition: CbmAnaConversionTest.h:150
CbmAnaConversionTest::CalcInvMass
Double_t CalcInvMass(Int_t e1, Int_t e2, Int_t e3, Int_t e4)
Definition: CbmAnaConversionTest.cxx:538
CbmAnaConversionTest::fElectrons_same
std::vector< int > fElectrons_same
Definition: CbmAnaConversionTest.h:83
CbmAnaConversionTest::CombineElectrons_STSonly
void CombineElectrons_STSonly()
Definition: CbmAnaConversionTest.cxx:1231
CbmAnaConversionTest::fRichRings
TClonesArray * fRichRings
Definition: CbmAnaConversionTest.h:67
CbmAnaConversionTest::fhTest_invmass_RICHindex1
TH1D * fhTest_invmass_RICHindex1
Definition: CbmAnaConversionTest.h:103
CbmAnaConversionTest::fHistoList_test
std::vector< TH1 * > fHistoList_test
Definition: CbmAnaConversionTest.h:77
CbmAnaConversionTest::fVector_mcIndex
std::vector< int > fVector_mcIndex
Definition: CbmAnaConversionTest.h:127
CbmAnaConversionTest::fKFVertex
CbmKFVertex fKFVertex
Definition: CbmAnaConversionTest.h:74
CbmLitGlobalElectronId.h
CbmAnaConversionTest::CbmAnaConversionTest
CbmAnaConversionTest()
Definition: CbmAnaConversionTest.cxx:32
CbmAnaConversionTest::fhTest_RICHelectronsPerEvent
TH1I * fhTest_RICHelectronsPerEvent
Definition: CbmAnaConversionTest.h:93
CbmAnaConversionTest::fVector_electronRICH_reconstructedPhotons
std::vector< std::vector< int > > fVector_electronRICH_reconstructedPhotons
Definition: CbmAnaConversionTest.h:136
CbmAnaConversionTest
Definition: CbmAnaConversionTest.h:29
CbmAnaConversionTest::fhTest_invmass_RICHindex3
TH1D * fhTest_invmass_RICHindex3
Definition: CbmAnaConversionTest.h:105
CbmKFVertex.h
CbmAnaConversionTest::DoSTSonlyAnalysis
void DoSTSonlyAnalysis()
Definition: CbmAnaConversionTest.cxx:565
CbmLmvmKinematicParams
Definition: CbmLmvmKinematicParams.h:17
CbmAnaConversionTest::fStsTracks
TClonesArray * fStsTracks
Definition: CbmAnaConversionTest.h:70
CbmAnaConversionTest::fhTest_eventMixing_3p1_pCut
TH1D * fhTest_eventMixing_3p1_pCut
Definition: CbmAnaConversionTest.h:163
CbmAnaConversionTest::GetNofRichElectrons
void GetNofRichElectrons()
Definition: CbmAnaConversionTest.cxx:493
CbmAnaConversionTest::fhTest_PhotonsPerEvent_RICHonly
TH1I * fhTest_PhotonsPerEvent_RICHonly
Definition: CbmAnaConversionTest.h:94
CbmAnaConversionTest::fhTest_ReconstructedPi0PerEvent
TH1I * fhTest_ReconstructedPi0PerEvent
Definition: CbmAnaConversionTest.h:96
CbmKFVertex
Definition: CbmKFVertex.h:6
CbmAnaConversionTest::fhTest_eventMixing_3p1_ANNcuts
TH2D * fhTest_eventMixing_3p1_ANNcuts
Definition: CbmAnaConversionTest.h:165
CbmLmvmKinematicParams.h
CbmAnaConversionTest::fElectrons_richInd
std::vector< int > fElectrons_richInd
Definition: CbmAnaConversionTest.h:81
CbmAnaConversionTest::fhTest_invmass_GGcut
TH1D * fhTest_invmass_GGcut
Definition: CbmAnaConversionTest.h:99
CbmAnaConversionTest::fhTest_eventMixing_STSonly_3p1
TH1D * fhTest_eventMixing_STSonly_3p1
Definition: CbmAnaConversionTest.h:154
CbmAnaConversionTest::CalculateKinematicParamsReco
CbmLmvmKinematicParams CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
Definition: CbmAnaConversionTest.cxx:1176