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 
33 
34 
36 
37  public:
38 
39  explicit EcalPerEvtLaserAnalyzer(const edm::ParameterSet& iConfig);
40  ~EcalPerEvtLaserAnalyzer() override;
41 
42 
43  void analyze( const edm::Event & e, const edm::EventSetup& c) override;
44  void beginJob() override;
45  void endJob() override;
46 
47  enum VarCol { iBlue, iRed, nColor };
48 
49  private:
50 
51  int iEvent;
52 
53 
54  // Framework parameters
55 
56  unsigned int _nsamples;
57  unsigned int _presample;
58  unsigned int _firstsample;
59  unsigned int _lastsample;
60  unsigned int _samplemin;
61  unsigned int _samplemax;
62  unsigned int _nsamplesPN;
63  unsigned int _presamplePN;
64  unsigned int _firstsamplePN;
65  unsigned int _lastsamplePN;
66  unsigned int _timingcutlow;
67  unsigned int _timingcuthigh;
68  unsigned int _niter ;
69  int _fedid ;
70  unsigned int _tower ;
71  unsigned int _channel ;
73 
81 
82 
83  // Output file names
84 
89 
90 
91  // Define geometrical constants
92  // Default values correspond to "EB" geometry (1700 crystals)
93 
94  unsigned int nCrys;
95  unsigned int nTT;
96  unsigned int nSides;
97 
98 
100 
101  // Define number of channels (68 or 1700) for alpha and beta calculation
102 
103  unsigned int nCh;
104 
105  // Identify run type
106 
107  int runType;
108  int runNum;
109  int dccID;
110  int fedID;
112 
114 
115 
116  std::vector<int> colors;
117 
118  // Temporary root files and trees
119  TFile *matacqFile;
120  TTree *matacqTree;
121 
122  TFile *ADCFile;
123  TTree *ADCtrees;
124 
125  TFile *APDFile;
126  TTree *header[2];
127  TTree *APDtrees;
128 
129 
133 
134  double ttMat, peakMat, peak;
136 
137  // Declaration of leaves types for temporary trees
138 
139  int phi, eta;
140  int event ;
141  int color ;
142  double adc[10];
143  int adcG[10];
144  double tt;
145  double ttrig;
146  double pn0,pn1;
147  double pn[50];
148  double apdAmpl;
149  double apdTime;
150  double pnAmpl;
151 
152 
153 
154 
155 
156 };
157 
158 
void analyze(const edm::Event &e, const edm::EventSetup &c) override
EcalPerEvtLaserAnalyzer(const edm::ParameterSet &iConfig)