CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
MELaserPrim Class Reference

#include <MELaserPrim.h>

Public Types

enum  {
  iAPD, iAPDoPN, iAPDoPNA, iAPDoPNB,
  iAPDoAPD, iAPDoAPDA, iAPDoAPDB, iTime,
  iSizeArray_apdpn
}
 
enum  {
  iMean, iRMS, iM3, iNevt,
  iMin, iMax, iSize_apdpn
}
 
enum  { iShapeCor, iSizeExtra_apdpn }
 
enum  {
  iAlpha, iBeta, iWidth, iChi2,
  iSize_ab
}
 
enum  {
  iPeak, iSigma, iFit, iAmpl,
  iTrise, iFwhm, iFw20, iFw80,
  iSlide, iSize_mtq
}
 
enum  {
  iGain0, iGain1, iGain2, iGain3,
  iSize_gain
}
 
enum  {
  iECAL, iECAL_LMR, iEB_crystal_number, iEB_LM_LMM,
  iEB_LM_PN, iEE_crystal_number, iEE_LM_LMM, iEE_LM_PN,
  iSize_cv
}
 

Public Member Functions

void bookHistograms ()
 
bool fill (const char *tname)
 
void fillHistograms ()
 
Int_t getInt (const char *, int ix, int iy)
 
Float_t getVal (const char *, int ix, int iy)
 
void init ()
 
 MELaserPrim (ME::Header header, ME::Settings settings, const char *inpath, const char *outfile)
 
void print (std::ostream &o)
 
bool setInt (const char *, int ix, int iy, int ival)
 
bool setInt (const char *tname, const char *vname, int ival)
 
bool setVal (const char *, int ix, int iy, float val)
 
bool setVal (const char *tname, const char *vname, float val)
 
void writeHistograms ()
 
virtual ~MELaserPrim ()
 

Static Public Member Functions

static TString channelViewName (int)
 
static bool getViewIds (int logicId, int &channelView, int &id1, int &id2)
 
static TString lmfLaserName (int table, int type, int color=ME::iBlue)
 
static int logicId (int channelView, int id1, int id2=0)
 

Public Attributes

bool init_ok
 

Static Public Attributes

static const TString separator = "__"
 

Private Member Functions

void addBranchC (const char *t_name, const char *v_name)
 
void addBranchF (const char *t_name, const char *v_name)
 
void addBranchI (const char *t_name, const char *v_name)
 
void bookHistoF (const char *t_name, const char *v_name)
 
void bookHistoI (const char *t_name, const char *v_name)
 
void refresh ()
 
void setHistoStyle (TH1 *)
 

Private Attributes

int _color
 
int _dcc
 
int _delay
 
int _ecal_region
 
int _events
 
int _filter
 
TString _inpath
 
bool _isBarrel
 
int _lb
 
int _lmr
 
int _memgain
 
int _mgpagain
 
TString _outfile
 
TString _pnPrimStr
 
int _power
 
TString _primStr
 
TString _pulseStr
 
int _reg
 
TString _regionStr
 
int _run
 
TString _sectorStr
 
int _side
 
int _sm
 
TString _tpPnPrimStr
 
TString _tpPrimStr
 
ME::TimeStamp _ts
 
ME::TimeStamp _ts_beg
 
ME::TimeStamp _ts_end
 
int _type
 
Double_t ab_ab [iSize_ab]
 
Int_t ab_channelID
 
Int_t ab_dccID
 
TFile * ab_file
 
Int_t ab_flag
 
Int_t ab_ieta
 
Int_t ab_iphi
 
Int_t ab_towerID
 
TTree * ab_tree
 
Double_t apdpn_apdpn [iSizeArray_apdpn][iSize_apdpn]
 
Int_t apdpn_channelID
 
Int_t apdpn_dccID
 
TFile * apdpn_file
 
Int_t apdpn_flag
 
Int_t apdpn_ieta
 
Int_t apdpn_iphi
 
Int_t apdpn_moduleID
 
Double_t apdpn_ShapeCor
 
Int_t apdpn_side
 
Int_t apdpn_towerID
 
TTree * apdpn_tree
 
TBranch * b_ab_ab [iSize_ab]
 
TBranch * b_ab_channelID
 
TBranch * b_ab_dccID
 
TBranch * b_ab_flag
 
TBranch * b_ab_ieta
 
TBranch * b_ab_iphi
 
TBranch * b_ab_towerID
 
TBranch * b_apdpn_apdpn [iSizeArray_apdpn]
 
TBranch * b_apdpn_channelID
 
TBranch * b_apdpn_dccID
 
TBranch * b_apdpn_flag
 
TBranch * b_apdpn_ieta
 
TBranch * b_apdpn_iphi
 
TBranch * b_apdpn_moduleID
 
TBranch * b_apdpn_ShapeCor
 
TBranch * b_apdpn_side
 
TBranch * b_apdpn_towerID
 
TBranch * b_mtq_color
 
TBranch * b_mtq_mtq [iSize_mtq]
 
TBranch * b_mtq_side
 
TBranch * b_pn_moduleID
 
TBranch * b_pn_PN
 
TBranch * b_pn_pnID
 
TBranch * b_pn_PNoPN
 
TBranch * b_pn_PNoPNA
 
TBranch * b_pn_PNoPNB
 
TBranch * b_pn_side
 
TBranch * b_tpapd_APD
 
TBranch * b_tpapd_channelID
 
TBranch * b_tpapd_dccID
 
TBranch * b_tpapd_flag
 
TBranch * b_tpapd_gain
 
TBranch * b_tpapd_ieta
 
TBranch * b_tpapd_iphi
 
TBranch * b_tpapd_moduleID
 
TBranch * b_tpapd_side
 
TBranch * b_tpapd_towerID
 
TBranch * b_tppn_gain
 
TBranch * b_tppn_moduleID
 
TBranch * b_tppn_PN
 
TBranch * b_tppn_pnID
 
TBranch * b_tppn_side
 
std::map< TString, const char * > c_t
 
std::map< TString, TH2 * > f_h
 
std::map< TString, float > f_t
 
std::map< TString, TH2 * > i_h
 
std::map< TString, int > i_t
 
int ixmax
 
int ixmin
 
int iymax
 
int iymin
 
Int_t mtq_color
 
TFile * mtq_file
 
Double_t mtq_mtq [iSize_mtq]
 
Int_t mtq_side
 
TTree * mtq_tree
 
int nx
 
int ny
 
TFile * out_file
 
TFile * pn_file
 
Int_t pn_moduleID
 
Double_t pn_PN [iSize_apdpn]
 
Int_t pn_pnID
 
Double_t pn_PNoPN [iSize_apdpn]
 
Double_t pn_PNoPNA [iSize_apdpn]
 
Double_t pn_PNoPNB [iSize_apdpn]
 
Int_t pn_side
 
TTree * pn_tree
 
std::map< TString, TTree * > t_t
 
Double_t tpapd_APD [iSize_apdpn]
 
Int_t tpapd_channelID
 
Int_t tpapd_dccID
 
TFile * tpapd_file
 
Int_t tpapd_flag
 
Int_t tpapd_gain
 
Int_t tpapd_ieta
 
Int_t tpapd_iphi
 
Int_t tpapd_moduleID
 
Int_t tpapd_side
 
Int_t tpapd_towerID
 
TTree * tpapd_tree
 
Int_t tppn_gain
 
Int_t tppn_moduleID
 
Double_t tppn_PN [iSize_apdpn]
 
Int_t tppn_pnID
 
Int_t tppn_side
 
TTree * tppn_tree
 

Static Private Attributes

static const TString ab_varName [iSize_ab] = {"alpha", "beta", "width", "chi2"}
 
static const TString apdpn_arrayName [iSizeArray_apdpn]
 
static const TString apdpn_extraVarName [iSizeExtra_apdpn] = {"ShapeCor"}
 
static const TString apdpn_extraVarUnit [iSizeExtra_apdpn] = {""}
 
static const TString apdpn_varName [iSize_apdpn] = {"Mean", "RMS", "M3", "Nevt", "Min", "Max"}
 
static const TString apdpn_varUnit [iSizeArray_apdpn][iSize_apdpn]
 
static const TString mtq_varName [iSize_mtq]
 
static const TString mtq_varUnit [iSize_mtq]
 

Detailed Description

Definition at line 18 of file MELaserPrim.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
iAPD 
iAPDoPN 
iAPDoPNA 
iAPDoPNB 
iAPDoAPD 
iAPDoAPDA 
iAPDoAPDB 
iTime 
iSizeArray_apdpn 

Definition at line 21 of file MELaserPrim.h.

◆ anonymous enum

anonymous enum
Enumerator
iMean 
iRMS 
iM3 
iNevt 
iMin 
iMax 
iSize_apdpn 

Definition at line 22 of file MELaserPrim.h.

◆ anonymous enum

anonymous enum
Enumerator
iShapeCor 
iSizeExtra_apdpn 

Definition at line 23 of file MELaserPrim.h.

◆ anonymous enum

anonymous enum
Enumerator
iAlpha 
iBeta 
iWidth 
iChi2 
iSize_ab 

Definition at line 24 of file MELaserPrim.h.

◆ anonymous enum

anonymous enum
Enumerator
iPeak 
iSigma 
iFit 
iAmpl 
iTrise 
iFwhm 
iFw20 
iFw80 
iSlide 
iSize_mtq 

Definition at line 25 of file MELaserPrim.h.

◆ anonymous enum

anonymous enum
Enumerator
iGain0 
iGain1 
iGain2 
iGain3 
iSize_gain 

Definition at line 27 of file MELaserPrim.h.

◆ anonymous enum

anonymous enum
Enumerator
iECAL 
iECAL_LMR 
iEB_crystal_number 
iEB_LM_LMM 
iEB_LM_PN 
iEE_crystal_number 
iEE_LM_LMM 
iEE_LM_PN 
iSize_cv 

Definition at line 30 of file MELaserPrim.h.

Constructor & Destructor Documentation

◆ MELaserPrim()

MELaserPrim::MELaserPrim ( ME::Header  header,
ME::Settings  settings,
const char *  inpath,
const char *  outfile 
)

Definition at line 39 of file MELaserPrim.cc.

References _color, _dcc, _delay, _events, _filter, _isBarrel, _lb, _lmr, _memgain, _mgpagain, _pnPrimStr, _power, _primStr, _pulseStr, _reg, _regionStr, _run, _sectorStr, _side, _sm, _tpPnPrimStr, _tpPrimStr, _ts, _ts_beg, _ts_end, _type, ab_file, ab_tree, apdpn_file, apdpn_tree, bookHistograms(), ME::Settings::delay, ME::Settings::filter, RecoTauValidation_cfi::header, ME::iEBM, ME::iEBP, ME::iLaser, ME::iLmfLaserPnPrim, ME::iLmfLaserPrim, ME::iLmfLaserPulse, ME::iLmfTestPulsePnPrim, ME::iLmfTestPulsePrim, init(), ME::iTestPulse, ixmax, ixmin, iymax, iymin, lmfLaserName(), ME::lmr(), ME::Settings::memgain, ME::Settings::mgpagain, mtq_file, mtq_tree, pn_tree, ME::Settings::power, ME::regionAndSector(), separator, ME::smName(), tpapd_file, tpapd_tree, tppn_tree, ME::Settings::type, and ME::Settings::wavelength.

40  : init_ok(false), _isBarrel(true), _inpath(inpath), _outfile(outfile) {
41  apdpn_file = nullptr;
42  ab_file = nullptr;
43  mtq_file = nullptr;
44  tpapd_file = nullptr;
45  apdpn_tree = nullptr;
46  ab_tree = nullptr;
47  pn_tree = nullptr;
48  mtq_tree = nullptr;
49  tpapd_tree = nullptr;
50  tppn_tree = nullptr;
51  ixmin = 0;
52  ixmax = 0;
53  iymin = 0;
54  iymax = 0;
55 
56  _dcc = header.dcc;
57  _side = header.side;
58  _run = header.run;
59  _lb = header.lb;
60  _events = header.events;
61  _ts = header.ts_beg;
62  _ts_beg = header.ts_beg;
63  _ts_end = header.ts_end;
64 
65  _type = settings.type;
66  _color = settings.wavelength;
67  _power = settings.power;
68  _filter = settings.filter;
69  _delay = settings.delay;
70  _mgpagain = settings.mgpagain;
71  _memgain = settings.memgain;
72 
73  if (_type == ME::iLaser) {
77  } else if (_type == ME::iTestPulse) {
80  }
81 
82  _lmr = ME::lmr(_dcc, _side);
84  _isBarrel = (_reg == ME::iEBM || _reg == ME::iEBP);
87  _regionStr += "_";
88  _regionStr += _side;
89 
90  init();
92  //fillHistograms();
93  //writeHistograms();
94 }
static void regionAndSector(int ilmr, int &ireg, int &isect, int &idcc, int &iside)
Definition: ME.cc:333
bool _isBarrel
Definition: MELaserPrim.h:81
int mgpagain
Definition: ME.h:89
static const TString separator
Definition: MELaserPrim.h:76
TString _inpath
Definition: MELaserPrim.h:133
int wavelength
Definition: ME.h:85
TString _outfile
Definition: MELaserPrim.h:136
TTree * apdpn_tree
Definition: MELaserPrim.h:125
TFile * mtq_file
Definition: MELaserPrim.h:120
TString _tpPrimStr
Definition: MELaserPrim.h:113
TTree * tppn_tree
Definition: MELaserPrim.h:130
Definition: ME.h:14
int filter
Definition: ME.h:87
ME::TimeStamp _ts_end
Definition: MELaserPrim.h:98
TTree * ab_tree
Definition: MELaserPrim.h:126
bool init_ok
Definition: MELaserPrim.h:52
TTree * mtq_tree
Definition: MELaserPrim.h:128
Definition: ME.h:63
void bookHistograms()
Definition: MELaserPrim.cc:335
TFile * apdpn_file
Definition: MELaserPrim.h:117
TString _primStr
Definition: MELaserPrim.h:110
Definition: ME.h:14
static TString lmfLaserName(int table, int type, int color=ME::iBlue)
Definition: MELaserPrim.cc:997
int power
Definition: ME.h:86
int type
Definition: ME.h:84
static int lmr(int idcc, int iside)
Definition: ME.cc:243
TString _pnPrimStr
Definition: MELaserPrim.h:111
TTree * tpapd_tree
Definition: MELaserPrim.h:129
TString _pulseStr
Definition: MELaserPrim.h:112
ME::TimeStamp _ts_beg
Definition: MELaserPrim.h:97
int delay
Definition: ME.h:88
TFile * ab_file
Definition: MELaserPrim.h:118
ME::TimeStamp _ts
Definition: MELaserPrim.h:96
static TString smName(int ilmr)
Definition: ME.cc:391
TString _sectorStr
Definition: MELaserPrim.h:108
TString _regionStr
Definition: MELaserPrim.h:109
TString _tpPnPrimStr
Definition: MELaserPrim.h:114
int memgain
Definition: ME.h:90
TFile * tpapd_file
Definition: MELaserPrim.h:121
TTree * pn_tree
Definition: MELaserPrim.h:127

