CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
FTLUncalibratedRecHit Class Reference

#include <FTLUncalibratedRecHit.h>

Public Types

enum  Flags { kGood = -1, kPoorReco, kSaturated, kOutOfTime }
 
typedef DetId key_type
 

Public Member Functions

std::pair< float, float > amplitude () const
 
bool checkFlag (Flags flag) const
 
int column () const
 
unsigned char flags () const
 
 FTLUncalibratedRecHit ()
 
 FTLUncalibratedRecHit (const DetId &detId, std::pair< float, float > ampl, std::pair< float, float > time, float timeError, float position, float positionError, unsigned char flags=0)
 
 FTLUncalibratedRecHit (const DetId &detId, uint8_t row, uint8_t column, std::pair< float, float > ampl, std::pair< float, float > time, float timeError, float position, float positionError, unsigned char flags=0)
 
DetId id () const
 
bool isSaturated () const
 
bool isTimeErrorValid () const
 
bool isTimeValid () const
 
float position () const
 
float positionError () const
 
int row () const
 
void setAmplitude (std::pair< float, float > amplitude)
 
void setFlagBit (Flags flag)
 
void setId (DetId id)
 
void setPosition (float position)
 
void setPositionError (float positionErr)
 
void setTime (std::pair< float, float > time)
 
void setTimeError (float timeErr)
 
std::pair< float, float > time () const
 
float timeError () const
 
 ~FTLUncalibratedRecHit ()=default
 

Private Attributes

std::pair< float, float > amplitude_
 
uint8_t column_
 
unsigned char flags_
 
DetId id_
 
float position_
 
float positionError_
 distance from the center of the bar to the hit More...
 
uint8_t row_
 
std::pair< float, float > time_
 
float timeError_
 

Detailed Description

Definition at line 7 of file FTLUncalibratedRecHit.h.

Member Typedef Documentation

◆ key_type

Definition at line 9 of file FTLUncalibratedRecHit.h.

Member Enumeration Documentation

◆ Flags

Enumerator
kGood 
kPoorReco 
kSaturated 
kOutOfTime 

Definition at line 11 of file FTLUncalibratedRecHit.h.

11  {
12  kGood = -1, // channel is good (mutually exclusive with other states) setFlagBit(kGood) reset flags_ to zero
13  kPoorReco, // channel has been badly reconstructed (e.g. bad shape, bad chi2 etc.)
14  kSaturated, // saturated channel
15  kOutOfTime // channel out of time
16  };

Constructor & Destructor Documentation

◆ FTLUncalibratedRecHit() [1/3]

FTLUncalibratedRecHit::FTLUncalibratedRecHit ( )

Definition at line 5 of file FTLUncalibratedRecHit.cc.

7  DetId(), 0, 0, {-1.f, -1.f}, {-1.f, -1.f}, -1.f, -1.f, -1.f, std::numeric_limits<unsigned char>::max()) {}

◆ FTLUncalibratedRecHit() [2/3]

FTLUncalibratedRecHit::FTLUncalibratedRecHit ( const DetId detId,
uint8_t  row,
uint8_t  column,
std::pair< float, float >  ampl,
std::pair< float, float >  time,
float  timeError,
float  position,
float  positionError,
unsigned char  flags = 0 
)

Definition at line 9 of file FTLUncalibratedRecHit.cc.

18  : amplitude_(ampl),
19  time_(time),
23  id_(id),
24  row_(row),
25  column_(column),
26  flags_(flags) {}

◆ FTLUncalibratedRecHit() [3/3]

FTLUncalibratedRecHit::FTLUncalibratedRecHit ( const DetId detId,
std::pair< float, float >  ampl,
std::pair< float, float >  time,
float  timeError,
float  position,
float  positionError,
unsigned char  flags = 0 
)

Definition at line 28 of file FTLUncalibratedRecHit.cc.

◆ ~FTLUncalibratedRecHit()

FTLUncalibratedRecHit::~FTLUncalibratedRecHit ( )
default

Member Function Documentation

◆ amplitude()

std::pair<float, float> FTLUncalibratedRecHit::amplitude ( ) const
inline

Definition at line 37 of file FTLUncalibratedRecHit.h.

37 { return amplitude_; }

References amplitude_.

Referenced by MTDRecHitAlgo::makeRecHit(), and setAmplitude().

◆ checkFlag()

bool FTLUncalibratedRecHit::checkFlag ( FTLUncalibratedRecHit::Flags  flag) const

Definition at line 65 of file FTLUncalibratedRecHit.cc.

65  {
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 }

References RemoveAddSevLevel::flag, flags_, and kGood.

Referenced by isSaturated().

◆ column()

int FTLUncalibratedRecHit::column ( ) const
inline

