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

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

6  : amplitude_(-1.f, -1.f),
7  time_(-1.f, -1.f),
8  timeError_(-1.f),
9  id_(DetId()),
10  row_(0),
11  column_(0),

◆ FTLUncalibratedRecHit() [2/3]

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.

16  : amplitude_(ampl), time_(time), timeError_(timeError), id_(id), row_(0), column_(0), flags_(flags) {}

◆ FTLUncalibratedRecHit() [3/3]

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 
)

Definition at line 18 of file FTLUncalibratedRecHit.cc.

◆ ~FTLUncalibratedRecHit()

FTLUncalibratedRecHit::~FTLUncalibratedRecHit ( )

Definition at line 27 of file FTLUncalibratedRecHit.cc.

27 {}

Member Function Documentation

◆ amplitude()

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

Definition at line 33 of file FTLUncalibratedRecHit.h.

33 { return amplitude_; }

References amplitude_.

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

◆ checkFlag()

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

Definition at line 57 of file FTLUncalibratedRecHit.cc.

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 }

References RemoveAddSevLevel::flag, flags_, and kGood.

Referenced by isSaturated().

◆ column()

int FTLUncalibratedRecHit::column ( ) const
inline

Definition at line 42 of file FTLUncalibratedRecHit.h.

42 { return column_; }

References column_.

Referenced by MTDRecHitAlgo::makeRecHit().

◆ flags()

unsigned char FTLUncalibratedRecHit::flags ( ) const
inline

Definition at line 38 of file FTLUncalibratedRecHit.h.

38 { return flags_; };

References flags_.

Referenced by MTDRecHitAlgo::makeRecHit().

◆ id()

DetId FTLUncalibratedRecHit::id ( ) const
inline

Definition at line 40 of file FTLUncalibratedRecHit.h.

40 { return id_; }

References id_.

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

◆ isSaturated()

bool FTLUncalibratedRecHit::isSaturated ( ) const

Definition at line 29 of file FTLUncalibratedRecHit.cc.

References checkFlag(), and kSaturated.

◆ isTimeErrorValid()

bool FTLUncalibratedRecHit::isTimeErrorValid ( ) const

Definition at line 38 of file FTLUncalibratedRecHit.cc.

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

References isTimeValid(), and timeError().

◆ isTimeValid()

bool FTLUncalibratedRecHit::isTimeValid ( ) const

Definition at line 31 of file FTLUncalibratedRecHit.cc.

31  {
32  if (timeError() < 0)
33  return false;
34  else
35  return true;
36 }

References timeError().

Referenced by isTimeErrorValid().

◆ row()

int FTLUncalibratedRecHit::row ( ) const
inline

Definition at line 41 of file FTLUncalibratedRecHit.h.

41 { return row_; }

References row_.

Referenced by MTDRecHitAlgo::makeRecHit().

◆ setAmplitude()

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

Definition at line 44 of file FTLUncalibratedRecHit.h.

44 { amplitude_ = amplitude; }

References amplitude(), and amplitude_.

◆ setFlagBit()

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

Definition at line 47 of file FTLUncalibratedRecHit.cc.

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 }

References RemoveAddSevLevel::flag, flags_, and kGood.

◆ setId()

void FTLUncalibratedRecHit::setId ( DetId  id)
inline

Definition at line 48 of file FTLUncalibratedRecHit.h.

48 { id_ = id; }

References id(), and id_.

◆ setTime()

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

Definition at line 45 of file FTLUncalibratedRecHit.h.

45 { time_ = time; }

References time(), and time_.

◆ setTimeError()

void FTLUncalibratedRecHit::setTimeError ( float  timeErr)
inline

Definition at line 47 of file FTLUncalibratedRecHit.h.

47 { timeError_ = timeErr; }

References timeError_.

◆ time()

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

Definition at line 34 of file FTLUncalibratedRecHit.h.

34 { return time_; }

References time_.

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

◆ timeError()

float FTLUncalibratedRecHit::timeError ( ) const
inline

Definition at line 36 of file FTLUncalibratedRecHit.h.

36 { 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 58 of file FTLUncalibratedRecHit.h.

Referenced by amplitude(), and setAmplitude().

◆ column_

uint8_t FTLUncalibratedRecHit::column_
private

Definition at line 62 of file FTLUncalibratedRecHit.h.

Referenced by column().

◆ flags_

unsigned char FTLUncalibratedRecHit::flags_
private

Definition at line 63 of file FTLUncalibratedRecHit.h.

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

◆ id_

DetId FTLUncalibratedRecHit::id_
private

Definition at line 61 of file FTLUncalibratedRecHit.h.

Referenced by id(), and setId().

◆ row_

uint8_t FTLUncalibratedRecHit::row_
private

Definition at line 62 of file FTLUncalibratedRecHit.h.

Referenced by row().

◆ time_

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

Definition at line 59 of file FTLUncalibratedRecHit.h.

Referenced by setTime(), and time().

◆ timeError_

float FTLUncalibratedRecHit::timeError_
private

Definition at line 60 of file FTLUncalibratedRecHit.h.

Referenced by setTimeError(), and timeError().

f
double f[11][100]
Definition: MuScleFitUtils.cc:78
FTLUncalibratedRecHit::column_
uint8_t column_
Definition: FTLUncalibratedRecHit.h:62
FTLUncalibratedRecHit::row
int row() const
Definition: FTLUncalibratedRecHit.h:41
FTLUncalibratedRecHit::flags_
unsigned char flags_
Definition: FTLUncalibratedRecHit.h:63
FTLUncalibratedRecHit::amplitude_
std::pair< float, float > amplitude_
Definition: FTLUncalibratedRecHit.h:58
FTLUncalibratedRecHit::kGood
Definition: FTLUncalibratedRecHit.h:12
FTLUncalibratedRecHit::kOutOfTime
Definition: FTLUncalibratedRecHit.h:15
FTLUncalibratedRecHit::timeError_
float timeError_
Definition: FTLUncalibratedRecHit.h:60
FTLUncalibratedRecHit::isTimeValid
bool isTimeValid() const
Definition: FTLUncalibratedRecHit.cc:31
DetId
Definition: DetId.h:17
FTLUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition: FTLUncalibratedRecHit.cc:57
FTLUncalibratedRecHit::kSaturated
Definition: FTLUncalibratedRecHit.h:14
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
FTLUncalibratedRecHit::id_
DetId id_
Definition: FTLUncalibratedRecHit.h:61
FTLUncalibratedRecHit::id
DetId id() const
Definition: FTLUncalibratedRecHit.h:40
FTLUncalibratedRecHit::column
int column() const
Definition: FTLUncalibratedRecHit.h:42
FTLUncalibratedRecHit::kPoorReco
Definition: FTLUncalibratedRecHit.h:13
FTLUncalibratedRecHit::flags
unsigned char flags() const
Definition: FTLUncalibratedRecHit.h:38
FTLUncalibratedRecHit::amplitude
std::pair< float, float > amplitude() const
Definition: FTLUncalibratedRecHit.h:33
FTLUncalibratedRecHit::row_
uint8_t row_
Definition: FTLUncalibratedRecHit.h:62
FTLUncalibratedRecHit::time_
std::pair< float, float > time_
Definition: FTLUncalibratedRecHit.h:59
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
FTLUncalibratedRecHit::timeError
float timeError() const
Definition: FTLUncalibratedRecHit.h:36
FTLUncalibratedRecHit::time
std::pair< float, float > time() const
Definition: FTLUncalibratedRecHit.h:34