◆ ~MELaserPrim()

MELaserPrim::~MELaserPrim ( )
virtual

Definition at line 947 of file MELaserPrim.cc.

References ab_file, ab_tree, apdpn_file, apdpn_tree, mtq_file, mtq_tree, pn_tree, tpapd_file, tpapd_tree, and tppn_tree.

947  {
948  delete apdpn_tree;
949  delete ab_tree;
950  delete pn_tree;
951  delete mtq_tree;
952  delete tpapd_tree;
953  delete tppn_tree;
954  if (apdpn_file != nullptr) {
955  // std::cout << "Closing apdpn_file " << std::endl;
956  apdpn_file->Close();
957  delete apdpn_file;
958  apdpn_file = nullptr;
959  }
960  if (ab_file != nullptr) {
961  // std::cout << "Closing ab_file " << std::endl;
962  ab_file->Close();
963  delete ab_file;
964  ab_file = nullptr;
965  }
966  if (mtq_file != nullptr) {
967  // std::cout << "Closing mtq_file " << std::endl;
968  mtq_file->Close();
969  delete mtq_file;
970  mtq_file = nullptr;
971  }
972  if (tpapd_file != nullptr) {
973  // std::cout << "Closing tpapd_file " << std::endl;
974  tpapd_file->Close();
975  delete tpapd_file;
976  tpapd_file = nullptr;
977  }
978 }
TTree * apdpn_tree
Definition: MELaserPrim.h:125
TFile * mtq_file
Definition: MELaserPrim.h:120
TTree * tppn_tree
Definition: MELaserPrim.h:130
TTree * ab_tree
Definition: MELaserPrim.h:126
TTree * mtq_tree
Definition: MELaserPrim.h:128
TFile * apdpn_file
Definition: MELaserPrim.h:117
TTree * tpapd_tree
Definition: MELaserPrim.h:129
TFile * ab_file
Definition: MELaserPrim.h:118
TFile * tpapd_file
Definition: MELaserPrim.h:121
TTree * pn_tree
Definition: MELaserPrim.h:127

Member Function Documentation

◆ addBranchC()

void MELaserPrim::addBranchC ( const char *  t_name,
const char *  v_name 
)
private

Definition at line 1086 of file MELaserPrim.cc.

References c_t, separator, and t_t.

Referenced by bookHistograms().

1086  {
1087  TString slashC("/C");
1088  TString t_name(t_name_);
1089  TString v_name(v_name_);
1090  if (t_t.count(t_name) == 0)
1091  t_t[t_name] = new TTree(t_name, t_name);
1092  t_t[t_name]->Branch(v_name, &c_t[t_name + separator + v_name], v_name + slashC);
1093 }
static const TString separator
Definition: MELaserPrim.h:76
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:151
std::map< TString, const char * > c_t
Definition: MELaserPrim.h:154

◆ addBranchF()

void MELaserPrim::addBranchF ( const char *  t_name,
const char *  v_name 
)
private

Definition at line 1077 of file MELaserPrim.cc.

References f_t, separator, and t_t.

Referenced by bookHistograms().

1077  {
1078  TString slashF("/F");
1079  TString t_name(t_name_);
1080  TString v_name(v_name_);
1081  if (t_t.count(t_name) == 0)
1082  t_t[t_name] = new TTree(t_name, t_name);
1083  t_t[t_name]->Branch(v_name, &f_t[t_name + separator + v_name], v_name + slashF);
1084 }
static const TString separator
Definition: MELaserPrim.h:76
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:151
std::map< TString, float > f_t
Definition: MELaserPrim.h:153

◆ addBranchI()

void MELaserPrim::addBranchI ( const char *  t_name,
const char *  v_name 
)
private

Definition at line 1068 of file MELaserPrim.cc.

References i_t, separator, and t_t.

Referenced by bookHistograms().

1068  {
1069  TString slashI("/i"); // Warning: always unsigned
1070  TString t_name(t_name_);
1071  TString v_name(v_name_);
1072  if (t_t.count(t_name) == 0)
1073  t_t[t_name] = new TTree(t_name, t_name);
1074  t_t[t_name]->Branch(v_name, &i_t[t_name + separator + v_name], v_name + slashI);
1075 }
static const TString separator
Definition: MELaserPrim.h:76
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:151
std::map< TString, int > i_t
Definition: MELaserPrim.h:152

◆ bookHistoF()

void MELaserPrim::bookHistoF ( const char *  t_name,
const char *  v_name 
)
private

Definition at line 1102 of file MELaserPrim.cc.

References f_h, ixmax, ixmin, iymax, iymin, nx, ny, and setHistoStyle().

Referenced by bookHistograms().

1102  {
1103  TString d_name = TString(h_name_) + TString(v_name_);
1104  TH2* h_ = new TH2F(d_name, d_name, nx, ixmin, ixmax, ny, iymin, iymax);
1105  setHistoStyle(h_);
1106  f_h[d_name] = h_;
1107 }
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:148
void setHistoStyle(TH1 *)

◆ bookHistograms()

void MELaserPrim::bookHistograms ( )

Definition at line 335 of file MELaserPrim.cc.

References _color, _isBarrel, _primStr, _tpPrimStr, _type, addBranchC(), addBranchF(), addBranchI(), bookHistoF(), bookHistoI(), ME::iLaser, ME::iLmfLaserConfig, ME::iLmfLaserPnPrim, ME::iLmfLaserPulse, ME::iLmfTestPulseConfig, ME::iLmfTestPulsePnPrim, init_ok, ME::iTestPulse, ixmax, ixmin, iymax, iymin, lmfLaserName(), nx, ny, and refresh().

Referenced by MELaserPrim().

335  {
336  if (!init_ok)
337  return;
338  refresh();
339 
340  TString i_name, d_name;
341 
342  if (_isBarrel) {
343  ixmin = 0;
344  ixmax = 85;
345  nx = ixmax - ixmin;
346  iymin = 0;
347  iymax = 20;
348  ny = iymax - iymin;
349 
350  // for( int ilmod=1; ilmod<=9; ilmod++ )
351  // {
352  // _pn[ilmod] = MEEBGeom::pn( ilmod );
353  // }
354  } else // fixme --- to be implemented
355  {
356  ixmin = 1;
357  ixmax = 101;
358  nx = ixmax - ixmin;
359  iymin = 1;
360  iymax = 101;
361  ny = iymax - iymin;
362  // for( int ilmod=1; ilmod<=21; ilmod++ ) // modules 20 and 21 are fake...
363  // {
364  // _pn[ilmod] = MEEEGeom::pn( ilmod );
365  // }
366  // abort();
367  }
368 
369  TString t_name;
370 
371  //
372  // Laser Run
373  //
374  t_name = "LMF_RUN_DAT";
375  addBranchI(t_name, "LOGIC_ID");
376  addBranchI(t_name, "NEVENTS");
377  addBranchI(t_name, "QUALITY_FLAG");
378 
379  //
380  // Laser Run IOV
381  //
382  t_name = "LMF_RUN_IOV";
383  addBranchI(t_name, "TAG_ID");
384  addBranchI(t_name, "SUB_RUN_NUM");
385  addBranchI(t_name, "SUB_RUN_START_LOW");
386  addBranchI(t_name, "SUB_RUN_START_HIGH");
387  addBranchI(t_name, "SUB_RUN_END_LOW");
388  addBranchI(t_name, "SUB_RUN_END_HIGH");
389  addBranchI(t_name, "DB_TIMESTAMP_LOW");
390  addBranchI(t_name, "DB_TIMESTAMP_HIGH");
391  addBranchC(t_name, "SUB_RUN_TYPE");
392 
393  if (_type == ME::iLaser) {
394  //
395  // Laser ADC Primitives
396  //
397  bookHistoI(_primStr, "LOGIC_ID");
398  bookHistoI(_primStr, "FLAG");
399  bookHistoF(_primStr, "MEAN");
400  bookHistoF(_primStr, "RMS");
401  bookHistoF(_primStr, "M3");
402  bookHistoF(_primStr, "APD_OVER_PNA_MEAN");
403  bookHistoF(_primStr, "APD_OVER_PNA_RMS");
404  bookHistoF(_primStr, "APD_OVER_PNA_M3");
405  bookHistoF(_primStr, "APD_OVER_PNB_MEAN");
406  bookHistoF(_primStr, "APD_OVER_PNB_RMS");
407  bookHistoF(_primStr, "APD_OVER_PNB_M3");
408  bookHistoF(_primStr, "APD_OVER_PN_MEAN");
409  bookHistoF(_primStr, "APD_OVER_PN_RMS");
410  bookHistoF(_primStr, "APD_OVER_PN_M3");
411  bookHistoF(_primStr, "APD_OVER_APDA_MEAN");
412  bookHistoF(_primStr, "APD_OVER_APDA_RMS");
413  bookHistoF(_primStr, "APD_OVER_APDA_M3");
414  bookHistoF(_primStr, "APD_OVER_APDB_MEAN");
415  bookHistoF(_primStr, "APD_OVER_APDB_RMS");
416  bookHistoF(_primStr, "APD_OVER_APDB_M3");
417  bookHistoF(_primStr, "SHAPE_COR");
418  bookHistoF(_primStr, "ALPHA");
419  bookHistoF(_primStr, "BETA");
420  // NEW GHM 08/06 --> SCHEMA MODIFIED?
421  bookHistoF(_primStr, "TIME_MEAN");
422  bookHistoF(_primStr, "TIME_RMS");
423  bookHistoF(_primStr, "TIME_M3");
424  bookHistoF(_primStr, "TIME_NEVT");
425 
426  //
427  // Laser PN Primitives
428  //
430  addBranchI(t_name, "LOGIC_ID");
431  addBranchI(t_name, "FLAG");
432  addBranchF(t_name, "MEAN");
433  addBranchF(t_name, "RMS");
434  addBranchF(t_name, "M3");
435  addBranchF(t_name, "PNA_OVER_PNB_MEAN");
436  addBranchF(t_name, "PNA_OVER_PNB_RMS");
437  addBranchF(t_name, "PNA_OVER_PNB_M3");
438 
439  //
440  // Laser Pulse
441  //
443  addBranchI(t_name, "LOGIC_ID");
444  addBranchI(t_name, "FIT_METHOD");
445  addBranchF(t_name, "MTQ_AMPL");
446  addBranchF(t_name, "MTQ_TIME");
447  addBranchF(t_name, "MTQ_RISE");
448  addBranchF(t_name, "MTQ_FWHM");
449  addBranchF(t_name, "MTQ_FW20");
450  addBranchF(t_name, "MTQ_FW80");
451  addBranchF(t_name, "MTQ_SLIDING");
452 
453  //
454  // Laser Config
455  //
457  addBranchI(t_name, "LOGIC_ID");
458  addBranchI(t_name, "WAVELENGTH");
459  addBranchI(t_name, "VFE_GAIN");
460  addBranchI(t_name, "PN_GAIN");
461  addBranchI(t_name, "LSR_POWER");
462  addBranchI(t_name, "LSR_ATTENUATOR");
463  addBranchI(t_name, "LSR_CURRENT");
464  addBranchI(t_name, "LSR_DELAY_1");
465  addBranchI(t_name, "LSR_DELAY_2");
466 
467  //
468  // Laser LaserRun config dat
469  //
470  t_name = "RUN_LASERRUN_CONFIG_DAT";
471  addBranchI(t_name, "LOGIC_ID");
472  addBranchC(t_name, "LASER_SEQUENCE_TYPE");
473  addBranchC(t_name, "LASER_SEQUENCE_COND");
474 
475  } else if (_type == ME::iTestPulse) {
476  //
477  // Test Pulse ADC Primitives
478  //
479  bookHistoI(_tpPrimStr, "LOGIC_ID");
480  bookHistoI(_tpPrimStr, "FLAG");
481  bookHistoF(_tpPrimStr, "MEAN");
482  bookHistoF(_tpPrimStr, "RMS");
483  bookHistoF(_tpPrimStr, "M3");
484  bookHistoF(_tpPrimStr, "NEVT");
485 
486  //
487  // Test Pulse PN Primitives
488  //
490  addBranchI(t_name, "LOGIC_ID");
491  addBranchI(t_name, "FLAG");
492  addBranchI(t_name, "GAIN");
493  addBranchF(t_name, "MEAN");
494  addBranchF(t_name, "RMS");
495  addBranchF(t_name, "M3");
496 
497  //
498  // Test Pulse Config
499  //
501  addBranchI(t_name, "LOGIC_ID");
502  addBranchI(t_name, "VFE_GAIN");
503  addBranchI(t_name, "PN_GAIN");
504  }
505 }
bool _isBarrel
Definition: MELaserPrim.h:81
TString _tpPrimStr
Definition: MELaserPrim.h:113
bool init_ok
Definition: MELaserPrim.h:52
Definition: ME.h:63
void addBranchC(const char *t_name, const char *v_name)
TString _primStr
Definition: MELaserPrim.h:110
static TString lmfLaserName(int table, int type, int color=ME::iBlue)
Definition: MELaserPrim.cc:997
void refresh()
void addBranchI(const char *t_name, const char *v_name)
void addBranchF(const char *t_name, const char *v_name)
void bookHistoI(const char *t_name, const char *v_name)
void bookHistoF(const char *t_name, const char *v_name)