Definition at line 48 of file FTLUncalibratedRecHit.h.

48 { return column_; }

References column_.

Referenced by MTDRecHitAlgo::makeRecHit().

◆ flags()

unsigned char FTLUncalibratedRecHit::flags ( ) const
inline

Definition at line 44 of file FTLUncalibratedRecHit.h.

44 { return flags_; };

References flags_.

Referenced by MTDRecHitAlgo::makeRecHit().

◆ id()

DetId FTLUncalibratedRecHit::id ( ) const
inline

Definition at line 46 of file FTLUncalibratedRecHit.h.

46 { return id_; }

References id_.

Referenced by MTDRecHitAlgo::makeRecHit(), and setId().

◆ isSaturated()

bool FTLUncalibratedRecHit::isSaturated ( ) const

Definition at line 37 of file FTLUncalibratedRecHit.cc.

References checkFlag(), and kSaturated.

◆ isTimeErrorValid()

bool FTLUncalibratedRecHit::isTimeErrorValid ( ) const

Definition at line 46 of file FTLUncalibratedRecHit.cc.

46  {
47  if (!isTimeValid())
48  return false;
49  if (timeError() >= 10000)
50  return false;
51 
52  return true;
53 }

References isTimeValid(), and timeError().

◆ isTimeValid()

bool FTLUncalibratedRecHit::isTimeValid ( ) const

Definition at line 39 of file FTLUncalibratedRecHit.cc.

39  {
40  if (timeError() < 0)
41  return false;
42  else
43  return true;
44 }

References timeError().

Referenced by isTimeErrorValid().

◆ position()

float FTLUncalibratedRecHit::position ( ) const
inline

Definition at line 39 of file FTLUncalibratedRecHit.h.

39 { return position_; }

References position_.

Referenced by MTDRecHitAlgo::makeRecHit(), and setPosition().

◆ positionError()

float FTLUncalibratedRecHit::positionError ( ) const
inline

Definition at line 42 of file FTLUncalibratedRecHit.h.

42 { return positionError_; }

References positionError_.

Referenced by MTDRecHitAlgo::makeRecHit().

◆ row()

int FTLUncalibratedRecHit::row ( ) const
inline

Definition at line 47 of file FTLUncalibratedRecHit.h.

47 { return row_; }

References row_.

Referenced by MTDRecHitAlgo::makeRecHit().

◆ setAmplitude()

void FTLUncalibratedRecHit::setAmplitude ( std::pair< float, float >  amplitude)
inline

Definition at line 50 of file FTLUncalibratedRecHit.h.

50 { amplitude_ = amplitude; }

References amplitude(), and amplitude_.

◆ setFlagBit()

void FTLUncalibratedRecHit::setFlagBit ( FTLUncalibratedRecHit::Flags  flag)

Definition at line 55 of file FTLUncalibratedRecHit.cc.

55  {
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 }

References RemoveAddSevLevel::flag, flags_, and kGood.

◆ setId()

void FTLUncalibratedRecHit::setId ( DetId  id)
inline

Definition at line 54 of file FTLUncalibratedRecHit.h.

54 { id_ = id; }

References id(), and id_.

◆ setPosition()

void FTLUncalibratedRecHit::setPosition ( float  position)
inline

Definition at line 58 of file FTLUncalibratedRecHit.h.

58 { position_ = position; }

References position(), and position_.

◆ setPositionError()

void FTLUncalibratedRecHit::setPositionError ( float  positionErr)
inline

Definition at line 59 of file FTLUncalibratedRecHit.h.

59 { positionError_ = positionErr; }

References positionError_.

◆ setTime()

void FTLUncalibratedRecHit::setTime ( std::pair< float, float >  time)
inline

Definition at line 51 of file FTLUncalibratedRecHit.h.

51 { time_ = time; }

References time(), and time_.

◆ setTimeError()

void FTLUncalibratedRecHit::setTimeError ( float  timeErr)
inline

Definition at line 53 of file FTLUncalibratedRecHit.h.

53 { timeError_ = timeErr; }

References timeError_.

◆ time()

std::pair<float, float> FTLUncalibratedRecHit::time ( ) const
inline

Definition at line 38 of file FTLUncalibratedRecHit.h.

38 { return time_; }

References time_.

Referenced by MTDRecHitAlgo::makeRecHit(), and setTime().

◆ timeError()

float FTLUncalibratedRecHit::timeError ( ) const
inline

Definition at line 41 of file FTLUncalibratedRecHit.h.

41 { return timeError_; }

References timeError_.

Referenced by isTimeErrorValid(), isTimeValid(), and MTDRecHitAlgo::makeRecHit().

Member Data Documentation

◆ amplitude_

