CMS 3D CMS Logo

FTLUncalibratedRecHit.cc
Go to the documentation of this file.
2 #include <cmath>
3 #include <limits>
4 
6  amplitude_(-1.f,-1.f), time_(-1.f,-1.f), timeError_(-1.f), id_(DetId()),
7  row_(0), column_(0), flags_(std::numeric_limits<unsigned char>::max()) { }
8 
9 FTLUncalibratedRecHit::FTLUncalibratedRecHit(const DetId& id, std::pair <float,float> ampl,
10  std::pair <float,float> time, float timeError, unsigned char flags) :
11  amplitude_(ampl), time_(time), timeError_(timeError), id_(id), row_(0), column_(0), flags_(flags) { }
12 
14  std::pair <float,float> ampl, std::pair <float,float> time,
15  float timeError, unsigned char flags) :
16  amplitude_(ampl), time_(time), timeError_(timeError), id_(id), row_(row), column_(column), flags_(flags) { }
17 
19 }
20 
23 }
24 
26  if(timeError() < 0)
27  return false;
28  else
29  return true;
30 }
31 
33  if(!isTimeValid())
34  return false;
35  if(timeError() >= 10000)
36  return false;
37 
38  return true;
39 }
40 
42 
43  if (flag == kGood) {
44  //then set all bits to zero;
45  flags_ = 0;
46  return;
47  }
48  // else set the flagbit
49  flags_|= 0x1 << flag;
50 }
51 
52 
54  if(flag == kGood){ if ( ! flags_ ) return true;else return false;} // if all flags are unset, then hit is good
55  return flags_ & ( 0x1<<flag);
56 }
bool checkFlag(Flags flag) const
std::pair< float, float > amplitude_
double f[11][100]
Definition: DetId.h:18
std::pair< float, float > time_
std::pair< float, float > time() const
unsigned char flags() const