◆ bookHistoI()

void MELaserPrim::bookHistoI ( const char *  t_name,
const char *  v_name 
)
private

Definition at line 1095 of file MELaserPrim.cc.

References i_h, ixmax, ixmin, iymax, iymin, nx, ny, and setHistoStyle().

Referenced by bookHistograms().

1095  {
1096  TString i_name = TString(h_name_) + TString(v_name_);
1097  TH2* h_ = new TH2I(i_name, i_name, nx, ixmin, ixmax, ny, iymin, iymax);
1098  setHistoStyle(h_);
1099  i_h[i_name] = h_;
1100 }
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:147
void setHistoStyle(TH1 *)

◆ channelViewName()

TString MELaserPrim::channelViewName ( int  iname)
static

Definition at line 96 of file MELaserPrim.cc.

References iEB_crystal_number, iEB_LM_LMM, iEB_LM_PN, iECAL, iECAL_LMR, iEE_crystal_number, iEE_LM_LMM, and iEE_LM_PN.

96  {
97  switch (iname) {
98  case iECAL:
99  return "ECAL";
100  case iECAL_LMR:
101  return "ECAL_LMR";
102  case iEB_crystal_number:
103  return "EB_crystal_number";
104  case iEB_LM_LMM:
105  return "EB_LM_LMM";
106  case iEB_LM_PN:
107  return "EB_LM_PN";
108  case iEE_crystal_number:
109  return "EE_crystal_number";
110  case iEE_LM_LMM:
111  return "EE_LM_LMM";
112  case iEE_LM_PN:
113  return "EE_LM_PN";
114  default:
115  abort();
116  }
117  return "";
118 }

◆ fill()

bool MELaserPrim::fill ( const char *  tname)

Definition at line 1195 of file MELaserPrim.cc.

References cms::cuda::assert(), t_t, and tname().

1195  {
1196  TString key_(tname);
1197  assert(t_t.count(key_) == 1);
1198  t_t[key_]->Fill();
1199  return true;
1200 }
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:151
assert(be >=bs)
std::string tname(const std::string &tableName, const std::string &schemaVersion)

◆ fillHistograms()

void MELaserPrim::fillHistograms ( )

Definition at line 507 of file MELaserPrim.cc.

References _color, _delay, _events, _filter, _isBarrel, _lmr, _memgain, _mgpagain, _power, _run, _side, _sm, _ts, _ts_beg, _ts_end, _type, ab_ab, ab_tree, apdpn_apdpn, apdpn_flag, apdpn_ieta, apdpn_iphi, apdpn_ShapeCor, apdpn_side, apdpn_tree, cms::cuda::assert(), c_t, MEEBGeom::crystal_channel(), MEEEGeom::dee(), f_t, RemoveAddSevLevel::flag, i_t, iAlpha, iAmpl, iAPD, iAPDoAPDA, iAPDoAPDB, iAPDoPN, iAPDoPNA, iAPDoPNB, iBeta, iEB_crystal_number, iEB_LM_PN, iECAL_LMR, iEE_crystal_number, iEE_LM_PN, hcalRecHitTable_cff::ieta, iFw20, iFw80, iFwhm, ME::iLaser, ME::iLmfLaserConfig, ME::iLmfLaserPnPrim, ME::iLmfLaserPulse, ME::iLmfLaserRun, iM3, iMean, iNevt, init_ok, iPeak, hcalRecHitTable_cff::iphi, iRMS, iSlide, ME::iTestPulse, iTime, iTrise, findQualityFiles::jj, lmfLaserName(), MEEBGeom::localCoord(), logicId(), sistrip::module_, mtq_mtq, mtq_side, mtq_tree, ME::pn(), pn_moduleID, pn_PN, pn_pnID, pn_PNoPNA, pn_PNoPNB, pn_side, pn_tree, separator, setInt(), setVal(), t_t, ME::time_high(), and ME::time_low().

