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 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 TString ab_varName [iSize_ab] = { "alpha", "beta", "width", "chi2" }
 
static TString apdpn_arrayName [iSizeArray_apdpn] = {"APD", "APDoPN", "APDoPNA", "APDoPNB","APDoAPD","APDoAPDA", "APDoAPDB", "Time"}
 
static TString apdpn_extraVarName [iSizeExtra_apdpn] = { "ShapeCor" }
 
static TString apdpn_extraVarUnit [iSizeExtra_apdpn] = { "" }
 
static TString apdpn_varName [iSize_apdpn] = { "Mean", "RMS", "M3", "Nevt", "Min", "Max"}
 
static TString apdpn_varUnit [iSizeArray_apdpn][iSize_apdpn]
 
static TString mtq_varName [iSize_mtq] = {"peak", "sigma", "fit", "ampl", "trise", "fwhm", "fw20", "fw80", "sliding" }
 
static TString mtq_varUnit [iSize_mtq]
 

Detailed Description

Definition at line 18 of file MELaserPrim.h.

Member Enumeration Documentation

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

Definition at line 24 of file MELaserPrim.h.

anonymous enum
Enumerator
iMean 
iRMS 
iM3 
iNevt 
iMin 
iMax 
iSize_apdpn 

Definition at line 25 of file MELaserPrim.h.

anonymous enum
Enumerator
iShapeCor 
iSizeExtra_apdpn 

Definition at line 26 of file MELaserPrim.h.

anonymous enum
Enumerator
iAlpha 
iBeta 
iWidth 
iChi2 
iSize_ab 

Definition at line 27 of file MELaserPrim.h.

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

Definition at line 28 of file MELaserPrim.h.

anonymous enum
Enumerator
iGain0 
iGain1 
iGain2 
iGain3 
iSize_gain 

Definition at line 30 of file MELaserPrim.h.

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 33 of file MELaserPrim.h.

Constructor & Destructor Documentation

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

Definition at line 32 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::Header::dcc, ME::Settings::delay, ME::Header::events, ME::Settings::filter, ME::iEBM, ME::iEBP, ME::iLaser, ME::iLmfLaserPnPrim, ME::iLmfLaserPrim, ME::iLmfLaserPulse, ME::iLmfTestPulsePnPrim, ME::iLmfTestPulsePrim, init(), ME::iTestPulse, ixmax, ixmin, iymax, iymin, ME::Header::lb, lmfLaserName(), ME::lmr(), ME::Settings::memgain, ME::Settings::mgpagain, mtq_file, mtq_tree, pn_tree, ME::Settings::power, ME::regionAndSector(), ME::Header::run, separator, ME::Header::side, ME::smName(), tpapd_file, tpapd_tree, tppn_tree, ME::Header::ts_beg, ME::Header::ts_end, ME::Settings::type, and ME::Settings::wavelength.

