CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
EcalTestPulseAnalyzer.h
Go to the documentation of this file.
1 
2 #include <memory>
4 
5 class TFile;
6 class TTree;
7 
8 // Define geometrical constants
9 // NOT the same for "EB" and "EE"
10 //
11 // "EB" "EE"
12 //
13 // 0 0
14 // 1 2 1 2
15 // 3 4
16 // 5 6
17 // 7 8
18 //
19 //
20 // "EB" geometry
21 // "EB" geometry
22 #define NCRYSEB 1700 // Number of crystals per EB supermodule
23 #define NTTEB 68 // Number of EB Trigger Towers
24 #define NMODEB 9 // Number of EB submodules
25 #define NPNPERMOD 2 // Number of PN per module
26 
27 // "EE" geometry
28 #define NCRYSEE 830 // Number of crystals per EE supermodule
29 #define NTTEE 68 // Number of EE Trigger Towers
30 #define NMODEE 21 // Number of EE submodules
31 
32 #define NGAINPN 2 // Number of gains
33 #define NGAINAPD 4 // Number of gains
34 
36 public:
37  explicit EcalTestPulseAnalyzer(const edm::ParameterSet &iConfig);
38  ~EcalTestPulseAnalyzer() override;
39 
40  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
41  void beginJob() override;
42  void endJob() override;
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 _niter;
60  double _chi2max;
61  double _timeofmax;
63  int _fedid;
64 
71 
72  // Output file names
73 
76 
77  // Define geometrical constants
78  // Default values correspond to "EB" geometry (1700 crystals)
79 
80  unsigned int nCrys;
81  unsigned int nTT;
82  unsigned int nMod;
83  unsigned int nGainPN;
84  unsigned int nGainAPD;
85 
86  // Count TP Events
87  int TPEvents;
88 
89  double ret_data[20];
90 
91  int towerID;
92  int channelID;
93 
94  // Identify run
95 
96  int runType;
97  int runNum;
98  int fedID;
99  int dccID;
100  int side;
101  int iZ;
102 
103  // Root Files
104 
105  TFile *outFile; // from 'analyze': Data
106  TFile *resFile; // from 'endJob': Results
107 
108  // Temporary data trees
109 
110  TTree *trees[NCRYSEB];
111 
112  // Declaration of leaves types
113 
114  int phi, eta;
115  int event;
116  double adc[10];
117  double pn[50];
118 
119  int apdGain;
120  int pnGain;
121  int pnG;
122  double apdAmpl;
123  double apdTime;
124  double pnAmpl0;
125  double pnAmpl1;
126  double pnAmpl;
127 
128  // Results trees
129 
130  TTree *restrees;
131  TTree *respntrees;
132 
133  std::map<int, int> channelMapEE;
134  std::vector<int> dccMEM;
135  std::vector<int> modules;
136 
137  // Declaration of leaves types
138 
139  int ieta, iphi, flag, gain;
142  double APD[6], PN[6];
143 
145  unsigned int iModule[NCRYSEB];
147 
148  unsigned int firstChanMod[NMODEB];
150 };
EcalTestPulseAnalyzer::resdir_
std::string resdir_
Definition: EcalTestPulseAnalyzer.h:65
EcalTestPulseAnalyzer::iZ
int iZ
Definition: EcalTestPulseAnalyzer.h:101
EcalTestPulseAnalyzer::EcalTestPulseAnalyzer
EcalTestPulseAnalyzer(const edm::ParameterSet &iConfig)
Definition: EcalTestPulseAnalyzer.cc:45
EcalTestPulseAnalyzer::pnAmpl
double pnAmpl
Definition: EcalTestPulseAnalyzer.h:126
EcalTestPulseAnalyzer::_fedid
int _fedid
Definition: EcalTestPulseAnalyzer.h:63
EcalTestPulseAnalyzer::pnAmpl1
double pnAmpl1
Definition: EcalTestPulseAnalyzer.h:125
EcalTestPulseAnalyzer::rootfile
std::string rootfile
Definition: EcalTestPulseAnalyzer.h:74
EcalTestPulseAnalyzer::nCrys
unsigned int nCrys
Definition: EcalTestPulseAnalyzer.h:80
EcalTestPulseAnalyzer::_firstsample
unsigned int _firstsample
Definition: EcalTestPulseAnalyzer.h:51
NMODEB
#define NMODEB
Definition: EcalTestPulseAnalyzer.h:24
EcalTestPulseAnalyzer::eta
int eta
Definition: EcalTestPulseAnalyzer.h:114
EcalTestPulseAnalyzer::TPEvents
int TPEvents
Definition: EcalTestPulseAnalyzer.h:87
EcalTestPulseAnalyzer::digiCollection_
std::string digiCollection_
Definition: EcalTestPulseAnalyzer.h:66
EcalTestPulseAnalyzer::phi
int phi
Definition: EcalTestPulseAnalyzer.h:114
EcalTestPulseAnalyzer::iEvent
int iEvent
Definition: EcalTestPulseAnalyzer.h:45
EcalTestPulseAnalyzer::gain
int gain
Definition: EcalTestPulseAnalyzer.h:139
EcalTestPulseAnalyzer::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: EcalTestPulseAnalyzer.cc:204
EcalTestPulseAnalyzer::nGainPN
unsigned int nGainPN
Definition: EcalTestPulseAnalyzer.h:83
EcalTestPulseAnalyzer::digiProducer_
std::string digiProducer_
Definition: EcalTestPulseAnalyzer.h:68
EcalTestPulseAnalyzer::_niter
unsigned int _niter
Definition: EcalTestPulseAnalyzer.h:59
EcalTestPulseAnalyzer::towerID
int towerID
Definition: EcalTestPulseAnalyzer.h:91
EcalTestPulseAnalyzer::_samplemin
unsigned int _samplemin
Definition: EcalTestPulseAnalyzer.h:53
EcalTestPulseAnalyzer::pnGain
int pnGain
Definition: EcalTestPulseAnalyzer.h:120
EcalTestPulseAnalyzer::iside
int iside[1700]
Definition: EcalTestPulseAnalyzer.h:146
EDAnalyzer.h
EcalTestPulseAnalyzer::resFile
TFile * resFile
Definition: EcalTestPulseAnalyzer.h:106
EcalTestPulseAnalyzer::_lastsamplePN
unsigned int _lastsamplePN
Definition: EcalTestPulseAnalyzer.h:58
EcalTestPulseAnalyzer::apdGain
int apdGain
Definition: EcalTestPulseAnalyzer.h:119
EcalTestPulseAnalyzer::iChannelID
int iChannelID[1700]
Definition: EcalTestPulseAnalyzer.h:146
EcalTestPulseAnalyzer::restrees
TTree * restrees
Definition: EcalTestPulseAnalyzer.h:130
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
EcalTestPulseAnalyzer::iphi
int iphi
Definition: EcalTestPulseAnalyzer.h:139
EcalTestPulseAnalyzer::pnID
int pnID
Definition: EcalTestPulseAnalyzer.h:140
EcalTestPulseAnalyzer::_nsamples
unsigned int _nsamples
Definition: EcalTestPulseAnalyzer.h:49
EcalTestPulseAnalyzer::nGainAPD
unsigned int nGainAPD
Definition: EcalTestPulseAnalyzer.h:84
EcalTestPulseAnalyzer::nMod
unsigned int nMod
Definition: EcalTestPulseAnalyzer.h:82
EcalTestPulseAnalyzer::fedID
int fedID
Definition: EcalTestPulseAnalyzer.h:98
EcalTestPulseAnalyzer::eventHeaderCollection_
std::string eventHeaderCollection_
Definition: EcalTestPulseAnalyzer.h:69
EcalTestPulseAnalyzer::iModule
unsigned int iModule[1700]
Definition: EcalTestPulseAnalyzer.h:145
EcalTestPulseAnalyzer::beginJob
void beginJob() override
Definition: EcalTestPulseAnalyzer.cc:131
EcalTestPulseAnalyzer::apdTime
double apdTime
Definition: EcalTestPulseAnalyzer.h:123
EcalTestPulseAnalyzer::adc
double adc[10]
Definition: EcalTestPulseAnalyzer.h:116
EcalTestPulseAnalyzer::ret_data
double ret_data[20]
Definition: EcalTestPulseAnalyzer.h:89
EcalTestPulseAnalyzer::outFile
TFile * outFile
Definition: EcalTestPulseAnalyzer.h:105
EcalTestPulseAnalyzer::_chi2max
double _chi2max
Definition: EcalTestPulseAnalyzer.h:60
EcalTestPulseAnalyzer::trees
TTree * trees[1700]
Definition: EcalTestPulseAnalyzer.h:110
EcalTestPulseAnalyzer::dccMEM
std::vector< int > dccMEM
Definition: EcalTestPulseAnalyzer.h:134
EcalTestPulseAnalyzer::ieta
int ieta
Definition: EcalTestPulseAnalyzer.h:139
EcalTestPulseAnalyzer::_lastsample
unsigned int _lastsample
Definition: EcalTestPulseAnalyzer.h:52
EcalTestPulseAnalyzer::endJob
void endJob() override
Definition: EcalTestPulseAnalyzer.cc:642
EcalTestPulseAnalyzer::_ecalPart
std::string _ecalPart
Definition: EcalTestPulseAnalyzer.h:62
edm::ParameterSet
Definition: ParameterSet.h:47
EcalTestPulseAnalyzer::_samplemax
unsigned int _samplemax
Definition: EcalTestPulseAnalyzer.h:54
EcalTestPulseAnalyzer::flag
int flag
Definition: EcalTestPulseAnalyzer.h:139
EcalTestPulseAnalyzer::idccID
int idccID[1700]
Definition: EcalTestPulseAnalyzer.h:146
EcalTestPulseAnalyzer::APD
double APD[6]
Definition: EcalTestPulseAnalyzer.h:142
EcalTestPulseAnalyzer::runNum
int runNum
Definition: EcalTestPulseAnalyzer.h:97
EcalTestPulseAnalyzer::event
int event
Definition: EcalTestPulseAnalyzer.h:115
EcalTestPulseAnalyzer::resfile
std::string resfile
Definition: EcalTestPulseAnalyzer.h:75
EcalTestPulseAnalyzer::pnG
int pnG
Definition: EcalTestPulseAnalyzer.h:121
EcalTestPulseAnalyzer::_firstsamplePN
unsigned int _firstsamplePN
Definition: EcalTestPulseAnalyzer.h:57
EcalTestPulseAnalyzer
Definition: EcalTestPulseAnalyzer.h:35
EcalTestPulseAnalyzer::_timeofmax
double _timeofmax
Definition: EcalTestPulseAnalyzer.h:61
EcalTestPulseAnalyzer::iEta
int iEta[1700]
Definition: EcalTestPulseAnalyzer.h:144
EcalTestPulseAnalyzer::pn
double pn[50]
Definition: EcalTestPulseAnalyzer.h:117
edm::EventSetup
Definition: EventSetup.h:58
EcalTestPulseAnalyzer::digiPNCollection_
std::string digiPNCollection_
Definition: EcalTestPulseAnalyzer.h:67
EcalTestPulseAnalyzer::_presample
unsigned int _presample
Definition: EcalTestPulseAnalyzer.h:50
NCRYSEB
#define NCRYSEB
Definition: EcalTestPulseAnalyzer.h:22
EcalTestPulseAnalyzer::moduleID
int moduleID
Definition: EcalTestPulseAnalyzer.h:140
EcalTestPulseAnalyzer::channelID
int channelID
Definition: EcalTestPulseAnalyzer.h:92
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalTestPulseAnalyzer::eventHeaderProducer_
std::string eventHeaderProducer_
Definition: EcalTestPulseAnalyzer.h:70
EcalTestPulseAnalyzer::nTT
unsigned int nTT
Definition: EcalTestPulseAnalyzer.h:81
EcalTestPulseAnalyzer::apdAmpl
double apdAmpl
Definition: EcalTestPulseAnalyzer.h:122
EcalTestPulseAnalyzer::isFirstChanModFilled
unsigned int isFirstChanModFilled[9]
Definition: EcalTestPulseAnalyzer.h:149
EcalTestPulseAnalyzer::firstChanMod
unsigned int firstChanMod[9]
Definition: EcalTestPulseAnalyzer.h:148
EcalTestPulseAnalyzer::dccID
int dccID
Definition: EcalTestPulseAnalyzer.h:99
EcalTestPulseAnalyzer::modules
std::vector< int > modules
Definition: EcalTestPulseAnalyzer.h:135
EcalTestPulseAnalyzer::iTowerID
int iTowerID[1700]
Definition: EcalTestPulseAnalyzer.h:146
EcalTestPulseAnalyzer::channelIteratorEE
int channelIteratorEE
Definition: EcalTestPulseAnalyzer.h:141
EcalTestPulseAnalyzer::iPhi
int iPhi[1700]
Definition: EcalTestPulseAnalyzer.h:144
EcalTestPulseAnalyzer::pnAmpl0
double pnAmpl0
Definition: EcalTestPulseAnalyzer.h:124
EcalTestPulseAnalyzer::respntrees
TTree * respntrees
Definition: EcalTestPulseAnalyzer.h:131
EcalTestPulseAnalyzer::_nsamplesPN
unsigned int _nsamplesPN
Definition: EcalTestPulseAnalyzer.h:55
EcalTestPulseAnalyzer::runType
int runType
Definition: EcalTestPulseAnalyzer.h:96
EcalTestPulseAnalyzer::_presamplePN
unsigned int _presamplePN
Definition: EcalTestPulseAnalyzer.h:56
EcalTestPulseAnalyzer::~EcalTestPulseAnalyzer
~EcalTestPulseAnalyzer() override
Definition: EcalTestPulseAnalyzer.cc:123
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
edm::Event
Definition: Event.h:73
EcalTestPulseAnalyzer::channelMapEE
std::map< int, int > channelMapEE
Definition: EcalTestPulseAnalyzer.h:133
EcalTestPulseAnalyzer::side
int side
Definition: EcalTestPulseAnalyzer.h:100
EcalTestPulseAnalyzer::PN
double PN[6]
Definition: EcalTestPulseAnalyzer.h:142
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37