CMS 3D CMS Logo

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