test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
37  public:
38 
39  explicit EcalABAnalyzer(const edm::ParameterSet& iConfig);
41 
42 
43  virtual void analyze( const edm::Event & e, const edm::EventSetup& c);
44  virtual void beginJob();
45  virtual void endJob();
46 
47 
48  enum VarCol { iBlue, iRed, nColor };
49 
50  private:
51 
52  int iEvent;
53 
54 
55  // Framework parameters
56 
57  unsigned int _nsamples;
58  unsigned int _presample;
59  unsigned int _firstsample;
60  unsigned int _lastsample;
61  unsigned int _timingcutlow;
62  unsigned int _timingcuthigh;
63  unsigned int _timingquallow;
64  unsigned int _timingqualhigh;
68  double _presamplecut;
69  unsigned int _niter ;
70  double _alpha ;
71  double _beta;
72  unsigned int _nevtmax;
73  double _noise;
74  double _chi2cut;
76  int _fedid;
77  double _qualpercent;
78  int _debug;
79 
83 
89 
90  // Output file names
91 
94 
96  unsigned int nevtAB[NCRYSEB];
97 
98  // Define geometrical constants
99  // Default values correspond to "EB" geometry (1700 crystals)
100 
101  unsigned int nCrys;
103 
104  bool _fitab;
105  // Identify run type
106 
107  int runType;
108  int runNum;
109  int fedID;
110  int dccID;
111  int side;
113  int iZ;
114 
115 
116  // Temporary root files and trees
117 
118  std::vector<int> colors;
119  std::map<int, int> channelMapEE;
120  std::vector<int> dccMEM;
121  std::vector<int> modules;
122 
123 
124  // Declaration of leaves types for temporary trees
125 
126  int phi, eta;
127  int event ;
128  int color ;
129  double adc[10];
130  int adcG[10];
132 
133 
136 
137  // Quality Checks variables and flags
138 
142 
145 
146  bool isGainOK;
148 
149 };
150 
151 #endif
152 
153 
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
virtual void beginJob()
unsigned int _nevtmax
double adc[10]
unsigned int _niter
std::vector< int > colors
std::string alphafile
double _presamplecut
#define NCRYSEB
int iChannelID[1700]
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
std::string digiCollection_
virtual void endJob()
unsigned int _timingqualhigh
unsigned int _presample
std::string eventHeaderCollection_
double _ratiomincutlow
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
unsigned int _timingcutlow
std::vector< int > dccMEM
bool wasTimingOK[1700]
std::vector< int > modules
unsigned int _timingquallow
bool wasGainOK[1700]
int nEvtBadTiming[1700]