34 : init_ok(false), _isBarrel(true), _inpath(inpath), _outfile(outfile)
35 {
36  apdpn_file =nullptr;
37  ab_file =nullptr;
38  mtq_file =nullptr;
39  tpapd_file =nullptr;
40  apdpn_tree =nullptr;
41  ab_tree =nullptr;
42  pn_tree =nullptr;
43  mtq_tree =nullptr;
44  tpapd_tree =nullptr;
45  tppn_tree =nullptr;
46  ixmin =0;
47  ixmax =0;
48  iymin =0;
49  iymax =0;
50 
51  _dcc = header.dcc;
52  _side = header.side;
53  _run = header.run;
54  _lb = header.lb;
55  _events = header.events;
56  _ts = header.ts_beg;
57  _ts_beg = header.ts_beg;
58  _ts_end = header.ts_end;
59 
60  _type = settings.type;
61  _color = settings.wavelength;
62  _power = settings.power;
63  _filter = settings.filter;
64  _delay = settings.delay;
65  _mgpagain = settings.mgpagain;
66  _memgain = settings.memgain;
67 
68  if( _type==ME::iLaser )
69  {
73  }
74  else if( _type==ME::iTestPulse )
75  {
78  }
79 
80  _lmr = ME::lmr( _dcc, _side );
85  _regionStr += "_"; _regionStr += _side;
86 
87  init();
89  //fillHistograms();
90  //writeHistograms();
91 }
static void regionAndSector(int ilmr, int &ireg, int &isect, int &idcc, int &iside)
Definition: ME.cc:348
int events
Definition: ME.h:80
bool _isBarrel
Definition: MELaserPrim.h:79
int dcc
Definition: ME.h:80
int mgpagain
Definition: ME.h:87
TString _inpath
Definition: MELaserPrim.h:131
int wavelength
Definition: ME.h:86
TString _outfile
Definition: MELaserPrim.h:134
TTree * apdpn_tree
Definition: MELaserPrim.h:123
TFile * mtq_file
Definition: MELaserPrim.h:118
TString _tpPrimStr
Definition: MELaserPrim.h:111
TTree * tppn_tree
Definition: MELaserPrim.h:128
Definition: ME.h:16
TimeStamp ts_beg
Definition: ME.h:81
int filter
Definition: ME.h:86
ME::TimeStamp _ts_end
Definition: MELaserPrim.h:96
TTree * ab_tree
Definition: MELaserPrim.h:124
bool init_ok
Definition: MELaserPrim.h:48
TTree * mtq_tree
Definition: MELaserPrim.h:126
Definition: ME.h:69
TimeStamp ts_end
Definition: ME.h:81
void bookHistograms()
Definition: MELaserPrim.cc:326
TFile * apdpn_file
Definition: MELaserPrim.h:115
TString _primStr
Definition: MELaserPrim.h:108
Definition: ME.h:16
int side
Definition: ME.h:80
static TString lmfLaserName(int table, int type, int color=ME::iBlue)
int lb
Definition: ME.h:80
int run
Definition: ME.h:80
int power
Definition: ME.h:86
int type
Definition: ME.h:86
static int lmr(int idcc, int iside)
Definition: ME.cc:261
TString _pnPrimStr
Definition: MELaserPrim.h:109
TTree * tpapd_tree
Definition: MELaserPrim.h:127
TString _pulseStr
Definition: MELaserPrim.h:110
ME::TimeStamp _ts_beg
Definition: MELaserPrim.h:95
int delay
Definition: ME.h:86
TFile * ab_file
Definition: MELaserPrim.h:116
ME::TimeStamp _ts
Definition: MELaserPrim.h:94
static TString smName(int ilmr)
Definition: ME.cc:415
static TString separator
Definition: MELaserPrim.h:73
TString _sectorStr
Definition: MELaserPrim.h:106
TString _regionStr
Definition: MELaserPrim.h:107
TString _tpPnPrimStr
Definition: MELaserPrim.h:112
int memgain
Definition: ME.h:87
TFile * tpapd_file
Definition: MELaserPrim.h:119
TTree * pn_tree
Definition: MELaserPrim.h:125
MELaserPrim::~MELaserPrim ( )
virtual

Definition at line 966 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.

967 {
968  delete apdpn_tree;
969  delete ab_tree;
970  delete pn_tree;
971  delete mtq_tree;
972  delete tpapd_tree;
973  delete tppn_tree;
974  if( apdpn_file!=nullptr )
975  {
976  // std::cout << "Closing apdpn_file " << std::endl;
977  apdpn_file->Close();
978  delete apdpn_file;
979  apdpn_file = nullptr;
980  }
981  if( ab_file!=nullptr )
982  {
983  // std::cout << "Closing ab_file " << std::endl;
984  ab_file->Close();
985  delete ab_file;
986  ab_file = nullptr;
987  }
988  if( mtq_file!=nullptr )
989  {
990  // std::cout << "Closing mtq_file " << std::endl;
991  mtq_file->Close();
992  delete mtq_file;
993  mtq_file = nullptr;
994  }
995  if( tpapd_file!=nullptr )
996  {
997  // std::cout << "Closing tpapd_file " << std::endl;
998  tpapd_file->Close();
999  delete tpapd_file;
1000  tpapd_file = nullptr;
1001  }
1002 }
TTree * apdpn_tree
Definition: MELaserPrim.h:123
TFile * mtq_file
Definition: MELaserPrim.h:118
TTree * tppn_tree
Definition: MELaserPrim.h:128
TTree * ab_tree
Definition: MELaserPrim.h:124
TTree * mtq_tree
Definition: MELaserPrim.h:126
TFile * apdpn_file
Definition: MELaserPrim.h:115
TTree * tpapd_tree
Definition: MELaserPrim.h:127
TFile * ab_file
Definition: MELaserPrim.h:116
TFile * tpapd_file
Definition: MELaserPrim.h:119
TTree * pn_tree
Definition: MELaserPrim.h:125

Member Function Documentation

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

Definition at line 1089 of file MELaserPrim.cc.

References c_t, separator, and t_t.

Referenced by bookHistograms().

