CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemLUTReader Class Reference

#include <CgemLUTReader.h>

Public Member Functions

 CgemLUTReader ()
 
 CgemLUTReader (TString name)
 
 ~CgemLUTReader ()
 
bool ReadLUT ()
 
std::map< int, int > * GetMap (int ilayer, int isheet, int iview)
 
bool LoadStripInfo (int ilayer, int isheet, int iview, int istrip)
 
int GetROC (int ilayer, int isheet, int iview, int istrip)
 
int GetTIGER (int ilayer, int isheet, int iview, int istrip)
 
int GetFEB (int ilayer, int isheet, int iview, int istrip)
 
int GetChip (int ilayer, int isheet, int iview, int istrip)
 
int GetChannel (int ilayer, int isheet, int iview, int istrip)
 
int GetLayer (int ilayer, int isheet, int iview, int istrip)
 
int GetSheet (int ilayer, int isheet, int iview, int istrip)
 
int GetSide (int ilayer, int isheet, int iview, int istrip)
 
int GetStrip_x_GRAAL (int ilayer, int isheet, int iview, int istrip)
 
int GetStrip_v_GRAAL (int ilayer, int isheet, int iview, int istrip)
 
int GetStrip_x_BOSS (int ilayer, int isheet, int iview, int istrip)
 
int GetStrip_v_BOSS (int ilayer, int isheet, int iview, int istrip)
 
float GetCalib_QCD_slope (int ilayer, int isheet, int iview, int istrip)
 
float GetCalib_QCD_const (int ilayer, int isheet, int iview, int istrip)
 
float GetCalib_QCD_saturation (int ilayer, int isheet, int iview, int istrip)
 
float GetV_thr_T_mV (int ilayer, int isheet, int iview, int istrip)
 
float GetV_thr_E_mV (int ilayer, int isheet, int iview, int istrip)
 
float Get_thr_T_fC (int ilayer, int isheet, int iview, int istrip)
 
float Get_thr_E_fC (int ilayer, int isheet, int iview, int istrip)
 
float GetBaseline_T_mV (int ilayer, int isheet, int iview, int istrip)
 
float GetBaseline_E_mV (int ilayer, int isheet, int iview, int istrip)
 
float Get_thr_fC (int ilayer, int isheet, int iview, int istrip)
 
float GetNoise_Rate_Hz (int ilayer, int isheet, int iview, int istrip)
 
