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 11 of file FTLUncalibratedRecHit.h.

Member Enumeration Documentation

Enumerator
kGood 
kPoorReco 
kSaturated 
kOutOfTime 

Definition at line 13 of file FTLUncalibratedRecHit.h.

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

Constructor & Destructor Documentation

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

Definition at line 9 of file FTLUncalibratedRecHit.cc.

10  :
11  amplitude_(ampl), time_(time), timeError_(timeError), id_(id), row_(0), column_(0), flags_(flags) { }
std::pair< float, float > amplitude_
std::pair< float, float > time_
std::pair< float, float > time() 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,
unsigned char  flags = 0 
)
FTLUncalibratedRecHit::~FTLUncalibratedRecHit ( )

Definition at line 18 of file FTLUncalibratedRecHit.cc.

18  {
19 }

Member Function Documentation

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

Definition at line 28 of file FTLUncalibratedRecHit.h.

References amplitude_.

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

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

Definition at line 53 of file FTLUncalibratedRecHit.cc.

References RemoveAddSevLevel::flag, flags_, and kGood.

Referenced by isSaturated(), and setId().

53  {
54  if(flag == kGood){ if ( ! flags_ ) return true;else return false;} // if all flags are unset, then hit is good
55  return flags_ & ( 0x1<<flag);
56 }
int FTLUncalibratedRecHit::column ( ) const
inline

Definition at line 37 of file FTLUncalibratedRecHit.h.

References column_.

Referenced by MTDRecHitAlgo::makeRecHit().

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

Definition at line 33 of file FTLUncalibratedRecHit.h.

References flags_.

Referenced by MTDRecHitAlgo::makeRecHit().

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

Definition at line 35 of file FTLUncalibratedRecHit.h.

References id_.

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

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

Definition at line 21 of file FTLUncalibratedRecHit.cc.

References checkFlag(), and kSaturated.

Referenced by setId().

bool FTLUncalibratedRecHit::isTimeErrorValid ( ) const

Definition at line 32 of file FTLUncalibratedRecHit.cc.

References isTimeValid(), and timeError().

Referenced by setId().

32  {
33  if(!isTimeValid())
34  return false;
35  if(timeError() >= 10000)
36  return false;
37 
38  return true;
39 }
bool FTLUncalibratedRecHit::isTimeValid ( ) const

Definition at line 25 of file FTLUncalibratedRecHit.cc.

References timeError().

Referenced by isTimeErrorValid(), and setId().

25  {
26  if(timeError() < 0)
27  return false;
28  else
29  return true;
30 }
int FTLUncalibratedRecHit::row ( ) const
inline

Definition at line 36 of file FTLUncalibratedRecHit.h.

References row_.

Referenced by MTDRecHitAlgo::makeRecHit().

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

Definition at line 39 of file FTLUncalibratedRecHit.h.

References amplitude(), and amplitude_.

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

Definition at line 41 of file FTLUncalibratedRecHit.cc.

References RemoveAddSevLevel::flag, flags_, and kGood.

Referenced by setId().

41  {
42 
43  if (flag == kGood) {
44  //then set all bits to zero;
45  flags_ = 0;
46  return;
47  }
48  // else set the flagbit
49  flags_|= 0x1 << flag;
50 }
void FTLUncalibratedRecHit::setId ( DetId  id)
inline
void FTLUncalibratedRecHit::setTime ( std::pair< float, float >  time)
inline

Definition at line 40 of file FTLUncalibratedRecHit.h.

References time(), and time_.

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

Definition at line 42 of file FTLUncalibratedRecHit.h.

References timeError_.

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

Definition at line 29 of file FTLUncalibratedRecHit.h.

References time_.

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

29 { 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 53 of file FTLUncalibratedRecHit.h.

Referenced by amplitude(), and setAmplitude().

uint8_t FTLUncalibratedRecHit::column_
private

Definition at line 57 of file FTLUncalibratedRecHit.h.

Referenced by column().

unsigned char FTLUncalibratedRecHit::flags_
private

Definition at line 58 of file FTLUncalibratedRecHit.h.

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

DetId FTLUncalibratedRecHit::id_
private

Definition at line 56 of file FTLUncalibratedRecHit.h.

Referenced by id(), and setId().

uint8_t FTLUncalibratedRecHit::row_
private

Definition at line 57 of file FTLUncalibratedRecHit.h.

Referenced by row().

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

Definition at line 54 of file FTLUncalibratedRecHit.h.

Referenced by setTime(), and time().

float FTLUncalibratedRecHit::timeError_
private

Definition at line 55 of file FTLUncalibratedRecHit.h.

Referenced by setTimeError(), and timeError().