1090 {
1091  TString slashC("/C");
1092  TString t_name(t_name_);
1093  TString v_name(v_name_);
1094  if( t_t.count(t_name)==0 ) t_t[t_name] = new TTree(t_name, t_name);
1095  t_t[t_name]->Branch(v_name, &c_t[t_name+separator+v_name],v_name+slashC);
1096 }
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:149
std::map< TString, const char * > c_t
Definition: MELaserPrim.h:152
static TString separator
Definition: MELaserPrim.h:73
void MELaserPrim::addBranchF ( const char *  t_name,
const char *  v_name 
)
private

Definition at line 1079 of file MELaserPrim.cc.

References f_t, separator, and t_t.

Referenced by bookHistograms().

1080 {
1081  TString slashF("/F");
1082  TString t_name(t_name_);
1083  TString v_name(v_name_);
1084  if( t_t.count(t_name)==0 ) t_t[t_name] = new TTree(t_name, t_name);
1085  t_t[t_name]->Branch(v_name, &f_t[t_name+separator+v_name],v_name+slashF);
1086 }
std::map< TString, float > f_t
Definition: MELaserPrim.h:151
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:149
static TString separator
Definition: MELaserPrim.h:73
void MELaserPrim::addBranchI ( const char *  t_name,
const char *  v_name 
)
private

Definition at line 1069 of file MELaserPrim.cc.

References i_t, separator, and t_t.

Referenced by bookHistograms().

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

Definition at line 1108 of file MELaserPrim.cc.

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

Referenced by bookHistograms().

1109 {
1110  TString d_name = TString(h_name_)+TString(v_name_);
1111  TH2* h_ = new TH2F(d_name,d_name,nx,ixmin,ixmax,ny,iymin,iymax);
1112  setHistoStyle( h_ );
1113  f_h[d_name] = h_;
1114 }
void setHistoStyle(TH1 *)
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:146
void MELaserPrim::bookHistograms ( )

Definition at line 326 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().

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

Definition at line 1099 of file MELaserPrim.cc.

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

Referenced by bookHistograms().

1100 {
1101  TString i_name = TString(h_name_)+TString(v_name_);
1102  TH2* h_ = new TH2I(i_name,i_name,nx,ixmin,ixmax,ny,iymin,iymax);
1103  setHistoStyle( h_ );
1104  i_h[i_name] = h_;
1105 }
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:145
void setHistoStyle(TH1 *)
TString MELaserPrim::channelViewName ( int  iname)
static

Definition at line 94 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.

95 {
96  switch( iname )
97  {
98  case iECAL: return "ECAL";
99  case iECAL_LMR: return "ECAL_LMR";
100  case iEB_crystal_number: return "EB_crystal_number";
101  case iEB_LM_LMM: return "EB_LM_LMM";
102  case iEB_LM_PN: return "EB_LM_PN";
103  case iEE_crystal_number: return "EE_crystal_number";
104  case iEE_LM_LMM: return "EE_LM_LMM";
105  case iEE_LM_PN: return "EE_LM_PN";
106  default:
107  abort();
108  }
109  return "";
110 }
bool MELaserPrim::fill ( const char *  tname)

Definition at line 1209 of file MELaserPrim.cc.

References HcalObjRepresent::Fill(), and t_t.

1210 {
1211  TString key_( tname );
1212  assert( t_t.count(key_)==1 );
1213  t_t[key_] -> Fill();
1214  return true;
1215 }
static char const * tname
Definition: GTSchema.h:13
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:149
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void MELaserPrim::fillHistograms ( )

Definition at line 504 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, 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, iFw20, iFw80, iFwhm, ME::iLaser, ME::iLmfLaserConfig, ME::iLmfLaserPnPrim, ME::iLmfLaserPulse, ME::iLmfLaserRun, iM3, iMean, iNevt, init_ok, iPeak, 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().

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

Definition at line 1155 of file MELaserPrim.cc.

References i_h.

Referenced by setInt().

1156 {
1157  Int_t ival=-99;
1158  if( i_h.count(name)==1 )
1159  {
1160  TH2I* h_ = (TH2I*) i_h[name];
1161  assert( h_!=nullptr );
1162  int binx = h_->GetXaxis()->FindBin( ix+0.5 );
1163  int biny = h_->GetYaxis()->FindBin( iy+0.5 );
1164  ival = (Int_t) h_->GetCellContent( binx, biny );
1165  }
1166  return ival;
1167 }
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:145
Float_t MELaserPrim::getVal ( const char *  name,
int  ix,
int  iy 
)

Definition at line 1170 of file MELaserPrim.cc.

References f_h, and heppy_batch::val.

Referenced by setVal().

