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 };
void analyze(const edm::Event &e, const edm::EventSetup &c) override
EcalPerEvtLaserAnalyzer(const edm::ParameterSet &iConfig)