507  {
508  TString t_name;
509 
510  if (!init_ok)
511  return;
512 
513  Long64_t nentries = 0;
514  Long64_t ientry = 0;
515 
516  int channelView_(0);
517  int id1_(0), id2_(0);
518  int logic_id_(0);
519 
520  if (_type == ME::iLaser) {
521  nentries = apdpn_tree->GetEntriesFast();
522  for (Long64_t jentry = 0; jentry < nentries; jentry++) {
523  ientry = apdpn_tree->LoadTree(jentry);
524  assert(ientry >= 0);
525  apdpn_tree->GetEntry(jentry);
526 
527  if (ab_tree) {
528  ientry = ab_tree->LoadTree(jentry);
529  assert(ientry >= 0);
530  ab_tree->GetEntry(jentry);
531  }
532 
533  if (apdpn_iphi < 0)
534  continue;
535 
536  // fixme remove until coordinated are fine
537  //if(ab_tree) assert( apdpn_ieta==ab_ieta && apdpn_iphi==ab_iphi );
538 
539  int ix(0);
540  int iy(0);
541  if (_isBarrel) {
542  // Barrel, global coordinates
543  id1_ = _sm;
544  if (apdpn_side != _side)
545  continue;
546  int ieta = apdpn_ieta;
547  int iphi = apdpn_iphi;
549  ix = xy_.first;
550  iy = xy_.second;
551  id2_ = MEEBGeom::crystal_channel(ix, iy);
552  channelView_ = iEB_crystal_number;
553  } else {
554  // EndCaps, global coordinates
555  id1_ = apdpn_iphi;
556  id2_ = apdpn_ieta;
557  ix = id1_;
558  iy = id2_;
559  channelView_ = iEE_crystal_number;
560  }
561 
562  logic_id_ = logicId(channelView_, id1_, id2_);
563 
564  int flag = apdpn_flag;
565 
566  setInt("LOGIC_ID", ix, iy, logic_id_);
567  setInt("FLAG", ix, iy, flag);
568  setVal("MEAN", ix, iy, apdpn_apdpn[iAPD][iMean]);
569  setVal("RMS", ix, iy, apdpn_apdpn[iAPD][iRMS]);
570  setVal("M3", ix, iy, apdpn_apdpn[iAPD][iM3]); // fixme --- peak?
571  setVal("APD_OVER_PNA_MEAN", ix, iy, apdpn_apdpn[iAPDoPNA][iMean]);
572  setVal("APD_OVER_PNA_RMS", ix, iy, apdpn_apdpn[iAPDoPNA][iRMS]);
573  setVal("APD_OVER_PNA_M3", ix, iy, apdpn_apdpn[iAPDoPNA][iM3]); // fixme
574  setVal("APD_OVER_PNB_MEAN", ix, iy, apdpn_apdpn[iAPDoPNB][iMean]);
575  setVal("APD_OVER_PNB_RMS", ix, iy, apdpn_apdpn[iAPDoPNB][iRMS]);
576  setVal("APD_OVER_PNB_M3", ix, iy, apdpn_apdpn[iAPDoPNB][iM3]); // fixme
577  setVal("APD_OVER_PN_MEAN", ix, iy, apdpn_apdpn[iAPDoPN][iMean]);
578  setVal("APD_OVER_PN_RMS", ix, iy, apdpn_apdpn[iAPDoPN][iRMS]);
579  setVal("APD_OVER_PN_M3", ix, iy, apdpn_apdpn[iAPDoPN][iM3]); // fixme
580  // JM
581  setVal("APD_OVER_APD_MEAN", ix, iy, apdpn_apdpn[iAPDoAPDA][iMean]);
582  setVal("APD_OVER_APD_RMS", ix, iy, apdpn_apdpn[iAPDoAPDA][iRMS]);
583  setVal("APD_OVER_APD_M3", ix, iy, apdpn_apdpn[iAPDoAPDA][iM3]); // fixme
584  setVal("APD_OVER_APDA_MEAN", ix, iy, apdpn_apdpn[iAPDoAPDA][iMean]);
585  setVal("APD_OVER_APDA_RMS", ix, iy, apdpn_apdpn[iAPDoAPDA][iRMS]);
586  setVal("APD_OVER_APDA_M3", ix, iy, apdpn_apdpn[iAPDoAPDA][iM3]); // fixme
587  setVal("APD_OVER_APDB_MEAN", ix, iy, apdpn_apdpn[iAPDoAPDB][iMean]);
588  setVal("APD_OVER_APDB_RMS", ix, iy, apdpn_apdpn[iAPDoAPDB][iRMS]);
589  setVal("APD_OVER_APDB_M3", ix, iy, apdpn_apdpn[iAPDoAPDB][iM3]); // fixme
590  // JM
591  setVal("SHAPE_COR", ix, iy, apdpn_ShapeCor);
592  if (ab_tree) {
593  setVal("ALPHA", ix, iy, ab_ab[iAlpha]);
594  setVal("BETA", ix, iy, ab_ab[iBeta]);
595  } else {
596  setVal("ALPHA", ix, iy, 0.);
597  setVal("BETA", ix, iy, 0.);
598  }
599  // NEW GHM 08/06
600  setVal("TIME_MEAN", ix, iy, apdpn_apdpn[iTime][iMean]);
601  setVal("TIME_RMS", ix, iy, apdpn_apdpn[iTime][iRMS]);
602  setVal("TIME_M3", ix, iy, apdpn_apdpn[iTime][iM3]);
603  setVal("TIME_NEVT", ix, iy, apdpn_apdpn[iTime][iNevt]);
604  }
605 
606  //
607  // PN primitives
608  //
610 
611  nentries = pn_tree->GetEntriesFast();
612  assert(nentries % 2 == 0);
613  int module_(0);
614  id1_ = _sm;
615  id2_ = 0;
616 
617  Long64_t jentry = 0;
618 
619  while (jentry < nentries) {
620  for (int jj = 0; jj < 2; jj++) {
621  // jj=0 --> PNA
622  // jj=1 --> PNB
623 
624  int zentry = jentry + jj;
625  assert(zentry < nentries);
626 
627  ientry = pn_tree->LoadTree(zentry);
628  assert(ientry >= 0);
629  pn_tree->GetEntry(zentry);
630 
631  if (_side != pn_side)
632  break;
633 
634  if (jj == 1)
637  assert(pn_pnID == jj);
638 
639  // get the PN number
640  std::pair<int, int> memPn_ = ME::pn(_lmr, module_, (ME::PN)jj);
641  if (_isBarrel) {
642  // assert( memPn_.first%600==_dcc%600 );
643  id1_ = _sm;
644  id2_ = memPn_.second;
645  } else {
646  int dee_ = MEEEGeom::dee(_lmr);
647  // int mem_ = memPn_.first%600;
648  // if( dee_==1 )
649  // {
650  // if( jj==ME::iPNA ) assert( mem_==50 );
651  // else assert( mem_==51 );
652  // }
653  // else if( dee_==2 )
654  // {
655  // if( jj==ME::iPNA ) assert( mem_==47 ); // warning !
656  // else assert( mem_==46 );
657  // // assert( mem_==46 || mem_==47 );
658  // }
659  // else if( dee_==3 )
660  // {
661  // if( jj==ME::iPNA ) assert( mem_==1 );
662  // else assert( mem_==2 );
663  // }
664  // else if( dee_==4 )
665  // {
666  // if( jj==ME::iPNA ) assert( mem_==5 );
667  // else assert( mem_==6 );
668  // }
669  id1_ = dee_;
670  id2_ = (jj + 1) * 100 + memPn_.second;
671  }
672 
673  if (_isBarrel) {
674  channelView_ = iEB_LM_PN;
675  } else {
676  channelView_ = iEE_LM_PN;
677  }
678  logic_id_ = logicId(channelView_, id1_, id2_);
679 
680  i_t[t_name + separator + "LOGIC_ID"] = logic_id_;
681  f_t[t_name + separator + "MEAN"] = pn_PN[iMean];
682  f_t[t_name + separator + "RMS"] = pn_PN[iRMS];
683  f_t[t_name + separator + "M3"] = pn_PN[iM3];
684  f_t[t_name + separator + "PNA_OVER_PNB_MEAN"] = (jj == 0) ? pn_PNoPNB[iMean] : pn_PNoPNA[iMean];
685  f_t[t_name + separator + "PNA_OVER_PNB_RMS"] = (jj == 0) ? pn_PNoPNB[iRMS] : pn_PNoPNA[iRMS];
686  f_t[t_name + separator + "PNA_OVER_PNB_M3"] = (jj == 0) ? pn_PNoPNB[iM3] : pn_PNoPNA[iM3];
687 
688  t_t[t_name]->Fill();
689  }
690  // std::cout << "Module=" << module_ << "\tPNA=" << pn_[0] << "\tPNB=" << pn_[1] << std::endl;
691 
692  // if( _isBarrel )
693  // jentry += 4;
694  // else
695  // jentry += 2;
696  jentry += 2;
697  }
698 
699  logic_id_ = logicId(iECAL_LMR, _lmr);
700 
701  //
702  // MATACQ primitives
703  //
704 
705  if (mtq_tree) {
707 
708  nentries = mtq_tree->GetEntriesFast();
709  assert(nentries == 2);
710  for (Long64_t jentry = 0; jentry < nentries; jentry++) {
711  ientry = mtq_tree->LoadTree(jentry);
712  assert(ientry >= 0);
713  mtq_tree->GetEntry(jentry);
714 
715  if (mtq_side != _side)
716  continue;
717 
718  i_t[t_name + separator + "LOGIC_ID"] = logic_id_;
719  i_t[t_name + separator + "FIT_METHOD"] = 0; // fixme --- what's this? ? ?
720  f_t[t_name + separator + "MTQ_AMPL"] = mtq_mtq[iAmpl];
721  f_t[t_name + separator + "MTQ_TIME"] = mtq_mtq[iPeak];
722  f_t[t_name + separator + "MTQ_RISE"] = mtq_mtq[iTrise];
723  f_t[t_name + separator + "MTQ_FWHM"] = mtq_mtq[iFwhm];
724  f_t[t_name + separator + "MTQ_FW20"] = mtq_mtq[iFw20];
725  f_t[t_name + separator + "MTQ_FW80"] = mtq_mtq[iFw80];
726  f_t[t_name + separator + "MTQ_SLIDING"] =
727  mtq_mtq[iSlide]; // fixme --- sliding: max of average in sliding window
728 
729  t_t[t_name]->Fill();
730  }
731  } else {
733 
734  i_t[t_name + separator + "LOGIC_ID"] = logic_id_;
735  i_t[t_name + separator + "FIT_METHOD"] = 0; // fixme
736  f_t[t_name + separator + "MTQ_AMPL"] = 0.0;
737  f_t[t_name + separator + "MTQ_TIME"] = 0.0;
738  f_t[t_name + separator + "MTQ_RISE"] = 0.0;
739  f_t[t_name + separator + "MTQ_FWHM"] = 0.0;
740  f_t[t_name + separator + "MTQ_FW20"] = 0.0;
741  f_t[t_name + separator + "MTQ_FW80"] = 0.0;
742  f_t[t_name + separator + "MTQ_SLIDING"] = 0.0;
743 
744  t_t[t_name]->Fill();
745  }
746 
747  //
748  // Laser Run
749  //
751  //std::cout << "Fill "<< t_name << std::endl;
752  i_t[t_name + separator + "LOGIC_ID"] = logic_id_;
753  i_t[t_name + separator + "NEVENTS"] = _events;
754  i_t[t_name + separator + "QUALITY_FLAG"] = 1; // fixme
755  t_t[t_name]->Fill();
756 
757  //
758  // Laser Config
759  //
761  //std::cout << "Fill "<< t_name << std::endl;
762  i_t[t_name + separator + "LOGIC_ID"] = logic_id_;
763  i_t[t_name + separator + "WAVELENGTH"] = _color;
764  i_t[t_name + separator + "VFE_GAIN"] = _mgpagain; // fixme
765  i_t[t_name + separator + "PN_GAIN"] = _memgain; // fixme
766  i_t[t_name + separator + "LSR_POWER"] = _power; // will be available from MATACQ data
767  i_t[t_name + separator + "LSR_ATTENUATOR"] = _filter; // idem
768  i_t[t_name + separator + "LSR_CURRENT"] = 0; // idem
769  i_t[t_name + separator + "LSR_DELAY_1"] = _delay; // idem
770  i_t[t_name + separator + "LSR_DELAY_2"] = 0; // idem
771  t_t[t_name]->Fill();
772 
773  } else if (_type == ME::iTestPulse) {
774  // nentries = tpapd_tree->GetEntriesFast();
775  // for( Long64_t jentry=0; jentry<nentries; jentry++ )
776  // {
777  // ientry = tpapd_tree->LoadTree( jentry );
778  // assert( ientry>=0 );
779  // nb = tpapd_tree->GetEntry( jentry );
780 
781  // if( tpapd_iphi<0 ) continue;
782 
783  // const bool new_= true;
784 
785  // int ix;
786  // int iy;
787  // int id2;
788  // if( new_ )
789  // {
790  // // for Cruzet3 , global coordinates
791  // if ( tpapd_side != _side ) continue;
792  // int ieta=tpapd_ieta;
793  // int iphi=tpapd_iphi;
794  // MEEBGeom::XYCoord xy_ = MEEBGeom::localCoord( ieta, iphi );
795  // ix = xy_.first;
796  // iy = xy_.second;
797  // id2 = ix*20 + iy; // !!! TO BE CHECKED !!!
798  // }
799  // else
800  // {
801  // // for Cruzet2 , local coordinates
802  // ix = tpapd_ieta;
803  // iy = 19-tpapd_iphi;
804  // id2 = ix*20 + (20 - iy); // !!! TO BE CHECKED !!!
805  // }
806  // //
807 
808  // int id1 = _sm; // fixme --- this is for barrel
809  // int logic_id_ = 1011000000; // fixme
810  // logic_id_ += 10000*id1 + id2;
811 
812  // int flag = tpapd_flag;
813 
814  // setInt( "LOGIC_ID", ix, iy, logic_id_ );
815  // setInt( "FLAG", ix, iy, flag );
816  // setVal( "MEAN", ix, iy, tpapd_APD[iMean] );
817  // setVal( "RMS", ix, iy, tpapd_APD[iRMS] );
818  // setVal( "M3", ix, iy, tpapd_APD[iM3] );
819  // setVal( "NEVT", ix, iy, tpapd_APD[iNevt] );
820  // }
821 
822  // //
823  // // PN primitives
824  // //
825  // t_name = lmfLaserName( ME::iLmfTestPulsePnPrim, _type );
826 
827  // nentries = tppn_tree->GetEntriesFast();
828  // assert( nentries%2==0 );
829  // int module_, pn_[2];
830  // int id1_(_sm), id2_(0);
831  // int logic_id_(0);
832 
833  // Long64_t jentry=0;
834  // if( _side==1 ) jentry+=2; // fixme : true also for endcaps?
835  // while( jentry<nentries )
836  // {
837  // for( int jj=0; jj<2; jj++ )
838  // {
839  // // jj=0 --> PNA
840  // // jj=1 --> PNB
841 
842  // int zentry = jentry+jj;
843  // assert( zentry<nentries );
844 
845  // ientry = tppn_tree->LoadTree( zentry );
846  // assert( ientry>=0 );
847  // nb = tppn_tree->GetEntry( zentry );
848 
849  // if( jj==1 ) assert( tppn_moduleID==module_ );
850  // module_ = tppn_moduleID;
851  // assert( tppn_pnID==jj );
852 
853  // pn_[jj] = ( jj==0 ) ? _pn[module_].first : _pn[module_].second;
854  // id2_ = pn_[jj];
855  // logic_id_ = 1131000000 ;
856  // // logic_id_ = 0; // fixme
857  // logic_id_ += 10000*id1_ + id2_;
858 
859  // i_t[t_name+separator+"LOGIC_ID"] = logic_id_;
860  // i_t[t_name+separator+"GAIN"] = tppn_gain;
861  // f_t[t_name+separator+"MEAN"] = tppn_PN[iMean];
862  // f_t[t_name+separator+"RMS"] = tppn_PN[iRMS];
863  // f_t[t_name+separator+"M3"] = tppn_PN[iM3]; // fixme --- peak?
864 
865  // t_t[t_name]->Fill();
866 
867  // }
868 
869  // // std::cout << "Module=" << module_ << "\tPNA=" << pn_[0] << "\tPNB=" << pn_[1] << std::endl;
870 
871  // jentry += 4;
872  // }
873 
874  // logic_id_ = 1041000000;
875  // logic_id_ += 10000*id1_;
876  // logic_id_ += id1_;
877 
878  // //
879  // // Test Pulse Run
880  // //
881  // t_name = lmfLaserName( ME::iLmfTestPulseRun, _type );
882  // //std::cout << "Fill "<< t_name << std::endl;
883  // i_t[t_name+separator+"LOGIC_ID"] = logic_id_; // fixme --- is there a channelview for this?
884  // i_t[t_name+separator+"NEVENTS"] = _events;
885  // i_t[t_name+separator+"QUALITY_FLAG"] = 1; // fixme
886  // t_t[t_name]->Fill();
887 
888  // //
889  // // Test Pulse Config
890  // //
891  // t_name = lmfLaserName( ME::iLmfTestPulseConfig, _type );
892  // //std::cout << "Fill "<< t_name << std::endl;
893  // i_t[t_name+separator+"LOGIC_ID"] = logic_id_; // fixme
894  // i_t[t_name+separator+"VFE_GAIN"] = _mgpagain; // fixme
895  // i_t[t_name+separator+"PN_GAIN"] = _memgain; // fixme
896  // t_t[t_name]->Fill();
897  }
898 
899  //
900  // Laser Run IOV
901  //
902  t_name = "LMF_RUN_IOV";
903  //std::cout << "Fill "<< t_name << std::endl;
904  i_t[t_name + separator + "TAG_ID"] = 0; // fixme
905  i_t[t_name + separator + "SUB_RUN_NUM"] = _run; // fixme
906  i_t[t_name + separator + "SUB_RUN_START_LOW"] = ME::time_low(_ts_beg);
907  i_t[t_name + separator + "SUB_RUN_START_HIGH"] = ME::time_high(_ts_beg);
908  i_t[t_name + separator + "SUB_RUN_END_LOW"] = ME::time_low(_ts_end);
909  i_t[t_name + separator + "SUB_RUN_END_HIGH"] = ME::time_high(_ts_end);
910  i_t[t_name + separator + "DB_TIMESTAMP_LOW"] = ME::time_low(_ts);
911  i_t[t_name + separator + "DB_TIMESTAMP_HIGH"] = ME::time_high(_ts);
912  c_t[t_name + separator + "SUB_RUN_TYPE"] = "LASER TEST CRUZET"; //fixme
913  t_t[t_name]->Fill();
914 }
static const char module_[]
static XYCoord localCoord(int icr)
Definition: MEEBGeom.cc:142
Int_t pn_pnID
Definition: MELaserPrim.h:180
bool _isBarrel
Definition: MELaserPrim.h:81
static const TString separator
Definition: MELaserPrim.h:76
TTree * apdpn_tree
Definition: MELaserPrim.h:125
Double_t pn_PN[iSize_apdpn]
Definition: MELaserPrim.h:182
Double_t pn_PNoPNB[iSize_apdpn]
Definition: MELaserPrim.h:185
Int_t pn_moduleID
Definition: MELaserPrim.h:181
static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:319
Double_t ab_ab[iSize_ab]
Definition: MELaserPrim.h:176
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:151
bool setVal(const char *, int ix, int iy, float val)
Double_t mtq_mtq[iSize_mtq]
Definition: MELaserPrim.h:190
static std::pair< ME::DCCid, ME::PNid > pn(ME::LMRid ilmr, ME::LMMid ilmmod, ME::PN ipn)
Definition: ME.cc:597
assert(be >=bs)
static Time time_low(TimeStamp t)
Definition: ME.cc:224
Int_t apdpn_iphi
Definition: MELaserPrim.h:164
ME::TimeStamp _ts_end
Definition: MELaserPrim.h:98
TTree * ab_tree
Definition: MELaserPrim.h:126
bool init_ok
Definition: MELaserPrim.h:52
TTree * mtq_tree
Definition: MELaserPrim.h:128
Definition: ME.h:63
Int_t pn_side
Definition: MELaserPrim.h:179
Int_t mtq_side
Definition: MELaserPrim.h:188
bool setInt(const char *, int ix, int iy, int ival)
static int logicId(int channelView, int id1, int id2=0)
Definition: MELaserPrim.cc:120
std::pair< EBLocalCoord, EBLocalCoord > XYCoord
Definition: MEEBGeom.h:25
std::map< TString, float > f_t
Definition: MELaserPrim.h:153
Int_t apdpn_flag
Definition: MELaserPrim.h:165
static TString lmfLaserName(int table, int type, int color=ME::iBlue)
Definition: MELaserPrim.cc:997
Double_t apdpn_ShapeCor
Definition: MELaserPrim.h:166
Double_t pn_PNoPNA[iSize_apdpn]
Definition: MELaserPrim.h:184
std::map< TString, const char * > c_t
Definition: MELaserPrim.h:154
Int_t apdpn_ieta
Definition: MELaserPrim.h:163
std::map< TString, int > i_t
Definition: MELaserPrim.h:152
static Time time_high(TimeStamp t)
Definition: ME.cc:226
static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:292
ME::TimeStamp _ts_beg
Definition: MELaserPrim.h:97
PN
Definition: ME.h:42
ME::TimeStamp _ts
Definition: MELaserPrim.h:96
Double_t apdpn_apdpn[iSizeArray_apdpn][iSize_apdpn]
Definition: MELaserPrim.h:167
TTree * pn_tree
Definition: MELaserPrim.h:127
Int_t apdpn_side
Definition: MELaserPrim.h:162

◆ getInt()

Int_t MELaserPrim::getInt ( const char *  name,
int  ix,
int  iy 
)

Definition at line 1148 of file MELaserPrim.cc.

References cms::cuda::assert(), i_h, and Skims_PA_cff::name.

Referenced by setInt().

1148  {
1149  Int_t ival = -99;
1150  if (i_h.count(name) == 1) {
1151  TH2I* h_ = (TH2I*)i_h[name];
1152  assert(h_ != nullptr);
1153  int binx = h_->GetXaxis()->FindBin(ix + 0.5);
1154  int biny = h_->GetYaxis()->FindBin(iy + 0.5);
1155  ival = (Int_t)h_->GetCellContent(binx, biny);
1156  }
1157  return ival;
1158 }
assert(be >=bs)
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:147

