CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionManual.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef CBM_KRES_CONVERSION_MANUAL
6#define CBM_KRES_CONVERSION_MANUAL
7
8#include "CbmKFVertex.h"
10#include "CbmKresSelectAnn.h"
11#include "CbmKresTrainAnn.h"
12#include "CbmMCTrack.h"
13#include "CbmRichRing.h"
14#include "CbmStsTrack.h"
15#include "CbmVertex.h"
16
17#include "TH2D.h"
18#include <TClonesArray.h>
19
21
22using namespace std;
23
25
26public:
27 //***** brief Standard constructor.
29 //***** brief Standard destructor.
31
32
33 void Init();
34 void InitHistograms();
35 void Finish();
36
37 void Exec(int fEventNumMan, double OpeningAngleCut, double GammaInvMassCut, int RealPID);
38
39 void SaveOutsideTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, double charge, int stsInd, int richInd,
40 int stsMcTrackId, CbmRichRing* RING);
41
42 void SaveTargetTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, TVector3 refmom, double charge, int stsInd,
43 int richInd, int stsMcTrackId, CbmRichRing* RING);
44
45 int FindInRich(int richInd, int stsMcTrackId);
46
47 int CheckIfElectron(CbmRichRing* ring, double momentum);
48
49 void FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID,
50 vector<CbmMCTrack*> MCtracks_minus, vector<CbmMCTrack*> MCtracks_plus,
51 vector<CbmStsTrack*> StsTrack_minus, vector<CbmStsTrack*> StsTrack_plus,
52 vector<TVector3> Momenta_minus, vector<TVector3> Momenta_plus, std::vector<int> Rings_minus,
53 std::vector<int> Rings_plus, std::vector<int> stsIndex_minus, std::vector<int> stsIndex_plus,
54 vector<CbmRichRing*> richRing_minus, vector<CbmRichRing*> richRing_plus,
55 vector<Int_t> MCIndex_minus, vector<Int_t> MCIndex_plus);
56
57 void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID,
58 vector<CbmMCTrack*> MCtracks_minus_Outside, vector<CbmMCTrack*> MCtracks_plus_Outside,
59 vector<CbmStsTrack*> StsTrack_minus_Outside, vector<CbmStsTrack*> StsTrack_plus_Outside,
60 std::vector<int> Rings_minus_Outside, std::vector<int> Rings_plus_Outside,
61 std::vector<int> stsIndex_minus_Outside, std::vector<int> stsIndex_plus_Outside,
62 vector<CbmRichRing*> richRing_minus_Outside, vector<CbmRichRing*> richRing_plus_Outside,
63 vector<Int_t> MCIndex_minus_Outside, vector<Int_t> MCIndex_plus_Outside);
64
65 void FindGammasBoth();
66
67 void FindPi0(TString mod, TString position, vector<vector<TVector3>> Gammas, vector<vector<int>> StsIndex,
68 vector<vector<int>> MCIndex, vector<vector<CbmMCTrack*>> GammasMC, TH1D* Pi0InvMassReco,
69 TH2D* Pi0_pt_vs_rap, TH2D* Pi0_pt_vs_rap_est, TH2D* MultiplicityGamma,
70 TH2D* MultiplicityChargedParticles, vector<TH1*> BGCases, TH1D* DalitzPi0, TH1D* PhotonsPi0);
71
72 void Mixing_Target();
73
74 void Mixing_Outside();
75
76 void Mixing_Both();
77
79
81
83
84 void Mixing_WAC();
85
86
87private:
89 Int_t AnnTrain;
91 Int_t UseAnn;
92
93
94 TClonesArray* fMcTracks;
95 TClonesArray* fGlobalTracks;
96 TClonesArray* fStsTracks;
97 TClonesArray* fStsTrackMatches;
98 TClonesArray* fRichProjections;
99 TClonesArray* fRichRings;
100 TClonesArray* fRichRingMatches;
101 TClonesArray* fRichHits;
102 TClonesArray* fArrayMvdHit;
103 TClonesArray* fArrayStsHit;
104
107
109
111
112 // charged tracks from outside
113 vector<CbmStsTrack*> VStsTrack_minus_Outside;
114 vector<CbmMCTrack*> VMCtracks_minus_Outside;
115 std::vector<int> VRings_minus_Outside;
116 std::vector<int> VStsIndex_minus_Outside;
117 vector<CbmRichRing*> VRichRing_minus_Outside;
119
120 vector<CbmStsTrack*> VStsTrack_plus_Outside;
121 vector<CbmMCTrack*> VMCtracks_plus_Outside;
122 std::vector<int> VRings_plus_Outside;
123 std::vector<int> VStsIndex_plus_Outside;
124 vector<CbmRichRing*> VRichRing_plus_Outside;
126
127
128 // charged tracks from the target
129 vector<CbmMCTrack*> VMCtracks_minus_Target;
130 vector<CbmStsTrack*> VStsTrack_minus_Target;
131 vector<TVector3> VMomenta_minus_Target;
132 std::vector<int> VRings_minus_Target;
133 std::vector<int> VStsIndex_minus_Target;
134 vector<CbmRichRing*> VRichRing_minus_Target;
136
137 vector<CbmMCTrack*> VMCtracks_plus_Target;
138 vector<CbmStsTrack*> VStsTrack_plus_Target;
139 vector<TVector3> VMomenta_plus_Target;
140 std::vector<int> VRings_plus_Target;
141 std::vector<int> VStsIndex_plus_Target;
142 vector<CbmRichRing*> VRichRing_plus_Target;
143 vector<Int_t> VMCIndex_plus_Target;
144
145
146 vector<TVector3> frefmomenta;
147 std::vector<int> frefId;
148 std::vector<int> fMCId;
149 std::vector<CbmMCTrack*> fMCtracks;
150
151
152 // EMT target Target
153 std::vector<int> EMT_man_Event_Target;
154 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Target;
155 std::vector<int> EMT_man_NofRings_Target;
156
157 // EMT target Outside
158 std::vector<int> EMT_man_Event_Outside;
159 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Outside;
160 std::vector<int> EMT_man_NofRings_Outside;
161
162 // EMT target Both
163 std::vector<int> EMT_man_Event_Both;
164 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Both;
165 std::vector<int> EMT_man_NofRings_Both;
166
167 // combined gammas from the target
168 std::vector<std::vector<TVector3>> Gammas_all_Target;
169 std::vector<std::vector<TVector3>> Gammas_zero_Target;
170 std::vector<std::vector<TVector3>> Gammas_one_Target;
171 std::vector<std::vector<TVector3>> Gammas_two_Target;
172 std::vector<std::vector<TVector3>> Gammas_onetwo_Target;
173
174 std::vector<std::vector<int>> Gammas_stsIndex_all_Target;
175 std::vector<std::vector<int>> Gammas_stsIndex_zero_Target;
176 std::vector<std::vector<int>> Gammas_stsIndex_one_Target;
177 std::vector<std::vector<int>> Gammas_stsIndex_two_Target;
178 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Target;
179
180 std::vector<std::vector<int>> Gammas_MCIndex_all_Target;
181 std::vector<std::vector<int>> Gammas_MCIndex_zero_Target;
182 std::vector<std::vector<int>> Gammas_MCIndex_one_Target;
183 std::vector<std::vector<int>> Gammas_MCIndex_two_Target;
184 std::vector<std::vector<int>> Gammas_MCIndex_onetwo_Target;
185
186 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Target;
187 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Target;
188 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Target;
189 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Target;
190 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Target;
191
192
193 // combined gammas from outside
194 std::vector<std::vector<TVector3>> Gammas_all_Outside;
195 std::vector<std::vector<TVector3>> Gammas_zero_Outside;
196 std::vector<std::vector<TVector3>> Gammas_one_Outside;
197 std::vector<std::vector<TVector3>> Gammas_two_Outside;
198 std::vector<std::vector<TVector3>> Gammas_onetwo_Outside;
199
200 std::vector<std::vector<int>> Gammas_stsIndex_all_Outside;
201 std::vector<std::vector<int>> Gammas_stsIndex_zero_Outside;
202 std::vector<std::vector<int>> Gammas_stsIndex_one_Outside;
203 std::vector<std::vector<int>> Gammas_stsIndex_two_Outside;
204 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Outside;
205
206 std::vector<std::vector<int>> Gammas_MCIndex_all_Outside;
207 std::vector<std::vector<int>> Gammas_MCIndex_zero_Outside;
208 std::vector<std::vector<int>> Gammas_MCIndex_one_Outside;
209 std::vector<std::vector<int>> Gammas_MCIndex_two_Outside;
210 std::vector<std::vector<int>> Gammas_MCIndex_onetwo_Outside;
211
212 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Outside;
213 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Outside;
214 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Outside;
215 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Outside;
216 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Outside;
217
218
219 // combined gammas from the target and outside together
220 std::vector<std::vector<TVector3>> Gammas_all_Both;
221 std::vector<std::vector<TVector3>> Gammas_zero_Both;
222 std::vector<std::vector<TVector3>> Gammas_one_Both;
223 std::vector<std::vector<TVector3>> Gammas_two_Both;
224 std::vector<std::vector<TVector3>> Gammas_onetwo_Both;
225
226 std::vector<std::vector<int>> Gammas_stsIndex_all_Both;
227 std::vector<std::vector<int>> Gammas_stsIndex_zero_Both;
228 std::vector<std::vector<int>> Gammas_stsIndex_one_Both;
229 std::vector<std::vector<int>> Gammas_stsIndex_two_Both;
230 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Both;
231
232 std::vector<std::vector<int>> Gammas_MCIndex_all_Both;
233 std::vector<std::vector<int>> Gammas_MCIndex_zero_Both;
234 std::vector<std::vector<int>> Gammas_MCIndex_one_Both;
235 std::vector<std::vector<int>> Gammas_MCIndex_two_Both;
236 std::vector<std::vector<int>> Gammas_MCIndex_onetwo_Both;
237
238 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Both;
239 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Both;
240 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Both;
241 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Both;
242 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Both;
243
244
245 // WAC
246 std::vector<std::vector<TVector3>> Gamma_WAC;
247 std::vector<std::vector<int>> Gammas_stsIndex_WAC;
248 std::vector<std::vector<int>> Gammas_MCIndex_WAC;
249 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_WAC;
250 // WAC event mixing
251 std::vector<int> EMT_man_Event_WAC;
252 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_WAC;
253 std::vector<int> EMT_man_NofRings_WAC;
254
255
256 // histograms
269
270
283
284
297
298
312
325
338
351
364
365
379
392
405
418
431
432
446
459
472
485
498
499
500 // Both additional histograms
504
505
506 // multiplicity Target
518
519 // multiplicity Outside
531
532 // multiplicity Both
544
545
546 // // rap_vs_Pt for "OneTwo" and "Both"
648
749
750
751 // // rap_vs_Pt for "All" and "Both"
853
954
955 //pt separation "onetwo"
978
999
1000 //pt separation "all"
1001 vector<TH1*> fHistoList_pt_all;
1023
1044
1045
1046 // BG cases Target
1052 // BG cases Outside
1058
1059 // BG cases Both
1060 // all
1092 // zero
1124 // one
1156 // two
1188 // onetwo
1220
1221
1226
1227 //WAC
1268
1269 vector<TH1*> fHistoList_manual;
1272
1273
1274 //***** brief Copy constructor.
1276
1277 //***** brief Assignment operator.
1279
1280
1281 ClassDef(CbmKresConversionManual, 1)
1282};
1283
1284#endif
Data class for STS tracks.
std::vector< int > VStsIndex_plus_Target
std::vector< std::vector< int > > Gammas_MCIndex_all_Target
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Both
std::vector< std::vector< int > > Gammas_stsIndex_zero_Target
vector< TVector3 > VMomenta_minus_Target
std::vector< std::vector< int > > Gammas_stsIndex_all_Outside
vector< TH1 * > fHistoList_bg_InM_zero_Outside
std::vector< std::vector< int > > Gammas_MCIndex_WAC
std::vector< std::vector< int > > Gammas_MCIndex_two_Target
double CalculatePlaneAngle_last(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
vector< TVector3 > VMomenta_plus_Target
std::vector< std::vector< int > > Gammas_stsIndex_two_Outside
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Outside
std::vector< int > EMT_man_NofRings_Target
std::vector< int > VRings_minus_Target
vector< TH1 * > fHistoList_bg_InM_zero_Target
vector< CbmMCTrack * > VMCtracks_plus_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Target
std::vector< int > VStsIndex_plus_Outside
std::vector< std::vector< int > > Gammas_MCIndex_two_Outside
std::vector< int > EMT_man_Event_Both
std::vector< int > EMT_man_Event_Outside
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Outside
std::vector< std::vector< TVector3 > > Gammas_two_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Outside
std::vector< std::vector< TVector3 > > Gammas_onetwo_Outside
std::vector< std::vector< int > > Gammas_MCIndex_all_Both
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Target
std::vector< int > VRings_minus_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Outside
std::vector< std::vector< int > > Gammas_MCIndex_two_Both
vector< CbmRichRing * > VRichRing_plus_Target
std::vector< int > EMT_man_NofRings_Outside
vector< CbmRichRing * > VRichRing_plus_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Both
vector< TH1 * > fHistoList_bg_InM_onetwo_Target
std::vector< std::vector< TVector3 > > Gammas_onetwo_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Outside
std::vector< int > VRings_plus_Target
vector< TH1 * > fHistoList_multiplicity_man_Target
std::vector< std::vector< TVector3 > > Gammas_all_Both
vector< TH1 * > fHistoList_man_cuts_Outside
std::vector< std::vector< int > > Gammas_stsIndex_one_Outside
CbmKresConversionManual(const CbmKresConversionManual &)
std::vector< std::vector< int > > Gammas_stsIndex_zero_Both
std::vector< std::vector< int > > Gammas_stsIndex_all_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Target
vector< TH1 * > fHistoList_bg_InM_two_Outside
std::vector< std::vector< int > > Gammas_MCIndex_one_Both
vector< CbmStsTrack * > VStsTrack_plus_Target
std::vector< std::vector< int > > Gammas_MCIndex_zero_Outside
double CalculatePlaneAngle_first(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< TVector3 > > Gammas_one_Outside
std::vector< std::vector< int > > Gammas_MCIndex_onetwo_Target
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Both
void SaveTargetTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
vector< TH1 * > fHistoList_rap_vs_pt_InM_all
std::vector< std::vector< TVector3 > > Gammas_onetwo_Both
vector< CbmMCTrack * > VMCtracks_minus_Target
int FindInRich(int richInd, int stsMcTrackId)
vector< CbmStsTrack * > VStsTrack_plus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_two_Target
vector< TH1 * > fHistoList_man_onetwo_Target
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< Int_t > MCIndex_minus_Outside, vector< Int_t > MCIndex_plus_Outside)
vector< TH1 * > fHistoList_multiplicity_man_Outside
CbmKresConversionManual operator=(const CbmKresConversionManual &)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Both
std::vector< std::vector< int > > Gammas_MCIndex_onetwo_Both
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Outside
vector< TH1 * > fHistoList_man_zero_Outside
std::vector< std::vector< TVector3 > > Gammas_all_Target
std::vector< std::vector< int > > Gammas_stsIndex_zero_Outside
vector< CbmRichRing * > VRichRing_minus_Target
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, vector< Int_t > MCIndex_minus, vector< Int_t > MCIndex_plus)
std::vector< std::vector< TVector3 > > Gammas_all_Outside
std::vector< std::vector< int > > Gammas_stsIndex_all_Both
std::vector< std::vector< TVector3 > > Gammas_two_Both
CbmRichRingFitterEllipseTau * fTauFit
std::vector< int > VStsIndex_minus_Outside
vector< TH1 * > fHistoList_man_onetwo_Outside
vector< CbmMCTrack * > VMCtracks_minus_Outside
vector< CbmRichRing * > VRichRing_minus_Outside
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Target
std::vector< std::vector< TVector3 > > Gammas_zero_Outside
std::vector< std::vector< TVector3 > > Gammas_one_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_WAC
void Exec(int fEventNumMan, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
std::vector< std::vector< TVector3 > > Gammas_two_Target
vector< CbmStsTrack * > VStsTrack_minus_Outside
std::vector< std::vector< int > > Gammas_MCIndex_one_Outside
vector< TH1 * > fHistoList_multiplicity_man_Both
std::vector< std::vector< int > > Gammas_stsIndex_one_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Outside
vector< CbmMCTrack * > VMCtracks_plus_Outside
vector< TH1 * > fHistoList_bg_InM_onetwo_Both
vector< TH1 * > fHistoList_bg_InM_onetwo_Outside
void SaveOutsideTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Both
vector< TH1 * > fHistoList_bg_InM_one_Outside
std::vector< std::vector< int > > Gammas_stsIndex_WAC
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_WAC
std::vector< std::vector< int > > Gammas_MCIndex_onetwo_Outside
std::vector< int > EMT_man_Event_Target
std::vector< std::vector< TVector3 > > Gammas_zero_Both
std::vector< int > VRings_plus_Outside
std::vector< CbmMCTrack * > fMCtracks
int CheckIfElectron(CbmRichRing *ring, double momentum)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Target
std::vector< std::vector< int > > Gammas_MCIndex_zero_Target
vector< TH1 * > fHistoList_bg_InM_all_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Both
std::vector< int > VStsIndex_minus_Target
std::vector< std::vector< TVector3 > > Gammas_zero_Target
std::vector< std::vector< TVector3 > > Gammas_one_Both
std::vector< std::vector< int > > Gammas_stsIndex_two_Both
vector< CbmStsTrack * > VStsTrack_minus_Target
std::vector< std::vector< int > > Gammas_MCIndex_one_Target
std::vector< std::vector< int > > Gammas_MCIndex_zero_Both
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Both
std::vector< int > EMT_man_NofRings_Both
std::vector< int > EMT_man_NofRings_WAC
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Target
std::vector< std::vector< TVector3 > > Gamma_WAC
void FindPi0(TString mod, TString position, vector< vector< TVector3 > > Gammas, vector< vector< int > > StsIndex, vector< vector< int > > MCIndex, vector< vector< CbmMCTrack * > > GammasMC, TH1D *Pi0InvMassReco, TH2D *Pi0_pt_vs_rap, TH2D *Pi0_pt_vs_rap_est, TH2D *MultiplicityGamma, TH2D *MultiplicityChargedParticles, vector< TH1 * > BGCases, TH1D *DalitzPi0, TH1D *PhotonsPi0)
std::vector< std::vector< int > > Gammas_MCIndex_all_Outside
std::vector< std::vector< int > > Gammas_stsIndex_one_Both
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Hash for CbmL1LinkKey.