CGEM BOSS 6.6.5.g
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_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
 
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 281 of file CgemLUTReader.cxx.

281 {
282 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
283 if(doesexist == false) return 0.;
284 return thr_E_fC;
285}
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 299 of file CgemLUTReader.cxx.

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

◆ Get_thr_T_fC()

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

Definition at line 275 of file CgemLUTReader.cxx.

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

Referenced by CgemCalibFunSvc::getTimeWalk().

◆ GetBaseline_E_mV()

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

Definition at line 293 of file CgemLUTReader.cxx.

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

◆ GetBaseline_T_mV()

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

Definition at line 287 of file CgemLUTReader.cxx.

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

◆ GetCalib_QCD_const()

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

Definition at line 251 of file CgemLUTReader.cxx.

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

◆ GetCalib_QCD_saturation()

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

Definition at line 257 of file CgemLUTReader.cxx.

257 {
258 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
259 if(doesexist == false) return 0.;
261}
float calib_QDC_saturation

◆ GetCalib_QCD_slope()

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

Definition at line 245 of file CgemLUTReader.cxx.

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

◆ GetChannel()

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

Definition at line 197 of file CgemLUTReader.cxx.

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

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

◆ GetChip()

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

Definition at line 191 of file CgemLUTReader.cxx.

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

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

◆ GetFEB()

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

Definition at line 185 of file CgemLUTReader.cxx.

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

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

◆ GetLayer()

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

Definition at line 203 of file CgemLUTReader.cxx.

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

◆ GetMap()

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

Definition at line 145 of file CgemLUTReader.cxx.

145 {
146
147 if(iview==0) {
148 if(ilayer == 0 && isheet == 0) return &map_L1_S1_stripx_to_entry;
149 else if(ilayer == 1 && isheet == 0) return &map_L2_S2_stripx_to_entry;
150 else if(ilayer == 1 && isheet == 1) return &map_L2_S1_stripx_to_entry;
151 }
152 else if(iview==1) {
153 if(ilayer == 0 && isheet == 0) return &map_L1_S1_stripv_to_entry;
154 else if(ilayer == 1 && isheet == 0) return &map_L2_S2_stripv_to_entry;
155 else if(ilayer == 1 && isheet == 1) return &map_L2_S1_stripv_to_entry;
156 }
157 else return NULL;
158}
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_L1_S1_stripv_to_entry
std::map< int, int > map_L2_S1_stripx_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 311 of file CgemLUTReader.cxx.

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

◆ GetNoise_Rate_Hz()

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

Definition at line 305 of file CgemLUTReader.cxx.

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

◆ GetQuality()

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

Definition at line 371 of file CgemLUTReader.cxx.

371 {
372 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
373 if(doesexist == false) return -1;
374 return quality;
375}

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 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 173 of file CgemLUTReader.cxx.

173 {
174 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
175 if(doesexist == false) return -1;
176 return ROC;
177}

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

◆ GetSheet()

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

Definition at line 209 of file CgemLUTReader.cxx.

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

◆ GetSide()

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

Definition at line 215 of file CgemLUTReader.cxx.

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

◆ GetSignal_FEBSigmaTime_ns()

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

Definition at line 365 of file CgemLUTReader.cxx.

365 {
366 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
367 if(doesexist == false) return 0.;
369}
float signal_FEBsigmaTime_ns

◆ GetSignal_FEBStartTime_ns()

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

Definition at line 353 of file CgemLUTReader.cxx.

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

◆ GetSignal_FEBStopTime_ns()

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

Definition at line 359 of file CgemLUTReader.cxx.

359 {
360 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
361 if(doesexist == false) return 0.;
363}
float signal_FEBstopTime_ns

◆ GetSignal_MaxQ_fC()

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

Definition at line 323 of file CgemLUTReader.cxx.

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

◆ GetSignal_MeanQ_fC()

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

Definition at line 317 of file CgemLUTReader.cxx.

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

◆ GetSignal_Rate_Hz()

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

Definition at line 329 of file CgemLUTReader.cxx.

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

◆ GetSignal_SigmaTime_ns()

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

Definition at line 347 of file CgemLUTReader.cxx.

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

◆ GetSignal_StartTime_ns()

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

Definition at line 335 of file CgemLUTReader.cxx.

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

◆ GetSignal_StopTime_ns()

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

Definition at line 341 of file CgemLUTReader.cxx.

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

◆ GetStrip_v_BOSS()

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

Definition at line 239 of file CgemLUTReader.cxx.

239 {
240 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
241 if(doesexist == false) return 0.;
242 return strip_v_boss;
243}

◆ GetStrip_v_GRAAL()

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

Definition at line 227 of file CgemLUTReader.cxx.

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

◆ GetStrip_x_BOSS()

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

Definition at line 233 of file CgemLUTReader.cxx.

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

