CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionManualmbias3.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_mbias_3
6#define CBM_KRES_CONVERSION_MANUAL_mbias_3
7
8#include "CbmKFVertex.h"
10#include "CbmMCTrack.h"
11#include "CbmRichRing.h"
12#include "CbmStsTrack.h"
13
14#include "FairMCEventHeader.h"
15
16#include "TH2D.h"
17#include <TClonesArray.h>
19
20using namespace std;
21
23
24public:
25 //***** brief Standard constructor.
27 //***** brief Standard destructor.
29
30
31 void Init();
32 void Finish();
33 void InitHistograms();
34
35 void Exec(int fEventNumMan, double OpeningAngleCut, double GammaInvMassCut, int RealPID);
36
37 void SaveOutsideTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, double charge, int stsInd, int richInd,
38 int stsMcTrackId, CbmRichRing* RING);
39
40 void SaveTargetTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, TVector3 refmom, double charge, int stsInd,
41 int richInd, int stsMcTrackId, CbmRichRing* RING);
42
43 int FindInRich(int richInd, int stsMcTrackId);
44
45 int CheckIfElectron(CbmRichRing* ring, double momentum);
46
47 void FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID,
48 vector<CbmMCTrack*> MCtracks_minus, vector<CbmMCTrack*> MCtracks_plus,
49 vector<CbmStsTrack*> StsTrack_minus, vector<CbmStsTrack*> StsTrack_plus,
50 vector<TVector3> Momenta_minus, vector<TVector3> Momenta_plus, std::vector<int> Rings_minus,
51 std::vector<int> Rings_plus, std::vector<int> stsIndex_minus, std::vector<int> stsIndex_plus,
52 vector<CbmRichRing*> richRing_minus, vector<CbmRichRing*> richRing_plus);
53
54 void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID,
55 vector<CbmMCTrack*> MCtracks_minus_Outside_mbias3,
56 vector<CbmMCTrack*> MCtracks_plus_Outside_mbias3,
57 vector<CbmStsTrack*> StsTrack_minus_Outside_mbias3,
58 vector<CbmStsTrack*> StsTrack_plus_Outside_mbias3, std::vector<int> Rings_minus_Outside_mbias3,
59 std::vector<int> Rings_plus_Outside_mbias3, std::vector<int> stsIndex_minus_Outside_mbias3,
60 std::vector<int> stsIndex_plus_Outside_mbias3,
61 vector<CbmRichRing*> richRing_minus_Outside_mbias3,
62 vector<CbmRichRing*> richRing_plus_Outside_mbias3);
63
64 void FindGammasBoth();
65
66 void FindPi0(TString mod, TString position, vector<vector<TVector3>> Gammas, vector<vector<int>> StsIndex,
67 vector<vector<CbmMCTrack*>> GammasMC, TH1D* Pi0InvMassReco, TH2D* Pi0_pt_vs_rap, TH2D* Pi0_pt_vs_rap_est,
68 TH2D* MultiplicityGamma, TH2D* MultiplicityChargedParticles, vector<TH1*> BGCases);
69
70 void Mixing_Target();
71
72 void Mixing_Outside();
73
74 void Mixing_Both();
75
77
79
80private:
81 TClonesArray* fMcTracks;
82 TClonesArray* fGlobalTracks;
83 TClonesArray* fStsTracks;
84 TClonesArray* fStsTrackMatches;
85 TClonesArray* fRichProjections;
86 TClonesArray* fRichRings;
87 TClonesArray* fRichRingMatches;
88 TClonesArray* fRichHits;
89 TClonesArray* fArrayMvdHit;
90 TClonesArray* fArrayStsHit;
91 FairMCEventHeader* fArrayCentrality;
92
95
97
99
100
101 // charged tracks from outside
102 vector<CbmStsTrack*> VStsTrack_minus_Outside_mbias3;
106 vector<CbmRichRing*> VRichRing_minus_Outside_mbias3;
107
108 vector<CbmStsTrack*> VStsTrack_plus_Outside_mbias3;
109 vector<CbmMCTrack*> VMCtracks_plus_Outside_mbias3;
112 vector<CbmRichRing*> VRichRing_plus_Outside_mbias3;
113
114
115 // charged tracks from the Target_mbias3
116 vector<CbmMCTrack*> VMCtracks_minus_Target_mbias3;
117 vector<CbmStsTrack*> VStsTrack_minus_Target_mbias3;
121 vector<CbmRichRing*> VRichRing_minus_Target_mbias3;
122
123 vector<CbmMCTrack*> VMCtracks_plus_Target_mbias3;
124 vector<CbmStsTrack*> VStsTrack_plus_Target_mbias3;
128 vector<CbmRichRing*> VRichRing_plus_Target_mbias3;
129
130
131 vector<TVector3> frefmomenta;
132 std::vector<int> frefId;
133 std::vector<CbmMCTrack*> fMCtracks;
134
135
136 // EMT Target_mbias3 Target_mbias3
138 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Target_mbias3;
140
141 // EMT Target_mbias3 Outside_mbias3
143 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Outside_mbias3;
145
146 // EMT Target_mbias3 Both_mbias3
148 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Both_mbias3;
150
151 // combined gammas from the Target_mbias3
152 std::vector<std::vector<TVector3>> Gammas_all_Target_mbias3;
153 std::vector<std::vector<TVector3>> Gammas_zero_Target_mbias3;
154 std::vector<std::vector<TVector3>> Gammas_one_Target_mbias3;
155 std::vector<std::vector<TVector3>> Gammas_two_Target_mbias3;
156 std::vector<std::vector<TVector3>> Gammas_onetwo_Target_mbias3;
157
158 std::vector<std::vector<int>> Gammas_stsIndex_all_Target_mbias3;
159 std::vector<std::vector<int>> Gammas_stsIndex_zero_Target_mbias3;
160 std::vector<std::vector<int>> Gammas_stsIndex_one_Target_mbias3;
161 std::vector<std::vector<int>> Gammas_stsIndex_two_Target_mbias3;
162 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Target_mbias3;
163
164 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Target_mbias3;
165 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Target_mbias3;
166 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Target_mbias3;
167 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Target_mbias3;
168 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Target_mbias3;
169
170
171 // combined gammas from Outside_mbias3
172 std::vector<std::vector<TVector3>> Gammas_all_Outside_mbias3;
173 std::vector<std::vector<TVector3>> Gammas_zero_Outside_mbias3;
174 std::vector<std::vector<TVector3>> Gammas_one_Outside_mbias3;
175 std::vector<std::vector<TVector3>> Gammas_two_Outside_mbias3;
176 std::vector<std::vector<TVector3>> Gammas_onetwo_Outside_mbias3;
177
178 std::vector<std::vector<int>> Gammas_stsIndex_all_Outside_mbias3;
179 std::vector<std::vector<int>> Gammas_stsIndex_zero_Outside_mbias3;
180 std::vector<std::vector<int>> Gammas_stsIndex_one_Outside_mbias3;
181 std::vector<std::vector<int>> Gammas_stsIndex_two_Outside_mbias3;
182 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Outside_mbias3;
183
184 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Outside_mbias3;
185 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Outside_mbias3;
186 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Outside_mbias3;
187 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Outside_mbias3;
188 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Outside_mbias3;
189
190
191 // combined gammas from the Target_mbias3 and Outside_mbias3 together
192 std::vector<std::vector<TVector3>> Gammas_all_Both_mbias3;
193 std::vector<std::vector<TVector3>> Gammas_zero_Both_mbias3;
194 std::vector<std::vector<TVector3>> Gammas_one_Both_mbias3;
195 std::vector<std::vector<TVector3>> Gammas_two_Both_mbias3;
196 std::vector<std::vector<TVector3>> Gammas_onetwo_Both_mbias3;
197
198 std::vector<std::vector<int>> Gammas_stsIndex_all_Both_mbias3;
199 std::vector<std::vector<int>> Gammas_stsIndex_zero_Both_mbias3;
200 std::vector<std::vector<int>> Gammas_stsIndex_one_Both_mbias3;
201 std::vector<std::vector<int>> Gammas_stsIndex_two_Both_mbias3;
202 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Both_mbias3;
203
204 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Both_mbias3;
205 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Both_mbias3;
206 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Both_mbias3;
207 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Both_mbias3;
208 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Both_mbias3;
209
210
211 // histograms
224
225
238
239
252
253
265
276
287
298
309
310
322
333
344
355
366
367
379
390
401
412
423
424
425 // Both_mbias3 additional histograms
429
430
431 // multiplicity Target_mbias3
443
444 // multiplicity Outside_mbias3
456
457 // multiplicity Both_mbias3
469
470
471 // rap_vs_Pt for "OneTwo" and "Both_mbias3"
503
534
535
536 // BG cases Target_mbias3
542 // BG cases Outside_mbias3
548
549 // BG cases Both_mbias3
550 // all
582 // zero
614 // one
646 // two
678 // onetwo
710
711
712 //***** brief Copy constructor.
714
715 //***** brief Assignment operator.
717
718
720};
721
722#endif
Data class for STS tracks.
void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus_Outside_mbias3, vector< CbmMCTrack * > MCtracks_plus_Outside_mbias3, vector< CbmStsTrack * > StsTrack_minus_Outside_mbias3, vector< CbmStsTrack * > StsTrack_plus_Outside_mbias3, std::vector< int > Rings_minus_Outside_mbias3, std::vector< int > Rings_plus_Outside_mbias3, std::vector< int > stsIndex_minus_Outside_mbias3, std::vector< int > stsIndex_plus_Outside_mbias3, vector< CbmRichRing * > richRing_minus_Outside_mbias3, vector< CbmRichRing * > richRing_plus_Outside_mbias3)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Target_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Target_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Both_mbias3
void FindPi0(TString mod, TString position, vector< vector< TVector3 > > Gammas, vector< vector< int > > StsIndex, vector< vector< CbmMCTrack * > > GammasMC, TH1D *Pi0InvMassReco, TH2D *Pi0_pt_vs_rap, TH2D *Pi0_pt_vs_rap_est, TH2D *MultiplicityGamma, TH2D *MultiplicityChargedParticles, vector< TH1 * > BGCases)
std::vector< std::vector< TVector3 > > Gammas_zero_Outside_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Target_mbias3
std::vector< std::vector< TVector3 > > Gammas_one_Outside_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_all_Target_mbias3
CbmRichRingFitterEllipseTau * fTauFit
double CalculatePlaneAngle_first(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
CbmKresConversionManualmbias3 operator=(const CbmKresConversionManualmbias3 &)
std::vector< std::vector< int > > Gammas_stsIndex_one_Outside_mbias3
int FindInRich(int richInd, int stsMcTrackId)
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Both_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Both_mbias3
std::vector< std::vector< TVector3 > > Gammas_all_Outside_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_zero_Target_mbias3
void Exec(int fEventNumMan, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
std::vector< std::vector< int > > Gammas_stsIndex_two_Target_mbias3
vector< CbmRichRing * > VRichRing_plus_Target_mbias3
std::vector< std::vector< TVector3 > > Gammas_one_Both_mbias3
std::vector< std::vector< TVector3 > > Gammas_two_Target_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_two_Both_mbias3
void SaveTargetTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Target_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Outside_mbias3
vector< CbmStsTrack * > VStsTrack_plus_Outside_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Outside_mbias3
vector< CbmStsTrack * > VStsTrack_minus_Target_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Both_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Target_mbias3
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< std::vector< int > > Gammas_stsIndex_zero_Both_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Both_mbias3
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Outside_mbias3
vector< CbmStsTrack * > VStsTrack_plus_Target_mbias3
std::vector< std::vector< TVector3 > > Gammas_one_Target_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_zero_Outside_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Outside_mbias3
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Target_mbias3
vector< CbmRichRing * > VRichRing_minus_Target_mbias3
std::vector< std::vector< TVector3 > > Gammas_onetwo_Outside_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_one_Both_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_one_Target_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Outside_mbias3
CbmKresConversionManualmbias3(const CbmKresConversionManualmbias3 &)
std::vector< std::vector< TVector3 > > Gammas_onetwo_Target_mbias3
std::vector< std::vector< TVector3 > > Gammas_zero_Target_mbias3
vector< CbmMCTrack * > VMCtracks_minus_Outside_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_all_Both_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Both_mbias3
int CheckIfElectron(CbmRichRing *ring, double momentum)
vector< CbmRichRing * > VRichRing_minus_Outside_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Target_mbias3
vector< CbmStsTrack * > VStsTrack_minus_Outside_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Both_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_two_Outside_mbias3
std::vector< std::vector< TVector3 > > Gammas_zero_Both_mbias3
std::vector< std::vector< TVector3 > > Gammas_two_Outside_mbias3
std::vector< std::vector< TVector3 > > Gammas_all_Both_mbias3
vector< CbmRichRing * > VRichRing_plus_Outside_mbias3
std::vector< std::vector< int > > Gammas_stsIndex_all_Outside_mbias3
std::vector< std::vector< TVector3 > > Gammas_all_Target_mbias3
void SaveOutsideTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< std::vector< TVector3 > > Gammas_two_Both_mbias3
double CalculatePlaneAngle_last(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Outside_mbias3
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Outside_mbias3
std::vector< std::vector< TVector3 > > Gammas_onetwo_Both_mbias3
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Hash for CbmL1LinkKey.