CMS 3D CMS Logo

FTLUncalibratedRecHit.cc
Go to the documentation of this file.
2 #include <cmath>
3 #include <limits>
4 
7  DetId(), 0, 0, {-1.f, -1.f}, {-1.f, -1.f}, -1.f, -1.f, -1.f, std::numeric_limits<unsigned char>::max()) {}
8 
10  uint8_t row,
11  uint8_t column,
12  std::pair<float, float> ampl,
13  std::pair<float, float> time,
14  float timeError,
15  float position,
16  float positionError,
17  unsigned char flags)
18  : amplitude_(ampl),
19  time_(time),
20  timeError_(timeError),
21  position_(position),
22  positionError_(positionError),
23  id_(id),
24  row_(row),
25  column_(column),
26  flags_(flags) {}
27 
29  std::pair<float, float> ampl,
30  std::pair<float, float> time,
31  float timeError,
32  float position,
33  float positionError,
34  unsigned char flags)
35  : FTLUncalibratedRecHit(id, 0, 0, ampl, time, timeError, position, positionError, flags) {}
36 
38 
40  if (timeError() < 0)
41  return false;
42  else
43  return true;
44 }
45 
47  if (!isTimeValid())
48  return false;
49  if (timeError() >= 10000)
50  return false;
51 
52  return true;
53 }
54 
56  if (flag == kGood) {
57  //then set all bits to zero;
58  flags_ = 0;
59  return;
60  }
61  // else set the flagbit
62  flags_ |= 0x1 << flag;
63 }
64 
66  if (flag == kGood) {
67  if (!flags_)
68  return true;
69  else
70  return false;
71  } // if all flags are unset, then hit is good
72  return flags_ & (0x1 << flag);
73 }
bool checkFlag(Flags flag) const
Definition: DetId.h:17
static int position[264][3]
Definition: ReadPGInfo.cc:289