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, 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)
 
 FTLUncalibratedRecHit (const DetId &detId, 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()) {}
Definition: DetId.h:17

◆ 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) {}
std::pair< float, float > amplitude_
float positionError_
distance from the center of the bar to the hit
std::pair< float, float > time_
std::pair< float, float > time() const
unsigned char flags() const

◆ 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.

References amplitude_.

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

37 { return amplitude_; }
std::pair< float, float > amplitude_

◆ checkFlag()

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

Definition at line 65 of file FTLUncalibratedRecHit.cc.

References RemoveAddSevLevel::flag, flags_, and kGood.

Referenced by isSaturated().

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 }

◆ column()

int FTLUncalibratedRecHit::column ( ) const
inline

Definition at line 48 of file FTLUncalibratedRecHit.h.

References column_.

Referenced by MTDRecHitAlgo::makeRecHit().

48 { return column_; }

◆ flags()

unsigned char FTLUncalibratedRecHit::flags ( ) const
inline

Definition at line 44 of file FTLUncalibratedRecHit.h.

References flags_.

Referenced by MTDRecHitAlgo::makeRecHit().

44 { return flags_; };

◆ id()

DetId FTLUncalibratedRecHit::id ( ) const
inline

Definition at line 46 of file FTLUncalibratedRecHit.h.

References id_.

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

46 { return id_; }

◆ isSaturated()

bool FTLUncalibratedRecHit::isSaturated ( ) const

◆ isTimeErrorValid()

bool FTLUncalibratedRecHit::isTimeErrorValid ( ) const

Definition at line 46 of file FTLUncalibratedRecHit.cc.

References isTimeValid(), and timeError().

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

◆ isTimeValid()

bool FTLUncalibratedRecHit::isTimeValid ( ) const

Definition at line 39 of file FTLUncalibratedRecHit.cc.

References timeError().

Referenced by isTimeErrorValid().

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

◆ position()

float FTLUncalibratedRecHit::position ( ) const
inline

Definition at line 39 of file FTLUncalibratedRecHit.h.

References position_.

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

39 { return position_; }

◆ positionError()

float FTLUncalibratedRecHit::positionError ( ) const
inline

Definition at line 42 of file FTLUncalibratedRecHit.h.

References positionError_.

Referenced by MTDRecHitAlgo::makeRecHit().

42 { return positionError_; }
float positionError_
distance from the center of the bar to the hit

◆ row()

int FTLUncalibratedRecHit::row ( ) const
inline

Definition at line 47 of file FTLUncalibratedRecHit.h.

References row_.

Referenced by MTDRecHitAlgo::makeRecHit().

47 { return row_; }

◆ setAmplitude()

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

Definition at line 50 of file FTLUncalibratedRecHit.h.

References amplitude(), and amplitude_.

50 { amplitude_ = amplitude; }
std::pair< float, float > amplitude_
std::pair< float, float > amplitude() const

◆ setFlagBit()

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

Definition at line 55 of file FTLUncalibratedRecHit.cc.

References RemoveAddSevLevel::flag, flags_, and kGood.

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 }

◆ setId()

void FTLUncalibratedRecHit::setId ( DetId  id)
inline

Definition at line 54 of file FTLUncalibratedRecHit.h.

References id(), and id_.

◆ setPosition()

void FTLUncalibratedRecHit::setPosition ( float  position)
inline

Definition at line 58 of file FTLUncalibratedRecHit.h.

References position(), and position_.

◆ setPositionError()

void FTLUncalibratedRecHit::setPositionError ( float  positionErr)
inline

Definition at line 59 of file FTLUncalibratedRecHit.h.

References positionError_.

59 { positionError_ = positionErr; }
float positionError_
distance from the center of the bar to the hit

◆ setTime()

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

Definition at line 51 of file FTLUncalibratedRecHit.h.

References time(), and time_.

51 { time_ = time; }
std::pair< float, float > time_
std::pair< float, float > time() const

◆ setTimeError()

void FTLUncalibratedRecHit::setTimeError ( float  timeErr)
inline

Definition at line 53 of file FTLUncalibratedRecHit.h.

References timeError_.

53 { timeError_ = timeErr; }

◆ time()

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

Definition at line 38 of file FTLUncalibratedRecHit.h.

References time_.

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

38 { return time_; }
std::pair< float, float > time_

◆ timeError()

float FTLUncalibratedRecHit::timeError ( ) const
inline

Definition at line 41 of file FTLUncalibratedRecHit.h.

References timeError_.

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

41 { return timeError_; }

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().