◆ getVal()

Float_t MELaserPrim::getVal ( const char *  name,
int  ix,
int  iy 
)

Definition at line 1160 of file MELaserPrim.cc.

References cms::cuda::assert(), f_h, Skims_PA_cff::name, and heppy_batch::val.

Referenced by setVal().

1160  {
1161  Float_t val = -99.;
1162  if (f_h.count(name) == 1) {
1163  TH2F* h_ = (TH2F*)f_h[name];
1164  assert(h_ != nullptr);
1165  int binx = h_->GetXaxis()->FindBin(ix + 0.5);
1166  int biny = h_->GetYaxis()->FindBin(iy + 0.5);
1167  val = h_->GetCellContent(binx, biny);
1168  }
1169  return val;
1170 }
assert(be >=bs)
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:148

◆ getViewIds()

bool MELaserPrim::getViewIds ( int  logicId,
int &  channelView,
int &  id1,
int &  id2 
)
static

Definition at line 125 of file MELaserPrim.cc.

References globals_cff::id1, globals_cff::id2, and MillePedeFileConverter_cfg::out.

125  {
126  bool out = true;
127  int channelView_ = logic_id / 1000000;
128  if (channelView != 0 && channelView_ != channelView)
129  out = false;
130  channelView = channelView_;
131  id1 = (logic_id % 1000000) / 10000;
132  id2 = logic_id % 10000;
133  return out;
134 }

◆ init()

void MELaserPrim::init ( )

Definition at line 136 of file MELaserPrim.cc.

References _color, _inpath, _type, ab_ab, ab_channelID, ab_dccID, ab_file, ab_flag, ab_ieta, ab_iphi, ab_towerID, ab_tree, ab_varName, apdpn_apdpn, apdpn_arrayName, apdpn_channelID, apdpn_dccID, apdpn_file, apdpn_flag, apdpn_ieta, apdpn_iphi, apdpn_moduleID, apdpn_ShapeCor, apdpn_side, apdpn_towerID, apdpn_tree, cms::cuda::assert(), b_ab_ab, b_ab_channelID, b_ab_dccID, b_ab_flag, b_ab_ieta, b_ab_iphi, b_ab_towerID, b_apdpn_apdpn, b_apdpn_channelID, b_apdpn_dccID, b_apdpn_flag, b_apdpn_ieta, b_apdpn_iphi, b_apdpn_moduleID, b_apdpn_ShapeCor, b_apdpn_side, b_apdpn_towerID, b_mtq_mtq, b_mtq_side, b_pn_moduleID, b_pn_PN, b_pn_pnID, b_pn_PNoPN, b_pn_PNoPNA, b_pn_PNoPNB, b_pn_side, b_tpapd_APD, b_tpapd_channelID, b_tpapd_dccID, b_tpapd_flag, b_tpapd_gain, b_tpapd_ieta, b_tpapd_iphi, b_tpapd_moduleID, b_tpapd_side, b_tpapd_towerID, b_tppn_gain, b_tppn_moduleID, b_tppn_PN, b_tppn_pnID, b_tppn_side, gather_cfg::cout, ME::iBlue, cuy::ii, ME::iIRed, ME::iLaser, init_ok, iSize_ab, iSize_mtq, iSizeArray_apdpn, ME::iTestPulse, findQualityFiles::jj, mtq_file, mtq_mtq, mtq_side, mtq_tree, mtq_varName, pn_moduleID, pn_PN, pn_pnID, pn_PNoPN, pn_PNoPNA, pn_PNoPNB, pn_side, pn_tree, ctpps_dqm_sourceclient-live_cfg::test, tpapd_APD, tpapd_channelID, tpapd_dccID, tpapd_file, tpapd_flag, tpapd_gain, tpapd_ieta, tpapd_iphi, tpapd_moduleID, tpapd_side, tpapd_towerID, tpapd_tree, tppn_gain, tppn_moduleID, tppn_PN, tppn_pnID, tppn_side, and tppn_tree.

Referenced by MELaserPrim().

136  {
137  bool verbose_ = false;
138 
139  if (_inpath == "0") {
140  if (verbose_)
141  std::cout << "no input file" << std::endl;
142  init_ok = true;
143  return; // GHM
144  }
145 
146  TString cur(_inpath);
147  if (!cur.EndsWith("/"))
148  cur += "/";
149 
150  if (_type == ME::iLaser) {
151  TString _APDPN_fname = cur;
152  _APDPN_fname += "APDPN_LASER.root";
153  TString _AB_fname = cur;
154  _AB_fname += "AB.root";
155  TString _MTQ_fname = cur;
156  _MTQ_fname += "MATACQ.root";
157 
158  bool apdpn_ok, ab_ok, pn_ok, mtq_ok;
159  apdpn_ok = false;
160  ab_ok = false;
161  pn_ok = false;
162  mtq_ok = false;
163 
164  FILE* test;
165  test = fopen(_APDPN_fname, "r");
166  if (test) {
167  apdpn_ok = true;
168  pn_ok = true;
169  fclose(test);
170  }
171  test = fopen(_AB_fname, "r");
172  if (test) {
173  ab_ok = true;
174  fclose(test);
175  }
176  test = fopen(_MTQ_fname, "r");
177  if (test) {
178  mtq_ok = true;
179  fclose(test);
180  }
181 
182  if (apdpn_ok)
183  apdpn_file = TFile::Open(_APDPN_fname);
184  if (ab_ok)
185  ab_file = TFile::Open(_AB_fname);
186  if (mtq_ok)
187  mtq_file = TFile::Open(_MTQ_fname);
188 
189  if (verbose_) {
190  std::cout << _APDPN_fname << " ok=" << apdpn_ok << std::endl;
191  std::cout << _AB_fname << " ok=" << ab_ok << std::endl;
192  std::cout << _MTQ_fname << " ok=" << mtq_ok << std::endl;
193  }
194  if (!apdpn_ok || !pn_ok)
195  return; // FIXME !
196 
197  TString apdpn_tree_name;
198  TString ab_tree_name;
199  TString pn_tree_name;
200  TString mtq_tree_name;
201 
202  apdpn_tree_name = "APDCol";
203  ab_tree_name = "ABCol";
204  pn_tree_name = "PNCol";
205  mtq_tree_name = "MatacqCol";
206 
207  apdpn_tree_name += _color;
208  ab_tree_name += _color;
209  pn_tree_name += _color;
210  mtq_tree_name += _color;
211 
212  if (mtq_ok) {
213  TTree* ckeckMtq = (TTree*)mtq_file->Get(mtq_tree_name);
214  if (ckeckMtq == nullptr)
215  mtq_ok = false;
216  }
217 
218  if (_color != ME::iIRed && _color != ME::iBlue) {
219  std::cout << "MELaserPrim::init() -- Fatal Error -- Wrong Laser Color : " << _color << " ---- Abort "
220  << std::endl;
221  return;
222  }
223 
224  apdpn_tree = (TTree*)apdpn_file->Get(apdpn_tree_name);
225  assert(apdpn_tree != nullptr);
226  apdpn_tree->SetMakeClass(1);
227  apdpn_tree->SetBranchAddress("dccID", &apdpn_dccID, &b_apdpn_dccID);
228  apdpn_tree->SetBranchAddress("towerID", &apdpn_towerID, &b_apdpn_towerID);
229  apdpn_tree->SetBranchAddress("channelID", &apdpn_channelID, &b_apdpn_channelID);
230  apdpn_tree->SetBranchAddress("moduleID", &apdpn_moduleID, &b_apdpn_moduleID);
231  apdpn_tree->SetBranchAddress("side", &apdpn_side, &b_apdpn_side);
232  apdpn_tree->SetBranchAddress("ieta", &apdpn_ieta, &b_apdpn_ieta);
233  apdpn_tree->SetBranchAddress("iphi", &apdpn_iphi, &b_apdpn_iphi);
234  apdpn_tree->SetBranchAddress("flag", &apdpn_flag, &b_apdpn_flag);
235  if (apdpn_tree->GetBranchStatus("ShapeCor"))
236  apdpn_tree->SetBranchAddress("ShapeCor", &apdpn_ShapeCor, &b_apdpn_ShapeCor);
237  else
238  apdpn_ShapeCor = 0.0;
239  for (int jj = 0; jj < iSizeArray_apdpn; jj++) {
240  TString name_ = apdpn_arrayName[jj];
241  apdpn_tree->SetBranchAddress(name_, apdpn_apdpn[jj], &b_apdpn_apdpn[jj]);
242  }
243 
244  if (ab_ok) {
245  ab_tree = (TTree*)ab_file->Get(ab_tree_name);
246  assert(ab_tree != nullptr);
247  ab_tree->SetMakeClass(1);
248  ab_tree->SetBranchAddress("dccID", &ab_dccID, &b_ab_dccID);
249  ab_tree->SetBranchAddress("towerID", &ab_towerID, &b_ab_towerID);
250  ab_tree->SetBranchAddress("channelID", &ab_channelID, &b_ab_channelID);
251  ab_tree->SetBranchAddress("ieta", &ab_ieta, &b_ab_ieta);
252  ab_tree->SetBranchAddress("iphi", &ab_iphi, &b_ab_iphi);
253  ab_tree->SetBranchAddress("flag", &ab_flag, &b_ab_flag);
254  for (int ii = 0; ii < iSize_ab; ii++) {
255  ab_tree->SetBranchAddress(ab_varName[ii], &ab_ab[ii], &b_ab_ab[ii]);
256  }
257  }
258 
259  pn_tree = (TTree*)apdpn_file->Get(pn_tree_name);
260  assert(pn_tree != nullptr);
261  pn_tree->SetMakeClass(1);
262  pn_tree->SetBranchAddress("side", &pn_side, &b_pn_side);
263  pn_tree->SetBranchAddress("pnID", &pn_pnID, &b_pn_pnID);
264  pn_tree->SetBranchAddress("moduleID", &pn_moduleID, &b_pn_moduleID);
265  pn_tree->SetBranchAddress("PN", pn_PN, &b_pn_PN);
266  pn_tree->SetBranchAddress("PNoPN", pn_PNoPN, &b_pn_PNoPN);
267  pn_tree->SetBranchAddress("PNoPNA", pn_PNoPNA, &b_pn_PNoPNA);
268  pn_tree->SetBranchAddress("PNoPNB", pn_PNoPNB, &b_pn_PNoPNB);
269 
270  if (mtq_ok) {
271  mtq_tree = (TTree*)mtq_file->Get(mtq_tree_name);
272  assert(mtq_tree != nullptr);
273  mtq_tree->SetMakeClass(1);
274  mtq_tree->SetBranchAddress("side", &mtq_side, &b_mtq_side);
275 
276  for (int ii = 0; ii < iSize_mtq; ii++) {
277  mtq_tree->SetBranchAddress(mtq_varName[ii], &mtq_mtq[ii], &b_mtq_mtq[ii]);
278  }
279  }
280  } else if (_type == ME::iTestPulse) {
281  TString _TPAPD_fname = cur;
282  _TPAPD_fname += "APDPN_TESTPULSE.root";
283 
284  bool tpapd_ok;
285  tpapd_ok = false;
286 
287  FILE* test;
288  test = fopen(_TPAPD_fname, "r");
289  if (test) {
290  tpapd_ok = true;
291  fclose(test);
292  }
293 
294  if (tpapd_ok)
295  tpapd_file = TFile::Open(_TPAPD_fname);
296 
297  if (verbose_) {
298  std::cout << _TPAPD_fname << " ok=" << tpapd_ok << std::endl;
299  }
300  if (!tpapd_ok)
301  return;
302 
303  TString tpapd_tree_name;
304  TString tppn_tree_name;
305 
306  tpapd_tree_name = "TPAPD";
307  tppn_tree_name = "TPPN";
308 
309  tpapd_tree = (TTree*)tpapd_file->Get(tpapd_tree_name);
310  assert(tpapd_tree != nullptr);
311  tpapd_tree->SetMakeClass(1);
312  tpapd_tree->SetBranchAddress("ieta", &tpapd_ieta, &b_tpapd_ieta);
313  tpapd_tree->SetBranchAddress("iphi", &tpapd_iphi, &b_tpapd_iphi);
314  tpapd_tree->SetBranchAddress("dccID", &tpapd_dccID, &b_tpapd_dccID);
315  tpapd_tree->SetBranchAddress("side", &tpapd_side, &b_tpapd_side);
316  tpapd_tree->SetBranchAddress("towerID", &tpapd_towerID, &b_tpapd_towerID);
317  tpapd_tree->SetBranchAddress("channelID", &tpapd_channelID, &b_tpapd_channelID);
318  tpapd_tree->SetBranchAddress("moduleID", &tpapd_moduleID, &b_tpapd_moduleID);
319  tpapd_tree->SetBranchAddress("flag", &tpapd_flag, &b_tpapd_flag);
320  tpapd_tree->SetBranchAddress("gain", &tpapd_gain, &b_tpapd_gain);
321  tpapd_tree->SetBranchAddress("APD", tpapd_APD, &b_tpapd_APD);
322 
323  tppn_tree = (TTree*)tpapd_file->Get(tppn_tree_name);
324  assert(tppn_tree != nullptr);
325  tppn_tree->SetMakeClass(1);
326  tppn_tree->SetBranchAddress("side", &tppn_side, &b_tppn_side);
327  tppn_tree->SetBranchAddress("pnID", &tppn_pnID, &b_tppn_pnID);
328  tppn_tree->SetBranchAddress("moduleID", &tppn_moduleID, &b_tppn_moduleID);
329  tppn_tree->SetBranchAddress("gain", &tppn_gain, &b_tppn_gain);
330  tppn_tree->SetBranchAddress("PN", tppn_PN, &b_tppn_PN);
331  }
332  init_ok = true;
333 }
Int_t apdpn_dccID
Definition: MELaserPrim.h:157
Double_t tpapd_APD[iSize_apdpn]
Definition: MELaserPrim.h:202
Int_t pn_pnID
Definition: MELaserPrim.h:180
TBranch * b_ab_channelID
Definition: MELaserPrim.h:227
TBranch * b_tppn_moduleID
Definition: MELaserPrim.h:262
TBranch * b_apdpn_apdpn[iSizeArray_apdpn]
Definition: MELaserPrim.h:222
TString _inpath
Definition: MELaserPrim.h:133
TBranch * b_tppn_PN
Definition: MELaserPrim.h:264
TBranch * b_tppn_pnID
Definition: MELaserPrim.h:261
TTree * apdpn_tree
Definition: MELaserPrim.h:125
TBranch * b_apdpn_channelID
Definition: MELaserPrim.h:214
Double_t pn_PN[iSize_apdpn]
Definition: MELaserPrim.h:182
TBranch * b_pn_pnID
Definition: MELaserPrim.h:235
TFile * mtq_file
Definition: MELaserPrim.h:120
TBranch * b_pn_PNoPNA
Definition: MELaserPrim.h:239
static const TString mtq_varName[iSize_mtq]
Definition: MELaserPrim.h:272
Double_t pn_PNoPNB[iSize_apdpn]
Definition: MELaserPrim.h:185
Int_t pn_moduleID
Definition: MELaserPrim.h:181
TTree * tppn_tree
Definition: MELaserPrim.h:130
Int_t tppn_moduleID
Definition: MELaserPrim.h:207
Int_t tpapd_ieta
Definition: MELaserPrim.h:194
TBranch * b_ab_ab[iSize_ab]
Definition: MELaserPrim.h:231
Double_t pn_PNoPN[iSize_apdpn]
Definition: MELaserPrim.h:183
TBranch * b_ab_towerID
Definition: MELaserPrim.h:226
Double_t ab_ab[iSize_ab]
Definition: MELaserPrim.h:176
TBranch * b_tpapd_dccID
Definition: MELaserPrim.h:250
TBranch * b_mtq_side
Definition: MELaserPrim.h:243
Int_t ab_flag
Definition: MELaserPrim.h:175
Int_t tppn_gain
Definition: MELaserPrim.h:208
Double_t mtq_mtq[iSize_mtq]
Definition: MELaserPrim.h:190
TBranch * b_tpapd_gain
Definition: MELaserPrim.h:256
assert(be >=bs)
Int_t ab_towerID
Definition: MELaserPrim.h:171
TBranch * b_tpapd_APD
Definition: MELaserPrim.h:257
Int_t tpapd_dccID
Definition: MELaserPrim.h:195
Int_t ab_ieta
Definition: MELaserPrim.h:173
Int_t tppn_side
Definition: MELaserPrim.h:205
TBranch * b_ab_ieta
Definition: MELaserPrim.h:228
TBranch * b_apdpn_ieta
Definition: MELaserPrim.h:218
Int_t tpapd_side
Definition: MELaserPrim.h:196
Int_t ab_channelID
Definition: MELaserPrim.h:172
Int_t apdpn_iphi
Definition: MELaserPrim.h:164
Int_t tpapd_towerID
Definition: MELaserPrim.h:197
TBranch * b_pn_moduleID
Definition: MELaserPrim.h:236
TTree * ab_tree
Definition: MELaserPrim.h:126
Int_t tpapd_iphi
Definition: MELaserPrim.h:193
Definition: ME.h:64
bool init_ok
Definition: MELaserPrim.h:52
TTree * mtq_tree
Definition: MELaserPrim.h:128
Definition: ME.h:63
TBranch * b_pn_PN
Definition: MELaserPrim.h:237
Int_t pn_side
Definition: MELaserPrim.h:179
TBranch * b_pn_side
Definition: MELaserPrim.h:234
TBranch * b_tpapd_flag
Definition: MELaserPrim.h:255
TBranch * b_tppn_gain
Definition: MELaserPrim.h:263
TFile * apdpn_file
Definition: MELaserPrim.h:117
Int_t mtq_side
Definition: MELaserPrim.h:188
TBranch * b_ab_dccID
Definition: MELaserPrim.h:225
TBranch * b_apdpn_ShapeCor
Definition: MELaserPrim.h:221
TBranch * b_pn_PNoPN
Definition: MELaserPrim.h:238
Int_t tpapd_flag
Definition: MELaserPrim.h:200
static const TString ab_varName[iSize_ab]
Definition: MELaserPrim.h:271
Int_t apdpn_moduleID
Definition: MELaserPrim.h:160
TBranch * b_tpapd_towerID
Definition: MELaserPrim.h:252
ii
Definition: cuy.py:589
Int_t apdpn_flag
Definition: MELaserPrim.h:165
TBranch * b_tppn_side
Definition: MELaserPrim.h:260
Int_t ab_iphi
Definition: MELaserPrim.h:174
TBranch * b_pn_PNoPNB
Definition: MELaserPrim.h:240
TBranch * b_apdpn_flag
Definition: MELaserPrim.h:220
Int_t tpapd_gain
Definition: MELaserPrim.h:201
TBranch * b_ab_flag
Definition: MELaserPrim.h:230
TBranch * b_mtq_mtq[iSize_mtq]
Definition: MELaserPrim.h:245
TBranch * b_tpapd_side
Definition: MELaserPrim.h:251
Double_t apdpn_ShapeCor
Definition: MELaserPrim.h:166
Int_t tpapd_moduleID
Definition: MELaserPrim.h:199
Double_t pn_PNoPNA[iSize_apdpn]
Definition: MELaserPrim.h:184
Int_t apdpn_channelID
Definition: MELaserPrim.h:159
Int_t apdpn_ieta
Definition: MELaserPrim.h:163
Int_t ab_dccID
Definition: MELaserPrim.h:170
TBranch * b_tpapd_iphi
Definition: MELaserPrim.h:248
Int_t tppn_pnID
Definition: MELaserPrim.h:206
TBranch * b_tpapd_channelID
Definition: MELaserPrim.h:253
TTree * tpapd_tree
Definition: MELaserPrim.h:129
Definition: ME.h:64
TBranch * b_tpapd_moduleID
Definition: MELaserPrim.h:254
Int_t apdpn_towerID
Definition: MELaserPrim.h:158
Int_t tpapd_channelID
Definition: MELaserPrim.h:198
TBranch * b_tpapd_ieta
Definition: MELaserPrim.h:249
TBranch * b_apdpn_iphi
Definition: MELaserPrim.h:219
TFile * ab_file
Definition: MELaserPrim.h:118
TBranch * b_apdpn_towerID
Definition: MELaserPrim.h:213
TBranch * b_apdpn_side
Definition: MELaserPrim.h:217
Double_t apdpn_apdpn[iSizeArray_apdpn][iSize_apdpn]
Definition: MELaserPrim.h:167
TBranch * b_ab_iphi
Definition: MELaserPrim.h:229
Double_t tppn_PN[iSize_apdpn]
Definition: MELaserPrim.h:209
static const TString apdpn_arrayName[iSizeArray_apdpn]
Definition: MELaserPrim.h:266
TFile * tpapd_file
Definition: MELaserPrim.h:121
TBranch * b_apdpn_dccID
Definition: MELaserPrim.h:212
TTree * pn_tree
Definition: MELaserPrim.h:127
TBranch * b_apdpn_moduleID
Definition: MELaserPrim.h:215
Int_t apdpn_side
Definition: MELaserPrim.h:162

