CMS 3D CMS Logo

EcalABAnalyzer.h
Go to the documentation of this file.
1 #ifndef EcalABAnalyzer_h_
2 #define EcalABAnalyzer_h_
3 
4 // $Id: EcalABAnalyzer.h
5 
6 #include <memory>
7 #include <vector>
8 #include <map>
9 
11 
12 class TShapeAnalysis;
13 class TAPDPulse;
14 class TMom;
15 
16 // Define geometrical constants
17 // NOT the same for "EB" and "EE"
18 //
19 // "EB" "EE"
20 //
21 // 0 0
22 // 1 2 1 2
23 // 3 4
24 // 5 6
25 // 7 8
26 //
27 //
28 
29 // "EB" geometry
30 #define NCRYSEB 1700 // Number of crystals per EB supermodule
31 
32 // "EE" geometry
33 #define NCRYSEE 830 // Number of crystals per EE supermodule
34 
36 public:
37  explicit EcalABAnalyzer(const edm::ParameterSet &iConfig);
38  ~EcalABAnalyzer() override;
39 
40  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
41  void beginJob() override;
42  void endJob() override;
43 
44  enum VarCol { iBlue, iRed, nColor };
45 
46 private:
47  int iEvent;
48 
49  // Framework parameters
50 
51  unsigned int _nsamples;
52  unsigned int _presample;
53  unsigned int _firstsample;
54  unsigned int _lastsample;
55  unsigned int _timingcutlow;
56  unsigned int _timingcuthigh;
57  unsigned int _timingquallow;
58  unsigned int _timingqualhigh;
62  double _presamplecut;
63  unsigned int _niter;
64  double _alpha;
65  double _beta;
66  unsigned int _nevtmax;
67  double _noise;
68  double _chi2cut;
70  int _fedid;
71  double _qualpercent;
72  int _debug;
73 
77 
83 
84  // Output file names
85 
88 
90  unsigned int nevtAB[NCRYSEB];
91 
92  // Define geometrical constants
93  // Default values correspond to "EB" geometry (1700 crystals)
94 
95  unsigned int nCrys;
97 
98  bool _fitab;
99  // Identify run type
100 
101  int runType;
102  int runNum;
103  int fedID;
104  int dccID;
105  int side;
107  int iZ;
108 
109  // Temporary root files and trees
110 
111  std::vector<int> colors;
112  std::map<int, int> channelMapEE;
113  std::vector<int> dccMEM;
114  std::vector<int> modules;
115 
116  // Declaration of leaves types for temporary trees
117 
118  int phi, eta;
119  int event;
120  int color;
121  double adc[10];
122  int adcG[10];
124 
127 
128  // Quality Checks variables and flags
129 
133 
136 
137  bool isGainOK;
139 };
140 
141 #endif
unsigned int nCrys
int nEvtBadGain[1700]
std::string digiProducer_
std::string alphainitfile
std::string eventHeaderProducer_
std::string _ecalPart
int idccID[1700]
double _ratiomaxcutlow
double _ratiomincuthigh
unsigned int _nsamples
unsigned int _firstsample
Definition: TMom.h:7
unsigned int _nevtmax
double adc[10]
unsigned int _niter
std::vector< int > colors
std::string alphafile
double _presamplecut
~EcalABAnalyzer() override
#define NCRYSEB
int iChannelID[1700]
void beginJob() override
int iTowerID[1700]
int nEvtTot[1700]
EcalABAnalyzer(const edm::ParameterSet &iConfig)
TShapeAnalysis * shapana
unsigned int nevtAB[1700]
unsigned int _timingcuthigh
std::string resdir_
unsigned int _lastsample
std::map< int, int > channelMapEE
TAPDPulse * APDPulse
void analyze(const edm::Event &e, const edm::EventSetup &c) override
std::string digiCollection_
unsigned int _timingqualhigh
unsigned int _presample
std::string eventHeaderCollection_
double _ratiomincutlow
void endJob() override
unsigned int _timingcutlow
std::vector< int > dccMEM
bool wasTimingOK[1700]
std::vector< int > modules
unsigned int _timingquallow
bool wasGainOK[1700]
int nEvtBadTiming[1700]