CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionManualmbias1.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_1
6#define CBM_KRES_CONVERSION_MANUAL_mbias_1
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_mbias1,
56 vector<CbmMCTrack*> MCtracks_plus_Outside_mbias1,
57 vector<CbmStsTrack*> StsTrack_minus_Outside_mbias1,
58 vector<CbmStsTrack*> StsTrack_plus_Outside_mbias1, std::vector<int> Rings_minus_Outside_mbias1,
59 std::vector<int> Rings_plus_Outside_mbias1, std::vector<int> stsIndex_minus_Outside_mbias1,
60 std::vector<int> stsIndex_plus_Outside_mbias1,
61 vector<CbmRichRing*> richRing_minus_Outside_mbias1,
62 vector<CbmRichRing*> richRing_plus_Outside_mbias1);
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_mbias1;
106 vector<CbmRichRing*> VRichRing_minus_Outside_mbias1;
107
108 vector<CbmStsTrack*> VStsTrack_plus_Outside_mbias1;
109 vector<CbmMCTrack*> VMCtracks_plus_Outside_mbias1;
112 vector<CbmRichRing*> VRichRing_plus_Outside_mbias1;
113
114
115 // charged tracks from the Target_mbias1
116 vector<CbmMCTrack*> VMCtracks_minus_Target_mbias1;
117 vector<CbmStsTrack*> VStsTrack_minus_Target_mbias1;
121 vector<CbmRichRing*> VRichRing_minus_Target_mbias1;
122
123 vector<CbmMCTrack*> VMCtracks_plus_Target_mbias1;
124 vector<CbmStsTrack*> VStsTrack_plus_Target_mbias1;
128 vector<CbmRichRing*> VRichRing_plus_Target_mbias1;
129
130
131 vector<TVector3> frefmomenta;
132 std::vector<int> frefId;
133 std::vector<CbmMCTrack*> fMCtracks;
134
135
136 // EMT Target_mbias1 Target_mbias1
138 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Target_mbias1;
140
141 // EMT Target_mbias1 Outside_mbias1
143 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Outside_mbias1;
145
146 // EMT Target_mbias1 Both_mbias1
148 std::vector<std::vector<TVector3>> EMT_man_pair_momenta_Both_mbias1;
150
151 // combined gammas from the Target_mbias1
152 std::vector<std::vector<TVector3>> Gammas_all_Target_mbias1;
153 std::vector<std::vector<TVector3>> Gammas_zero_Target_mbias1;
154 std::vector<std::vector<TVector3>> Gammas_one_Target_mbias1;
155 std::vector<std::vector<TVector3>> Gammas_two_Target_mbias1;
156 std::vector<std::vector<TVector3>> Gammas_onetwo_Target_mbias1;
157
158 std::vector<std::vector<int>> Gammas_stsIndex_all_Target_mbias1;
159 std::vector<std::vector<int>> Gammas_stsIndex_zero_Target_mbias1;
160 std::vector<std::vector<int>> Gammas_stsIndex_one_Target_mbias1;
161 std::vector<std::vector<int>> Gammas_stsIndex_two_Target_mbias1;
162 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Target_mbias1;
163
164 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Target_mbias1;
165 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Target_mbias1;
166 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Target_mbias1;
167 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Target_mbias1;
168 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Target_mbias1;
169
170
171 // combined gammas from Outside_mbias1
172 std::vector<std::vector<TVector3>> Gammas_all_Outside_mbias1;
173 std::vector<std::vector<TVector3>> Gammas_zero_Outside_mbias1;
174 std::vector<std::vector<TVector3>> Gammas_one_Outside_mbias1;
175 std::vector<std::vector<TVector3>> Gammas_two_Outside_mbias1;
176 std::vector<std::vector<TVector3>> Gammas_onetwo_Outside_mbias1;
177
178 std::vector<std::vector<int>> Gammas_stsIndex_all_Outside_mbias1;
179 std::vector<std::vector<int>> Gammas_stsIndex_zero_Outside_mbias1;
180 std::vector<std::vector<int>> Gammas_stsIndex_one_Outside_mbias1;
181 std::vector<std::vector<int>> Gammas_stsIndex_two_Outside_mbias1;
182 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Outside_mbias1;
183
184 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Outside_mbias1;
185 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Outside_mbias1;
186 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Outside_mbias1;
187 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Outside_mbias1;
188 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Outside_mbias1;
189
190
191 // combined gammas from the Target_mbias1 and Outside_mbias1 together
192 std::vector<std::vector<TVector3>> Gammas_all_Both_mbias1;
193 std::vector<std::vector<TVector3>> Gammas_zero_Both_mbias1;
194 std::vector<std::vector<TVector3>> Gammas_one_Both_mbias1;
195 std::vector<std::vector<TVector3>> Gammas_two_Both_mbias1;
196 std::vector<std::vector<TVector3>> Gammas_onetwo_Both_mbias1;
197
198 std::vector<std::vector<int>> Gammas_stsIndex_all_Both_mbias1;
199 std::vector<std::vector<int>> Gammas_stsIndex_zero_Both_mbias1;
200 std::vector<std::vector<int>> Gammas_stsIndex_one_Both_mbias1;
201 std::vector<std::vector<int>> Gammas_stsIndex_two_Both_mbias1;
202 std::vector<std::vector<int>> Gammas_stsIndex_onetwo_Both_mbias1;
203
204 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_all_Both_mbias1;
205 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_zero_Both_mbias1;
206 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_one_Both_mbias1;
207 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_two_Both_mbias1;
208 std::vector<std::vector<CbmMCTrack*>> Gammas_MC_onetwo_Both_mbias1;
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_mbias1 additional histograms
429
430
431 // multiplicity Target_mbias1
443
444 // multiplicity Outside_mbias1
456
457 // multiplicity Both_mbias1
469
470
471 // rap_vs_Pt for "OneTwo" and "Both_mbias1"
503
534
535
536 // BG cases Target_mbias1
542 // BG cases Outside_mbias1
548
549 // BG cases Both_mbias1
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< TVector3 > > Gammas_two_Outside_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Outside_mbias1
std::vector< std::vector< TVector3 > > Gammas_all_Target_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_one_Both_mbias1
std::vector< std::vector< TVector3 > > Gammas_zero_Both_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Both_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Outside_mbias1
void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus_Outside_mbias1, vector< CbmMCTrack * > MCtracks_plus_Outside_mbias1, vector< CbmStsTrack * > StsTrack_minus_Outside_mbias1, vector< CbmStsTrack * > StsTrack_plus_Outside_mbias1, std::vector< int > Rings_minus_Outside_mbias1, std::vector< int > Rings_plus_Outside_mbias1, std::vector< int > stsIndex_minus_Outside_mbias1, std::vector< int > stsIndex_plus_Outside_mbias1, vector< CbmRichRing * > richRing_minus_Outside_mbias1, vector< CbmRichRing * > richRing_plus_Outside_mbias1)
double CalculatePlaneAngle_first(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Target_mbias1
vector< CbmRichRing * > VRichRing_plus_Outside_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Target_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Target_mbias1
int FindInRich(int richInd, int stsMcTrackId)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Both_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_two_Outside_mbias1
std::vector< std::vector< TVector3 > > Gammas_one_Target_mbias1
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_Target_mbias1
vector< CbmRichRing * > VRichRing_minus_Target_mbias1
vector< CbmStsTrack * > VStsTrack_minus_Outside_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Target_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Both_mbias1
CbmKresConversionManualmbias1 operator=(const CbmKresConversionManualmbias1 &)
vector< CbmRichRing * > VRichRing_minus_Outside_mbias1
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Outside_mbias1
vector< CbmStsTrack * > VStsTrack_plus_Target_mbias1
vector< CbmStsTrack * > VStsTrack_minus_Target_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Outside_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Target_mbias1
vector< CbmMCTrack * > VMCtracks_minus_Outside_mbias1
std::vector< std::vector< TVector3 > > Gammas_onetwo_Both_mbias1
std::vector< std::vector< TVector3 > > Gammas_all_Outside_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Outside_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Both_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_all_Target_mbias1
std::vector< std::vector< TVector3 > > Gammas_one_Outside_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_all_Outside_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_zero_Both_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Both_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_zero_Outside_mbias1
std::vector< std::vector< TVector3 > > Gammas_two_Target_mbias1
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Target_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Target_mbias1
std::vector< std::vector< TVector3 > > Gammas_all_Both_mbias1
CbmKresConversionManualmbias1(const CbmKresConversionManualmbias1 &)
int CheckIfElectron(CbmRichRing *ring, double momentum)
std::vector< std::vector< TVector3 > > Gammas_onetwo_Target_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Outside_mbias1
std::vector< std::vector< TVector3 > > EMT_man_pair_momenta_Both_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Both_mbias1
std::vector< std::vector< TVector3 > > Gammas_zero_Outside_mbias1
vector< CbmRichRing * > VRichRing_plus_Target_mbias1
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< TVector3 > > Gammas_onetwo_Outside_mbias1
void SaveOutsideTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
void Exec(int fEventNumMan, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
std::vector< std::vector< int > > Gammas_stsIndex_two_Target_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_one_Outside_mbias1
void SaveTargetTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
double CalculatePlaneAngle_last(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< int > > Gammas_stsIndex_all_Both_mbias1
std::vector< std::vector< TVector3 > > Gammas_two_Both_mbias1
std::vector< std::vector< TVector3 > > Gammas_one_Both_mbias1
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Outside_mbias1
CbmRichRingFitterEllipseTau * fTauFit
std::vector< std::vector< int > > Gammas_stsIndex_two_Both_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_zero_Target_mbias1
std::vector< std::vector< int > > Gammas_stsIndex_one_Target_mbias1
vector< CbmStsTrack * > VStsTrack_plus_Outside_mbias1
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Hash for CbmL1LinkKey.