CbmRoot
Loading...
Searching...
No Matches
CbmLitGlobalElectronId.h
Go to the documentation of this file.
1/* Copyright (C) 2011-2025 UGiessen/JINR-LIT, Giessen/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev, Semen Lebedev [committer], Cornelius Feier-Riesen */
4
5#ifndef CBMLITGLOBALELECTRONID_H_
6#define CBMLITGLOBALELECTRONID_H_
7
8#include "TCutG.h"
9#include "TObject.h"
10
11#include <memory> // TODO: needed?
12
13class TClonesArray;
14class CbmGlobalTrack;
15
16class CbmLitGlobalElectronId : public TObject {
17 private:
22
26 void Init();
27
28
29 public:
34 {
35 static CbmLitGlobalElectronId fInstance;
36 return fInstance;
37 }
38
43
50 Bool_t IsStsElectron(Int_t globalTrackIndex, Double_t momentum);
51
58 Bool_t IsRichElectron(Int_t globalTrackIndex, Double_t momentum);
59
66 Bool_t IsTrdElectron(Int_t globalTrackindex, Double_t momentum);
67
74
75 // TODO: 1000 ns is a hardcoded offset for event-by-event mode
76 Bool_t IsTofElectron(Int_t globalTrackIndex, Double_t momentum, Double_t eventTime = 1000.);
77
78 std::unique_ptr<TCutG> fStsELossCut2D = std::make_unique<TCutG>(*[]() {
79 // Cut values for 8 Gev
80 auto stsCut = new TCutG("StsELossCut2D", 6);
81 stsCut->SetVarX("P");
82 stsCut->SetVarY("eLoss");
83 stsCut->SetPoint(0, 0., 21e3);
84 stsCut->SetPoint(1, 10., 23e3);
85 stsCut->SetPoint(2, 10., 28e3);
86 stsCut->SetPoint(3, 4., 33e3);
87 stsCut->SetPoint(4, 2., 33e3);
88 stsCut->SetPoint(5, 0., 27e3);
89 return stsCut;
90 }());
91
92 std::unique_ptr<TCutG> fRichAnnCut2D = std::make_unique<TCutG>(*[]() {
93 // Cut values for 8 Gev
94 auto richCut = new TCutG("RichAnnCut2D", 6);
95 richCut->SetVarX("P");
96 richCut->SetVarY("ANN");
97 richCut->SetPoint(0, 0.0, 0.0);
98 richCut->SetPoint(1, 2.0, 0.0);
99 richCut->SetPoint(2, 3.0, 0.6);
100 richCut->SetPoint(3, 10.0, 0.9);
101 richCut->SetPoint(4, 10.0, 1.5);
102 richCut->SetPoint(5, 0.0, 1.5);
103 return richCut;
104 }());
105
106 std::unique_ptr<TCutG> fTrdElLikeCut2D = std::make_unique<TCutG>(*[]() {
107 // Cut values for 8 Gev
108 auto trdLikeCut = new TCutG("TrdElLikeCut2D", 8);
109 trdLikeCut->SetVarX("P");
110 trdLikeCut->SetVarY("Likelihood");
111 trdLikeCut->SetPoint(0, 0.0, 0.65);
112 trdLikeCut->SetPoint(1, 2.0, 0.65);
113 trdLikeCut->SetPoint(2, 3.0, 0.4);
114 trdLikeCut->SetPoint(3, 5.5, 0.4);
115 trdLikeCut->SetPoint(4, 6., 0.85);
116 trdLikeCut->SetPoint(5, 8., 0.9);
117 trdLikeCut->SetPoint(6, 8., 1.5);
118 trdLikeCut->SetPoint(7, 0., 1.5);
119 return trdLikeCut;
120 }());
121
122 std::unique_ptr<TCutG> fTrdChi2Cut2D = std::make_unique<TCutG>(*[]() {
123 // Cut values for 8 Gev
124 auto trdChi2Cut = new TCutG("TrdChi2Cut2D", 5);
125 trdChi2Cut->SetVarX("P");
126 trdChi2Cut->SetVarY("Chi2");
127 trdChi2Cut->SetPoint(0, 0.0, 0.0);
128 trdChi2Cut->SetPoint(1, 10.0, 1.0);
129 trdChi2Cut->SetPoint(2, 10.0, 7.0);
130 trdChi2Cut->SetPoint(3, 7.0, 10.0);
131 trdChi2Cut->SetPoint(4, 0.0, 10.0);
132 return trdChi2Cut;
133 }());
134
135 std::unique_ptr<TCutG> fTofM2Cut2D = std::make_unique<TCutG>(*[]() {
136 // Cut values for 8 Gev
137 auto tofM2Cut = new TCutG("TofM2Cut2D", 8);
138 tofM2Cut->SetVarX("P");
139 tofM2Cut->SetVarY("m2");
140 tofM2Cut->SetPoint(0, 0., -0.01);
141 tofM2Cut->SetPoint(1, 2., -0.06);
142 tofM2Cut->SetPoint(2, 8., -0.35);
143 tofM2Cut->SetPoint(3, 10., -0.35);
144 tofM2Cut->SetPoint(4, 10., 0.2);
145 tofM2Cut->SetPoint(5, 6., 0.3);
146 tofM2Cut->SetPoint(6, 1.3, 0.01);
147 tofM2Cut->SetPoint(7, 0., 0.01);
148 return tofM2Cut;
149 }());
150
151 std::unique_ptr<TCutG> fTofDistCut2D = std::make_unique<TCutG>(*[]() {
152 // Cut values for 8 Gev
153 auto tofDistCut = new TCutG("TofDistCut2D", 7);
154 tofDistCut->SetVarX("P");
155 tofDistCut->SetVarY("Dist");
156 tofDistCut->SetPoint(0, 0., 0.);
157 tofDistCut->SetPoint(1, 10., 0.);
158 tofDistCut->SetPoint(2, 10., 5.);
159 tofDistCut->SetPoint(3, 5., 7.);
160 tofDistCut->SetPoint(4, 2.5, 25.);
161 tofDistCut->SetPoint(5, 1., 50.);
162 tofDistCut->SetPoint(6, 0., 50.);
163 return tofDistCut;
164 }());
165
172 /*
173 Bool_t IsElectron(
174 Int_t globalTrackIndex,
175 Double_t momentum);
176*/
177
184 Double_t GetRichAnn(Int_t globalTrackIndex, Double_t momentum);
185
192 Double_t GetTrdAnn(Int_t globalTrackindex, Double_t momentum);
193
194
198 // TODO: 1000 ns is a hardcoded offset for even-by-even mode
199 Double_t GetTofM2(Int_t globalTrackIndex, Double_t momentum, Double_t eventTime = 1000.);
200
201
205 void SetTrdAnnCut(Double_t par) { fTrdAnnCut = par; }
206
210 void SetRichUseAnn(Bool_t par) { fRichUseAnn = par; }
211
215 void SetRichAnnCut(Double_t par) { fRichAnnCut = par; }
216
220 void SetRichCuts(Double_t meanA, Double_t rmsA, Double_t meanB, Double_t rmsB, Double_t rmsCoeff, Double_t rtDistCut)
221 {
222 fRichMeanA = meanA;
223 fRichMeanB = meanB;
224 fRichRmsA = rmsA;
225 fRichRmsB = rmsB;
226 fRichRmsCoeff = rmsCoeff;
227 fRichDistCut = rtDistCut;
228 }
229
233 Double_t GetRichAnnCut() { return fRichAnnCut; }
234
238 Double_t GetTrdAnnCut() { return fTrdAnnCut; }
239
240 private:
241 Double_t fRichAnnCut;
243 Double_t fRichMeanA;
244 Double_t fRichMeanB;
245 Double_t fRichRmsA;
246 Double_t fRichRmsB;
248 Double_t fRichDistCut;
249 Double_t fTrdAnnCut;
250
251 TClonesArray* fGlobalTracks;
252 TClonesArray* fStsTracks;
253 TClonesArray* fRichRings;
254 TClonesArray* fTrdTracks;
255 TClonesArray* fTofHits;
256 TClonesArray* fTofTracks;
257
260
262};
263
264#endif /* CBMLITGLOBALELECTRONID_H_ */
int Int_t
bool Bool_t
Bool_t IsTrdElectron(Int_t globalTrackindex, Double_t momentum)
Identify electron in RICH detector.
std::unique_ptr< TCutG > fRichAnnCut2D
void SetRichUseAnn(Bool_t par)
Set to true if you want to use ANN method for the RICH detector.
Double_t GetTrdAnn(Int_t globalTrackindex, Double_t momentum)
Return ANN value for electron Identification in the TRD detector.
std::unique_ptr< TCutG > fTrdElLikeCut2D
Bool_t IsStsElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in STS detector.
std::unique_ptr< TCutG > fTofM2Cut2D
Double_t GetRichAnnCut()
Return RICH ANN cut.
Double_t GetTofM2(Int_t globalTrackIndex, Double_t momentum, Double_t eventTime=1000.)
Return TOF m2 value.
Double_t GetRichAnn(Int_t globalTrackIndex, Double_t momentum)
Identify electron in RICH detector.
Bool_t IsTofElectron(Int_t globalTrackIndex, Double_t momentum, Double_t eventTime=1000.)
Identify electron in RICH detector.
Bool_t IsRichElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in RICH detector.
Double_t GetTrdAnnCut()
Return TRD ANN cut.
ClassDef(CbmLitGlobalElectronId, 1)
void SetRichAnnCut(Double_t par)
Set cut on RICH ANN output value.
std::unique_ptr< TCutG > fTofDistCut2D
void Init()
Initialize TClonesArrays.
CbmLitGlobalElectronId & operator=(const CbmLitGlobalElectronId &)
std::unique_ptr< TCutG > fStsELossCut2D
void SetRichCuts(Double_t meanA, Double_t rmsA, Double_t meanB, Double_t rmsB, Double_t rmsCoeff, Double_t rtDistCut)
Set RICH electron ID cuts when ANN is not used.
static CbmLitGlobalElectronId & GetInstance()
CbmLitGlobalElectronId(const CbmLitGlobalElectronId &)
virtual ~CbmLitGlobalElectronId()
Destructor.
void SetTrdAnnCut(Double_t par)
Set cut on TRD ANN output value.
std::unique_ptr< TCutG > fTrdChi2Cut2D