CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionManualmbias4.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_4
6#define CBM_KRES_CONVERSION_MANUAL_mbias_4
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_mbias4,
56 vector<CbmMCTrack*> MCtracks_plus_Outside_mbias4,
57 vector<CbmStsTrack*> StsTrack_minus_Outside_mbias4,
58 vector<CbmStsTrack*> StsTrack_plus_Outside_mbias4, std::vector<int> Rings_minus_Outside_mbias4,
59 std::vector<int> Rings_plus_Outside_mbias4, std::vector<int> stsIndex_minus_Outside_mbias4,
60 std::vector<int> stsIndex_plus_Outside_mbias4,
61 vector<CbmRichRing*> richRing_minus_Outside_mbias4,
62 vector<CbmRichRing*> richRing_plus_Outside_mbias4);
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_mbias4;
106 vector<CbmRichRing*> VRichRing_minus_Outside_mbias4;
107
108 vector<CbmStsTrack*> VStsTrack_plus_Outside_mbias4;
109 vector<CbmMCTrack*> VMCtracks_plus_Outside_mbias4;
112 vector<CbmRichRing*> VRichRing_plus_Outside_mbias4;
113
114
115 // charged tracks from the Target_mbias4
116 vector<CbmMCTrack*> VMCtracks_minus_Target_mbias4;
117 vector<CbmStsTrack*> VStsTrack_minus_Target_mbias4;
121 vector<CbmRichRing*> VRichRing_minus_Target_mbias4;
122
123 vector<CbmMCTrack*> VMCtracks_plus_Target_mbias4;
124 vector<CbmStsTrack*> VStsTrack_plus_Target_mbias4;
128 vector<CbmRichRing*> VRichRing_plus_Target_mbias4;
129
130
131 vector<TVector3> frefmomenta;
132 std::vector<int> frefId;
133 std::vector<CbmMCTrack*> fMCtracks;
134
135
136 // EMT Target_mbias4 Target_mbias4
138 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Target_mbias4;
140
141 // EMT Target_mbias4 Outside_mbias4
143 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Outside_mbias4;
145
146 // EMT Target_mbias4 Both_mbias4
148 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Both_mbias4;
150
151 // combined gammas from the Target_mbias4
152 std::vector<std::vector<TVector3>> Gammas_all_Target_mbias4;
153 std::vector<std::vector<TVector3>> Gammas_zero_Target_mbias4;
154 std::vector<std::vector<TVector3>> Gammas_one_Target_mbias4;
155 std::vector<std::vector<TVector3>> Gammas_two_Target_mbias4;
156 std::vector<std::vector<TVector3>> Gammas_onetwo_Target_mbias4;
157
158 std::vector<std::vector<int>> Gammas_stsIndex_all_Target_mbias4;
159 std::vector<std::vector<int>> Gammas_stsIndex_zero_Target_mbias4;
160 std::vector<std::vector<int>> Gammas_stsIndex_one_Target_mbias4;
161 std::vector<std::vector<int>> Gammas_stsIndex_two_Target_mbias4;
162 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Target_mbias4;
163
164 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Target_mbias4;
165 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Target_mbias4;
166 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Target_mbias4;
167 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Target_mbias4;
168 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Target_mbias4;
169
170
171 // combined gammas from Outside_mbias4
172 std::vector<std::vector<TVector3>> Gammas_all_Outside_mbias4;
173 std::vector<std::vector<TVector3>> Gammas_zero_Outside_mbias4;
174 std::vector<std::vector<TVector3>> Gammas_one_Outside_mbias4;
175 std::vector<std::vector<TVector3>> Gammas_two_Outside_mbias4;
176 std::vector<std::vector<TVector3>> Gammas_onetwo_Outside_mbias4;
177
178 std::vector<std::vector<int>> Gammas_stsIndex_all_Outside_mbias4;
179 std::vector<std::vector<int>> Gammas_stsIndex_zero_Outside_mbias4;
180 std::vector<std::vector<int>> Gammas_stsIndex_one_Outside_mbias4;
181 std::vector<std::vector<int>> Gammas_stsIndex_two_Outside_mbias4;
182 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Outside_mbias4;
183
184 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Outside_mbias4;
185 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Outside_mbias4;
186 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Outside_mbias4;
187 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Outside_mbias4;
188 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Outside_mbias4;
189
190
191 // combined gammas from the Target_mbias4 and Outside_mbias4 together
192 std::vector<std::vector<TVector3>> Gammas_all_Both_mbias4;
193 std::vector<std::vector<TVector3>> Gammas_zero_Both_mbias4;
194 std::vector<std::vector<TVector3>> Gammas_one_Both_mbias4;
195 std::vector<std::vector<TVector3>> Gammas_two_Both_mbias4;
196 std::vector<std::vector<TVector3>> Gammas_onetwo_Both_mbias4;
197
198 std::vector<std::vector<int>> Gammas_stsIndex_all_Both_mbias4;
199 std::vector<std::vector<int>> Gammas_stsIndex_zero_Both_mbias4;
200 std::vector<std::vector<int>> Gammas_stsIndex_one_Both_mbias4;
201 std::vector<std::vector<int>> Gammas_stsIndex_two_Both_mbias4;
202 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Both_mbias4;
203
204 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Both_mbias4;
205 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Both_mbias4;
206 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Both_mbias4;
207 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Both_mbias4;
208 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Both_mbias4;
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_mbias4 additional histograms
429
430
431 // multiplicity Target_mbias4
443
444 // multiplicity Outside_mbias4
456
457 // multiplicity Both_mbias4
469
470
471 // rap_vs_Pt for "OneTwo" and "Both_mbias4"
503
534
535
536 // BG cases Target_mbias4
542 // BG cases Outside_mbias4
548
549 // BG cases Both_mbias4
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.
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Outside_mbias4
vector< CbmRichRing * > VRichRing_plus_Outside_mbias4
void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus_Outside_mbias4, vector< CbmMCTrack * > MCtracks_plus_Outside_mbias4, vector< CbmStsTrack * > StsTrack_minus_Outside_mbias4, vector< CbmStsTrack * > StsTrack_plus_Outside_mbias4, std::vector< int > Rings_minus_Outside_mbias4, std::vector< int > Rings_plus_Outside_mbias4, std::vector< int > stsIndex_minus_Outside_mbias4, std::vector< int > stsIndex_plus_Outside_mbias4, vector< CbmRichRing * > richRing_minus_Outside_mbias4, vector< CbmRichRing * > richRing_plus_Outside_mbias4)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Outside_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Both_mbias4
std::vector< std::vector< TVector3 > > Gammas_two_Target_mbias4
std::vector< std::vector< TVector3 > > Gammas_all_Both_mbias4
CbmKresConversionManualmbias4(const CbmKresConversionManualmbias4 &)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Both_mbias4
std::vector< std::vector< TVector3 > > Gammas_one_Both_mbias4
CbmRichRingFitterEllipseTau * fTauFit
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_mbias4
std::vector< std::vector< TVector3 > > Gammas_all_Target_mbias4
int FindInRich(int richInd, int stsMcTrackId)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Target_mbias4
double CalculatePlaneAngle_first(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< int > > Gammas_stsIndex_zero_Target_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Both_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Both_mbias4
std::vector< std::vector< TVector3 > > Gammas_one_Target_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Outside_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_zero_Outside_mbias4
int CheckIfElectron(CbmRichRing *ring, double momentum)
std::vector< std::vector< int > > Gammas_stsIndex_one_Target_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Both_mbias4
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< CbmMCTrack * > > Gammas_MC_onetwo_Both_mbias4
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Target_mbias4
std::vector< std::vector< TVector3 > > Gammas_two_Outside_mbias4
vector< CbmRichRing * > VRichRing_plus_Target_mbias4
std::vector< std::vector< TVector3 > > Gammas_onetwo_Target_mbias4
std::vector< std::vector< TVector3 > > Gammas_one_Outside_mbias4
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Both_mbias4
void SaveOutsideTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Outside_mbias4
vector< CbmStsTrack * > VStsTrack_minus_Outside_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Target_mbias4
std::vector< std::vector< TVector3 > > Gammas_two_Both_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Target_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_two_Both_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Outside_mbias4
void Exec(int fEventNumMan, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
std::vector< std::vector< int > > Gammas_stsIndex_two_Outside_mbias4
vector< CbmStsTrack * > VStsTrack_plus_Outside_mbias4
CbmKresConversionManualmbias4 operator=(const CbmKresConversionManualmbias4 &)
std::vector< std::vector< TVector3 > > Gammas_zero_Outside_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Target_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Target_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_one_Outside_mbias4
std::vector< std::vector< TVector3 > > Gammas_onetwo_Outside_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_two_Target_mbias4
std::vector< std::vector< TVector3 > > Gammas_all_Outside_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_all_Outside_mbias4
std::vector< std::vector< TVector3 > > Gammas_zero_Both_mbias4
std::vector< std::vector< TVector3 > > Gammas_zero_Target_mbias4
vector< CbmStsTrack * > VStsTrack_minus_Target_mbias4
double CalculatePlaneAngle_last(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
vector< CbmRichRing * > VRichRing_minus_Target_mbias4
void SaveTargetTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Outside_mbias4
vector< CbmMCTrack * > VMCtracks_minus_Outside_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_all_Target_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_one_Both_mbias4
vector< CbmRichRing * > VRichRing_minus_Outside_mbias4
std::vector< std::vector< TVector3 > > Gammas_onetwo_Both_mbias4
vector< CbmStsTrack * > VStsTrack_plus_Target_mbias4
std::vector< std::vector< int > > Gammas_stsIndex_all_Both_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Target_mbias4
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Outside_mbias4
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Hash for CbmL1LinkKey.