1171 {
1172  Float_t val=-99.;
1173  if( f_h.count(name)==1 )
1174  {
1175  TH2F* h_ = (TH2F*) f_h[name];
1176  assert( h_!=nullptr );
1177  int binx = h_->GetXaxis()->FindBin( ix+0.5 );
1178  int biny = h_->GetYaxis()->FindBin( iy+0.5 );
1179  val = h_->GetCellContent( binx, biny );
1180  }
1181  return val;
1182 }
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:146
bool MELaserPrim::getViewIds ( int  logicId,
int &  channelView,
int &  id1,
int &  id2 
)
static

Definition at line 120 of file MELaserPrim.cc.

References MillePedeFileConverter_cfg::out.

121 {
122  bool out = true;
123  int channelView_ = logic_id/1000000;
124  if( channelView!=0 && channelView_!=channelView ) out=false;
125  channelView = channelView_;
126  id1 = (logic_id%1000000)/10000;
127  id2 = logic_id%10000;
128  return out;
129 }
void MELaserPrim::init ( )

Definition at line 132 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, 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, PFTauMVAInputDiscriminatorTranslator_cfi::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().

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

Definition at line 1024 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, and harvestTrackValidationPlots::str.

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

1025 {
1026  TString str("LMF_ERROR");
1027  if( table<0 || table>=ME::iSizeLmf ) return str;
1028  if( color<0 || color>=ME::iSizeC ) return str;
1029 
1030  if( type==ME::iLaser )
1031  {
1032  TString colstr;
1033  switch( color )
1034  {
1035  case ME::iBlue: colstr = "_BLUE"; break;
1036  case ME::iGreen: colstr = "_GREEN"; break;
1037  case ME::iRed: colstr = "_RED"; break;
1038  case ME::iIRed: colstr = "_IRED"; break;
1039  default: abort();
1040  }
1041  str = "LMF_LASER";
1042  switch( table )
1043  {
1044  case ME::iLmfLaserRun: str = "LMF_RUN"; break;
1045  case ME::iLmfLaserConfig: str += "_CONFIG"; break;
1046  case ME::iLmfLaserPulse: str += colstr; str += "_PULSE"; break;
1047  case ME::iLmfLaserPrim: str += colstr; str += "_PRIM"; break;
1048  case ME::iLmfLaserPnPrim: str += colstr; str += "_PN_PRIM"; break;
1049  default: abort();
1050  }
1051  }
1052  else if( type==ME::iTestPulse )
1053  {
1054  str = "LMF_TEST_PULSE";
1055  switch( table )
1056  {
1057  case ME::iLmfTestPulseRun: str = "LMF_RUN"; break;
1058  case ME::iLmfTestPulseConfig: str += "_CONFIG"; break;
1059  case ME::iLmfTestPulsePrim: str += "_PRIM"; break;
1060  case ME::iLmfTestPulsePnPrim: str += "_PN_PRIM"; break;
1061  default: abort();
1062  }
1063  }
1064  str += "_DAT";
1065  return str;
1066 }
type
Definition: HCALResponse.h:21
Definition: ME.h:70
Definition: ME.h:70
Definition: ME.h:69
Definition: ME.h:70
Definition: ME.h:70
Definition: ME.h:70
int MELaserPrim::logicId ( int  channelView,
int  id1,
int  id2 = 0 
)
static

Definition at line 113 of file MELaserPrim.cc.

References globals_cff::id2, iECAL, and iSize_cv.

Referenced by fillHistograms().

114 {
115  assert( channelView>=iECAL && channelView<iSize_cv );
116  return 1000000*channelView + 10000*id1 + id2;
117 }
void MELaserPrim::print ( std::ostream &  o)

Definition at line 1005 of file MELaserPrim.cc.

References _color, _dcc, _run, _side, _sm, _ts, and _type.

1006 {
1007  o << "DCC/SM/side/type/color/run/ts " << _dcc << "/" << _sm << "/" << _side << "/"
1008  << _type << "/" << _color << "/" << _run << "/" << _ts << std::endl;
1009 
1010 // for( int ix=ixmin; ix<ixmax; ix++ )
1011 // {
1012 // for( int iy=iymin; iy<iymax; iy++ )
1013 // {
1014 // int flag = getInt( _primStr+"FLAG", ix, iy );
1015 // if( flag==0 ) continue;
1016 // int logic_id = getInt( _primStr+"LOGIC_ID", ix, iy );
1017 // float apd = getVal( _primStr+"MEAN", ix, iy );
1018 // o << "Crystal ieta=" << ix << "\tiphi=" << iy << "\tlogic_id=" << logic_id << "\tAPD=" << apd << endl;
1019 // }
1020 // }
1021 }
ME::TimeStamp _ts
Definition: MELaserPrim.h:94
void MELaserPrim::refresh ( )
private

