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),
7  time_(-1.f, -1.f),
8  timeError_(-1.f),
9  id_(DetId()),
10  row_(0),
11  column_(0),
12  flags_(std::numeric_limits<unsigned char>::max()) {}
13 
15  const DetId& id, std::pair<float, float> ampl, std::pair<float, float> time, float timeError, unsigned char flags)
16  : amplitude_(ampl), time_(time), timeError_(timeError), id_(id), row_(0), column_(0), flags_(flags) {}
17 
19  uint8_t row,
20  uint8_t column,
21  std::pair<float, float> ampl,
22  std::pair<float, float> time,
23  float timeError,
24  unsigned char flags)
25  : amplitude_(ampl), time_(time), timeError_(timeError), id_(id), row_(row), column_(column), flags_(flags) {}
26 
28 
30 
32  if (timeError() < 0)
33  return false;
34  else
35  return true;
36 }
37 
39  if (!isTimeValid())
40  return false;
41  if (timeError() >= 10000)
42  return false;
43 
44  return true;
45 }
46 
48  if (flag == kGood) {
49  //then set all bits to zero;
50  flags_ = 0;
51  return;
52  }
53  // else set the flagbit
54  flags_ |= 0x1 << flag;
55 }
56 
58  if (flag == kGood) {
59  if (!flags_)
60  return true;
61  else
62  return false;
63  } // if all flags are unset, then hit is good
64  return flags_ & (0x1 << flag);
65 }
std::pair< float, float > time() const
std::pair< float, float > amplitude_
bool checkFlag(Flags flag) const
double f[11][100]
Definition: DetId.h:17
std::pair< float, float > time_
unsigned char flags() const