◆ GetStrip_x_GRAAL()

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

Definition at line 221 of file CgemLUTReader.cxx.

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

◆ GetTIGER()

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

Definition at line 179 of file CgemLUTReader.cxx.

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

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 269 of file CgemLUTReader.cxx.

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

◆ GetV_thr_T_mV()

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

Definition at line 263 of file CgemLUTReader.cxx.

263 {
264 bool doesexist = LoadStripInfo(ilayer, isheet, iview, istrip);
265 if(doesexist == false) return 0.;
266 return v_thr_T_mV;
267}

◆ LoadStripInfo()

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

Definition at line 160 of file CgemLUTReader.cxx.

160 {
161 std::map<int, int> *mappa = GetMap(ilayer, isheet, iview);
162 if(mappa == NULL) return false;
163 std::map<int, int>::iterator it = mappa->find(istrip);
164 if (it != mappa->end()) {
165 int ientry = it->second;
166 tree->GetEntry(ientry);
167 return true;
168 }
169 return false;;
170}
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 377 of file CgemLUTReader.cxx.

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

◆ 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 // ----------------------------------------
75 general = (TTree*) f->Get("general");
76 int First_RUN;
77 int Last_RUN;
79 int Energy_mode;
80 int HV_L1_G3; int HV_L2_G3; int HV_L3_G3;
81 int HV_L1_G2; int HV_L2_G2; int HV_L3_G2;
82 int HV_L1_G1; int HV_L2_G1; int HV_L3_G1;
83 int HV_L1_In; int HV_L2_In; int HV_L3_In;
84 int HV_L1_T2; int HV_L2_T2; int HV_L3_T2;
85 int HV_L1_T1; int HV_L2_T1; int HV_L3_T1;
86 int HV_L1_Dr; int HV_L2_Dr; int HV_L3_Dr;
87 general->SetBranchAddress("First_RUN", &First_RUN);
88 general->SetBranchAddress("Last_RUN", &Last_RUN);
89 general->SetBranchAddress("Integration_time", &Integration_time);
90 general->SetBranchAddress("Energy_mode", &Energy_mode);
91 general->SetBranchAddress("HV_L1_G3", &HV_L1_G3);
92 general->SetBranchAddress("HV_L1_G2", &HV_L1_G2);
93 general->SetBranchAddress("HV_L1_G1", &HV_L1_G1);
94 general->SetBranchAddress("HV_L2_G3", &HV_L2_G3);
95 general->SetBranchAddress("HV_L2_G2", &HV_L2_G2);
96 general->SetBranchAddress("HV_L2_G1", &HV_L2_G1);
97 general->SetBranchAddress("HV_L3_G3", &HV_L3_G3);
98 general->SetBranchAddress("HV_L3_G2", &HV_L3_G2);
99 general->SetBranchAddress("HV_L3_G1", &HV_L3_G1);
100 general->SetBranchAddress("HV_L1_Dr", &HV_L1_Dr);
101 general->SetBranchAddress("HV_L2_Dr", &HV_L2_Dr);
102 general->SetBranchAddress("HV_L3_Dr", &HV_L3_Dr);
103 general->SetBranchAddress("HV_L1_T1", &HV_L1_T1);
104 general->SetBranchAddress("HV_L2_T1", &HV_L2_T1);
105 general->SetBranchAddress("HV_L3_T1", &HV_L3_T1);
106 general->SetBranchAddress("HV_L1_T2", &HV_L1_T2);
107 general->SetBranchAddress("HV_L2_T2", &HV_L2_T2);
108 general->SetBranchAddress("HV_L3_T2", &HV_L3_T2);
109 general->SetBranchAddress("HV_L1_In", &HV_L1_In);
110 general->SetBranchAddress("HV_L2_In", &HV_L2_In);
111 general->SetBranchAddress("HV_L3_In", &HV_L3_In);
112 general->GetEntry(0);
113 // ----------------------------------------
114
115 int nchannel_off=0;
116
117 for(int ientry=0; ientry<tree->GetEntries(); ientry++) {
118 tree->GetEntry(ientry);
119
120 std::pair<int, int> pairx(strip_x_boss, ientry);
121 std::pair<int, int> pairv(strip_v_boss, ientry);
122
123 if(strip_x_boss != -1) {
124 if(layer == 0 && sheet == 0) map_L1_S1_stripx_to_entry.insert(pairx);
125 else if(layer == 1 && sheet == 0) map_L2_S2_stripx_to_entry.insert(pairx); // sheet 1 and 2 are swapped
126 else if(layer == 1 && sheet == 1) map_L2_S1_stripx_to_entry.insert(pairx); // 1 now is 0 and viceversa
127 }
128 else if(strip_v_boss != -1) {
129 if(layer == 0 && sheet == 0) map_L1_S1_stripv_to_entry.insert(pairv);
130 else if(layer == 1 && sheet == 0) map_L2_S2_stripv_to_entry.insert(pairv); // sheet 1 and 2 are swapped
131 else if(layer == 1 && sheet == 1) map_L2_S1_stripv_to_entry.insert(pairv); // 1 now is 0 and viceversa
132 }
133 else nchannel_off++;
134
135 // std::cout << "entry " << ientry << " channel " << channel << " layer " << layer << " sheet " << sheet << " ROC " << ROC << std::endl;
136 }
137
138 std::cout << "not connected TIGER channels " << nchannel_off << std::endl;
139
140}

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