float GetNoise_MeanQ_fC (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_MeanQ_fC (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_MaxQ_fC (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_Rate_Hz (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_StartTime_ns (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_StopTime_ns (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_SigmaTime_ns (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_FEBStartTime_ns (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_FEBStopTime_ns (int ilayer, int isheet, int iview, int istrip)
 
float GetSignal_FEBSigmaTime_ns (int ilayer, int isheet, int iview, int istrip)
 
int GetQuality (int ilayer, int isheet, int iview, int istrip)
 
bool PrintMap (int ilayer, int isheet, int iview)
 

Public Attributes

TString CosmicRayLUTName
 
std::map< int, int > map_L1_S1_stripx_to_entry
 
std::map< int, int > map_L2_S1_stripx_to_entry
 
std::map< int, int > map_L2_S2_stripx_to_entry
 
std::map< int, int > map_L3_S1_stripx_to_entry
 
std::map< int, int > map_L3_S2_stripx_to_entry
 
std::map< int, int > map_L1_S1_stripv_to_entry
 
std::map< int, int > map_L2_S1_stripv_to_entry
 
std::map< int, int > map_L2_S2_stripv_to_entry
 
std::map< int, int > map_L3_S1_stripv_to_entry
 
std::map< int, int > map_L3_S2_stripv_to_entry
 
TFile * f
 
TTree * tree
 
int ROC
 
int TIGER
 
int FEB
 
int chip
 
int channel
 
int layer
 
int side
 
int strip_x_graal
 
int strip_v_graal
 
int strip_x_boss
 
int strip_v_boss
 
int sheet
 
float calib_QDC_slope
 
float calib_QDC_const
 
float calib_QDC_saturation
 
float v_thr_T_mV
 
float v_thr_E_mV
 
float thr_T_fC
 
float thr_E_fC
 
float baseline_T_mV
 
float baseline_E_mV
 
float thr_fC
 
float noise_rate_Hz
 
float noise_meanQ_fC
 
float signal_meanQ_fC
 
float signal_maxQ_fC
 
float signal_rate_Hz
 
float signal_startTime_ns
 
float signal_stopTime_ns
 
float signal_sigmaTime_ns
 
float signal_FEBstartTime_ns
 
float signal_FEBstopTime_ns
 
float signal_FEBsigmaTime_ns
 
int quality
 
TTree * general
 
int First_RUN
 
int Last_RUN
 
int Integration_time
 
int Energy_mode
 
int HV_L1_G3
 
int HV_L2_G3
 
int HV_L3_G3
 
int HV_L1_G2
 
int HV_L2_G2
 
int HV_L3_G2
 
int HV_L1_G1
 
int HV_L2_G1
 
int HV_L3_G1
 
int HV_L1_In
 
int HV_L2_In
 
int HV_L3_In
 
int HV_L1_T2
 
int HV_L2_T2
 
int HV_L3_T2
 
int HV_L1_T1
 
int HV_L2_T1
 
int HV_L3_T1
 
int HV_L1_Dr
 
int HV_L2_Dr
 
int HV_L3_Dr
 

Detailed Description

#define MAXLAYER 3 #define MAXSHEET 2 #define MAXVIEW 2 #define MAXSTRIP 1395 // LAYER3

Definition at line 16 of file CgemLUTReader.h.

Constructor & Destructor Documentation

◆ CgemLUTReader() [1/2]

CgemLUTReader::CgemLUTReader ( )

Definition at line 19 of file CgemLUTReader.cxx.

19 : tree(NULL) {
21}
TString CosmicRayLUTName

◆ CgemLUTReader() [2/2]

CgemLUTReader::CgemLUTReader ( TString name)

Definition at line 23 of file CgemLUTReader.cxx.

23 : tree(NULL) {
24 CosmicRayLUTName = lutname;
25}

◆ ~CgemLUTReader()

CgemLUTReader::~CgemLUTReader ( )

Definition at line 27 of file CgemLUTReader.cxx.

27{}

Member Function Documentation

◆ Get_thr_E_fC()

float CgemLUTReader::Get_thr_E_fC ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 288 of file CgemLUTReader.cxx.

288 {
289 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
290 if(doesexist == false) return 0.;
291 return thr_E_fC;
292}
bool LoadStripInfo(int ilayer, int isheet, int iview, int istrip)

◆ Get_thr_fC()

float CgemLUTReader::Get_thr_fC ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 306 of file CgemLUTReader.cxx.

306 {
307 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
308 if(doesexist == false) return 0.;
309 return thr_fC;
310}

◆ Get_thr_T_fC()

float CgemLUTReader::Get_thr_T_fC ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 282 of file CgemLUTReader.cxx.

282 {
283 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
284 if(doesexist == false) return 0.;
285 return thr_T_fC;
286}

Referenced by CgemCalibFunSvc::getTimeWalk().

◆ GetBaseline_E_mV()

float CgemLUTReader::GetBaseline_E_mV ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 300 of file CgemLUTReader.cxx.

300 {
301 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
302 if(doesexist == false) return 0.;
303 return baseline_E_mV;
304}

◆ GetBaseline_T_mV()

float CgemLUTReader::GetBaseline_T_mV ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 294 of file CgemLUTReader.cxx.

294 {
295 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
296 if(doesexist == false) return 0.;
297 return baseline_T_mV;
298}

◆ GetCalib_QCD_const()

float CgemLUTReader::GetCalib_QCD_const ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 258 of file CgemLUTReader.cxx.

258 {
259 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
260 if(doesexist == false) return 0.;
261 return calib_QDC_const;
262}

◆ GetCalib_QCD_saturation()

float CgemLUTReader::GetCalib_QCD_saturation ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 264 of file CgemLUTReader.cxx.

264 {
265 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
266 if(doesexist == false) return 0.;
268}
float calib_QDC_saturation

◆ GetCalib_QCD_slope()

float CgemLUTReader::GetCalib_QCD_slope ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 252 of file CgemLUTReader.cxx.

252 {
253 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
254 if(doesexist == false) return 0.;
255 return calib_QDC_slope;
256}

◆ GetChannel()

int CgemLUTReader::GetChannel ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 204 of file CgemLUTReader.cxx.

204 {
205 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
206 if(doesexist == false) return -1;
207 return channel;
208}

Referenced by TestHit::execute(), and TestTrack::execute().

◆ GetChip()

int CgemLUTReader::GetChip ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 198 of file CgemLUTReader.cxx.

198 {
199 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
200 if(doesexist == false) return -1;
201 return chip;
202}

Referenced by TestHit::execute(), and TestTrack::execute().

◆ GetFEB()

int CgemLUTReader::GetFEB ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 192 of file CgemLUTReader.cxx.

192 {
193 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
194 if(doesexist == false) return -1;
195 return FEB;
196}

Referenced by CgemCosmicRayQA::analyze(), TestHit::execute(), TestTrack::execute(), and CgemCosmicRayQA::fill_track_histo().

◆ GetLayer()

int CgemLUTReader::GetLayer ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 210 of file CgemLUTReader.cxx.

210 {
211 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
212 if(doesexist == false) return -1;
213 return layer;
214}

◆ GetMap()

std::map< int, int > * CgemLUTReader::GetMap ( int ilayer,
int isheet,
int iview )

Definition at line 148 of file CgemLUTReader.cxx.

148 {
149
150 if(iview==0) {
151 if(ilayer == 0 && isheet == 0) return &map_L1_S1_stripx_to_entry;
152 else if(ilayer == 1 && isheet == 0) return &map_L2_S1_stripx_to_entry; // unswapped - farinelli
153 else if(ilayer == 1 && isheet == 1) return &map_L2_S2_stripx_to_entry; // unswapped - farinelli
154 else if(ilayer == 2 && isheet == 0) return &map_L3_S1_stripx_to_entry;
155 else if(ilayer == 2 && isheet == 1) return &map_L3_S2_stripx_to_entry;
156 }
157 else if(iview==1) {
158 if(ilayer == 0 && isheet == 0) return &map_L1_S1_stripv_to_entry;
159 else if(ilayer == 1 && isheet == 0) return &map_L2_S1_stripv_to_entry; // unswapped - farinelli
160 else if(ilayer == 1 && isheet == 1) return &map_L2_S2_stripv_to_entry; // unswapped - farinelli
161 else if(ilayer == 2 && isheet == 0) return &map_L3_S1_stripv_to_entry;
162 else if(ilayer == 2 && isheet == 1) return &map_L3_S2_stripv_to_entry;
163 }
164 else return NULL;
165}
std::map< int, int > map_L3_S2_stripx_to_entry
std::map< int, int > map_L1_S1_stripx_to_entry
std::map< int, int > map_L2_S2_stripx_to_entry
std::map< int, int > map_L2_S1_stripv_to_entry
std::map< int, int > map_L3_S1_stripx_to_entry
std::map< int, int > map_L1_S1_stripv_to_entry
std::map< int, int > map_L2_S1_stripx_to_entry
std::map< int, int > map_L3_S1_stripv_to_entry
std::map< int, int > map_L3_S2_stripv_to_entry
std::map< int, int > map_L2_S2_stripv_to_entry

Referenced by LoadStripInfo(), and PrintMap().

◆ GetNoise_MeanQ_fC()

float CgemLUTReader::GetNoise_MeanQ_fC ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 318 of file CgemLUTReader.cxx.

318 {
319 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
320 if(doesexist == false) return 0.;
321 return noise_meanQ_fC;
322}

◆ GetNoise_Rate_Hz()

float CgemLUTReader::GetNoise_Rate_Hz ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 312 of file CgemLUTReader.cxx.

312 {
313 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
314 if(doesexist == false) return 0.;
315 return noise_rate_Hz;
316}

◆ GetQuality()

int CgemLUTReader::GetQuality ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 378 of file CgemLUTReader.cxx.

378 {
379 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
380 if(doesexist == false) return -1;
381 return quality;
382}

Referenced by TestHit::execute(), and TestTrack::execute().

◆ GetROC()

int CgemLUTReader::GetROC ( int ilayer,
int isheet,
int iview,
int istrip )

Setup of each LAYER readout: strip -> TIGER -> FEB -> ROC

‍each ROC has up to 4 FEB each FEB has 2 TIGER To select a strip use : layer, sheet, view and strip ID (in Cgemboss style)

More info at: https://docbes3.ihep.ac.cn/~cgem/index.php/Documentation

Definition at line 180 of file CgemLUTReader.cxx.

180 {
181 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
182 if(doesexist == false) return -1;
183 return ROC;
184}

Referenced by TestHit::execute(), and TestTrack::execute().

◆ GetSheet()

int CgemLUTReader::GetSheet ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 216 of file CgemLUTReader.cxx.

216 {
217 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
218 if(doesexist == false) return -1;
219 return sheet;
220}

◆ GetSide()

int CgemLUTReader::GetSide ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 222 of file CgemLUTReader.cxx.

222 {
223 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
224 if(doesexist == false) return -1;
225 return side;
226}

◆ GetSignal_FEBSigmaTime_ns()

float CgemLUTReader::GetSignal_FEBSigmaTime_ns ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 372 of file CgemLUTReader.cxx.

372 {
373 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
374 if(doesexist == false) return 0.;
376}
float signal_FEBsigmaTime_ns

◆ GetSignal_FEBStartTime_ns()

float CgemLUTReader::GetSignal_FEBStartTime_ns ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 360 of file CgemLUTReader.cxx.

360 {
361 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
362 if(doesexist == false) return 0.;
364}
float signal_FEBstartTime_ns

◆ GetSignal_FEBStopTime_ns()

float CgemLUTReader::GetSignal_FEBStopTime_ns ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 366 of file CgemLUTReader.cxx.

366 {
367 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
368 if(doesexist == false) return 0.;
370}
float signal_FEBstopTime_ns

◆ GetSignal_MaxQ_fC()

float CgemLUTReader::GetSignal_MaxQ_fC ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 330 of file CgemLUTReader.cxx.

330 {
331 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
332 if(doesexist == false) return 0.;
333 return signal_maxQ_fC;
334}

◆ GetSignal_MeanQ_fC()

float CgemLUTReader::GetSignal_MeanQ_fC ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 324 of file CgemLUTReader.cxx.

324 {
325 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
326 if(doesexist == false) return 0.;
327 return signal_meanQ_fC;
328}

◆ GetSignal_Rate_Hz()

float CgemLUTReader::GetSignal_Rate_Hz ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 336 of file CgemLUTReader.cxx.

336 {
337 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
338 if(doesexist == false) return 0.;
339 return signal_rate_Hz;
340}

◆ GetSignal_SigmaTime_ns()

float CgemLUTReader::GetSignal_SigmaTime_ns ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 354 of file CgemLUTReader.cxx.

354 {
355 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
356 if(doesexist == false) return 0.;
357 return signal_sigmaTime_ns;
358}
float signal_sigmaTime_ns

◆ GetSignal_StartTime_ns()

float CgemLUTReader::GetSignal_StartTime_ns ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 342 of file CgemLUTReader.cxx.

342 {
343 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
344 if(doesexist == false) return 0.;
345 return signal_startTime_ns;
346}
float signal_startTime_ns

◆ GetSignal_StopTime_ns()

float CgemLUTReader::GetSignal_StopTime_ns ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 348 of file CgemLUTReader.cxx.

348 {
349 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
350 if(doesexist == false) return 0.;
351 return signal_stopTime_ns;
352}
float signal_stopTime_ns

◆ GetStrip_v_BOSS()

int CgemLUTReader::GetStrip_v_BOSS ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 246 of file CgemLUTReader.cxx.

246 {
247 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
248 if(doesexist == false) return 0.;
249 return strip_v_boss;
250}

◆ GetStrip_v_GRAAL()

int CgemLUTReader::GetStrip_v_GRAAL ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 234 of file CgemLUTReader.cxx.

234 {
235 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
236 if(doesexist == false) return -1;
237 return strip_v_graal;
238}

◆ GetStrip_x_BOSS()

int CgemLUTReader::GetStrip_x_BOSS ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 240 of file CgemLUTReader.cxx.

240 {
241 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
242 if(doesexist == false) return -1;
243 return strip_x_boss;
244}

◆ GetStrip_x_GRAAL()

int CgemLUTReader::GetStrip_x_GRAAL ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 228 of file CgemLUTReader.cxx.

228 {
229 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
230 if(doesexist == false) return -1;
231 return strip_x_graal;
232}

◆ GetTIGER()

int CgemLUTReader::GetTIGER ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 186 of file CgemLUTReader.cxx.

186 {
187 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
188 if(doesexist == false) return -1;
189 return TIGER;
190}

Referenced by TestHit::execute(), and TestTrack::execute().

◆ GetV_thr_E_mV()

float CgemLUTReader::GetV_thr_E_mV ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 276 of file CgemLUTReader.cxx.

276 {
277 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
278 if(doesexist == false) return 0.;
279 return v_thr_E_mV;
280}

◆ GetV_thr_T_mV()

float CgemLUTReader::GetV_thr_T_mV ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 270 of file CgemLUTReader.cxx.

270 {
271 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
272 if(doesexist == false) return 0.;
273 return v_thr_T_mV;
274}

◆ LoadStripInfo()

bool CgemLUTReader::LoadStripInfo ( int ilayer,
int isheet,
int iview,
int istrip )

Definition at line 167 of file CgemLUTReader.cxx.

167 {
168 std::map<int, int> *mappa = GetMap(ilayer, isheet, iview);
169 if(mappa == NULL) return false;
170 std::map<int, int>::iterator it = mappa->find(istrip);
171 if (it != mappa->end()) {
172 int ientry = it->second;
173 tree->GetEntry(ientry);
174 return true;
175 }
176 return false;;
177}
std::map< int, int > * GetMap(int ilayer, int isheet, int iview)

Referenced by Get_thr_E_fC(), Get_thr_fC(), Get_thr_T_fC(), GetBaseline_E_mV(), GetBaseline_T_mV(), GetCalib_QCD_const(), GetCalib_QCD_saturation(), GetCalib_QCD_slope(), GetChannel(), GetChip(), GetFEB(), GetLayer(), GetNoise_MeanQ_fC(), GetNoise_Rate_Hz(), GetQuality(), GetROC(), GetSheet(), GetSide(), GetSignal_FEBSigmaTime_ns(), GetSignal_FEBStartTime_ns(), GetSignal_FEBStopTime_ns(), GetSignal_MaxQ_fC(), GetSignal_MeanQ_fC(), GetSignal_Rate_Hz(), GetSignal_SigmaTime_ns(), GetSignal_StartTime_ns(), GetSignal_StopTime_ns(), GetStrip_v_BOSS(), GetStrip_v_GRAAL(), GetStrip_x_BOSS(), GetStrip_x_GRAAL(), GetTIGER(), GetV_thr_E_mV(), and GetV_thr_T_mV().

◆ PrintMap()

bool CgemLUTReader::PrintMap ( int ilayer,
int isheet,
int iview )

Definition at line 384 of file CgemLUTReader.cxx.

384 {
385
386 std::map<int, int> *mappa = GetMap(ilayer, isheet, iview);
387 if(mappa == NULL) return false;
388
389 int nstrip = mappa->size();
390 std::cout << "MAPPING STRIPS of view " << iview << " on sheet " << isheet << " of layer " << ilayer << std::endl;
391 std::cout << "N. OF STRIP " << nstrip << std::endl;
392
393 std::map<int, int>::iterator it;
394 for(int istrip=0; istrip < nstrip; istrip++) {
395 it = mappa->find(istrip);
396 int ientry = it->second;
397 tree->GetEntry(ientry);
398 std::cout << "strip " << istrip << " channel " << channel << " ROC " << ROC << " TIGER " << TIGER << " FEB " << FEB << std::endl;
399 }
400
401 return true;
402}

◆ ReadLUT()

bool CgemLUTReader::ReadLUT ( )

Definition at line 29 of file CgemLUTReader.cxx.

29 {
30
31 const int nlayer = 3; // CHECK hardcoded
32 const int nsheet[nlayer] = {1, 2, 2}; // CHECK hardcoded
33 const int nview = 2; // CHECK hardcoded
34 int nstrip[nlayer][nview] = {{856, 1173}, {630, 1077}, {832, 1395}}; // CHECK hardcoded
35
36 // ----------------------------------------
37 f = new TFile(CosmicRayLUTName, "READ");
38 tree = (TTree*) f->Get("tree");
39 tree->SetBranchAddress("ROC",&ROC);
40 tree->SetBranchAddress("SW_FEB",&TIGER);
41 tree->SetBranchAddress("FEB",&FEB);
42 tree->SetBranchAddress("chip",&chip);
43 tree->SetBranchAddress("channel",&channel);
44 tree->SetBranchAddress("layer",&layer);
45 tree->SetBranchAddress("side",&side);
46 tree->SetBranchAddress("strip_x_graal",&strip_x_graal);
47 tree->SetBranchAddress("strip_v_graal",&strip_v_graal);
48 tree->SetBranchAddress("strip_x_boss",&strip_x_boss);
49 tree->SetBranchAddress("strip_v_boss",&strip_v_boss);
50 tree->SetBranchAddress("sheet",&sheet);
51 tree->SetBranchAddress("calib_QDC_slope",&calib_QDC_slope);
52 tree->SetBranchAddress("calib_QDC_const",&calib_QDC_const);
53 tree->SetBranchAddress("calib_QDC_saturation",&calib_QDC_saturation);
54 tree->SetBranchAddress("v_thr_T_mV",&v_thr_T_mV);
55 tree->SetBranchAddress("v_thr_E_mV",&v_thr_E_mV);
56 tree->SetBranchAddress("thr_T_fC",&thr_T_fC);
57 tree->SetBranchAddress("thr_E_fC",&thr_E_fC);
58 tree->SetBranchAddress("baseline_T_mV",&baseline_T_mV);
59 tree->SetBranchAddress("baseline_E_mV",&baseline_E_mV);
60 tree->SetBranchAddress("thr_fC",&thr_fC);
61 tree->SetBranchAddress("noise_rate_Hz",&noise_rate_Hz);
62 tree->SetBranchAddress("noise_meanQ_fC",&noise_meanQ_fC);
63 tree->SetBranchAddress("signal_meanQ_fC",&signal_meanQ_fC);
64 tree->SetBranchAddress("signal_maxQ_fC",&signal_maxQ_fC);
65 tree->SetBranchAddress("signal_rate_Hz",&signal_rate_Hz);
66 tree->SetBranchAddress("signal_startTime_ns",&signal_startTime_ns);
67 tree->SetBranchAddress("signal_stopTime_ns",&signal_stopTime_ns);
68 tree->SetBranchAddress("signal_sigmaTime_ns",&signal_sigmaTime_ns);
69 tree->SetBranchAddress("signal_FEBstartTime_ns",&signal_FEBstartTime_ns);
70 tree->SetBranchAddress("signal_FEBstopTime_ns",&signal_FEBstopTime_ns);
71 tree->SetBranchAddress("signal_FEBsigmaTime_ns",&signal_FEBsigmaTime_ns);
72 tree->SetBranchAddress("quality",&quality);
73 // ----------------------------------------
74 general = (TTree*) f->Get("general");
75 int First_RUN;
76 int Last_RUN;
78 int Energy_mode;
79 int HV_L1_G3; int HV_L2_G3; int HV_L3_G3;
80 int HV_L1_G2; int HV_L2_G2; int HV_L3_G2;
81 int HV_L1_G1; int HV_L2_G1; int HV_L3_G1;
82 int HV_L1_In; int HV_L2_In; int HV_L3_In;
83 int HV_L1_T2; int HV_L2_T2; int HV_L3_T2;
84 int HV_L1_T1; int HV_L2_T1; int HV_L3_T1;
85 int HV_L1_Dr; int HV_L2_Dr; int HV_L3_Dr;
86 general->SetBranchAddress("First_RUN", &First_RUN);
87 general->SetBranchAddress("Last_RUN", &Last_RUN);
88 general->SetBranchAddress("Integration_time", &Integration_time);
89 general->SetBranchAddress("Energy_mode", &Energy_mode);
90 general->SetBranchAddress("HV_L1_G3", &HV_L1_G3);
91 general->SetBranchAddress("HV_L1_G2", &HV_L1_G2);
92 general->SetBranchAddress("HV_L1_G1", &HV_L1_G1);
93 general->SetBranchAddress("HV_L2_G3", &HV_L2_G3);
94 general->SetBranchAddress("HV_L2_G2", &HV_L2_G2);
95 general->SetBranchAddress("HV_L2_G1", &HV_L2_G1);
96 general->SetBranchAddress("HV_L3_G3", &HV_L3_G3);
97 general->SetBranchAddress("HV_L3_G2", &HV_L3_G2);
98 general->SetBranchAddress("HV_L3_G1", &HV_L3_G1);
99 general->SetBranchAddress("HV_L1_Dr", &HV_L1_Dr);
100 general->SetBranchAddress("HV_L2_Dr", &HV_L2_Dr);
101 general->SetBranchAddress("HV_L3_Dr", &HV_L3_Dr);
102 general->SetBranchAddress("HV_L1_T1", &HV_L1_T1);
103 general->SetBranchAddress("HV_L2_T1", &HV_L2_T1);
104 general->SetBranchAddress("HV_L3_T1", &HV_L3_T1);
105 general->SetBranchAddress("HV_L1_T2", &HV_L1_T2);
106 general->SetBranchAddress("HV_L2_T2", &HV_L2_T2);
107 general->SetBranchAddress("HV_L3_T2", &HV_L3_T2);
108 general->SetBranchAddress("HV_L1_In", &HV_L1_In);
109 general->SetBranchAddress("HV_L2_In", &HV_L2_In);
110 general->SetBranchAddress("HV_L3_In", &HV_L3_In);
111 general->GetEntry(0);
112 // ----------------------------------------
113
114 int nchannel_off=0;
115
116 for(int ientry=0; ientry<tree->GetEntries(); ientry++) {
117 tree->GetEntry(ientry);
118
119 std::pair<int, int> pairx(strip_x_boss, ientry);
120 std::pair<int, int> pairv(strip_v_boss, ientry);
121
122 if(strip_x_boss != -1) {
123 if(layer == 0 && sheet == 0) map_L1_S1_stripx_to_entry.insert(pairx);
124 else if(layer == 1 && sheet == 0) map_L2_S1_stripx_to_entry.insert(pairx); // sheet 1 and 2 are swapped
125 else if(layer == 1 && sheet == 1) map_L2_S2_stripx_to_entry.insert(pairx); // 1 now is 0 and viceversa
126 else if(layer == 2 && sheet == 0) map_L3_S1_stripx_to_entry.insert(pairx);
127 else if(layer == 2 && sheet == 1) map_L3_S2_stripx_to_entry.insert(pairx);
128 }
129 else if(strip_v_boss != -1) {
130 if(layer == 0 && sheet == 0) map_L1_S1_stripv_to_entry.insert(pairv);
131 else if(layer == 1 && sheet == 0) map_L2_S1_stripv_to_entry.insert(pairv); // sheet 1 and 2 are swapped
132 else if(layer == 1 && sheet == 1) map_L2_S2_stripv_to_entry.insert(pairv); // 1 now is 0 and viceversa
133 else if(layer == 2 && sheet == 0) map_L3_S1_stripv_to_entry.insert(pairv);
134 else if(layer == 2 && sheet == 1) map_L3_S2_stripv_to_entry.insert(pairv);
135 }
136 else nchannel_off++;
137
138 // std::cout << "entry " << ientry << " channel " << channel << " layer " << layer << " sheet " << sheet << " ROC " << ROC << std::endl;
139 }
140
141 std::cout <<"The number of channels not connected to strips is: " << nchannel_off << "(i.e. strip X&V = -1)" <<std::endl;
142
143}

Referenced by CgemCalibFunSvc::initialize(), CgemClusterCreate::initialize(), CgemCosmicRayQA::initialize(), CgemLineFit::initialize(), TestClusterWithHit::initialize(), TestGeometry::initialize(), TestHit::initialize(), and TestTrack::initialize().

Member Data Documentation

◆ baseline_E_mV

float CgemLUTReader::baseline_E_mV

Definition at line 191 of file CgemLUTReader.h.

Referenced by GetBaseline_E_mV(), and ReadLUT().

◆ baseline_T_mV

float CgemLUTReader::baseline_T_mV

Definition at line 190 of file CgemLUTReader.h.

Referenced by GetBaseline_T_mV(), and ReadLUT().

◆ calib_QDC_const

float CgemLUTReader::calib_QDC_const

Definition at line 184 of file CgemLUTReader.h.

Referenced by GetCalib_QCD_const(), and ReadLUT().

◆ calib_QDC_saturation

float CgemLUTReader::calib_QDC_saturation

Definition at line 185 of file CgemLUTReader.h.

Referenced by GetCalib_QCD_saturation(), and ReadLUT().

◆ calib_QDC_slope

float CgemLUTReader::calib_QDC_slope

Definition at line 183 of file CgemLUTReader.h.

Referenced by GetCalib_QCD_slope(), and ReadLUT().

◆ channel

int CgemLUTReader::channel

Definition at line 175 of file CgemLUTReader.h.

Referenced by GetChannel(), PrintMap(), and ReadLUT().

◆ chip

int CgemLUTReader::chip

Definition at line 174 of file CgemLUTReader.h.

Referenced by GetChip(), and ReadLUT().

◆ CosmicRayLUTName

TString CgemLUTReader::CosmicRayLUTName

Definition at line 153 of file CgemLUTReader.h.

Referenced by CgemLUTReader(), CgemLUTReader(), and ReadLUT().

◆ Energy_mode

int CgemLUTReader::Energy_mode

Definition at line 211 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ f

TFile* CgemLUTReader::f

Definition at line 168 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ FEB

int CgemLUTReader::FEB

Definition at line 173 of file CgemLUTReader.h.

Referenced by GetFEB(), PrintMap(), and ReadLUT().

◆ First_RUN

int CgemLUTReader::First_RUN

Definition at line 208 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ general

TTree* CgemLUTReader::general

Definition at line 207 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_Dr

int CgemLUTReader::HV_L1_Dr

Definition at line 230 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_G1

int CgemLUTReader::HV_L1_G1

Definition at line 218 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_G2

int CgemLUTReader::HV_L1_G2

Definition at line 215 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_G3

int CgemLUTReader::HV_L1_G3

Definition at line 212 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_In

int CgemLUTReader::HV_L1_In

Definition at line 221 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_T1

int CgemLUTReader::HV_L1_T1

Definition at line 227 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_T2

int CgemLUTReader::HV_L1_T2

Definition at line 224 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_Dr

int CgemLUTReader::HV_L2_Dr

Definition at line 231 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_G1

int CgemLUTReader::HV_L2_G1

Definition at line 219 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_G2

int CgemLUTReader::HV_L2_G2

Definition at line 216 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_G3

int CgemLUTReader::HV_L2_G3

Definition at line 213 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_In

int CgemLUTReader::HV_L2_In

Definition at line 222 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_T1

int CgemLUTReader::HV_L2_T1

Definition at line 228 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_T2

int CgemLUTReader::HV_L2_T2

Definition at line 225 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_Dr

int CgemLUTReader::HV_L3_Dr

Definition at line 232 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_G1

int CgemLUTReader::HV_L3_G1

Definition at line 220 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_G2

int CgemLUTReader::HV_L3_G2

Definition at line 217 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_G3

int CgemLUTReader::HV_L3_G3

Definition at line 214 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_In

int CgemLUTReader::HV_L3_In

Definition at line 223 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_T1

int CgemLUTReader::HV_L3_T1

Definition at line 229 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_T2

int CgemLUTReader::HV_L3_T2

Definition at line 226 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ Integration_time

int CgemLUTReader::Integration_time

Definition at line 210 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ Last_RUN

int CgemLUTReader::Last_RUN

Definition at line 209 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ layer

int CgemLUTReader::layer

Definition at line 176 of file CgemLUTReader.h.

Referenced by GetLayer(), and ReadLUT().

◆ map_L1_S1_stripv_to_entry

std::map<int, int> CgemLUTReader::map_L1_S1_stripv_to_entry

Definition at line 160 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L1_S1_stripx_to_entry

std::map<int, int> CgemLUTReader::map_L1_S1_stripx_to_entry

Definition at line 155 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L2_S1_stripv_to_entry

std::map<int, int> CgemLUTReader::map_L2_S1_stripv_to_entry

Definition at line 161 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L2_S1_stripx_to_entry

std::map<int, int> CgemLUTReader::map_L2_S1_stripx_to_entry

Definition at line 156 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L2_S2_stripv_to_entry

std::map<int, int> CgemLUTReader::map_L2_S2_stripv_to_entry

Definition at line 162 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L2_S2_stripx_to_entry

std::map<int, int> CgemLUTReader::map_L2_S2_stripx_to_entry

Definition at line 157 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L3_S1_stripv_to_entry

std::map<int, int> CgemLUTReader::map_L3_S1_stripv_to_entry

Definition at line 163 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L3_S1_stripx_to_entry

std::map<int, int> CgemLUTReader::map_L3_S1_stripx_to_entry

Definition at line 158 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L3_S2_stripv_to_entry

std::map<int, int> CgemLUTReader::map_L3_S2_stripv_to_entry

Definition at line 164 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ map_L3_S2_stripx_to_entry

std::map<int, int> CgemLUTReader::map_L3_S2_stripx_to_entry

Definition at line 159 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ noise_meanQ_fC

float CgemLUTReader::noise_meanQ_fC

Definition at line 194 of file CgemLUTReader.h.

Referenced by GetNoise_MeanQ_fC(), and ReadLUT().

◆ noise_rate_Hz

float CgemLUTReader::noise_rate_Hz

Definition at line 193 of file CgemLUTReader.h.

Referenced by GetNoise_Rate_Hz(), and ReadLUT().

◆ quality

int CgemLUTReader::quality

Definition at line 204 of file CgemLUTReader.h.

Referenced by GetQuality(), and ReadLUT().

◆ ROC

int CgemLUTReader::ROC

Definition at line 170 of file CgemLUTReader.h.

Referenced by GetROC(), PrintMap(), and ReadLUT().

◆ sheet

int CgemLUTReader::sheet

Definition at line 182 of file CgemLUTReader.h.

Referenced by GetSheet(), and ReadLUT().

◆ side

int CgemLUTReader::side

Definition at line 177 of file CgemLUTReader.h.

Referenced by GetSide(), and ReadLUT().

◆ signal_FEBsigmaTime_ns

float CgemLUTReader::signal_FEBsigmaTime_ns

Definition at line 203 of file CgemLUTReader.h.

Referenced by GetSignal_FEBSigmaTime_ns(), and ReadLUT().

◆ signal_FEBstartTime_ns

float CgemLUTReader::signal_FEBstartTime_ns

Definition at line 201 of file CgemLUTReader.h.

Referenced by GetSignal_FEBStartTime_ns(), and ReadLUT().

◆ signal_FEBstopTime_ns

float CgemLUTReader::signal_FEBstopTime_ns

Definition at line 202 of file CgemLUTReader.h.

Referenced by GetSignal_FEBStopTime_ns(), and ReadLUT().

◆ signal_maxQ_fC

float CgemLUTReader::signal_maxQ_fC

Definition at line 196 of file CgemLUTReader.h.

Referenced by GetSignal_MaxQ_fC(), and ReadLUT().

◆ signal_meanQ_fC

float CgemLUTReader::signal_meanQ_fC

Definition at line 195 of file CgemLUTReader.h.

Referenced by GetSignal_MeanQ_fC(), and ReadLUT().

◆ signal_rate_Hz

float CgemLUTReader::signal_rate_Hz

Definition at line 197 of file CgemLUTReader.h.

Referenced by GetSignal_Rate_Hz(), and ReadLUT().

◆ signal_sigmaTime_ns

float CgemLUTReader::signal_sigmaTime_ns

Definition at line 200 of file CgemLUTReader.h.

Referenced by GetSignal_SigmaTime_ns(), and ReadLUT().

◆ signal_startTime_ns

float CgemLUTReader::signal_startTime_ns

Definition at line 198 of file CgemLUTReader.h.

Referenced by GetSignal_StartTime_ns(), and ReadLUT().

◆ signal_stopTime_ns

float CgemLUTReader::signal_stopTime_ns

Definition at line 199 of file CgemLUTReader.h.

Referenced by GetSignal_StopTime_ns(), and ReadLUT().

◆ strip_v_boss

int CgemLUTReader::strip_v_boss

Definition at line 181 of file CgemLUTReader.h.

Referenced by GetStrip_v_BOSS(), and ReadLUT().

◆ strip_v_graal

int CgemLUTReader::strip_v_graal

Definition at line 179 of file CgemLUTReader.h.

Referenced by GetStrip_v_GRAAL(), and ReadLUT().

◆ strip_x_boss

int CgemLUTReader::strip_x_boss

Definition at line 180 of file CgemLUTReader.h.

Referenced by GetStrip_x_BOSS(), and ReadLUT().

◆ strip_x_graal

int CgemLUTReader::strip_x_graal

Definition at line 178 of file CgemLUTReader.h.

Referenced by GetStrip_x_GRAAL(), and ReadLUT().

◆ thr_E_fC

float CgemLUTReader::thr_E_fC

Definition at line 189 of file CgemLUTReader.h.

Referenced by Get_thr_E_fC(), and ReadLUT().

◆ thr_fC

float CgemLUTReader::thr_fC

Definition at line 192 of file CgemLUTReader.h.

Referenced by Get_thr_fC(), and ReadLUT().

◆ thr_T_fC

float CgemLUTReader::thr_T_fC

Definition at line 188 of file CgemLUTReader.h.

Referenced by Get_thr_T_fC(), and ReadLUT().

◆ TIGER

int CgemLUTReader::TIGER

Definition at line 171 of file CgemLUTReader.h.

Referenced by GetTIGER(), PrintMap(), and ReadLUT().

◆ tree

TTree* CgemLUTReader::tree

Definition at line 169 of file CgemLUTReader.h.

Referenced by LoadStripInfo(), PrintMap(), and ReadLUT().

◆ v_thr_E_mV

float CgemLUTReader::v_thr_E_mV

Definition at line 187 of file CgemLUTReader.h.

Referenced by GetV_thr_E_mV(), and ReadLUT().

◆ v_thr_T_mV

float CgemLUTReader::v_thr_T_mV

Definition at line 186 of file CgemLUTReader.h.

Referenced by GetV_thr_T_mV(), and ReadLUT().


The documentation for this class was generated from the following files: