CMS 3D CMS Logo

ZdcTBAnalysis.h
Go to the documentation of this file.
1 #include "TH1.h"
2 #include "TFile.h"
3 #include "TTree.h"
9 #include <map>
10 #include <vector>
11 
12 typedef struct TRIGGGER {
13  int runNum;
14  int eventNum;
23 } TRIGGER;
24 
25 typedef struct TDC {
26  double trigger;
27  double ttcL1;
28  double beamCoincidence[5];
29  double laserFlash;
30  double qiePhase;
31  double TOF1;
32  double TOF2;
33  double m1[5];
34  double m2[5];
35  double m3[5];
36  double s1[5];
37  double s2[5];
38  double s3[5];
39  double s4[5];
40  double bh1[5];
41  double bh2[5];
42  double bh3[5];
43  double bh4[5];
44 } TDC;
45 
46 typedef struct ADC {
47  double VM;
48  double V3;
49  double V6;
50  double VH1;
51  double VH2;
52  double VH3;
53  double VH4;
54  double Ecal7x7;
55  double Sci521;
56  double Sci528;
57  double CK1;
58  double CK2;
59  double CK3;
60  double SciVLE;
61  double S1;
62  double S2;
63  double S3;
64  double S4;
65  double VMF;
66  double VMB;
67  double VM1;
68  double VM2;
69  double VM3;
70  double VM4;
71  double VM5;
72  double VM6;
73  double VM7;
74  double VM8;
75  double TOF1;
76  double TOF2;
77  double BH1;
78  double BH2;
79  double BH3;
80  double BH4;
81 } ADC;
82 
83 typedef struct CHAMB {
84  double WCAx[5];
85  double WCAy[5];
86  double WCBx[5];
87  double WCBy[5];
88  double WCCx[5];
89  double WCCy[5];
90  double WCDx[5];
91  double WCDy[5];
92  double WCEx[5];
93  double WCEy[5];
94  double WCFx[5];
95  double WCFy[5];
96  double WCGx[5];
97  double WCGy[5];
98  double WCHx[5];
99  double WCHy[5];
100 } CHAMB;
101 
102 typedef struct ZDCN {
103  double zdcHADMod1;
104  double zdcHADMod2;
105  double zdcHADMod3;
106  double zdcHADMod4;
107  double zdcEMMod1;
108  double zdcEMMod2;
109  double zdcEMMod3;
110  double zdcEMMod4;
111  double zdcEMMod5;
112  double zdcScint1;
113  double zdcScint2;
114  double zdcExtras[7];
115 } ZDCN;
116 
117 typedef struct ZDCP {
118  double zdcHADMod1;
119  double zdcHADMod2;
120  double zdcHADMod3;
121  double zdcHADMod4;
122  double zdcEMMod1;
123  double zdcEMMod2;
124  double zdcEMMod3;
125  double zdcEMMod4;
126  double zdcEMMod5;
127  double zdcScint1;
128  double zdcScint2;
129  double zdcExtras[7];
130 } ZDCP;
131 
133 public:
134  ZdcTBAnalysis();
135  void setup(const std::string& histoFileName);
136  void analyze(const ZDCRecHitCollection& hf);
137  void analyze(const HcalTBTriggerData& trg);
138  void analyze(const HcalTBBeamCounters& bc);
139  void analyze(const HcalTBTiming& times);
140  void analyze(const HcalTBEventPosition& chpos);
141  void fillTree();
142  void done();
143 
144 private:
145  int iside;
146  int isection;
147  int ichannel;
148  int idepth;
149  double energy;
151 
162 
163  double trigger_time;
164  double ttc_L1a_time;
165  double beam_coincidence[5];
166  double laser_flash;
167  double qie_phase;
168  double TOF1_time;
169  double TOF2_time;
170 
171  double m1hits[5];
172  double m2hits[5];
173  double m3hits[5];
174  double s1hits[5];
175  double s2hits[5];
176  double s3hits[5];
177  double s4hits[5];
178  double bh1hits[5];
179  double bh2hits[5];
180  double bh3hits[5];
181  double bh4hits[5];
182 
183  double VMadc;
184  double V3adc;
185  double V6adc;
186  double VH1adc;
187  double VH2adc;
188  double VH3adc;
189  double VH4adc;
190  double Ecal7x7adc;
191  double Sci521adc;
192  double Sci528adc;
193 
194  double CK1adc;
195  double CK2adc;
196  double CK3adc;
197  double SciVLEadc;
198  double S1adc;
199  double S2adc;
200  double S3adc;
201  double S4adc;
202 
203  double VMFadc;
204  double VMBadc;
205  double VM1adc;
206  double VM2adc;
207  double VM3adc;
208  double VM4adc;
209  double VM5adc;
210  double VM6adc;
211  double VM7adc;
212  double VM8adc;
213  double TOF1adc;
214  double TOF2adc;
215  double BH1adc;
216  double BH2adc;
217  double BH3adc;
218  double BH4adc;
219 
220  std::vector<double> wcax;
221  std::vector<double> wcay;
222  std::vector<double> wcbx;
223  std::vector<double> wcby;
224  std::vector<double> wccx;
225  std::vector<double> wccy;
226  std::vector<double> wcdx;
227  std::vector<double> wcdy;
228  std::vector<double> wcex;
229  std::vector<double> wcey;
230  std::vector<double> wcfx;
231  std::vector<double> wcfy;
232  std::vector<double> wcgx;
233  std::vector<double> wcgy;
234  std::vector<double> wchx;
235  std::vector<double> wchy;
236 
243 
244  TFile* outFile;
245  TTree* ZdcAnalize;
246 };
int ledTrigger
Definition: ZdcTBAnalysis.h:21
double VM4
Definition: ZdcTBAnalysis.h:70
std::vector< double > wcfx
std::vector< double > wcgx
double laser_flash
int outSpillPedestalTrigger
Definition: ZdcTBAnalysis.h:18
double zdcEMMod2
double S2
Definition: ZdcTBAnalysis.h:62
double trigger
Definition: ZdcTBAnalysis.h:26
std::vector< double > wcex
struct CHAMB CHAMB
std::vector< double > wchx
double zdcEMMod3
double zdcHADMod3
double zdcEMMod3
std::vector< double > wcax
double CK1
Definition: ZdcTBAnalysis.h:57
double Sci528
Definition: ZdcTBAnalysis.h:56
std::vector< double > wccx
double VM
Definition: ZdcTBAnalysis.h:47
std::vector< double > wchy
struct TRIGGGER TRIGGER
double VH2
Definition: ZdcTBAnalysis.h:51
double trigger_time
double zdcEMMod5
double VH3
Definition: ZdcTBAnalysis.h:52
double zdcEMMod1
double VM5
Definition: ZdcTBAnalysis.h:71
double zdcScint1
double VMF
Definition: ZdcTBAnalysis.h:65
struct ZDCP ZDCP
int fakeTrigger
Definition: ZdcTBAnalysis.h:16
std::vector< double > wcbx
double S1
Definition: ZdcTBAnalysis.h:61
int laserTrigger
Definition: ZdcTBAnalysis.h:20
struct TDC TDC
std::vector< double > wccy
double zdcScint2
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
double TOF2
Definition: ZdcTBAnalysis.h:76
std::vector< double > wcgy
std::vector< double > wcey
double VM2
Definition: ZdcTBAnalysis.h:68
double VH1
Definition: ZdcTBAnalysis.h:50
struct ZDCN ZDCN
double VM1
Definition: ZdcTBAnalysis.h:67
double VM8
Definition: ZdcTBAnalysis.h:74
double V6
Definition: ZdcTBAnalysis.h:49
std::vector< double > wcdy
double SciVLE
Definition: ZdcTBAnalysis.h:60
double VM3
Definition: ZdcTBAnalysis.h:69
double zdcEMMod1
double zdcEMMod2
double Sci521
Definition: ZdcTBAnalysis.h:55
double VH4
Definition: ZdcTBAnalysis.h:53
int spillTrigger
Definition: ZdcTBAnalysis.h:22
double ttc_L1a_time
std::vector< double > wcfy
double zdcHADMod3
double S3
Definition: ZdcTBAnalysis.h:63
double zdcHADMod2
double zdcScint1
double CK3
Definition: ZdcTBAnalysis.h:59
double VM6
Definition: ZdcTBAnalysis.h:72
double zdcHADMod4
double Ecal7x7
Definition: ZdcTBAnalysis.h:54
double zdcEMMod4
double VMB
Definition: ZdcTBAnalysis.h:66
double BH4
Definition: ZdcTBAnalysis.h:80
double TOF1
Definition: ZdcTBAnalysis.h:75
double S4
Definition: ZdcTBAnalysis.h:64
int beamTrigger
Definition: ZdcTBAnalysis.h:15
double CK2
Definition: ZdcTBAnalysis.h:58
HcalZDCDetId detID
double zdcScint2
std::vector< double > wcdx
double BH3
Definition: ZdcTBAnalysis.h:79
double TOF1
Definition: ZdcTBAnalysis.h:31
double zdcHADMod1
double V3
Definition: ZdcTBAnalysis.h:48
double zdcHADMod2
double VM7
Definition: ZdcTBAnalysis.h:73
int eventNum
Definition: ZdcTBAnalysis.h:14
std::vector< double > wcby
TTree * ZdcAnalize
double TOF2
Definition: ZdcTBAnalysis.h:32
int calibTrigger
Definition: ZdcTBAnalysis.h:17
bool isOutSpillPedestalTrigger
double laserFlash
Definition: ZdcTBAnalysis.h:29
double zdcHADMod4
double BH2
Definition: ZdcTBAnalysis.h:78
double ttcL1
Definition: ZdcTBAnalysis.h:27
int inSpillPedestalTrigger
Definition: ZdcTBAnalysis.h:19
bool isInSpillPedestalTrigger
double zdcHADMod1
double zdcEMMod5
double BH1
Definition: ZdcTBAnalysis.h:77
std::vector< double > wcay
struct ADC ADC
double zdcEMMod4
double qiePhase
Definition: ZdcTBAnalysis.h:30