Member Data Documentation

◆ baseline_E_mV

float CgemLUTReader::baseline_E_mV

Definition at line 184 of file CgemLUTReader.h.

Referenced by GetBaseline_E_mV(), and ReadLUT().

◆ baseline_T_mV

float CgemLUTReader::baseline_T_mV

Definition at line 183 of file CgemLUTReader.h.

Referenced by GetBaseline_T_mV(), and ReadLUT().

◆ calib_QDC_const

float CgemLUTReader::calib_QDC_const

Definition at line 177 of file CgemLUTReader.h.

Referenced by GetCalib_QCD_const(), and ReadLUT().

◆ calib_QDC_saturation

float CgemLUTReader::calib_QDC_saturation

Definition at line 178 of file CgemLUTReader.h.

Referenced by GetCalib_QCD_saturation(), and ReadLUT().

◆ calib_QDC_slope

float CgemLUTReader::calib_QDC_slope

Definition at line 176 of file CgemLUTReader.h.

Referenced by GetCalib_QCD_slope(), and ReadLUT().

◆ channel

int CgemLUTReader::channel

Definition at line 168 of file CgemLUTReader.h.

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

◆ chip

int CgemLUTReader::chip

Definition at line 167 of file CgemLUTReader.h.

Referenced by GetChip(), and ReadLUT().

◆ CosmicRayLUTName

TString CgemLUTReader::CosmicRayLUTName

Definition at line 151 of file CgemLUTReader.h.

Referenced by CgemLUTReader(), and ReadLUT().

◆ Energy_mode

int CgemLUTReader::Energy_mode

Definition at line 204 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ f

TFile* CgemLUTReader::f

Definition at line 161 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ FEB

int CgemLUTReader::FEB

Definition at line 166 of file CgemLUTReader.h.

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

◆ First_RUN

int CgemLUTReader::First_RUN

Definition at line 201 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ general

TTree* CgemLUTReader::general

Definition at line 200 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_Dr

int CgemLUTReader::HV_L1_Dr

Definition at line 223 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_G1

int CgemLUTReader::HV_L1_G1

Definition at line 211 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_G2

int CgemLUTReader::HV_L1_G2

Definition at line 208 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_G3

int CgemLUTReader::HV_L1_G3

Definition at line 205 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_In

int CgemLUTReader::HV_L1_In

Definition at line 214 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_T1

int CgemLUTReader::HV_L1_T1

Definition at line 220 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L1_T2

int CgemLUTReader::HV_L1_T2

Definition at line 217 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_Dr

int CgemLUTReader::HV_L2_Dr

Definition at line 224 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_G1

int CgemLUTReader::HV_L2_G1

Definition at line 212 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_G2

int CgemLUTReader::HV_L2_G2

Definition at line 209 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_G3

int CgemLUTReader::HV_L2_G3

Definition at line 206 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_In

int CgemLUTReader::HV_L2_In

Definition at line 215 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_T1

int CgemLUTReader::HV_L2_T1

Definition at line 221 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L2_T2

int CgemLUTReader::HV_L2_T2

Definition at line 218 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_Dr

int CgemLUTReader::HV_L3_Dr

Definition at line 225 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_G1

int CgemLUTReader::HV_L3_G1

Definition at line 213 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_G2

int CgemLUTReader::HV_L3_G2

Definition at line 210 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_G3

int CgemLUTReader::HV_L3_G3

Definition at line 207 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_In

int CgemLUTReader::HV_L3_In

Definition at line 216 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_T1

int CgemLUTReader::HV_L3_T1

Definition at line 222 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ HV_L3_T2

int CgemLUTReader::HV_L3_T2

Definition at line 219 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ Integration_time

int CgemLUTReader::Integration_time

Definition at line 203 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ Last_RUN

int CgemLUTReader::Last_RUN

Definition at line 202 of file CgemLUTReader.h.

Referenced by ReadLUT().

◆ layer

int CgemLUTReader::layer

Definition at line 169 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 156 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 153 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 157 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 154 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 158 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 155 of file CgemLUTReader.h.

Referenced by GetMap(), and ReadLUT().

◆ noise_meanQ_fC

float CgemLUTReader::noise_meanQ_fC

