CMS 3D CMS Logo

EcalPerEvtLaserAnalyzer.h
Go to the documentation of this file.
1 // $Id: EcalPerEvtLaserAnalyzer.h
2 
3 #include <memory>
5 
6 class TTree;
7 class TFile;
8 
9 // Define geometrical constants
10 // NOT the same for "EB" and "EE"
11 //
12 // "EB" "EE"
13 //
14 // 0 0
15 // 1 2 1 2
16 // 3 4
17 // 5 6
18 // 7 8
19 //
20 //
21 #define NSIDES 2 // Number of sides (0, 1)
22 
23 // "EB" geometry
24 #define NCRYSEB 1700 // Number of crystals per EB supermodule
25 #define NTTEB 68 // Number of EB Trigger Towers
26 #define NPNEB 10 // Number of PN per EB supermodule
27 
28 // "EE" geometry
29 #define NCRYSEE 825 // Number of crystals per EE supermodule
30 #define NTTEE 33 // Number of EE Trigger Towers
31 #define NPNEE 4 // Number of PN per EE supermodule
32 
34 public:
35  explicit EcalPerEvtLaserAnalyzer(const edm::ParameterSet &iConfig);
36  ~EcalPerEvtLaserAnalyzer() override;
37 
38  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
39  void beginJob() override;
40  void endJob() override;
41 
42  enum VarCol { iBlue, iRed, nColor };
43 
44 private:
45  int iEvent;
46 
47  // Framework parameters
48 
49  unsigned int _nsamples;
50  unsigned int _presample;
51  unsigned int _firstsample;
52  unsigned int _lastsample;
53  unsigned int _samplemin;
54  unsigned int _samplemax;
55  unsigned int _nsamplesPN;
56  unsigned int _presamplePN;
57  unsigned int _firstsamplePN;
58  unsigned int _lastsamplePN;
59  unsigned int _timingcutlow;
60  unsigned int _timingcuthigh;
61  unsigned int _niter;
62  int _fedid;
63  unsigned int _tower;
64  unsigned int _channel;
66 
74 
75  // Output file names
76 
81 
82  // Define geometrical constants
83  // Default values correspond to "EB" geometry (1700 crystals)
84 
85  unsigned int nCrys;
86  unsigned int nTT;
87  unsigned int nSides;
88 
90 
91  // Define number of channels (68 or 1700) for alpha and beta calculation
92 
93  unsigned int nCh;
94 
95  // Identify run type
96 
97  int runType;
98  int runNum;
99  int dccID;
100  int fedID;
102 
104 
105  std::vector<int> colors;
106 
107  // Temporary root files and trees
108  TFile *matacqFile;
109  TTree *matacqTree;
110 
111  TFile *ADCFile;
112  TTree *ADCtrees;
113 
114  TFile *APDFile;
115  TTree *header[2];
116  TTree *APDtrees;
117 
121 
122  double ttMat, peakMat, peak;
124 
125  // Declaration of leaves types for temporary trees
126 
127  int phi, eta;
128  int event;
129  int color;
130  double adc[10];
131  int adcG[10];
132  double tt;
133  double ttrig;
134  double pn0, pn1;
135  double pn[50];
136  double apdAmpl;
137  double apdTime;
138  double pnAmpl;
139 };
EcalPerEvtLaserAnalyzer::_fedid
int _fedid
Definition: EcalPerEvtLaserAnalyzer.h:62
EcalPerEvtLaserAnalyzer::iEvent
int iEvent
Definition: EcalPerEvtLaserAnalyzer.h:45
EcalPerEvtLaserAnalyzer::resfile
std::string resfile
Definition: EcalPerEvtLaserAnalyzer.h:80
EcalPerEvtLaserAnalyzer::resdir_
std::string resdir_
Definition: EcalPerEvtLaserAnalyzer.h:67
EcalPerEvtLaserAnalyzer::tt
double tt
Definition: EcalPerEvtLaserAnalyzer.h:132
EcalPerEvtLaserAnalyzer::_samplemax
unsigned int _samplemax
Definition: EcalPerEvtLaserAnalyzer.h:54
EcalPerEvtLaserAnalyzer::_nsamplesPN
unsigned int _nsamplesPN
Definition: EcalPerEvtLaserAnalyzer.h:55
EcalPerEvtLaserAnalyzer::pnAmpl
double pnAmpl
Definition: EcalPerEvtLaserAnalyzer.h:138
EcalPerEvtLaserAnalyzer::pn1
double pn1
Definition: EcalPerEvtLaserAnalyzer.h:134
EcalPerEvtLaserAnalyzer::_nsamples
unsigned int _nsamples
Definition: EcalPerEvtLaserAnalyzer.h:49
EcalPerEvtLaserAnalyzer::ttMat
double ttMat
Definition: EcalPerEvtLaserAnalyzer.h:122
EcalPerEvtLaserAnalyzer::eventHeaderProducer_
std::string eventHeaderProducer_
Definition: EcalPerEvtLaserAnalyzer.h:73
EcalPerEvtLaserAnalyzer::refalphabeta_
std::string refalphabeta_
Definition: EcalPerEvtLaserAnalyzer.h:68
EcalPerEvtLaserAnalyzer::ttrig
double ttrig
Definition: EcalPerEvtLaserAnalyzer.h:133
EcalPerEvtLaserAnalyzer::runNum
int runNum
Definition: EcalPerEvtLaserAnalyzer.h:98
EcalPerEvtLaserAnalyzer::_presample
unsigned int _presample
Definition: EcalPerEvtLaserAnalyzer.h:50
EcalPerEvtLaserAnalyzer::color
int color
Definition: EcalPerEvtLaserAnalyzer.h:129
EcalPerEvtLaserAnalyzer::adc
double adc[10]
Definition: EcalPerEvtLaserAnalyzer.h:130
EDAnalyzer.h
EcalPerEvtLaserAnalyzer::_firstsamplePN
unsigned int _firstsamplePN
Definition: EcalPerEvtLaserAnalyzer.h:57
EcalPerEvtLaserAnalyzer::adcG
int adcG[10]
Definition: EcalPerEvtLaserAnalyzer.h:131
EcalPerEvtLaserAnalyzer::channelNumber
int channelNumber
Definition: EcalPerEvtLaserAnalyzer.h:103
EcalPerEvtLaserAnalyzer::header
TTree * header[2]
Definition: EcalPerEvtLaserAnalyzer.h:115
EcalPerEvtLaserAnalyzer::digiCollection_
std::string digiCollection_
Definition: EcalPerEvtLaserAnalyzer.h:69
EcalPerEvtLaserAnalyzer::pn
double pn[50]
Definition: EcalPerEvtLaserAnalyzer.h:135
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
EcalPerEvtLaserAnalyzer::_firstsample
unsigned int _firstsample
Definition: EcalPerEvtLaserAnalyzer.h:51
EcalPerEvtLaserAnalyzer::matacqFile
TFile * matacqFile
Definition: EcalPerEvtLaserAnalyzer.h:108
EcalPerEvtLaserAnalyzer::nSides
unsigned int nSides
Definition: EcalPerEvtLaserAnalyzer.h:87
EcalPerEvtLaserAnalyzer::_timingcutlow
unsigned int _timingcutlow
Definition: EcalPerEvtLaserAnalyzer.h:59
EcalPerEvtLaserAnalyzer::iRed
Definition: EcalPerEvtLaserAnalyzer.h:42
EcalPerEvtLaserAnalyzer::colors
std::vector< int > colors
Definition: EcalPerEvtLaserAnalyzer.h:105
EcalPerEvtLaserAnalyzer::ADCfile
std::string ADCfile
Definition: EcalPerEvtLaserAnalyzer.h:78
EcalPerEvtLaserAnalyzer::_channel
unsigned int _channel
Definition: EcalPerEvtLaserAnalyzer.h:64
EcalPerEvtLaserAnalyzer::ADCFile
TFile * ADCFile
Definition: EcalPerEvtLaserAnalyzer.h:111
EcalPerEvtLaserAnalyzer::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: EcalPerEvtLaserAnalyzer.cc:164
EcalPerEvtLaserAnalyzer::IsHeaderFilled
int IsHeaderFilled[nColor]
Definition: EcalPerEvtLaserAnalyzer.h:120
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalPerEvtLaserAnalyzer::~EcalPerEvtLaserAnalyzer
~EcalPerEvtLaserAnalyzer() override
Definition: EcalPerEvtLaserAnalyzer.cc:110
edm::ParameterSet
Definition: ParameterSet.h:36
EcalPerEvtLaserAnalyzer::iBlue
Definition: EcalPerEvtLaserAnalyzer.h:42
EcalPerEvtLaserAnalyzer::phi
int phi
Definition: EcalPerEvtLaserAnalyzer.h:127
EcalPerEvtLaserAnalyzer::APDFile
TFile * APDFile
Definition: EcalPerEvtLaserAnalyzer.h:114
EcalPerEvtLaserAnalyzer::event
int event
Definition: EcalPerEvtLaserAnalyzer.h:128
EcalPerEvtLaserAnalyzer::matacqTree
TTree * matacqTree
Definition: EcalPerEvtLaserAnalyzer.h:109
EcalPerEvtLaserAnalyzer::dccID
int dccID
Definition: EcalPerEvtLaserAnalyzer.h:99
EcalPerEvtLaserAnalyzer::pn0
double pn0
Definition: EcalPerEvtLaserAnalyzer.h:134
EcalPerEvtLaserAnalyzer::apdAmpl
double apdAmpl
Definition: EcalPerEvtLaserAnalyzer.h:136
EcalPerEvtLaserAnalyzer::doesRefFileExist
int doesRefFileExist
Definition: EcalPerEvtLaserAnalyzer.h:118
EcalPerEvtLaserAnalyzer::nCrys
unsigned int nCrys
Definition: EcalPerEvtLaserAnalyzer.h:85
EcalPerEvtLaserAnalyzer::IsFileCreated
int IsFileCreated
Definition: EcalPerEvtLaserAnalyzer.h:89
EcalPerEvtLaserAnalyzer::EcalPerEvtLaserAnalyzer
EcalPerEvtLaserAnalyzer(const edm::ParameterSet &iConfig)
Definition: EcalPerEvtLaserAnalyzer.cc:46
EcalPerEvtLaserAnalyzer::APDfile
std::string APDfile
Definition: EcalPerEvtLaserAnalyzer.h:79
edm::EventSetup
Definition: EventSetup.h:57
EcalPerEvtLaserAnalyzer::digiProducer_
std::string digiProducer_
Definition: EcalPerEvtLaserAnalyzer.h:71
EcalPerEvtLaserAnalyzer::nColor
Definition: EcalPerEvtLaserAnalyzer.h:42
EcalPerEvtLaserAnalyzer::VarCol
VarCol
Definition: EcalPerEvtLaserAnalyzer.h:42
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
EcalPerEvtLaserAnalyzer::APDtrees
TTree * APDtrees
Definition: EcalPerEvtLaserAnalyzer.h:116
EcalPerEvtLaserAnalyzer::eta
int eta
Definition: EcalPerEvtLaserAnalyzer.h:127
EcalPerEvtLaserAnalyzer::digiPNCollection_
std::string digiPNCollection_
Definition: EcalPerEvtLaserAnalyzer.h:70
EcalPerEvtLaserAnalyzer::_niter
unsigned int _niter
Definition: EcalPerEvtLaserAnalyzer.h:61
EcalPerEvtLaserAnalyzer::_ecalPart
std::string _ecalPart
Definition: EcalPerEvtLaserAnalyzer.h:65
EcalPerEvtLaserAnalyzer::evtMat
int evtMat
Definition: EcalPerEvtLaserAnalyzer.h:123
EcalPerEvtLaserAnalyzer::peakMat
double peakMat
Definition: EcalPerEvtLaserAnalyzer.h:122
EcalPerEvtLaserAnalyzer::_timingcuthigh
unsigned int _timingcuthigh
Definition: EcalPerEvtLaserAnalyzer.h:60
EcalPerEvtLaserAnalyzer::nCh
unsigned int nCh
Definition: EcalPerEvtLaserAnalyzer.h:93
EcalPerEvtLaserAnalyzer::IsThereDataADC
int IsThereDataADC[nColor]
Definition: EcalPerEvtLaserAnalyzer.h:119
EcalPerEvtLaserAnalyzer::colMat
int colMat
Definition: EcalPerEvtLaserAnalyzer.h:123
EcalPerEvtLaserAnalyzer::ADCtrees
TTree * ADCtrees
Definition: EcalPerEvtLaserAnalyzer.h:112
EcalPerEvtLaserAnalyzer::fedID
int fedID
Definition: EcalPerEvtLaserAnalyzer.h:100
EcalPerEvtLaserAnalyzer::beginJob
void beginJob() override
Definition: EcalPerEvtLaserAnalyzer.cc:118
EcalPerEvtLaserAnalyzer::_presamplePN
unsigned int _presamplePN
Definition: EcalPerEvtLaserAnalyzer.h:56
EcalPerEvtLaserAnalyzer::alphafile
std::string alphafile
Definition: EcalPerEvtLaserAnalyzer.h:77
EcalPerEvtLaserAnalyzer::_lastsample
unsigned int _lastsample
Definition: EcalPerEvtLaserAnalyzer.h:52
EcalPerEvtLaserAnalyzer::lightside
int lightside
Definition: EcalPerEvtLaserAnalyzer.h:101
EcalPerEvtLaserAnalyzer::_samplemin
unsigned int _samplemin
Definition: EcalPerEvtLaserAnalyzer.h:53
EcalPerEvtLaserAnalyzer
Definition: EcalPerEvtLaserAnalyzer.h:33
EcalPerEvtLaserAnalyzer::runType
int runType
Definition: EcalPerEvtLaserAnalyzer.h:97
EcalPerEvtLaserAnalyzer::_tower
unsigned int _tower
Definition: EcalPerEvtLaserAnalyzer.h:63
edm::Event
Definition: Event.h:73
EcalPerEvtLaserAnalyzer::peak
double peak
Definition: EcalPerEvtLaserAnalyzer.h:122
EcalPerEvtLaserAnalyzer::eventHeaderCollection_
std::string eventHeaderCollection_
Definition: EcalPerEvtLaserAnalyzer.h:72
EcalPerEvtLaserAnalyzer::endJob
void endJob() override
Definition: EcalPerEvtLaserAnalyzer.cc:558
EcalPerEvtLaserAnalyzer::apdTime
double apdTime
Definition: EcalPerEvtLaserAnalyzer.h:137
EcalPerEvtLaserAnalyzer::_lastsamplePN
unsigned int _lastsamplePN
Definition: EcalPerEvtLaserAnalyzer.h:58
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EcalPerEvtLaserAnalyzer::nTT
unsigned int nTT
Definition: EcalPerEvtLaserAnalyzer.h:86