Definition at line 1246 of file MELaserPrim.cc.

References f_h, i_h, and t_t.

Referenced by bookHistograms(), and Vispa.Main.TabController.TabController::checkModificationTimestamp().

1247 {
1248  std::map< TString, TH2* >::iterator it;
1249 
1250  for( it=i_h.begin(); it!=i_h.end(); ++it )
1251  {
1252  delete it->second;
1253  it->second = nullptr;
1254  }
1255  i_h.clear();
1256 
1257  for( it=f_h.begin(); it!=f_h.end(); ++it )
1258  {
1259  delete it->second;
1260  it->second = nullptr;
1261  }
1262  f_h.clear();
1263 
1264  std::map< TString, TTree* >::iterator it_t;
1265  for( it_t=t_t.begin(); it_t!=t_t.end(); ++it_t )
1266  {
1267  delete it_t->second;
1268  it->second = nullptr;
1269  }
1270  t_t.clear();
1271 }
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:149
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:145
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:146
void MELaserPrim::setHistoStyle ( TH1 *  h)
private

Definition at line 1218 of file MELaserPrim.cc.

References a, and cuy::ii.

Referenced by bookHistoF(), and bookHistoI().

1219 {
1220  if( h==nullptr ) return;
1221 
1222  float _scale = 1;
1223 
1224  h->SetLineColor(4);
1225  h->SetLineWidth(1);
1226  h->SetFillColor(38);
1227  TAxis* axis[3];
1228  axis[0] = h->GetXaxis();
1229  axis[1] = h->GetYaxis();
1230  axis[2] = h->GetZaxis();
1231  for( int ii=0; ii<3; ii++ )
1232  {
1233  TAxis* a = axis[ii];
1234  if( !a ) continue;
1235  a->SetLabelFont(132);
1236  a->SetLabelOffset(_scale*0.005);
1237  a->SetLabelSize(_scale*0.04);
1238  a->SetTitleFont(132);
1239  a->SetTitleOffset(_scale*1);
1240  a->SetTitleSize(_scale*0.04);
1241  }
1242  h->SetStats( kTRUE );
1243 }
ii
Definition: cuy.py:588
double a
Definition: hdecay.h:121
bool MELaserPrim::setInt ( const char *  name,
int  ix,
int  iy,
int  ival 
)

Definition at line 1118 of file MELaserPrim.cc.

References _primStr, _tpPrimStr, _type, getInt(), i_h, ME::iLaser, ME::iTestPulse, and dataset::name.

Referenced by fillHistograms().

1119 {
1120  TString name_;
1121  if( _type==ME::iLaser ) name_=_primStr+name;
1122  else if( _type==ME::iTestPulse ) name_=_tpPrimStr+name;
1123 
1124  int _ival = getInt( name_, ix, iy );
1125  assert( _ival!=-99 );
1126  if( _ival!=0 ) return false;
1127 
1128  TH2I* h_ = (TH2I*) i_h[name_];
1129  assert( h_!=nullptr );
1130  h_->Fill( ix+0.5, iy+0.5, ival );
1131 
1132  return true;
1133 }
TString _tpPrimStr
Definition: MELaserPrim.h:111
Int_t getInt(const char *, int ix, int iy)
Definition: ME.h:69
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:145
TString _primStr
Definition: MELaserPrim.h:108
bool MELaserPrim::setInt ( const char *  tname,
const char *  vname,
int  ival 
)

Definition at line 1185 of file MELaserPrim.cc.

References i_t, and separator.

1186 {
1187  TString key_(tname); key_ += separator; key_ += vname;
1188  assert( i_t.count(key_)==1 );
1189  i_t[key_] = ival;
1190  return true;
1191 }
static char const * tname
Definition: GTSchema.h:13
static TString separator
Definition: MELaserPrim.h:73
std::map< TString, int > i_t
Definition: MELaserPrim.h:150
bool MELaserPrim::setVal ( const char *  name,
int  ix,
int  iy,
float  val 
)

Definition at line 1136 of file MELaserPrim.cc.

References _primStr, _tpPrimStr, _type, f_h, getVal(), ME::iLaser, ME::iTestPulse, and dataset::name.

Referenced by fillHistograms().