◆ lmfLaserName()

TString MELaserPrim::lmfLaserName ( int  table,
int  type,
int  color = ME::iBlue 
)
static

Definition at line 997 of file MELaserPrim.cc.

References ME::iBlue, ME::iGreen, ME::iIRed, ME::iLaser, ME::iLmfLaserConfig, ME::iLmfLaserPnPrim, ME::iLmfLaserPrim, ME::iLmfLaserPulse, ME::iLmfLaserRun, ME::iLmfTestPulseConfig, ME::iLmfTestPulsePnPrim, ME::iLmfTestPulsePrim, ME::iLmfTestPulseRun, ME::iRed, ME::iSizeC, ME::iSizeLmf, ME::iTestPulse, str, and TableParser::table.

Referenced by bookHistograms(), fillHistograms(), and MELaserPrim().

997  {
998  TString str("LMF_ERROR");
999  if (table < 0 || table >= ME::iSizeLmf)
1000  return str;
1001  if (color < 0 || color >= ME::iSizeC)
1002  return str;
1003 
1004  if (type == ME::iLaser) {
1005  TString colstr;
1006  switch (color) {
1007  case ME::iBlue:
1008  colstr = "_BLUE";
1009  break;
1010  case ME::iGreen:
1011  colstr = "_GREEN";
1012  break;
1013  case ME::iRed:
1014  colstr = "_RED";
1015  break;
1016  case ME::iIRed:
1017  colstr = "_IRED";
1018  break;
1019  default:
1020  abort();
1021  }
1022  str = "LMF_LASER";
1023  switch (table) {
1024  case ME::iLmfLaserRun:
1025  str = "LMF_RUN";
1026  break;
1027  case ME::iLmfLaserConfig:
1028  str += "_CONFIG";
1029  break;
1030  case ME::iLmfLaserPulse:
1031  str += colstr;
1032  str += "_PULSE";
1033  break;
1034  case ME::iLmfLaserPrim:
1035  str += colstr;
1036  str += "_PRIM";
1037  break;
1038  case ME::iLmfLaserPnPrim:
1039  str += colstr;
1040  str += "_PN_PRIM";
1041  break;
1042  default:
1043  abort();
1044  }
1045  } else if (type == ME::iTestPulse) {
1046  str = "LMF_TEST_PULSE";
1047  switch (table) {
1048  case ME::iLmfTestPulseRun:
1049  str = "LMF_RUN";
1050  break;
1052  str += "_CONFIG";
1053  break;
1054  case ME::iLmfTestPulsePrim:
1055  str += "_PRIM";
1056  break;
1058  str += "_PN_PRIM";
1059  break;
1060  default:
1061  abort();
1062  }
1063  }
1064  str += "_DAT";
1065  return str;
1066 }
Definition: ME.h:64
Definition: ME.h:64
Definition: ME.h:63
Definition: ME.h:64
Definition: ME.h:64
Definition: ME.h:64
#define str(s)

◆ logicId()

int MELaserPrim::logicId ( int  channelView,
int  id1,
int  id2 = 0 
)
static

Definition at line 120 of file MELaserPrim.cc.

References cms::cuda::assert(), globals_cff::id1, globals_cff::id2, iECAL, and iSize_cv.

Referenced by fillHistograms().

120  {
121  assert(channelView >= iECAL && channelView < iSize_cv);
122  return 1000000 * channelView + 10000 * id1 + id2;
123 }
assert(be >=bs)

◆ print()

void MELaserPrim::print ( std::ostream &  o)

Definition at line 980 of file MELaserPrim.cc.

References _color, _dcc, _run, _side, _sm, _ts, _type, and EcalTangentSkim_cfg::o.

980  {
981  o << "DCC/SM/side/type/color/run/ts " << _dcc << "/" << _sm << "/" << _side << "/" << _type << "/" << _color << "/"
982  << _run << "/" << _ts << std::endl;
983 
984  // for( int ix=ixmin; ix<ixmax; ix++ )
985  // {
986  // for( int iy=iymin; iy<iymax; iy++ )
987  // {
988  // int flag = getInt( _primStr+"FLAG", ix, iy );
989  // if( flag==0 ) continue;
990  // int logic_id = getInt( _primStr+"LOGIC_ID", ix, iy );
991  // float apd = getVal( _primStr+"MEAN", ix, iy );
992  // o << "Crystal ieta=" << ix << "\tiphi=" << iy << "\tlogic_id=" << logic_id << "\tAPD=" << apd << endl;
993  // }
994  // }
995 }
ME::TimeStamp _ts
Definition: MELaserPrim.h:96

◆ refresh()

void MELaserPrim::refresh ( )
private

Definition at line 1229 of file MELaserPrim.cc.

References f_h, i_h, and t_t.

Referenced by bookHistograms().

1229  {
1230  std::map<TString, TH2*>::iterator it;
1231 
1232  for (it = i_h.begin(); it != i_h.end(); ++it) {
1233  delete it->second;
1234  it->second = nullptr;
1235  }
1236  i_h.clear();
1237 
1238  for (it = f_h.begin(); it != f_h.end(); ++it) {
1239  delete it->second;
1240  it->second = nullptr;
1241  }
1242  f_h.clear();
1243 
1244  std::map<TString, TTree*>::iterator it_t;
1245  for (it_t = t_t.begin(); it_t != t_t.end(); ++it_t) {
1246  delete it_t->second;
1247  it->second = nullptr;
1248  }
1249  t_t.clear();
1250 }
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:151
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:148
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:147

◆ setHistoStyle()

void MELaserPrim::setHistoStyle ( TH1 *  h)
private

Definition at line 1202 of file MELaserPrim.cc.

References a, h, and cuy::ii.

Referenced by bookHistoF(), and bookHistoI().

1202  {
1203  if (h == nullptr)
1204  return;
1205 
1206  float _scale = 1;
1207 
1208  h->SetLineColor(4);
1209  h->SetLineWidth(1);
1210  h->SetFillColor(38);
1211  TAxis* axis[3];
1212  axis[0] = h->GetXaxis();
1213  axis[1] = h->GetYaxis();
1214  axis[2] = h->GetZaxis();
1215  for (int ii = 0; ii < 3; ii++) {
1216  TAxis* a = axis[ii];
1217  if (!a)
1218  continue;
1219  a->SetLabelFont(132);
1220  a->SetLabelOffset(_scale * 0.005);
1221  a->SetLabelSize(_scale * 0.04);
1222  a->SetTitleFont(132);
1223  a->SetTitleOffset(_scale * 1);
1224  a->SetTitleSize(_scale * 0.04);
1225  }
1226  h->SetStats(kTRUE);
1227 }
ii
Definition: cuy.py:589
double a
Definition: hdecay.h:121
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ setInt() [1/2]

