CbmRoot
Loading...
Searching...
No Matches
CbmAnaConversionRecoFull.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2016 Fakultaet fuer Mathematik und Naturwissenschaften, Bergische Universitaet Wuppertal, Wuppertal
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sascha Reinecke [committer], Florian Uhlig */
4
13#ifndef CBM_ANA_CONVERSION_RECOFULL
14#define CBM_ANA_CONVERSION_RECOFULL
15
16
17// included from ROOT
18#include <TClonesArray.h>
19#include <TH1.h>
20#include <TH2.h>
21#include <TH3.h>
22#include <TStopwatch.h>
23
24// included from CbmRoot
25#include "CbmKFVertex.h"
27#include "CbmMCTrack.h"
28#include "CbmVertex.h"
29
30#include <vector>
31
32#include "LmvmKinePar.h"
33
35
36public:
39
40 void Init();
41 void InitHistos();
42 void Finish();
43 void Exec();
44
45 void CombineElectrons(std::vector<CbmGlobalTrack*> gtrack, std::vector<TVector3> momenta,
46 std::vector<float> momentaChi, std::vector<int> mctrackID,
47 std::vector<std::vector<int>> reconstructedPhotons, Int_t index);
48 Double_t Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3,
49 const TVector3 part4);
50 Double_t Pt_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4);
51 Double_t Rap_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4);
52
53 LmvmKinePar CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2);
54 LmvmKinePar CalculateKinematicParams_4particles(const TVector3 part1, const TVector3 part2, const TVector3 part3,
55 const TVector3 part4);
56
57 void CombinePhotons(std::vector<CbmGlobalTrack*> gtrack, std::vector<TVector3> momenta, std::vector<float> momentaChi,
58 std::vector<int> mctrackID, std::vector<std::vector<int>> reconstructedPhotons, Int_t index);
59 Double_t OpeningAngleBetweenPhotons2(std::vector<int> photon1, std::vector<int> photons2);
60 Double_t OpeningAngleBetweenPhotons(std::vector<TVector3> momenta, std::vector<int> photon1,
61 std::vector<int> photons2);
62
63 //void CombineElectronsRefit();
64 //void CombinePhotonsRefit();
65 //Double_t OpeningAngleBetweenPhotonsRefit(std::vector<int> photon1, std::vector<int> photons2);
66
68
69 void CombineElectrons();
70 void CombinePhotons();
71
72 void MixedEventTest();
73 void MixedEventTest2();
74 void MixedEventTest3();
75 void MixedEventTest4();
76
77 Double_t ElectronANNvalue(Int_t globalTrackIndex, Double_t momentum);
78
79private:
80 TClonesArray* fRichPoints;
81 TClonesArray* fRichRings;
82 TClonesArray* fRichRingMatches;
83 TClonesArray* fMcTracks;
84 TClonesArray* fStsTracks;
85 TClonesArray* fStsTrackMatches;
86 TClonesArray* fGlobalTracks;
89
90 std::vector<TH1*> fHistoList_recofull;
91 std::vector<TH1*> fHistoList_recofull_1;
92 std::vector<TH1*> fHistoList_recofull_2;
93 std::vector<TH1*> fHistoList_recofull_3;
94 std::vector<TH1*> fHistoList_recofull_4;
95 std::vector<TH1*> fHistoList_recofull_new[5];
96
98
102
103 std::vector<CbmGlobalTrack*> fElectrons_track;
104 std::vector<TVector3> fElectrons_momenta;
105 std::vector<float> fElectrons_momentaChi;
106 std::vector<int> fElectrons_mctrackID;
107
108
109 std::vector<CbmGlobalTrack*> fElectrons_track_1;
110 std::vector<TVector3> fElectrons_momenta_1;
111 std::vector<float> fElectrons_momentaChi_1;
112 std::vector<int> fElectrons_mctrackID_1;
113 std::vector<std::vector<int>> fVector_photons_pairs_1;
114
115 std::vector<CbmGlobalTrack*> fElectrons_track_2;
116 std::vector<TVector3> fElectrons_momenta_2;
117 std::vector<float> fElectrons_momentaChi_2;
118 std::vector<int> fElectrons_mctrackID_2;
119 std::vector<std::vector<int>> fVector_photons_pairs_2;
120
121 std::vector<CbmGlobalTrack*> fElectrons_track_3;
122 std::vector<TVector3> fElectrons_momenta_3;
123 std::vector<float> fElectrons_momentaChi_3;
124 std::vector<int> fElectrons_mctrackID_3;
125 std::vector<std::vector<int>> fVector_photons_pairs_3;
126
127 std::vector<CbmGlobalTrack*> fElectrons_track_4;
128 std::vector<TVector3> fElectrons_momenta_4;
129 std::vector<float> fElectrons_momentaChi_4;
130 std::vector<int> fElectrons_mctrackID_4;
131 std::vector<std::vector<int>> fVector_photons_pairs_4;
132
133 std::vector<CbmGlobalTrack*> fElectrons_track_new[5];
134 std::vector<TVector3> fElectrons_momenta_new[5];
135 std::vector<float> fElectrons_momentaChi_new[5];
136 std::vector<int> fElectrons_mctrackID_new[5];
137 std::vector<int> fElectrons_globaltrackID_new[5];
138 std::vector<std::vector<int>> fVector_photons_pairs_new[5];
139
140
145
146
147 std::vector<std::vector<int>> fVector_photons_pairs;
148 std::vector<TVector3> fVector_photons_momenta;
159
164
172
180
185
186
187 std::vector<CbmGlobalTrack*> fElectrons_track_refit;
188 std::vector<TVector3> fElectrons_momenta_refit;
189 std::vector<std::vector<int>> fVector_photons_pairs_refit;
192
193 std::vector<std::vector<int>> fVector_photons_pairs_direction;
199
202
203 // histograms for index = 1
213
214 // histograms for index = 2
224
225 // histograms for index = 3
235
236 // histograms for index = 4
246
247
280
283
284
285 // test with mixed event method for estimation of invariant mass background
286 // test1
287 std::vector<TVector3> fMixedEventsElectrons[5];
288 std::vector<CbmGlobalTrack*> fMixedEventsElectrons_gtrack[5];
290
291 // test2
292 std::vector<TVector3> fMixedEventsElectrons_list1;
293 std::vector<TVector3> fMixedEventsElectrons_list2;
294 std::vector<TVector3> fMixedEventsElectrons_list3;
295 std::vector<TVector3> fMixedEventsElectrons_list4;
296 std::vector<CbmGlobalTrack*> fMixedEventsElectrons_list1_gtrack;
297 std::vector<CbmGlobalTrack*> fMixedEventsElectrons_list2_gtrack;
298 std::vector<CbmGlobalTrack*> fMixedEventsElectrons_list3_gtrack;
299 std::vector<CbmGlobalTrack*> fMixedEventsElectrons_list4_gtrack;
301
302 // test3
303 std::vector<TVector3> fMixedTest3_momenta;
304 std::vector<CbmGlobalTrack*> fMixedTest3_gtrack;
305 std::vector<int> fMixedTest3_eventno;
308
309 // test4
310 std::vector<std::vector<TVector3>> fMixedTest4_photons;
311 std::vector<std::vector<CbmMCTrack*>> fMixedTest4_mctracks;
312 std::vector<std::vector<Bool_t>> fMixedTest4_isRichElectronAnn0;
313 std::vector<std::vector<Double_t>> fMixedTest4_ElectronAnns;
314 std::vector<int> fMixedTest4_eventno;
323
324 // timer
325 TStopwatch timer;
326 Double_t fTime;
327
330
331 ClassDef(CbmAnaConversionRecoFull, 1)
332};
333
334#endif
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list3_gtrack
std::vector< std::vector< Bool_t > > fMixedTest4_isRichElectronAnn0
std::vector< CbmGlobalTrack * > fElectrons_track_2
std::vector< CbmGlobalTrack * > fMixedTest3_gtrack
std::vector< int > fElectrons_mctrackID_2
std::vector< float > fElectrons_momentaChi
std::vector< int > fElectrons_mctrackID_1
CbmAnaConversionRecoFull operator=(const CbmAnaConversionRecoFull &)
std::vector< TVector3 > fElectrons_momenta_3
std::vector< TH1 * > fHistoList_recofull_new[5]
std::vector< TVector3 > fVector_photons_momenta
std::vector< int > fElectrons_mctrackID_new[5]
CbmAnaConversionRecoFull(const CbmAnaConversionRecoFull &)
Double_t Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< TVector3 > fElectrons_momenta
std::vector< CbmGlobalTrack * > fElectrons_track_4
std::vector< TH1 * > fHistoList_recofull_3
std::vector< TH1 * > fHistoList_recofull_2
std::vector< TVector3 > fElectrons_momenta_new[5]
std::vector< std::vector< Double_t > > fMixedTest4_ElectronAnns
LmvmKinePar CalculateKinematicParams_4particles(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< std::vector< TVector3 > > fMixedTest4_photons
std::vector< float > fElectrons_momentaChi_4
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list1_gtrack
std::vector< TVector3 > fMixedEventsElectrons_list1
std::vector< TVector3 > fMixedEventsElectrons_list3
std::vector< std::vector< int > > fVector_photons_pairs_4
std::vector< float > fElectrons_momentaChi_1
std::vector< TVector3 > fElectrons_momenta_4
std::vector< std::vector< int > > fVector_photons_pairs_new[5]
std::vector< std::vector< int > > fVector_photons_pairs_1
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list2_gtrack
std::vector< TVector3 > fMixedTest3_momenta
std::vector< CbmGlobalTrack * > fElectrons_track_new[5]
std::vector< int > fElectrons_globaltrackID_new[5]
std::vector< std::vector< int > > fVector_photons_pairs_3
std::vector< TVector3 > fMixedEventsElectrons_list2
std::vector< TH1 * > fHistoList_recofull_4
std::vector< CbmGlobalTrack * > fElectrons_track_refit
std::vector< int > fElectrons_mctrackID_4
std::vector< float > fElectrons_momentaChi_3
std::vector< TH1 * > fHistoList_recofull
std::vector< std::vector< int > > fVector_photons_pairs_2
std::vector< TVector3 > fMixedEventsElectrons[5]
std::vector< std::vector< int > > fVector_photons_pairs_direction
std::vector< std::vector< int > > fVector_photons_pairs
std::vector< TVector3 > fElectrons_momenta_1
std::vector< TVector3 > fElectrons_momenta_2
Double_t Rap_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< float > fElectrons_momentaChi_new[5]
Double_t ElectronANNvalue(Int_t globalTrackIndex, Double_t momentum)
std::vector< CbmGlobalTrack * > fElectrons_track
std::vector< TVector3 > fElectrons_momenta_refit
std::vector< int > fElectrons_mctrackID_3
std::vector< std::vector< int > > fVector_photons_pairs_refit
std::vector< TVector3 > fMixedEventsElectrons_list4
std::vector< TH1 * > fHistoList_recofull_1
Double_t OpeningAngleBetweenPhotons2(std::vector< int > photon1, std::vector< int > photons2)
LmvmKinePar CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
Double_t OpeningAngleBetweenPhotons(std::vector< TVector3 > momenta, std::vector< int > photon1, std::vector< int > photons2)
std::vector< CbmGlobalTrack * > fElectrons_track_1
std::vector< CbmGlobalTrack * > fElectrons_track_3
std::vector< std::vector< CbmMCTrack * > > fMixedTest4_mctracks
std::vector< float > fElectrons_momentaChi_2
Double_t Pt_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_gtrack[5]
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list4_gtrack