Main Page
Namespaces
Classes
Package Documentation
DataFormats
FTLRecHit
src
FTLUncalibratedRecHit.cc
Go to the documentation of this file.
1
#include "
DataFormats/FTLRecHit/interface/FTLUncalibratedRecHit.h
"
2
#include <cmath>
3
#include <limits>
4
5
FTLUncalibratedRecHit::FTLUncalibratedRecHit
() :
6
amplitude_(-1.
f
,-1.
f
), time_(-1.
f
,-1.
f
), timeError_(-1.
f
), id_(
DetId
()),
7
row_(0), column_(0), flags_(
std
::numeric_limits<unsigned char>::
max
()) { }
8
9
FTLUncalibratedRecHit::FTLUncalibratedRecHit
(
const
DetId
&
id
, std::pair <float,float> ampl,
10
std::pair <float,float>
time
,
float
timeError
,
unsigned
char
flags
) :
11
amplitude_
(ampl),
time_
(time),
timeError_
(timeError),
id_
(id),
row_
(0),
column_
(0),
flags_
(flags) { }
12
13
FTLUncalibratedRecHit::FTLUncalibratedRecHit
(
const
DetId
&
id
, uint8_t
row
, uint8_t
column
,
14
std::pair <float,float> ampl, std::pair <float,float>
time
,
15
float
timeError
,
unsigned
char
flags
) :
16
amplitude_
(ampl),
time_
(time),
timeError_
(timeError),
id_
(id),
row_
(row),
column_
(column),
flags_
(flags) { }
17
18
FTLUncalibratedRecHit::~FTLUncalibratedRecHit
() {
19
}
20
21
bool
FTLUncalibratedRecHit::isSaturated
()
const
{
22
return
FTLUncalibratedRecHit::checkFlag
(
kSaturated
);
23
}
24
25
bool
FTLUncalibratedRecHit::isTimeValid
()
const
{
26
if
(
timeError
() < 0)
27
return
false
;
28
else
29
return
true
;
30
}
31
32
bool
FTLUncalibratedRecHit::isTimeErrorValid
()
const
{
33
if
(!
isTimeValid
())
34
return
false
;
35
if
(
timeError
() >= 10000)
36
return
false
;
37
38
return
true
;
39
}
40
41
void
FTLUncalibratedRecHit::setFlagBit
(
FTLUncalibratedRecHit::Flags
flag
) {
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
}
51
52
53
bool
FTLUncalibratedRecHit::checkFlag
(
FTLUncalibratedRecHit::Flags
flag
)
const
{
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
}
FTLUncalibratedRecHit.h
FTLUncalibratedRecHit::flags_
unsigned char flags_
Definition:
FTLUncalibratedRecHit.h:58
FTLUncalibratedRecHit::column_
uint8_t column_
Definition:
FTLUncalibratedRecHit.h:57
FTLUncalibratedRecHit::isTimeErrorValid
bool isTimeErrorValid() const
Definition:
FTLUncalibratedRecHit.cc:32
FTLUncalibratedRecHit::id_
DetId id_
Definition:
FTLUncalibratedRecHit.h:56
RemoveAddSevLevel.flag
flag
Definition:
RemoveAddSevLevel.py:115
FTLUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition:
FTLUncalibratedRecHit.cc:53
FTLUncalibratedRecHit::timeError_
float timeError_
Definition:
FTLUncalibratedRecHit.h:55
std
Definition:
JetResolutionObject.h:80
FTLUncalibratedRecHit::FTLUncalibratedRecHit
FTLUncalibratedRecHit()
Definition:
FTLUncalibratedRecHit.cc:5
FTLUncalibratedRecHit::isSaturated
bool isSaturated() const
Definition:
FTLUncalibratedRecHit.cc:21
FTLUncalibratedRecHit::row_
uint8_t row_
Definition:
FTLUncalibratedRecHit.h:57
FTLUncalibratedRecHit::amplitude_
std::pair< float, float > amplitude_
Definition:
FTLUncalibratedRecHit.h:53
FTLUncalibratedRecHit::timeError
float timeError() const
Definition:
FTLUncalibratedRecHit.h:31
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:178
FTLUncalibratedRecHit::row
int row() const
Definition:
FTLUncalibratedRecHit.h:36
FTLUncalibratedRecHit::kSaturated
Definition:
FTLUncalibratedRecHit.h:16
DetId
Definition:
DetId.h:18
FTLUncalibratedRecHit::time_
std::pair< float, float > time_
Definition:
FTLUncalibratedRecHit.h:54
FTLUncalibratedRecHit::column
int column() const
Definition:
FTLUncalibratedRecHit.h:37
FTLUncalibratedRecHit::kGood
Definition:
FTLUncalibratedRecHit.h:14
FTLUncalibratedRecHit::time
std::pair< float, float > time() const
Definition:
FTLUncalibratedRecHit.h:29
FTLUncalibratedRecHit::isTimeValid
bool isTimeValid() const
Definition:
FTLUncalibratedRecHit.cc:25
FTLUncalibratedRecHit::~FTLUncalibratedRecHit
~FTLUncalibratedRecHit()
Definition:
FTLUncalibratedRecHit.cc:18
FTLUncalibratedRecHit::flags
unsigned char flags() const
Definition:
FTLUncalibratedRecHit.h:33
FTLUncalibratedRecHit::setFlagBit
void setFlagBit(Flags flag)
Definition:
FTLUncalibratedRecHit.cc:41
FTLUncalibratedRecHit::Flags
Flags
Definition:
FTLUncalibratedRecHit.h:13
Generated for CMSSW Reference Manual by
1.8.11