test
CMS 3D CMS Logo

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