CMS 3D CMS Logo

HcalTBTiming.cc
Go to the documentation of this file.
2 
3 using namespace std;
4 
6  : triggerTime_(0),
7  ttcL1Atime_(0),
8  laserFlash_(0),
9  qiePhase_(0),
10  TOF1Stime_(0),
11  TOF1Jtime_(0),
12  TOF2Stime_(0),
13  TOF2Jtime_(0),
14  beamCoincidenceHits_(),
15  m1hits_(),
16  m2hits_(),
17  m3hits_(),
18  s1hits_(),
19  s2hits_(),
20  s3hits_(),
21  s4hits_(),
22  bh1hits_(),
23  bh2hits_(),
24  bh3hits_(),
25  bh4hits_() {
26  for (int i = 0; i < 32; i++)
27  V775_[i] = -1;
28 }
29 
30 void HcalTBTiming::setTimes(const double trigger_time,
31  const double ttc_l1a_time,
32  const double laser_flash,
33  const double qie_phase,
34  const double TOF1S_time,
35  const double TOF1J_time,
36  const double TOF2S_time,
37  const double TOF2J_time) {
38  triggerTime_ = trigger_time;
39  ttcL1Atime_ = ttc_l1a_time;
40  laserFlash_ = laser_flash;
41  qiePhase_ = qie_phase;
42  TOF1Stime_ = TOF1S_time;
43  TOF1Jtime_ = TOF1J_time;
44  TOF2Stime_ = TOF2S_time;
45  TOF2Jtime_ = TOF2J_time;
46 }
47 
48 void HcalTBTiming::setHits(const std::vector<double>& m1hits,
49  const std::vector<double>& m2hits,
50  const std::vector<double>& m3hits,
51  const std::vector<double>& s1hits,
52  const std::vector<double>& s2hits,
53  const std::vector<double>& s3hits,
54  const std::vector<double>& s4hits,
55  const std::vector<double>& bh1hits,
56  const std::vector<double>& bh2hits,
57  const std::vector<double>& bh3hits,
58  const std::vector<double>& bh4hits,
59  const std::vector<double>& beamCoincidenceHits) {
60  m1hits_ = m1hits;
61  m2hits_ = m2hits;
62  m3hits_ = m3hits;
63 
64  s1hits_ = s1hits;
65  s2hits_ = s2hits;
66  s3hits_ = s3hits;
67  s4hits_ = s4hits;
68 
69  bh1hits_ = bh1hits;
70  bh2hits_ = bh2hits;
71  bh3hits_ = bh3hits;
72  bh4hits_ = bh4hits;
73  beamCoincidenceHits_ = beamCoincidenceHits;
74 }
75 
76 void HcalTBTiming::setV775(int* V775) {
77  for (int i = 0; i < 32; i++)
78  V775_[i] = V775[i];
79 }
80 
81 ostream& operator<<(ostream& s, const HcalTBTiming& htbtmg) {
82  s << "Trigger time = " << htbtmg.triggerTime() << endl;
83  s << "TTC L1A time = " << htbtmg.ttcL1Atime() << endl;
84  s << "Laser Flash = " << htbtmg.laserFlash() << endl;
85  s << "QIE Phase = " << htbtmg.qiePhase() << endl;
86  s << "TOF1S = " << htbtmg.TOF1Stime() << endl;
87  s << "TOF1J = " << htbtmg.TOF1Jtime() << endl;
88  s << "TOF2S = " << htbtmg.TOF2Stime() << endl;
89  s << "TOF2J = " << htbtmg.TOF2Jtime() << endl;
90 
91  s << "M1 hits: ";
92  for (int i = 0; i < htbtmg.M1Count(); i++) {
93  if (i)
94  s << ", ";
95  s << htbtmg.M1Hits(i);
96  }
97  s << endl;
98 
99  s << "M2 hits: ";
100  for (int i = 0; i < htbtmg.M2Count(); i++) {
101  if (i)
102  s << ", ";
103  s << htbtmg.M2Hits(i);
104  }
105  s << endl;
106 
107  s << "M3 hits: ";
108  for (int i = 0; i < htbtmg.M3Count(); i++) {
109  if (i)
110  s << ", ";
111  s << htbtmg.M3Hits(i);
112  }
113  s << endl;
114 
115  s << "S1 hits: ";
116  for (int i = 0; i < htbtmg.S1Count(); i++) {
117  if (i)
118  s << ", ";
119  s << htbtmg.S1Hits(i);
120  }
121  s << endl;
122 
123  s << "S2 hits: ";
124  for (int i = 0; i < htbtmg.S2Count(); i++) {
125  if (i)
126  s << ", ";
127  s << htbtmg.S2Hits(i);
128  }
129  s << endl;
130 
131  s << "S3 hits: ";
132  for (int i = 0; i < htbtmg.S3Count(); i++) {
133  if (i)
134  s << ", ";
135  s << htbtmg.S3Hits(i);
136  }
137  s << endl;
138 
139  s << "S4 hits: ";
140  for (int i = 0; i < htbtmg.S4Count(); i++) {
141  if (i)
142  s << ", ";
143  s << htbtmg.S4Hits(i);
144  }
145  s << endl;
146 
147  s << "BH1 hits: ";
148  for (int i = 0; i < htbtmg.BH1Count(); i++) {
149  if (i)
150  s << ", ";
151  s << htbtmg.BH1Hits(i);
152  }
153  s << endl;
154 
155  s << "BH2 hits: ";
156  for (int i = 0; i < htbtmg.BH2Count(); i++) {
157  if (i)
158  s << ", ";
159  s << htbtmg.BH2Hits(i);
160  }
161  s << endl;
162 
163  s << "BH3 hits: ";
164  for (int i = 0; i < htbtmg.BH3Count(); i++) {
165  if (i)
166  s << ", ";
167  s << htbtmg.BH3Hits(i);
168  }
169  s << endl;
170 
171  s << "BH4 hits: ";
172  for (int i = 0; i < htbtmg.BH4Count(); i++) {
173  if (i)
174  s << ", ";
175  s << htbtmg.BH4Hits(i);
176  }
177  s << endl;
178 
179  s << "Beam Coincidence hits: ";
180  for (int i = 0; i < htbtmg.BeamCoincidenceCount(); i++) {
181  if (i)
182  s << ", ";
183  s << htbtmg.BeamCoincidenceHits(i);
184  }
185  s << endl;
186 
187  return s;
188 }
HcalTBTiming::M2Count
int M2Count() const
Returns the number of hits from muon veto scintillator M2.
Definition: HcalTBTiming.h:48
HcalTBTiming::BH3Count
int BH3Count() const
Returns the number of hits from beam halo counter right from particle view.
Definition: HcalTBTiming.h:66
mps_fire.i
i
Definition: mps_fire.py:428
HcalTBTiming.h
HcalTBTiming::S1Hits
double S1Hits(int index) const
Returns the indexed hit time from scintillator S1, which is 12cm x 12cm.
Definition: HcalTBTiming.h:80
HcalTBTiming::s4hits_
std::vector< double > s4hits_
Definition: HcalTBTiming.h:144
HcalTBTiming::S2Count
int S2Count() const
Returns the number of hits from scintillator S2, which is 4cm x 4cm.
Definition: HcalTBTiming.h:55
HcalTBTiming::beamCoincidenceHits_
std::vector< double > beamCoincidenceHits_
Definition: HcalTBTiming.h:135
HcalTBTiming::S2Hits
double S2Hits(int index) const
Returns the indexed hit time from scintillator S2, which is 4cm x 4cm.
Definition: HcalTBTiming.h:82
HcalTBTiming::s3hits_
std::vector< double > s3hits_
Definition: HcalTBTiming.h:143
HcalTBTiming::setHits
void setHits(const std::vector< double > &m1hits, const std::vector< double > &m2hits, const std::vector< double > &m3hits, const std::vector< double > &s1hits, const std::vector< double > &s2hits, const std::vector< double > &s3hits, const std::vector< double > &s4hits, const std::vector< double > &bh1hits, const std::vector< double > &bh2hits, const std::vector< double > &bh3hits, const std::vector< double > &bh4hits, const std::vector< double > &beamCoincidenceHits)
Definition: HcalTBTiming.cc:48
HcalTBTiming::setTimes
void setTimes(const double trigger_time, const double ttc_l1a_time, const double laser_flash, const double qie_phase, const double TOF1S_time, const double TOF1J_time, const double TOF2S_time, const double TOF2J_time)
Definition: HcalTBTiming.cc:30
HcalTBTiming::M1Count
int M1Count() const
Returns the number of hits from muon veto scintillator M1.
Definition: HcalTBTiming.h:46
HcalTBTiming::s1hits_
std::vector< double > s1hits_
Definition: HcalTBTiming.h:141
HcalTBTiming::BH2Count
int BH2Count() const
Returns the number of hits from beam halo counter left from particle view.
Definition: HcalTBTiming.h:64
HcalTBTiming::S1Count
int S1Count() const
Returns the number of hits from scintillator S1, which is 12cm x 12cm.
Definition: HcalTBTiming.h:53
HcalTBTiming::S4Count
int S4Count() const
Returns the number of hits from scintillator S4, which is 12cm x 12cm.
Definition: HcalTBTiming.h:59
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HcalTBTiming::m3hits_
std::vector< double > m3hits_
Definition: HcalTBTiming.h:139
HcalTBTiming::TOF1Stime_
double TOF1Stime_
Definition: HcalTBTiming.h:129
HcalTBTiming::BeamCoincidenceHits
double BeamCoincidenceHits(int index) const
Returns the indexed hit time from Beam Coincidence.
Definition: HcalTBTiming.h:71
HcalTBTiming::S4Hits
double S4Hits(int index) const
Returns the indexed hit time from scintillator S4, which is 12cm x 12cm.
Definition: HcalTBTiming.h:86
HcalTBTiming::qiePhase
double qiePhase() const
Returns the QIE phase for 2003 testbeam data (zero otherwise)
Definition: HcalTBTiming.h:32
HcalTBTiming::m2hits_
std::vector< double > m2hits_
Definition: HcalTBTiming.h:138
HcalTBTiming::bh4hits_
std::vector< double > bh4hits_
Definition: HcalTBTiming.h:149
HcalTBTiming
Definition: HcalTBTiming.h:17
HcalTBTiming::bh2hits_
std::vector< double > bh2hits_
Definition: HcalTBTiming.h:147
HcalTBTiming::BH4Hits
double BH4Hits(int index) const
Returns the indexed hit time from beam halo counter DOWN HORZINTAL.
Definition: HcalTBTiming.h:95
HcalTBTiming::laserFlash
double laserFlash() const
Returns the laser activation time in ns.
Definition: HcalTBTiming.h:30
HcalTBTiming::S3Hits
double S3Hits(int index) const
Returns the indexed hit time from scintillator S3, which is 2cm x 2cm.
Definition: HcalTBTiming.h:84
HcalTBTiming::ttcL1Atime_
double ttcL1Atime_
Definition: HcalTBTiming.h:126
HcalTBTiming::BH1Count
int BH1Count() const
Returns the number of hits from beam halo counter up horizontal.
Definition: HcalTBTiming.h:62
HcalTBTiming::qiePhase_
double qiePhase_
Definition: HcalTBTiming.h:128
HcalTBTiming::M1Hits
double M1Hits(int index) const
Returns the indexed hit time from muon veto scintillator M1.
Definition: HcalTBTiming.h:73
HcalTBTiming::M3Count
int M3Count() const
Returns the number of hits from muon veto scintillator M3.
Definition: HcalTBTiming.h:50
HcalTBTiming::m1hits_
std::vector< double > m1hits_
Definition: HcalTBTiming.h:137
HcalTBTiming::TOF1Jtime
double TOF1Jtime() const
Returns the TOF1J time (zero otherwise)
Definition: HcalTBTiming.h:37
HcalTBTiming::V775_
int V775_[32]
Definition: HcalTBTiming.h:134
HcalTBTiming::BH3Hits
double BH3Hits(int index) const
Returns the indexed hit time from beam halo counter BEAM RIGHT FROM PARTICLE'S VIEW.
Definition: HcalTBTiming.h:93
HcalTBTiming::setV775
void setV775(int *V775)
Definition: HcalTBTiming.cc:76
HcalTBTiming::triggerTime
double triggerTime() const
Returns the trigger time in ns.
Definition: HcalTBTiming.h:24
HcalTBTiming::S3Count
int S3Count() const
Returns the number of hits from scintillator S3, which is 2cm x 2cm.
Definition: HcalTBTiming.h:57
HcalTBTiming::M2Hits
double M2Hits(int index) const
Returns the indexed hit time from muon veto scintillator M2.
Definition: HcalTBTiming.h:75
HcalTBTiming::TOF2Jtime
double TOF2Jtime() const
Returns the TOF2J time (zero otherwise)
Definition: HcalTBTiming.h:41
HcalTBTiming::BH1Hits
double BH1Hits(int index) const
Returns the indexed hit time from beam halo counter UP HORIZONTAL.
Definition: HcalTBTiming.h:89
std
Definition: JetResolutionObject.h:76
HcalTBTiming::bh3hits_
std::vector< double > bh3hits_
Definition: HcalTBTiming.h:148
HcalTBTiming::M3Hits
double M3Hits(int index) const
Returns the indexed hit time from muon veto scintillator M3.
Definition: HcalTBTiming.h:77
HcalTBTiming::TOF1Jtime_
double TOF1Jtime_
Definition: HcalTBTiming.h:130
HcalTBTiming::laserFlash_
double laserFlash_
Definition: HcalTBTiming.h:127
HcalTBTiming::ttcL1Atime
double ttcL1Atime() const
Returns the Level 1 Accept time in ns.
Definition: HcalTBTiming.h:27
HcalTBTiming::TOF2Jtime_
double TOF2Jtime_
Definition: HcalTBTiming.h:132
HcalTBTiming::BeamCoincidenceCount
int BeamCoincidenceCount() const
Returns the number of hits from Beam Coincidence.
Definition: HcalTBTiming.h:44
operator<<
ostream & operator<<(ostream &s, const HcalTBTiming &htbtmg)
Definition: HcalTBTiming.cc:81
HcalTBTiming::TOF2Stime_
double TOF2Stime_
Definition: HcalTBTiming.h:131
HcalTBTiming::triggerTime_
double triggerTime_
Definition: HcalTBTiming.h:125
HcalTBTiming::bh1hits_
std::vector< double > bh1hits_
Definition: HcalTBTiming.h:146
HcalTBTiming::HcalTBTiming
HcalTBTiming()
Definition: HcalTBTiming.cc:5
HcalTBTiming::TOF2Stime
double TOF2Stime() const
Returns the TOF2S time (zero otherwise)
Definition: HcalTBTiming.h:39
HcalTBTiming::s2hits_
std::vector< double > s2hits_
Definition: HcalTBTiming.h:142
HcalTBTiming::BH4Count
int BH4Count() const
Returns the number of hits from beam halo counter down horizontal.
Definition: HcalTBTiming.h:68
HcalTBTiming::TOF1Stime
double TOF1Stime() const
Returns the TOF1S time (zero otherwise)
Definition: HcalTBTiming.h:35
HcalTBTiming::BH2Hits
double BH2Hits(int index) const
Returns the indexed hit time from from beam halo counter BEAM LEFT FROM PARTICLE'S VIEW.
Definition: HcalTBTiming.h:91
HcalTBTiming::V775
int V775(int index) const
Returns the hit in the specified channel.
Definition: HcalTBTiming.h:97