1137 {
1138  TString name_;
1139  if( _type==ME::iLaser ) name_=_primStr+name;
1140  else if( _type==ME::iTestPulse ) name_=_tpPrimStr+name;
1141 
1142  float _val = getVal( name_, ix, iy );
1143  assert( _val!=-99 );
1144  if( _val!=0 ) return false;
1145 
1146  TH2F* h_ = (TH2F*) f_h[name_];
1147  assert( h_!=nullptr );
1148 
1149  h_->Fill( ix+0.5, iy+0.5, val );
1150 
1151  return true;
1152 }
TString _tpPrimStr
Definition: MELaserPrim.h:111
Definition: ME.h:69
Float_t getVal(const char *, int ix, int iy)
TString _primStr
Definition: MELaserPrim.h:108
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:146
bool MELaserPrim::setVal ( const char *  tname,
const char *  vname,
float  val 
)

Definition at line 1194 of file MELaserPrim.cc.

References gather_cfg::cout, f_t, separator, and heppy_batch::val.

1195 {
1196  TString key_(tname); key_ += separator; key_ += vname;
1197 
1198  // ghm
1199  if( f_t.count(key_)!=1 )
1200  {
1201  std::cout << key_ << std::endl;
1202  }
1203  assert( f_t.count(key_)==1 );
1204  f_t[key_] = val;
1205  return true;
1206 }
std::map< TString, float > f_t
Definition: MELaserPrim.h:151
static char const * tname
Definition: GTSchema.h:13
static TString separator
Definition: MELaserPrim.h:73
void MELaserPrim::writeHistograms ( )

Definition at line 932 of file MELaserPrim.cc.

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

933 {
934  if( !init_ok ) return;
935 
936  out_file = new TFile( _outfile, "RECREATE" );
937  // out_file->cd();
938 
939  std::map< TString, TH2* >::iterator it;
940 
941  for( it=i_h.begin(); it!=i_h.end(); ++it )
942  {
943  it->second->Write();
944  delete it->second;
945  }
946 
947  for( it=f_h.begin(); it!=f_h.end(); ++it )
948  {
949  it->second->Write();
950  delete it->second;
951  }
952 
953  std::map< TString, TTree* >::iterator it_t;
954  for( it_t=t_t.begin(); it_t!=t_t.end(); ++it_t )
955  {
956  it_t->second->Write();
957  delete it_t->second;
958  }
959 
960  // std::cout << "Closing " << _outfile << std::endl;
961  out_file->Close();
962  delete out_file;
963  out_file=nullptr;
964 }
TString _outfile
Definition: MELaserPrim.h:134
std::map< TString, TTree * > t_t
Definition: MELaserPrim.h:149
bool init_ok
Definition: MELaserPrim.h:48
std::map< TString, TH2 * > i_h
Definition: MELaserPrim.h:145
TFile * out_file
Definition: MELaserPrim.h:120
std::map< TString, TH2 * > f_h
Definition: MELaserPrim.h:146

Member Data Documentation

int MELaserPrim::_color
private
int MELaserPrim::_dcc
private

Definition at line 81 of file MELaserPrim.h.

Referenced by MELaserPrim(), and print().

int MELaserPrim::_delay
private

Definition at line 91 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

int MELaserPrim::_ecal_region
private

Definition at line 102 of file MELaserPrim.h.

int MELaserPrim::_events
private
int MELaserPrim::_filter
private
TString MELaserPrim::_inpath
private

Definition at line 131 of file MELaserPrim.h.

Referenced by init().

bool MELaserPrim::_isBarrel
private

Definition at line 79 of file MELaserPrim.h.

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

int MELaserPrim::_lb
private

Definition at line 84 of file MELaserPrim.h.

Referenced by MELaserPrim().

int MELaserPrim::_lmr
private

Definition at line 80 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

int MELaserPrim::_memgain
private

Definition at line 99 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

int MELaserPrim::_mgpagain
private

Definition at line 98 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

TString MELaserPrim::_outfile
private

Definition at line 134 of file MELaserPrim.h.

Referenced by writeHistograms().

TString MELaserPrim::_pnPrimStr
private

Definition at line 109 of file MELaserPrim.h.

Referenced by MELaserPrim().

int MELaserPrim::_power
private

Definition at line 89 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

TString MELaserPrim::_primStr
private

Definition at line 108 of file MELaserPrim.h.

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

TString MELaserPrim::_pulseStr
private

Definition at line 110 of file MELaserPrim.h.

Referenced by MELaserPrim().

int MELaserPrim::_reg
private
TString MELaserPrim::_regionStr
private

Definition at line 107 of file MELaserPrim.h.

Referenced by MELaserPrim().

int MELaserPrim::_run
private
TString MELaserPrim::_sectorStr
private

Definition at line 106 of file MELaserPrim.h.

Referenced by MELaserPrim().

int MELaserPrim::_side
private

Definition at line 82 of file MELaserPrim.h.

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

int MELaserPrim::_sm
private