std::pair<float, float> FTLUncalibratedRecHit::amplitude_
private

Definition at line 67 of file FTLUncalibratedRecHit.h.

Referenced by amplitude(), and setAmplitude().

◆ column_

uint8_t FTLUncalibratedRecHit::column_
private

Definition at line 74 of file FTLUncalibratedRecHit.h.

Referenced by column().

◆ flags_

unsigned char FTLUncalibratedRecHit::flags_
private

Definition at line 75 of file FTLUncalibratedRecHit.h.

Referenced by checkFlag(), flags(), and setFlagBit().

◆ id_

DetId FTLUncalibratedRecHit::id_
private

Definition at line 72 of file FTLUncalibratedRecHit.h.

Referenced by id(), and setId().

◆ position_

float FTLUncalibratedRecHit::position_
private

Definition at line 70 of file FTLUncalibratedRecHit.h.

Referenced by position(), and setPosition().

◆ positionError_

float FTLUncalibratedRecHit::positionError_
private

distance from the center of the bar to the hit

Definition at line 71 of file FTLUncalibratedRecHit.h.

Referenced by positionError(), and setPositionError().

◆ row_

uint8_t FTLUncalibratedRecHit::row_
private

Definition at line 73 of file FTLUncalibratedRecHit.h.

Referenced by row().

◆ time_

std::pair<float, float> FTLUncalibratedRecHit::time_
private

Definition at line 68 of file FTLUncalibratedRecHit.h.

Referenced by setTime(), and time().

◆ timeError_

float FTLUncalibratedRecHit::timeError_
private

Definition at line 69 of file FTLUncalibratedRecHit.h.

Referenced by setTimeError(), and timeError().

FTLUncalibratedRecHit::column_
uint8_t column_
Definition: FTLUncalibratedRecHit.h:74
FTLUncalibratedRecHit::row
int row() const
Definition: FTLUncalibratedRecHit.h:47
FTLUncalibratedRecHit::flags_
unsigned char flags_
Definition: FTLUncalibratedRecHit.h:75
FTLUncalibratedRecHit::amplitude_
std::pair< float, float > amplitude_
Definition: FTLUncalibratedRecHit.h:67
FTLUncalibratedRecHit::kGood
Definition: FTLUncalibratedRecHit.h:12
FTLUncalibratedRecHit::kOutOfTime
Definition: FTLUncalibratedRecHit.h:15
FTLUncalibratedRecHit::timeError_
float timeError_
Definition: FTLUncalibratedRecHit.h:69
FTLUncalibratedRecHit::isTimeValid
bool isTimeValid() const
Definition: FTLUncalibratedRecHit.cc:39
DetId
Definition: DetId.h:17
FTLUncalibratedRecHit::positionError_
float positionError_
distance from the center of the bar to the hit
Definition: FTLUncalibratedRecHit.h:71
FTLUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition: FTLUncalibratedRecHit.cc:65
FTLUncalibratedRecHit::position_
float position_
Definition: FTLUncalibratedRecHit.h:70
FTLUncalibratedRecHit::position
float position() const
Definition: FTLUncalibratedRecHit.h:39
FTLUncalibratedRecHit::kSaturated
Definition: FTLUncalibratedRecHit.h:14
FTLUncalibratedRecHit::positionError
float positionError() const
Definition: FTLUncalibratedRecHit.h:42
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
FTLUncalibratedRecHit::id_
DetId id_
Definition: FTLUncalibratedRecHit.h:72
FTLUncalibratedRecHit::id
DetId id() const
Definition: FTLUncalibratedRecHit.h:46
FTLUncalibratedRecHit::column
int column() const
Definition: FTLUncalibratedRecHit.h:48
FTLUncalibratedRecHit::kPoorReco
Definition: FTLUncalibratedRecHit.h:13
FTLUncalibratedRecHit::flags
unsigned char flags() const
Definition: FTLUncalibratedRecHit.h:44
FTLUncalibratedRecHit::amplitude
std::pair< float, float > amplitude() const
Definition: FTLUncalibratedRecHit.h:37
FTLUncalibratedRecHit::row_
uint8_t row_
Definition: FTLUncalibratedRecHit.h:73
FTLUncalibratedRecHit::FTLUncalibratedRecHit
FTLUncalibratedRecHit()
Definition: FTLUncalibratedRecHit.cc:5
FTLUncalibratedRecHit::time_
std::pair< float, float > time_
Definition: FTLUncalibratedRecHit.h:68
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
FTLUncalibratedRecHit::timeError
float timeError() const
Definition: FTLUncalibratedRecHit.h:41
FTLUncalibratedRecHit::time
std::pair< float, float > time() const
Definition: FTLUncalibratedRecHit.h:38