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, 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, unsigned char flags=0)
 
DetId id () const
 
bool isSaturated () const
 
bool isTimeErrorValid () const
 
bool isTimeValid () const
 
int row () const
 
void setAmplitude (std::pair< float, float > amplitude)
 
void setFlagBit (Flags flag)
 
void setId (DetId id)
 
void setTime (std::pair< float, float > time)
 
void setTimeError (float timeErr)
 
std::pair< float, float > time () const
 
float timeError () const
 
 ~FTLUncalibratedRecHit ()
 

Private Attributes

std::pair< float, float > amplitude_
 
uint8_t column_
 
unsigned char flags_
 
DetId id_
 
uint8_t row_
 
std::pair< float, float > time_
 
float timeError_
 

Detailed Description

Definition at line 7 of file FTLUncalibratedRecHit.h.

Member Typedef Documentation

Definition at line 9 of file FTLUncalibratedRecHit.h.

Member Enumeration Documentation

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::FTLUncalibratedRecHit ( )

Definition at line 5 of file FTLUncalibratedRecHit.cc.

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

Definition at line 14 of file FTLUncalibratedRecHit.cc.

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

Definition at line 27 of file FTLUncalibratedRecHit.cc.

27 {}

Member Function Documentation

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

Definition at line 33 of file FTLUncalibratedRecHit.h.

References amplitude_.

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

33 { return amplitude_; }
std::pair< float, float > amplitude_
bool FTLUncalibratedRecHit::checkFlag ( FTLUncalibratedRecHit::Flags  flag) const

Definition at line 57 of file FTLUncalibratedRecHit.cc.

References RemoveAddSevLevel::flag, flags_, and kGood.

Referenced by isSaturated(), and setId().

57  {
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 }
int FTLUncalibratedRecHit::column ( ) const
inline

Definition at line 42 of file FTLUncalibratedRecHit.h.

References column_.

Referenced by MTDRecHitAlgo::makeRecHit().

42 { return column_; }
unsigned char FTLUncalibratedRecHit::flags ( ) const
inline

Definition at line 38 of file FTLUncalibratedRecHit.h.

References flags_.

Referenced by MTDRecHitAlgo::makeRecHit().

38 { return flags_; };
DetId FTLUncalibratedRecHit::id ( ) const
inline

Definition at line 40 of file FTLUncalibratedRecHit.h.

References id_.

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

40 { return id_; }
bool FTLUncalibratedRecHit::isSaturated ( ) const

Definition at line 29 of file FTLUncalibratedRecHit.cc.

References checkFlag(), and kSaturated.

Referenced by setId().

bool FTLUncalibratedRecHit::isTimeErrorValid ( ) const

Definition at line 38 of file FTLUncalibratedRecHit.cc.

References isTimeValid(), and timeError().

Referenced by setId().

38  {
39  if (!isTimeValid())
40  return false;
41  if (timeError() >= 10000)
42  return false;
43 
44  return true;
45 }
bool FTLUncalibratedRecHit::isTimeValid ( ) const

Definition at line 31 of file FTLUncalibratedRecHit.cc.

References timeError().

Referenced by isTimeErrorValid(), and setId().

31  {
32  if (timeError() < 0)
33  return false;
34  else
35  return true;
36 }
int FTLUncalibratedRecHit::row ( ) const
inline

Definition at line 41 of file FTLUncalibratedRecHit.h.

References row_.

Referenced by MTDRecHitAlgo::makeRecHit().

41 { return row_; }
void FTLUncalibratedRecHit::setAmplitude ( std::pair< float, float >  amplitude)
inline

Definition at line 44 of file FTLUncalibratedRecHit.h.

References amplitude(), and amplitude_.

44 { amplitude_ = amplitude; }
std::pair< float, float > amplitude_
std::pair< float, float > amplitude() const
void FTLUncalibratedRecHit::setFlagBit ( FTLUncalibratedRecHit::Flags  flag)

Definition at line 47 of file FTLUncalibratedRecHit.cc.

References RemoveAddSevLevel::flag, flags_, and kGood.

Referenced by setId().

47  {
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 }
void FTLUncalibratedRecHit::setId ( DetId  id)
inline
void FTLUncalibratedRecHit::setTime ( std::pair< float, float >  time)
inline

Definition at line 45 of file FTLUncalibratedRecHit.h.

References time(), and time_.

45 { time_ = time; }
std::pair< float, float > time() const
std::pair< float, float > time_
void FTLUncalibratedRecHit::setTimeError ( float  timeErr)
inline

Definition at line 47 of file FTLUncalibratedRecHit.h.

References timeError_.

47 { timeError_ = timeErr; }
std::pair<float, float> FTLUncalibratedRecHit::time ( ) const
inline

Definition at line 34 of file FTLUncalibratedRecHit.h.

References time_.

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

34 { return time_; }
std::pair< float, float > time_
float FTLUncalibratedRecHit::timeError ( ) const
inline

Member Data Documentation

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

Definition at line 58 of file FTLUncalibratedRecHit.h.

Referenced by amplitude(), and setAmplitude().

uint8_t FTLUncalibratedRecHit::column_
private

Definition at line 62 of file FTLUncalibratedRecHit.h.

Referenced by column().

unsigned char FTLUncalibratedRecHit::flags_
private

Definition at line 63 of file FTLUncalibratedRecHit.h.

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

DetId FTLUncalibratedRecHit::id_
private

Definition at line 61 of file FTLUncalibratedRecHit.h.

Referenced by id(), and setId().

uint8_t FTLUncalibratedRecHit::row_
private

Definition at line 62 of file FTLUncalibratedRecHit.h.

Referenced by row().

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

Definition at line 59 of file FTLUncalibratedRecHit.h.

Referenced by setTime(), and time().

float FTLUncalibratedRecHit::timeError_
private

Definition at line 60 of file FTLUncalibratedRecHit.h.

Referenced by setTimeError(), and timeError().