CMS 3D CMS Logo

EcalPerEvtLaserAnalyzer.h
Go to the documentation of this file.
1 #ifndef CalibCalorimetry_EcalLaserAnalyzer_EcalPerEvtLaserAnalyzer_h
2 #define CalibCalorimetry_EcalLaserAnalyzer_EcalPerEvtLaserAnalyzer_h
3 // $Id: EcalPerEvtLaserAnalyzer.h
4 
5 #include <memory>
6 
7 #include <vector>
8 
10 
15 
16 class TFile;
17 class TTree;
18 
19 // Define geometrical constants
20 // NOT the same for "EB" and "EE"
21 //
22 // "EB" "EE"
23 //
24 // 0 0
25 // 1 2 1 2
26 // 3 4
27 // 5 6
28 // 7 8
29 //
30 //
31 #define NSIDES 2 // Number of sides (0, 1)
32 
33 // "EB" geometry
34 #define NCRYSEB 1700 // Number of crystals per EB supermodule
35 #define NTTEB 68 // Number of EB Trigger Towers
36 #define NPNEB 10 // Number of PN per EB supermodule
37 
38 // "EE" geometry
39 #define NCRYSEE 825 // Number of crystals per EE supermodule
40 #define NTTEE 33 // Number of EE Trigger Towers
41 #define NPNEE 4 // Number of PN per EE supermodule
42 
44 public:
45  explicit EcalPerEvtLaserAnalyzer(const edm::ParameterSet &iConfig);
46  ~EcalPerEvtLaserAnalyzer() override;
47 
48  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
49  void beginJob() override;
50  void endJob() override;
51 
52  enum VarCol { iBlue, iRed, nColor };
53 
54 private:
55  int iEvent;
56 
62 
68 
69  // Framework parameters
70 
71  const unsigned int _nsamples;
72  const unsigned int _presample;
73  const unsigned int _firstsample;
74  const unsigned int _lastsample;
75  const unsigned int _nsamplesPN;
76  const unsigned int _presamplePN;
77  const unsigned int _firstsamplePN;
78  const unsigned int _lastsamplePN;
79  const unsigned int _timingcutlow;
80  const unsigned int _timingcuthigh;
81  const unsigned int _niter;
82  const int _fedid;
83  const unsigned int _tower;
84  const unsigned int _channel;
86 
89 
90  // Output file names
91 
94 
95  // Define geometrical constants
96  // Default values correspond to "EB" geometry (1700 crystals)
97 
98  unsigned int nCrys;
99 
101 
102  // Identify run type
103 
104  int runType;
105  int runNum;
106  int dccID;
107  int fedID;
109 
111 
112  std::vector<int> colors;
113 
114  // Temporary root files and trees
115  TFile *matacqFile;
116  TTree *matacqTree;
117 
118  TFile *ADCFile;
119  TTree *ADCtrees;
120 
121  TFile *APDFile;
122  TTree *header[2];
123  TTree *APDtrees;
124 
128 
129  double ttMat, peakMat, peak;
131 
132  // Declaration of leaves types for temporary trees
133 
134  int phi, eta;
135  int event;
136  int color;
137  double adc[10];
138  int adcG[10];
139  double tt;
140  double ttrig;
141  double pn0, pn1;
142  double pn[50];
143  double apdAmpl;
144  double apdTime;
145  double pnAmpl;
146 };
147 #endif
const std::string eventHeaderCollection_
edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
const unsigned int _timingcuthigh
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const unsigned int _timingcutlow
const unsigned int _firstsamplePN
const std::string digiPNCollection_
EcalPerEvtLaserAnalyzer(const edm::ParameterSet &iConfig)
const std::string eventHeaderProducer_
edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > mappingToken_
const unsigned int _lastsamplePN
const edm::EDGetTokenT< EcalPnDiodeDigiCollection > pnDiodeDigiToken_