Definition at line 103 of file MELaserPrim.h.

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

TString MELaserPrim::_tpPnPrimStr
private

Definition at line 112 of file MELaserPrim.h.

Referenced by MELaserPrim().

TString MELaserPrim::_tpPrimStr
private

Definition at line 111 of file MELaserPrim.h.

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

ME::TimeStamp MELaserPrim::_ts
private

Definition at line 94 of file MELaserPrim.h.

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

ME::TimeStamp MELaserPrim::_ts_beg
private

Definition at line 95 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

ME::TimeStamp MELaserPrim::_ts_end
private

Definition at line 96 of file MELaserPrim.h.

Referenced by fillHistograms(), and MELaserPrim().

int MELaserPrim::_type
private
Double_t MELaserPrim::ab_ab[iSize_ab]
private

Definition at line 174 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::ab_channelID
private

Definition at line 170 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::ab_dccID
private

Definition at line 168 of file MELaserPrim.h.

Referenced by init().

TFile* MELaserPrim::ab_file
private

Definition at line 116 of file MELaserPrim.h.

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

Int_t MELaserPrim::ab_flag
private

Definition at line 173 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::ab_ieta
private

Definition at line 171 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::ab_iphi
private

Definition at line 172 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::ab_towerID
private

Definition at line 169 of file MELaserPrim.h.

Referenced by init().

TTree* MELaserPrim::ab_tree
private

Definition at line 124 of file MELaserPrim.h.

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

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

Definition at line 269 of file MELaserPrim.h.

Referenced by init().

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

Definition at line 165 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

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

Definition at line 264 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::apdpn_channelID
private

Definition at line 157 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::apdpn_dccID
private

Definition at line 155 of file MELaserPrim.h.

Referenced by init().

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

Definition at line 267 of file MELaserPrim.h.

TString MELaserPrim::apdpn_extraVarUnit = { "" }
staticprivate

Definition at line 268 of file MELaserPrim.h.

TFile* MELaserPrim::apdpn_file
private

Definition at line 115 of file MELaserPrim.h.

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

Int_t MELaserPrim::apdpn_flag
private

Definition at line 163 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::apdpn_ieta
private

Definition at line 161 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::apdpn_iphi
private

Definition at line 162 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::apdpn_moduleID
private

Definition at line 158 of file MELaserPrim.h.

Referenced by init().

Double_t MELaserPrim::apdpn_ShapeCor
private

Definition at line 164 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::apdpn_side
private

Definition at line 160 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::apdpn_towerID
private

Definition at line 156 of file MELaserPrim.h.

Referenced by init().

TTree* MELaserPrim::apdpn_tree
private

Definition at line 123 of file MELaserPrim.h.

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

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

Definition at line 265 of file MELaserPrim.h.

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 266 of file MELaserPrim.h.

TBranch* MELaserPrim::b_ab_ab[iSize_ab]
private

Definition at line 229 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_ab_channelID
private

Definition at line 225 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_ab_dccID
private

Definition at line 223 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_ab_flag
private

Definition at line 228 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_ab_ieta
private

Definition at line 226 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_ab_iphi
private

Definition at line 227 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_ab_towerID
private

Definition at line 224 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_apdpn[iSizeArray_apdpn]
private

Definition at line 220 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_channelID
private

Definition at line 212 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_dccID
private

Definition at line 210 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_flag
private

Definition at line 218 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_ieta
private

Definition at line 216 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_iphi
private

Definition at line 217 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_moduleID
private

Definition at line 213 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_ShapeCor
private

Definition at line 219 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_side
private

Definition at line 215 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_apdpn_towerID
private

Definition at line 211 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_mtq_color
private

Definition at line 242 of file MELaserPrim.h.

TBranch* MELaserPrim::b_mtq_mtq[iSize_mtq]
private

Definition at line 243 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_mtq_side
private

Definition at line 241 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_pn_moduleID
private

Definition at line 234 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_pn_PN
private

Definition at line 235 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_pn_pnID
private

Definition at line 233 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_pn_PNoPN
private

Definition at line 236 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_pn_PNoPNA
private

Definition at line 237 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_pn_PNoPNB
private

Definition at line 238 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_pn_side
private

Definition at line 232 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_APD
private

Definition at line 255 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_channelID
private

Definition at line 251 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_dccID
private

Definition at line 248 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_flag
private

Definition at line 253 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_gain
private

Definition at line 254 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_ieta
private

Definition at line 247 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_iphi
private

Definition at line 246 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_moduleID
private

Definition at line 252 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_side
private

Definition at line 249 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tpapd_towerID
private

Definition at line 250 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tppn_gain
private