bool MELaserPrim::setInt ( const char *  name,
int  ix,
int  iy,
int  ival 
)

Definition at line 1109 of file MELaserPrim.cc.

References _primStr, _tpPrimStr, _type, cms::cuda::assert(), getInt(), i_h, ME::iLaser, ME::iTestPulse, and Skims_PA_cff::name.

Referenced by fillHistograms().

1109  {
1110  TString name_;
1111  if (_type == ME::iLaser)
1112  name_ = _primStr + name;
1113  else if (_type == ME::iTestPulse)
1114  name_ = _tpPrimStr + name;
1115 
1116  int _ival = getInt(name_, ix, iy);
1117  assert(_ival != -99);
1118  if (_ival != 0)
1119  return false;
1120 
1121  TH2I* h_ = (TH2I*)i_h[name_];
1122  assert(h_ != nullptr);
1123  h_->Fill(ix + 0.5, iy + 0.5, ival);
1124 
1125  return true;
1126 }
TString _tpPrimStr
Definition: MELaserPrim.h:113
Int_t getInt(const char *, int ix, int iy)
assert(be >=bs)
Definition: ME.h:63
TString _primStr
Definition: MELaserPrim.h:110
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:147

◆ setInt() [2/2]

bool MELaserPrim::setInt ( const char *  tname,
const char *  vname,
int  ival 
)

Definition at line 1172 of file MELaserPrim.cc.

References cms::cuda::assert(), i_t, separator, and tname().

1172  {
1173  TString key_(tname);
1174  key_ += separator;
1175  key_ += vname;
1176  assert(i_t.count(key_) == 1);
1177  i_t[key_] = ival;
1178  return true;
1179 }
static const TString separator
Definition: MELaserPrim.h:76
assert(be >=bs)
std::map< TString, int > i_t
Definition: MELaserPrim.h:152
std::string tname(const std::string &tableName, const std::string &schemaVersion)

◆ setVal() [1/2]

bool MELaserPrim::setVal ( const char *  name,
int  ix,
int  iy,
float  val 
)

Definition at line 1128 of file MELaserPrim.cc.

References _primStr, _tpPrimStr, _type, cms::cuda::assert(), f_h, getVal(), ME::iLaser, ME::iTestPulse, Skims_PA_cff::name, and heppy_batch::val.

Referenced by fillHistograms().

1128  {
1129  TString name_;
1130  if (_type == ME::iLaser)
1131  name_ = _primStr + name;
1132  else if (_type == ME::iTestPulse)
1133  name_ = _tpPrimStr + name;
1134 
1135  float _val = getVal(name_, ix, iy);
1136  assert(_val != -99);
1137  if (_val != 0)
1138  return false;
1139 
1140  TH2F* h_ = (TH2F*)f_h[name_];
1141  assert(h_ != nullptr);
1142 
1143  h_->Fill(ix + 0.5, iy + 0.5, val);
1144 
1145  return true;
1146 }
TString _tpPrimStr
Definition: MELaserPrim.h:113
assert(be >=bs)
Definition: ME.h:63
Float_t getVal(const char *, int ix, int iy)
TString _primStr
Definition: MELaserPrim.h:110
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:148

◆ setVal() [2/2]

bool MELaserPrim::setVal ( const char *  tname,
const char *  vname,
float  val 
)

Definition at line 1181 of file MELaserPrim.cc.

References cms::cuda::assert(), gather_cfg::cout, f_t, separator, tname(), and heppy_batch::val.

1181  {
1182  TString key_(tname);
1183  key_ += separator;
1184  key_ += vname;
1185 
1186  // ghm
1187  if (f_t.count(key_) != 1) {
1188  std::cout << key_ << std::endl;
1189  }
1190  assert(f_t.count(key_) == 1);
1191  f_t[key_] = val;
1192  return true;
1193 }
static const TString separator
Definition: MELaserPrim.h:76
assert(be >=bs)
std::map< TString, float > f_t
Definition: MELaserPrim.h:153
std::string tname(const std::string &tableName, const std::string &schemaVersion)

◆ writeHistograms()

void MELaserPrim::writeHistograms ( )

Definition at line 916 of file MELaserPrim.cc.

References _outfile, f_h, i_h, init_ok, out_file, and t_t.

916  {
917  if (!init_ok)
918  return;
919 
920  out_file = new TFile(_outfile, "RECREATE");
921  // out_file->cd();
922 
923  std::map<TString, TH2*>::iterator it;
924 
925  for (it = i_h.begin(); it != i_h.end(); ++it) {
926  it->second->Write();
927  delete it->second;
928  }
929 
930  for (it = f_h.begin(); it != f_h.end(); ++it) {
931  it->second->Write();
932  delete it->second;
933  }
934 
935  std::map<TString, TTree*>::iterator it_t;
936  for (it_t = t_t.begin(); it_t != t_t.end(); ++it_t) {
937  it_t->second->Write();
938  delete it_t->second;
939  }
940 
941  // std::cout << "Closing " << _outfile << std::endl;
942  out_file->Close();
943  delete out_file;
944  out_file = nullptr;
945 }
TString _outfile
Definition: MELaserPrim.h:136
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:151
bool init_ok
Definition: MELaserPrim.h:52
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:148
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:147
TFile * out_file
Definition: MELaserPrim.h:122

Member Data Documentation

◆ _color

int MELaserPrim::_color
private

Definition at line 90 of file MELaserPrim.h.

Referenced by bookHistograms(), fillHistograms(), init(), MELaserPrim(), and print().

◆ _dcc

int MELaserPrim::_dcc
private

Definition at line 83 of file MELaserPrim.h.

Referenced by MELaserPrim(), and print().

◆ _delay

int MELaserPrim::_delay
private

Definition at line 93 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _ecal_region

int MELaserPrim::_ecal_region
private

Definition at line 104 of file MELaserPrim.h.

◆ _events

int MELaserPrim::_events
private

Definition at line 87 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _filter

int MELaserPrim::_filter
private

Definition at line 92 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _inpath

TString MELaserPrim::_inpath
private

Definition at line 133 of file MELaserPrim.h.

Referenced by init().

◆ _isBarrel

bool MELaserPrim::_isBarrel
private

Definition at line 81 of file MELaserPrim.h.

Referenced by bookHistograms(), fillHistograms(), and MELaserPrim().

◆ _lb

int MELaserPrim::_lb
private

Definition at line 86 of file MELaserPrim.h.

Referenced by MELaserPrim().

◆ _lmr

int MELaserPrim::_lmr
private

Definition at line 82 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _memgain

int MELaserPrim::_memgain
private

Definition at line 101 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _mgpagain

int MELaserPrim::_mgpagain
private

Definition at line 100 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _outfile

TString MELaserPrim::_outfile
private

Definition at line 136 of file MELaserPrim.h.

Referenced by writeHistograms().

◆ _pnPrimStr

TString MELaserPrim::_pnPrimStr
private

Definition at line 111 of file MELaserPrim.h.

Referenced by MELaserPrim().

◆ _power

int MELaserPrim::_power
private

Definition at line 91 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _primStr

TString MELaserPrim::_primStr
private

Definition at line 110 of file MELaserPrim.h.

Referenced by bookHistograms(), MELaserPrim(), setInt(), and setVal().

◆ _pulseStr

TString MELaserPrim::_pulseStr
private

Definition at line 112 of file MELaserPrim.h.

Referenced by MELaserPrim().

◆ _reg

int MELaserPrim::_reg
private

Definition at line 80 of file MELaserPrim.h.

Referenced by MELaserPrim().

◆ _regionStr

TString MELaserPrim::_regionStr
private

Definition at line 109 of file MELaserPrim.h.

Referenced by MELaserPrim().

◆ _run

int MELaserPrim::_run
private

◆ _sectorStr

TString MELaserPrim::_sectorStr
private

Definition at line 108 of file MELaserPrim.h.

Referenced by MELaserPrim().

◆ _side

int MELaserPrim::_side
private

Definition at line 84 of file MELaserPrim.h.

Referenced by fillHistograms(), MELaserPrim(), and print().

◆ _sm

int MELaserPrim::_sm
private

Definition at line 105 of file MELaserPrim.h.

Referenced by fillHistograms(), MELaserPrim(), and print().

◆ _tpPnPrimStr

TString MELaserPrim::_tpPnPrimStr
private

Definition at line 114 of file MELaserPrim.h.

Referenced by MELaserPrim().

◆ _tpPrimStr

TString MELaserPrim::_tpPrimStr
private

Definition at line 113 of file MELaserPrim.h.

Referenced by bookHistograms(), MELaserPrim(), setInt(), and setVal().

◆ _ts

ME::TimeStamp MELaserPrim::_ts
private

Definition at line 96 of file MELaserPrim.h.

Referenced by fillHistograms(), MELaserPrim(), and print().

◆ _ts_beg

ME::TimeStamp MELaserPrim::_ts_beg
private

Definition at line 97 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _ts_end

ME::TimeStamp MELaserPrim::_ts_end
private

Definition at line 98 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

◆ _type

int MELaserPrim::_type
private

◆ ab_ab

Double_t MELaserPrim::ab_ab[iSize_ab]
private

Definition at line 176 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ ab_channelID

Int_t MELaserPrim::ab_channelID
private

Definition at line 172 of file MELaserPrim.h.

Referenced by init().

◆ ab_dccID

Int_t MELaserPrim::ab_dccID
private

Definition at line 170 of file MELaserPrim.h.

Referenced by init().

◆ ab_file

TFile* MELaserPrim::ab_file
private

Definition at line 118 of file MELaserPrim.h.

Referenced by init(), MELaserPrim(), and ~MELaserPrim().

◆ ab_flag

Int_t MELaserPrim::ab_flag
private

Definition at line 175 of file MELaserPrim.h.

Referenced by init().

◆ ab_ieta

Int_t MELaserPrim::ab_ieta
private

Definition at line 173 of file MELaserPrim.h.

Referenced by init().

◆ ab_iphi

Int_t MELaserPrim::ab_iphi
private

Definition at line 174 of file MELaserPrim.h.

Referenced by init().

◆ ab_towerID

Int_t MELaserPrim::ab_towerID
private

Definition at line 171 of file MELaserPrim.h.

Referenced by init().

◆ ab_tree

TTree* MELaserPrim::ab_tree
private

Definition at line 126 of file MELaserPrim.h.

Referenced by fillHistograms(), init(), MELaserPrim(), and ~MELaserPrim().

◆ ab_varName

const TString MELaserPrim::ab_varName = {"alpha", "beta", "width", "chi2"}
staticprivate

Definition at line 271 of file MELaserPrim.h.

Referenced by init().

◆ apdpn_apdpn

Double_t MELaserPrim::apdpn_apdpn[iSizeArray_apdpn][iSize_apdpn]
private

Definition at line 167 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ apdpn_arrayName

const TString MELaserPrim::apdpn_arrayName
staticprivate
Initial value:
= {
"APD", "APDoPN", "APDoPNA", "APDoPNB", "APDoAPD", "APDoAPDA", "APDoAPDB", "Time"}

Definition at line 266 of file MELaserPrim.h.

Referenced by init().

◆ apdpn_channelID

Int_t MELaserPrim::apdpn_channelID
private

Definition at line 159 of file MELaserPrim.h.

Referenced by init().

◆ apdpn_dccID

Int_t MELaserPrim::apdpn_dccID
private

Definition at line 157 of file MELaserPrim.h.

Referenced by init().

◆ apdpn_extraVarName

const TString MELaserPrim::apdpn_extraVarName = {"ShapeCor"}
staticprivate

Definition at line 269 of file MELaserPrim.h.

◆ apdpn_extraVarUnit

const TString MELaserPrim::apdpn_extraVarUnit = {""}
staticprivate

Definition at line 270 of file MELaserPrim.h.

◆ apdpn_file

TFile* MELaserPrim::apdpn_file
private

Definition at line 117 of file MELaserPrim.h.

Referenced by init(), MELaserPrim(), and ~MELaserPrim().

◆ apdpn_flag

Int_t MELaserPrim::apdpn_flag
private

Definition at line 165 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ apdpn_ieta

Int_t MELaserPrim::apdpn_ieta
private

Definition at line 163 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ apdpn_iphi

Int_t MELaserPrim::apdpn_iphi
private

Definition at line 164 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ apdpn_moduleID

Int_t MELaserPrim::apdpn_moduleID
private

Definition at line 160 of file MELaserPrim.h.

Referenced by init().

◆ apdpn_ShapeCor

Double_t MELaserPrim::apdpn_ShapeCor
private

Definition at line 166 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ apdpn_side

Int_t MELaserPrim::apdpn_side
private

Definition at line 162 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ apdpn_towerID

Int_t MELaserPrim::apdpn_towerID
private

Definition at line 158 of file MELaserPrim.h.

Referenced by init().

◆ apdpn_tree

TTree* MELaserPrim::apdpn_tree
private

Definition at line 125 of file MELaserPrim.h.

Referenced by fillHistograms(), init(), MELaserPrim(), and ~MELaserPrim().

◆ apdpn_varName

const TString MELaserPrim::apdpn_varName = {"Mean", "RMS", "M3", "Nevt", "Min", "Max"}
staticprivate

Definition at line 267 of file MELaserPrim.h.

◆ apdpn_varUnit

