CMS 3D CMS Logo

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