Definition at line 261 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tppn_moduleID
private

Definition at line 260 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tppn_PN
private

Definition at line 262 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tppn_pnID
private

Definition at line 259 of file MELaserPrim.h.

Referenced by init().

TBranch* MELaserPrim::b_tppn_side
private

Definition at line 258 of file MELaserPrim.h.

Referenced by init().

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

Definition at line 152 of file MELaserPrim.h.

Referenced by addBranchC(), and fillHistograms().

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

Definition at line 146 of file MELaserPrim.h.

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

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

Definition at line 151 of file MELaserPrim.h.

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

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

Definition at line 145 of file MELaserPrim.h.

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

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

Definition at line 150 of file MELaserPrim.h.

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

bool MELaserPrim::init_ok

Definition at line 48 of file MELaserPrim.h.

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

int MELaserPrim::ixmax
private

Definition at line 139 of file MELaserPrim.h.

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

int MELaserPrim::ixmin
private

Definition at line 138 of file MELaserPrim.h.

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

int MELaserPrim::iymax
private

Definition at line 142 of file MELaserPrim.h.

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

int MELaserPrim::iymin
private

Definition at line 141 of file MELaserPrim.h.

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

Int_t MELaserPrim::mtq_color
private

Definition at line 187 of file MELaserPrim.h.

TFile* MELaserPrim::mtq_file
private

Definition at line 118 of file MELaserPrim.h.

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

Double_t MELaserPrim::mtq_mtq[iSize_mtq]
private

Definition at line 188 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::mtq_side
private

Definition at line 186 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

TTree* MELaserPrim::mtq_tree
private

Definition at line 126 of file MELaserPrim.h.

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

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

Definition at line 270 of file MELaserPrim.h.

Referenced by init().

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

Definition at line 271 of file MELaserPrim.h.

int MELaserPrim::nx
private

Definition at line 137 of file MELaserPrim.h.

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

int MELaserPrim::ny
private

Definition at line 140 of file MELaserPrim.h.

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

TFile* MELaserPrim::out_file
private

Definition at line 120 of file MELaserPrim.h.

Referenced by writeHistograms().

TFile* MELaserPrim::pn_file
private

Definition at line 117 of file MELaserPrim.h.

Int_t MELaserPrim::pn_moduleID
private

Definition at line 179 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Double_t MELaserPrim::pn_PN[iSize_apdpn]
private

Definition at line 180 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::pn_pnID
private

Definition at line 178 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Double_t MELaserPrim::pn_PNoPN[iSize_apdpn]
private

Definition at line 181 of file MELaserPrim.h.

Referenced by init().

Double_t MELaserPrim::pn_PNoPNA[iSize_apdpn]
private

Definition at line 182 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Double_t MELaserPrim::pn_PNoPNB[iSize_apdpn]
private

Definition at line 183 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

Int_t MELaserPrim::pn_side
private

Definition at line 177 of file MELaserPrim.h.

Referenced by fillHistograms(), and init().

TTree* MELaserPrim::pn_tree
private

Definition at line 125 of file MELaserPrim.h.

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

TString MELaserPrim::separator = "__"
static
std::map< TString, TTree* > MELaserPrim::t_t
private
Double_t MELaserPrim::tpapd_APD[iSize_apdpn]
private

Definition at line 200 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_channelID
private

Definition at line 196 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_dccID
private

Definition at line 193 of file MELaserPrim.h.

Referenced by init().

TFile* MELaserPrim::tpapd_file
private

Definition at line 119 of file MELaserPrim.h.

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

Int_t MELaserPrim::tpapd_flag
private

Definition at line 198 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_gain
private

Definition at line 199 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_ieta
private

Definition at line 192 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_iphi
private

Definition at line 191 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_moduleID
private

Definition at line 197 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_side
private

Definition at line 194 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tpapd_towerID
private

Definition at line 195 of file MELaserPrim.h.

Referenced by init().

TTree* MELaserPrim::tpapd_tree
private

Definition at line 127 of file MELaserPrim.h.

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

Int_t MELaserPrim::tppn_gain
private

Definition at line 206 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tppn_moduleID
private

Definition at line 205 of file MELaserPrim.h.

Referenced by init().

Double_t MELaserPrim::tppn_PN[iSize_apdpn]
private

Definition at line 207 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tppn_pnID
private

Definition at line 204 of file MELaserPrim.h.

Referenced by init().

Int_t MELaserPrim::tppn_side
private

Definition at line 203 of file MELaserPrim.h.

Referenced by init().

TTree* MELaserPrim::tppn_tree
private

Definition at line 128 of file MELaserPrim.h.

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