const TString MELaserPrim::apdpn_varUnit
staticprivate
Initial value:
=
{{" (ADC Counts)", " (ADC Counts)", " (ADC Counts)", "", " (ADC Counts)", " (ADC Counts)"},
{"", "", "", "", "", ""},
{"", "", "", "", "", ""},
{"", "", "", "", "", ""},
{"", "", "", "", "", ""},
{"", "", "", "", "", ""},
{" (25 ns)", " (25 ns)", " (25 ns)", "", " (25 ns)", " (25 ns)"}}

Definition at line 268 of file MELaserPrim.h.

◆ b_ab_ab

TBranch* MELaserPrim::b_ab_ab[iSize_ab]
private

Definition at line 231 of file MELaserPrim.h.

Referenced by init().

◆ b_ab_channelID

TBranch* MELaserPrim::b_ab_channelID
private

Definition at line 227 of file MELaserPrim.h.

Referenced by init().

◆ b_ab_dccID

TBranch* MELaserPrim::b_ab_dccID
private

Definition at line 225 of file MELaserPrim.h.

Referenced by init().

◆ b_ab_flag

TBranch* MELaserPrim::b_ab_flag
private

Definition at line 230 of file MELaserPrim.h.

Referenced by init().

◆ b_ab_ieta

TBranch* MELaserPrim::b_ab_ieta
private

Definition at line 228 of file MELaserPrim.h.

Referenced by init().

◆ b_ab_iphi

TBranch* MELaserPrim::b_ab_iphi
private

Definition at line 229 of file MELaserPrim.h.

Referenced by init().

◆ b_ab_towerID

TBranch* MELaserPrim::b_ab_towerID
private

Definition at line 226 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_apdpn

TBranch* MELaserPrim::b_apdpn_apdpn[iSizeArray_apdpn]
private

Definition at line 222 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_channelID

TBranch* MELaserPrim::b_apdpn_channelID
private

Definition at line 214 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_dccID

TBranch* MELaserPrim::b_apdpn_dccID
private

Definition at line 212 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_flag

TBranch* MELaserPrim::b_apdpn_flag
private

Definition at line 220 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_ieta

TBranch* MELaserPrim::b_apdpn_ieta
private

Definition at line 218 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_iphi

TBranch* MELaserPrim::b_apdpn_iphi
private

Definition at line 219 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_moduleID

TBranch* MELaserPrim::b_apdpn_moduleID
private

Definition at line 215 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_ShapeCor

TBranch* MELaserPrim::b_apdpn_ShapeCor
private

Definition at line 221 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_side

TBranch* MELaserPrim::b_apdpn_side
private

Definition at line 217 of file MELaserPrim.h.

Referenced by init().

◆ b_apdpn_towerID

TBranch* MELaserPrim::b_apdpn_towerID
private

Definition at line 213 of file MELaserPrim.h.

Referenced by init().

◆ b_mtq_color

TBranch* MELaserPrim::b_mtq_color
private

Definition at line 244 of file MELaserPrim.h.

◆ b_mtq_mtq

TBranch* MELaserPrim::b_mtq_mtq[iSize_mtq]
private

Definition at line 245 of file MELaserPrim.h.

Referenced by init().

◆ b_mtq_side

TBranch* MELaserPrim::b_mtq_side
private

Definition at line 243 of file MELaserPrim.h.

Referenced by init().

◆ b_pn_moduleID

TBranch* MELaserPrim::b_pn_moduleID
private

Definition at line 236 of file MELaserPrim.h.

Referenced by init().

◆ b_pn_PN

TBranch* MELaserPrim::b_pn_PN
private

Definition at line 237 of file MELaserPrim.h.

Referenced by init().

◆ b_pn_pnID

TBranch* MELaserPrim::b_pn_pnID
private

Definition at line 235 of file MELaserPrim.h.

Referenced by init().

◆ b_pn_PNoPN

TBranch* MELaserPrim::b_pn_PNoPN
private

Definition at line 238 of file MELaserPrim.h.

Referenced by init().

◆ b_pn_PNoPNA

TBranch* MELaserPrim::b_pn_PNoPNA
private

Definition at line 239 of file MELaserPrim.h.

Referenced by init().

◆ b_pn_PNoPNB

TBranch* MELaserPrim::b_pn_PNoPNB
private

Definition at line 240 of file MELaserPrim.h.

Referenced by init().

◆ b_pn_side

TBranch* MELaserPrim::b_pn_side
private

Definition at line 234 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_APD

TBranch* MELaserPrim::b_tpapd_APD
private

Definition at line 257 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_channelID

TBranch* MELaserPrim::b_tpapd_channelID
private

Definition at line 253 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_dccID

TBranch* MELaserPrim::b_tpapd_dccID
private

Definition at line 250 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_flag

TBranch* MELaserPrim::b_tpapd_flag
private

Definition at line 255 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_gain

TBranch* MELaserPrim::b_tpapd_gain
private

Definition at line 256 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_ieta

TBranch* MELaserPrim::b_tpapd_ieta
private

Definition at line 249 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_iphi

TBranch* MELaserPrim::b_tpapd_iphi
private

Definition at line 248 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_moduleID

TBranch* MELaserPrim::b_tpapd_moduleID
private

Definition at line 254 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_side

TBranch* MELaserPrim::b_tpapd_side
private

Definition at line 251 of file MELaserPrim.h.

Referenced by init().

◆ b_tpapd_towerID

TBranch* MELaserPrim::b_tpapd_towerID
private

Definition at line 252 of file MELaserPrim.h.

Referenced by init().

◆ b_tppn_gain

TBranch* MELaserPrim::b_tppn_gain
private

Definition at line 263 of file MELaserPrim.h.

Referenced by init().

◆ b_tppn_moduleID

TBranch* MELaserPrim::b_tppn_moduleID
private

Definition at line 262 of file MELaserPrim.h.

Referenced by init().

◆ b_tppn_PN

TBranch* MELaserPrim::b_tppn_PN
private

Definition at line 264 of file MELaserPrim.h.

Referenced by init().

◆ b_tppn_pnID

TBranch* MELaserPrim::b_tppn_pnID
private

Definition at line 261 of file MELaserPrim.h.

Referenced by init().

◆ b_tppn_side

TBranch* MELaserPrim::b_tppn_side
private

Definition at line 260 of file MELaserPrim.h.

Referenced by init().

◆ c_t

std::map<TString, const char *> MELaserPrim::c_t
private

Definition at line 154 of file MELaserPrim.h.

Referenced by addBranchC(), and fillHistograms().

◆ f_h

std::map<TString, TH2 *> MELaserPrim::f_h
private

Definition at line 148 of file MELaserPrim.h.

Referenced by bookHistoF(), getVal(), refresh(), setVal(), and writeHistograms().

◆ f_t

std::map<TString, float> MELaserPrim::f_t
private

Definition at line 153 of file MELaserPrim.h.

Referenced by addBranchF(), fillHistograms(), and setVal().

◆ i_h

std::map<TString, TH2 *> MELaserPrim::i_h
private

Definition at line 147 of file MELaserPrim.h.

Referenced by bookHistoI(), getInt(), refresh(), setInt(), and writeHistograms().

◆ i_t

std::map<TString, int> MELaserPrim::i_t
private

Definition at line 152 of file MELaserPrim.h.

Referenced by addBranchI(), fillHistograms(), and setInt().

◆ init_ok

bool MELaserPrim::init_ok

Definition at line 52 of file MELaserPrim.h.

Referenced by bookHistograms(), fillHistograms(), init(), and writeHistograms().

◆ ixmax

int MELaserPrim::ixmax
private

Definition at line 141 of file MELaserPrim.h.

Referenced by bookHistoF(), bookHistograms(), bookHistoI(), and MELaserPrim().

◆ ixmin

int MELaserPrim::ixmin
private

Definition at line 140 of file MELaserPrim.h.

Referenced by bookHistoF(), bookHistograms(), bookHistoI(), and MELaserPrim().

◆ iymax

int MELaserPrim::iymax
private

Definition at line 144 of file MELaserPrim.h.

Referenced by bookHistoF(), bookHistograms(), bookHistoI(), and MELaserPrim().

◆ iymin

int MELaserPrim::iymin
private

Definition at line 143 of file MELaserPrim.h.

Referenced by bookHistoF(), bookHistograms(), bookHistoI(), and MELaserPrim().

◆ mtq_color

Int_t MELaserPrim::mtq_color
private

Definition at line 189 of file MELaserPrim.h.

◆ mtq_file

TFile* MELaserPrim::mtq_file
private

Definition at line 120 of file MELaserPrim.h.

Referenced by init(), MELaserPrim(), and ~MELaserPrim().

◆ mtq_mtq

Double_t MELaserPrim::mtq_mtq[iSize_mtq]
private

Definition at line 190 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ mtq_side

Int_t MELaserPrim::mtq_side
private

Definition at line 188 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ mtq_tree

TTree* MELaserPrim::mtq_tree
private

Definition at line 128 of file MELaserPrim.h.

Referenced by fillHistograms(), init(), MELaserPrim(), and ~MELaserPrim().

◆ mtq_varName

const TString MELaserPrim::mtq_varName
staticprivate
Initial value:
= {
"peak", "sigma", "fit", "ampl", "trise", "fwhm", "fw20", "fw80", "sliding"}

Definition at line 272 of file MELaserPrim.h.

Referenced by init().

◆ mtq_varUnit

const TString MELaserPrim::mtq_varUnit
staticprivate
Initial value:
= {"(nanoseconds)",
"(nanoseconds)",
"(nanoseconds)",
"(ADC counts)",
"(nanoseconds)",
"(nanoseconds)",
"(nanoseconds)",
"(nanoseconds)",
"(ADC counts)"}

Definition at line 273 of file MELaserPrim.h.

◆ nx

int MELaserPrim::nx
private

Definition at line 139 of file MELaserPrim.h.

Referenced by bookHistoF(), bookHistograms(), and bookHistoI().

◆ ny

int MELaserPrim::ny
private

Definition at line 142 of file MELaserPrim.h.

Referenced by bookHistoF(), bookHistograms(), and bookHistoI().

◆ out_file

TFile* MELaserPrim::out_file
private

Definition at line 122 of file MELaserPrim.h.

Referenced by writeHistograms().

◆ pn_file

TFile* MELaserPrim::pn_file
private

Definition at line 119 of file MELaserPrim.h.

◆ pn_moduleID

Int_t MELaserPrim::pn_moduleID
private

Definition at line 181 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ pn_PN

Double_t MELaserPrim::pn_PN[iSize_apdpn]
private

Definition at line 182 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ pn_pnID

Int_t MELaserPrim::pn_pnID
private

Definition at line 180 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ pn_PNoPN

Double_t MELaserPrim::pn_PNoPN[iSize_apdpn]
private

Definition at line 183 of file MELaserPrim.h.

Referenced by init().

◆ pn_PNoPNA

Double_t MELaserPrim::pn_PNoPNA[iSize_apdpn]
private

Definition at line 184 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ pn_PNoPNB

Double_t MELaserPrim::pn_PNoPNB[iSize_apdpn]
private

Definition at line 185 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ pn_side

Int_t MELaserPrim::pn_side
private

Definition at line 179 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

◆ pn_tree

TTree* MELaserPrim::pn_tree
private

Definition at line 127 of file MELaserPrim.h.

Referenced by fillHistograms(), init(), MELaserPrim(), and ~MELaserPrim().

◆ separator

const TString MELaserPrim::separator = "__"
static

◆ t_t

std::map<TString, TTree *> MELaserPrim::t_t
private

◆ tpapd_APD

Double_t MELaserPrim::tpapd_APD[iSize_apdpn]
private

Definition at line 202 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_channelID

Int_t MELaserPrim::tpapd_channelID
private

Definition at line 198 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_dccID

Int_t MELaserPrim::tpapd_dccID
private

Definition at line 195 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_file

TFile* MELaserPrim::tpapd_file
private

Definition at line 121 of file MELaserPrim.h.

Referenced by init(), MELaserPrim(), and ~MELaserPrim().

◆ tpapd_flag

Int_t MELaserPrim::tpapd_flag
private

Definition at line 200 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_gain

Int_t MELaserPrim::tpapd_gain
private

Definition at line 201 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_ieta

Int_t MELaserPrim::tpapd_ieta
private

Definition at line 194 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_iphi

Int_t MELaserPrim::tpapd_iphi
private

Definition at line 193 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_moduleID

Int_t MELaserPrim::tpapd_moduleID
private

Definition at line 199 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_side

Int_t MELaserPrim::tpapd_side
private

Definition at line 196 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_towerID

Int_t MELaserPrim::tpapd_towerID
private

Definition at line 197 of file MELaserPrim.h.

Referenced by init().

◆ tpapd_tree

TTree* MELaserPrim::tpapd_tree
private

Definition at line 129 of file MELaserPrim.h.

Referenced by init(), MELaserPrim(), and ~MELaserPrim().

◆ tppn_gain

Int_t MELaserPrim::tppn_gain
private

Definition at line 208 of file MELaserPrim.h.

Referenced by init().

◆ tppn_moduleID

Int_t MELaserPrim::tppn_moduleID
private

Definition at line 207 of file MELaserPrim.h.

Referenced by init().

◆ tppn_PN

Double_t MELaserPrim::tppn_PN[iSize_apdpn]
private

Definition at line 209 of file MELaserPrim.h.

Referenced by init().

◆ tppn_pnID

Int_t MELaserPrim::tppn_pnID
private

Definition at line 206 of file MELaserPrim.h.

Referenced by init().

◆ tppn_side

Int_t MELaserPrim::tppn_side
private

Definition at line 205 of file MELaserPrim.h.

Referenced by init().

◆ tppn_tree

TTree* MELaserPrim::tppn_tree
private

Definition at line 130 of file MELaserPrim.h.

Referenced by init(), MELaserPrim(), and ~MELaserPrim().