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 }
FTLUncalibratedRecHit::flags_
unsigned char flags_
Definition: FTLUncalibratedRecHit.h:75
FTLUncalibratedRecHit::Flags
Flags
Definition: FTLUncalibratedRecHit.h:11
FTLUncalibratedRecHit::kGood
Definition: FTLUncalibratedRecHit.h:12
FTLUncalibratedRecHit::setFlagBit
void setFlagBit(Flags flag)
Definition: FTLUncalibratedRecHit.cc:55
FTLUncalibratedRecHit::isSaturated
bool isSaturated() const
Definition: FTLUncalibratedRecHit.cc:37
FTLUncalibratedRecHit::isTimeValid
bool isTimeValid() const
Definition: FTLUncalibratedRecHit.cc:39
DetId
Definition: DetId.h:17
FTLUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition: FTLUncalibratedRecHit.cc:65
FTLUncalibratedRecHit::kSaturated
Definition: FTLUncalibratedRecHit.h:14
FTLUncalibratedRecHit.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
FTLUncalibratedRecHit
Definition: FTLUncalibratedRecHit.h:7
ntuplemaker.time
time
Definition: ntuplemaker.py:310
HLT_FULL_cff.flags
flags
Definition: HLT_FULL_cff.py:13216
FTLUncalibratedRecHit::FTLUncalibratedRecHit
FTLUncalibratedRecHit()
Definition: FTLUncalibratedRecHit.cc:5
FTLUncalibratedRecHit::isTimeErrorValid
bool isTimeErrorValid() const
Definition: FTLUncalibratedRecHit.cc:46
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
FTLUncalibratedRecHit::timeError
float timeError() const
Definition: FTLUncalibratedRecHit.h:41