Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
DataFormats
DTDigi
src
DTDigi.cc
Go to the documentation of this file.
1
7
#include <
DataFormats/DTDigi/interface/DTDigi.h
>
8
#include <
FWCore/Utilities/interface/Exception.h
>
9
10
using namespace
std
;
11
12
DTDigi::DTDigi
(
int
wire,
int
nTDC,
int
number
,
int
base
)
13
: theCounts(nTDC), theWire(wire), theNumber(
number
), theTDCBase(
base
) {
14
if
(
number
> 255 ||
number
< 0 || !(
base
== 30 ||
base
== 32)) {
15
throw
cms::Exception
(
"BadConfig"
) <<
"DTDigi ctor: invalid parameters: number: "
<<
number
<<
" base: "
<<
base
;
16
}
17
}
18
19
DTDigi::DTDigi
(
int
wire,
double
tdrift,
int
number
,
int
base
)
20
: theCounts(static_cast<
int
>(tdrift / 25. *
base
)), theWire(wire), theNumber(
number
), theTDCBase(
base
) {
21
if
(
number
> 255 ||
number
< 0 || !(
base
== 30 ||
base
== 32)) {
22
throw
cms::Exception
(
"BadConfig"
) <<
"DTDigi ctor: invalid parameters: number: "
<<
number
<<
" base: "
<<
base
;
23
}
24
}
25
26
DTDigi::DTDigi
() : theCounts(0), theWire(0), theNumber(0), theTDCBase(32) {}
27
28
// Comparison
29
bool
DTDigi::operator==
(
const
DTDigi
& digi)
const
{
30
if
(
theWire
!= digi.
wire
() ||
31
// theNumber != digi.number() || //FIXME required ??
32
theCounts
!= digi.
countsTDC
())
33
return
false
;
34
return
true
;
35
}
36
37
double
DTDigi::time
()
const
{
return
theCounts
* 25. /
theTDCBase
; }
38
39
int32_t
DTDigi::countsTDC
()
const
{
return
theCounts
; }
40
41
int
DTDigi::wire
()
const
{
return
theWire
; }
42
43
int
DTDigi::number
()
const
{
return
theNumber
; }
44
45
double
DTDigi::tdcUnit
()
const
{
return
25. /
theTDCBase
; }
46
47
int
DTDigi::tdcBase
()
const
{
return
theTDCBase
; }
48
49
void
DTDigi::print
()
const
{
50
cout
<<
"Wire "
<<
wire
() <<
" Digi # "
<<
number
() <<
" Drift time (ns) "
<<
time
() << endl;
51
}
DTDigi::tdcUnit
double tdcUnit() const
Get the TDC unit value in ns.
Definition:
DTDigi.cc:45
DTDigi::number
int number() const
Identifies different digis within the same cell.
Definition:
DTDigi.cc:43
DTDigi::DTDigi
DTDigi()
Default construction.
Definition:
DTDigi.cc:26
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
DTDigi::theTDCBase
uint8_t theTDCBase
Definition:
DTDigi.h:72
DTDigi::time
double time() const
Get time in ns.
Definition:
DTDigi.cc:37
DTDigi::wire
int wire() const
Return wire number.
Definition:
DTDigi.cc:41
DTDigi::theCounts
int32_t theCounts
Definition:
DTDigi.h:69
contentValuesFiles.number
number
Definition:
contentValuesFiles.py:53
DTDigi::tdcBase
int tdcBase() const
Get the TDC base (counts per BX)
Definition:
DTDigi.cc:47
DTDigi::countsTDC
int32_t countsTDC() const
Get raw TDC count.
Definition:
DTDigi.cc:39
DTDigi::print
void print() const
Print content of digi.
Definition:
DTDigi.cc:49
createfilelist.int
int
Definition:
createfilelist.py:10
DTDigi::theWire
uint16_t theWire
Definition:
DTDigi.h:70
DTDigi::operator==
bool operator==(const DTDigi &digi) const
Digis are equal if they are on the same cell and have same TDC count.
Definition:
DTDigi.cc:29
std
Definition:
JetResolutionObject.h:76
Exception
Definition:
hltDiff.cc:245
DTDigi
Definition:
DTDigi.h:17
Exception.h
DTDigi.h
newFWLiteAna.base
base
Definition:
newFWLiteAna.py:92
DTDigi::theNumber
uint8_t theNumber
Definition:
DTDigi.h:71
Generated for CMSSW Reference Manual by
1.8.16