Definition at line 187 of file CgemLUTReader.h.

Referenced by GetNoise_MeanQ_fC(), and ReadLUT().

◆ noise_rate_Hz

float CgemLUTReader::noise_rate_Hz

Definition at line 186 of file CgemLUTReader.h.

Referenced by GetNoise_Rate_Hz(), and ReadLUT().

◆ quality

int CgemLUTReader::quality

Definition at line 197 of file CgemLUTReader.h.

Referenced by GetQuality(), and ReadLUT().

◆ ROC

int CgemLUTReader::ROC

Definition at line 163 of file CgemLUTReader.h.

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

◆ sheet

int CgemLUTReader::sheet

Definition at line 175 of file CgemLUTReader.h.

Referenced by GetSheet(), and ReadLUT().

◆ side

int CgemLUTReader::side

Definition at line 170 of file CgemLUTReader.h.

Referenced by GetSide(), and ReadLUT().

◆ signal_FEBsigmaTime_ns

float CgemLUTReader::signal_FEBsigmaTime_ns

Definition at line 196 of file CgemLUTReader.h.

Referenced by GetSignal_FEBSigmaTime_ns(), and ReadLUT().

◆ signal_FEBstartTime_ns

float CgemLUTReader::signal_FEBstartTime_ns

Definition at line 194 of file CgemLUTReader.h.

Referenced by GetSignal_FEBStartTime_ns(), and ReadLUT().

◆ signal_FEBstopTime_ns

float CgemLUTReader::signal_FEBstopTime_ns

Definition at line 195 of file CgemLUTReader.h.

Referenced by GetSignal_FEBStopTime_ns(), and ReadLUT().

◆ signal_maxQ_fC

float CgemLUTReader::signal_maxQ_fC

Definition at line 189 of file CgemLUTReader.h.

Referenced by GetSignal_MaxQ_fC(), and ReadLUT().

◆ signal_meanQ_fC

float CgemLUTReader::signal_meanQ_fC

Definition at line 188 of file CgemLUTReader.h.

Referenced by GetSignal_MeanQ_fC(), and ReadLUT().

◆ signal_rate_Hz

float CgemLUTReader::signal_rate_Hz

Definition at line 190 of file CgemLUTReader.h.

Referenced by GetSignal_Rate_Hz(), and ReadLUT().

◆ signal_sigmaTime_ns

float CgemLUTReader::signal_sigmaTime_ns

Definition at line 193 of file CgemLUTReader.h.

Referenced by GetSignal_SigmaTime_ns(), and ReadLUT().

◆ signal_startTime_ns

float CgemLUTReader::signal_startTime_ns

Definition at line 191 of file CgemLUTReader.h.

Referenced by GetSignal_StartTime_ns(), and ReadLUT().

◆ signal_stopTime_ns

float CgemLUTReader::signal_stopTime_ns

Definition at line 192 of file CgemLUTReader.h.

Referenced by GetSignal_StopTime_ns(), and ReadLUT().

◆ strip_v_boss

int CgemLUTReader::strip_v_boss

Definition at line 174 of file CgemLUTReader.h.

Referenced by GetStrip_v_BOSS(), and ReadLUT().

◆ strip_v_graal

int CgemLUTReader::strip_v_graal

Definition at line 172 of file CgemLUTReader.h.

Referenced by GetStrip_v_GRAAL(), and ReadLUT().

◆ strip_x_boss

int CgemLUTReader::strip_x_boss

Definition at line 173 of file CgemLUTReader.h.

Referenced by GetStrip_x_BOSS(), and ReadLUT().

◆ strip_x_graal

int CgemLUTReader::strip_x_graal

Definition at line 171 of file CgemLUTReader.h.

Referenced by GetStrip_x_GRAAL(), and ReadLUT().

◆ thr_E_fC

float CgemLUTReader::thr_E_fC

Definition at line 182 of file CgemLUTReader.h.

Referenced by Get_thr_E_fC(), and ReadLUT().

◆ thr_fC

float CgemLUTReader::thr_fC

Definition at line 185 of file CgemLUTReader.h.

Referenced by Get_thr_fC(), and ReadLUT().

◆ thr_T_fC

float CgemLUTReader::thr_T_fC

Definition at line 181 of file CgemLUTReader.h.

Referenced by Get_thr_T_fC(), and ReadLUT().

◆ TIGER

int CgemLUTReader::TIGER

Definition at line 164 of file CgemLUTReader.h.

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

◆ tree

TTree* CgemLUTReader::tree

Definition at line 162 of file CgemLUTReader.h.

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

◆ v_thr_E_mV

float CgemLUTReader::v_thr_E_mV

Definition at line 180 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 179 of file CgemLUTReader.h.

Referenced by GetV_thr_T_mV(), and ReadLUT().


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