15#include "ReadCosmicRayData/CgemLUTReader.h"
32 const int nsheet[nlayer] = {1, 2, 2};
34 int nstrip[nlayer][nview] = {{856, 1173}, {630, 1077}, {832, 1395}};
38 tree = (TTree*)
f->Get(
"tree");
39 tree->SetBranchAddress(
"ROC",&
ROC);
41 tree->SetBranchAddress(
"FEB",&
FEB);
42 tree->SetBranchAddress(
"chip",&
chip);
45 tree->SetBranchAddress(
"side",&
side);
75 general = (TTree*)
f->Get(
"general");
117 for(
int ientry=0; ientry<
tree->GetEntries(); ientry++) {
118 tree->GetEntry(ientry);
138 std::cout <<
"not connected TIGER channels " << nchannel_off << std::endl;
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);
174 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
175 if(doesexist ==
false)
return -1;
180 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
181 if(doesexist ==
false)
return -1;
186 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
187 if(doesexist ==
false)
return -1;
192 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
193 if(doesexist ==
false)
return -1;
198 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
199 if(doesexist ==
false)
return -1;
204 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
205 if(doesexist ==
false)
return -1;
210 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
211 if(doesexist ==
false)
return -1;
216 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
217 if(doesexist ==
false)
return -1;
222 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
223 if(doesexist ==
false)
return -1;
228 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
229 if(doesexist ==
false)
return -1;
234 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
235 if(doesexist ==
false)
return -1;
240 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
241 if(doesexist ==
false)
return 0.;
246 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
247 if(doesexist ==
false)
return 0.;
252 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
253 if(doesexist ==
false)
return 0.;
258 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
259 if(doesexist ==
false)
return 0.;
264 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
265 if(doesexist ==
false)
return 0.;
270 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
271 if(doesexist ==
false)
return 0.;
276 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
277 if(doesexist ==
false)
return 0.;
282 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
283 if(doesexist ==
false)
return 0.;
288 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
289 if(doesexist ==
false)
return 0.;
294 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
295 if(doesexist ==
false)
return 0.;
300 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
301 if(doesexist ==
false)
return 0.;
306 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
307 if(doesexist ==
false)
return 0.;
312 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
313 if(doesexist ==
false)
return 0.;
318 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
319 if(doesexist ==
false)
return 0.;
324 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
325 if(doesexist ==
false)
return 0.;
330 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
331 if(doesexist ==
false)
return 0.;
336 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
337 if(doesexist ==
false)
return 0.;
342 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
343 if(doesexist ==
false)
return 0.;
348 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
349 if(doesexist ==
false)
return 0.;
354 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
355 if(doesexist ==
false)
return 0.;
360 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
361 if(doesexist ==
false)
return 0.;
366 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
367 if(doesexist ==
false)
return 0.;
372 bool doesexist =
LoadStripInfo(ilayer, isheet, iview, istrip);
373 if(doesexist ==
false)
return -1;
379 std::map<int, int> *mappa =
GetMap(ilayer, isheet, iview);
380 if(mappa == NULL)
return false;
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;
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;
int GetChip(int ilayer, int isheet, int iview, int istrip)
float GetSignal_StartTime_ns(int ilayer, int isheet, int iview, int istrip)
float GetCalib_QCD_const(int ilayer, int isheet, int iview, int istrip)
int GetQuality(int ilayer, int isheet, int iview, int istrip)
float signal_startTime_ns
float calib_QDC_saturation
int GetROC(int ilayer, int isheet, int iview, int istrip)
float GetSignal_FEBStopTime_ns(int ilayer, int isheet, int iview, int istrip)
float GetCalib_QCD_saturation(int ilayer, int isheet, int iview, int istrip)
float signal_FEBstopTime_ns
float GetNoise_Rate_Hz(int ilayer, int isheet, int iview, int istrip)
bool LoadStripInfo(int ilayer, int isheet, int iview, int istrip)
float Get_thr_T_fC(int ilayer, int isheet, int iview, int istrip)
float GetSignal_FEBStartTime_ns(int ilayer, int isheet, int iview, int istrip)
float GetCalib_QCD_slope(int ilayer, int isheet, int iview, int istrip)
std::map< int, int > map_L1_S1_stripx_to_entry
bool PrintMap(int ilayer, int isheet, int iview)
float signal_sigmaTime_ns
int GetStrip_x_GRAAL(int ilayer, int isheet, int iview, int istrip)
float GetSignal_MaxQ_fC(int ilayer, int isheet, int iview, int istrip)
std::map< int, int > map_L2_S2_stripv_to_entry
std::map< int, int > map_L1_S1_stripv_to_entry
float Get_thr_E_fC(int ilayer, int isheet, int iview, int istrip)
float GetV_thr_E_mV(int ilayer, int isheet, int iview, int istrip)
float GetV_thr_T_mV(int ilayer, int isheet, int iview, int istrip)
std::map< int, int > map_L2_S2_stripx_to_entry
int GetSheet(int ilayer, int isheet, int iview, int istrip)
float GetSignal_MeanQ_fC(int ilayer, int isheet, int iview, int istrip)
float GetSignal_Rate_Hz(int ilayer, int isheet, int iview, int istrip)
int GetStrip_v_GRAAL(int ilayer, int isheet, int iview, int istrip)
int GetChannel(int ilayer, int isheet, int iview, int istrip)
float GetSignal_FEBSigmaTime_ns(int ilayer, int isheet, int iview, int istrip)
std::map< int, int > * GetMap(int ilayer, int isheet, int iview)
float signal_FEBsigmaTime_ns
float GetSignal_SigmaTime_ns(int ilayer, int isheet, int iview, int istrip)
int GetTIGER(int ilayer, int isheet, int iview, int istrip)
int GetSide(int ilayer, int isheet, int iview, int istrip)
float signal_FEBstartTime_ns
float GetBaseline_E_mV(int ilayer, int isheet, int iview, int istrip)
int GetLayer(int ilayer, int isheet, int iview, int istrip)
int GetStrip_x_BOSS(int ilayer, int isheet, int iview, int istrip)
float GetSignal_StopTime_ns(int ilayer, int isheet, int iview, int istrip)
float Get_thr_fC(int ilayer, int isheet, int iview, int istrip)
int GetStrip_v_BOSS(int ilayer, int isheet, int iview, int istrip)
std::map< int, int > map_L2_S1_stripv_to_entry
std::map< int, int > map_L2_S1_stripx_to_entry
int GetFEB(int ilayer, int isheet, int iview, int istrip)
float GetNoise_MeanQ_fC(int ilayer, int isheet, int iview, int istrip)
float GetBaseline_T_mV(int ilayer, int isheet, int iview, int istrip)