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 
103 typedef struct ZDCN{
104  double zdcHADMod1;
105  double zdcHADMod2;
106  double zdcHADMod3;
107  double zdcHADMod4;
108  double zdcEMMod1;
109  double zdcEMMod2;
110  double zdcEMMod3;
111  double zdcEMMod4;
112  double zdcEMMod5;
113  double zdcScint1;
114  double zdcScint2;
115  double zdcExtras[7];
116 }ZDCN;
117 
118 typedef struct ZDCP{
119  double zdcHADMod1;
120  double zdcHADMod2;
121  double zdcHADMod3;
122  double zdcHADMod4;
123  double zdcEMMod1;
124  double zdcEMMod2;
125  double zdcEMMod3;
126  double zdcEMMod4;
127  double zdcEMMod5;
128  double zdcScint1;
129  double zdcScint2;
130  double zdcExtras[7];
131 }ZDCP;
132 
134 public:
135  ZdcTBAnalysis();
136  void setup(const std::string& histoFileName);
137  void analyze(const ZDCRecHitCollection& hf);
138  void analyze(const HcalTBTriggerData& trg);
139  void analyze(const HcalTBBeamCounters& bc);
140  void analyze(const HcalTBTiming& times);
141  void analyze(const HcalTBEventPosition& chpos);
142  void fillTree();
143  void done();
144 
145  private:
146  int iside;
147  int isection;
148  int ichannel;
149  int idepth;
150  double energy;
152 
163 
164  double trigger_time;
165  double ttc_L1a_time;
166  double beam_coincidence[5];
167  double laser_flash;
168  double qie_phase;
169  double TOF1_time;
170  double TOF2_time;
171 
172  double m1hits[5];
173  double m2hits[5];
174  double m3hits[5];
175  double s1hits[5];
176  double s2hits[5];
177  double s3hits[5];
178  double s4hits[5];
179  double bh1hits[5];
180  double bh2hits[5];
181  double bh3hits[5];
182  double bh4hits[5];
183 
184  double VMadc;
185  double V3adc;
186  double V6adc;
187  double VH1adc;
188  double VH2adc;
189  double VH3adc;
190  double VH4adc;
191  double Ecal7x7adc;
192  double Sci521adc;
193  double Sci528adc;
194 
195  double CK1adc;
196  double CK2adc;
197  double CK3adc;
198  double SciVLEadc;
199  double S1adc;
200  double S2adc;
201  double S3adc;
202  double S4adc;
203 
204  double VMFadc;
205  double VMBadc;
206  double VM1adc;
207  double VM2adc;
208  double VM3adc;
209  double VM4adc;
210  double VM5adc;
211  double VM6adc;
212  double VM7adc;
213  double VM8adc;
214  double TOF1adc;
215  double TOF2adc;
216  double BH1adc;
217  double BH2adc;
218  double BH3adc;
219  double BH4adc;
220 
221  std::vector<double> wcax;
222  std::vector<double> wcay;
223  std::vector<double> wcbx;
224  std::vector<double> wcby;
225  std::vector<double> wccx;
226  std::vector<double> wccy;
227  std::vector<double> wcdx;
228  std::vector<double> wcdy;
229  std::vector<double> wcex;
230  std::vector<double> wcey;
231  std::vector<double> wcfx;
232  std::vector<double> wcfy;
233  std::vector<double> wcgx;
234  std::vector<double> wcgy;
235  std::vector<double> wchx;
236  std::vector<double> wchy;
237 
244 
245  TFile* outFile;
246  TTree* ZdcAnalize;
247 
248  };
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
std::vector< double > wchx
def analyze(function, filename, filter=None)
Definition: Profiling.py:11
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
double VH2
Definition: ZdcTBAnalysis.h:51
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
double trigger_time
double zdcEMMod5
double VH3
Definition: ZdcTBAnalysis.h:52
double zdcEMMod1
struct TRIGGGER TRIGGER
double VM5
Definition: ZdcTBAnalysis.h:71
double zdcScint1
double VMF
Definition: ZdcTBAnalysis.h:65
int fakeTrigger
Definition: ZdcTBAnalysis.h:16
std::vector< double > wcbx
double S1
Definition: ZdcTBAnalysis.h:61
int laserTrigger
Definition: ZdcTBAnalysis.h:20
std::vector< double > wccy
double zdcScint2
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
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
struct ZDCN ZDCN
double VH4
Definition: ZdcTBAnalysis.h:53
def trg(schema, nls)
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
struct ZDCP ZDCP
double VM7
Definition: ZdcTBAnalysis.h:73
int eventNum
Definition: ZdcTBAnalysis.h:14
struct TDC TDC
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
struct CHAMB CHAMB
double zdcHADMod4
double BH2
Definition: ZdcTBAnalysis.h:78
struct ADC ADC
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
double zdcEMMod4
double qiePhase
Definition: ZdcTBAnalysis.h:30