src
SimDataFormats
DigiSimLinks
src
DTDigiSimLink.cc
Go to the documentation of this file.
1
#include <
SimDataFormats/DigiSimLinks/interface/DTDigiSimLink.h
>
2
3
using namespace
std
;
4
5
DTDigiSimLink::DTDigiSimLink
(
int
wireNr,
int
digiNr,
int
nTDC,
unsigned
int
trackId,
EncodedEventId
evId,
int
base
)
6
: theWire(wireNr),
7
theDigiNumber(digiNr),
8
theTDCBase(
base
),
9
theCounts(nTDC),
10
theSimTrackId(trackId),
11
theEventId(evId) {}
12
13
DTDigiSimLink::DTDigiSimLink
(
int
wireNr,
int
digiNr,
double
tdrift,
unsigned
int
trackId,
EncodedEventId
evId,
int
base
)
14
: theWire(wireNr),
15
theDigiNumber(digiNr),
16
theTDCBase(
base
),
17
theCounts(static_cast<
int
>(tdrift *
base
/ 25.)),
18
theSimTrackId(trackId),
19
theEventId(evId) {}
20
21
DTDigiSimLink::DTDigiSimLink
()
22
: theWire(0), theDigiNumber(0), theTDCBase(32), theCounts(0), theSimTrackId(0), theEventId(0) {}
23
24
DTDigiSimLink::ChannelType
DTDigiSimLink::channel
()
const
{
25
#pragma GCC diagnostic push
26
#pragma GCC diagnostic ignored "-Wuninitialized"
27
ChannelPacking
result
;
28
result
.wi =
theWire
;
29
result
.num =
theDigiNumber
;
30
DTDigiSimLink::ChannelType
* p_result =
reinterpret_cast<
DTDigiSimLink::ChannelType
*
>
(&
result
);
31
return
*p_result;
32
#pragma GCC diagnostic pop
33
}
34
35
int
DTDigiSimLink::wire
()
const
{
return
theWire
; }
36
37
int
DTDigiSimLink::number
()
const
{
return
theDigiNumber
; }
38
39
uint32_t
DTDigiSimLink::countsTDC
()
const
{
return
theCounts
; }
40
41
double
DTDigiSimLink::time
()
const
{
return
theCounts
* 25. /
theTDCBase
; }
42
43
unsigned
int
DTDigiSimLink::SimTrackId
()
const
{
return
theSimTrackId
; }
44
45
EncodedEventId
DTDigiSimLink::eventId
()
const
{
return
theEventId
; }
DTDigiSimLink::channel
ChannelType channel() const
Definition:
DTDigiSimLink.cc:24
DTDigiSimLink::ChannelPacking
Definition:
DTDigiSimLink.h:46
DTDigiSimLink::theCounts
int32_t theCounts
Definition:
DTDigiSimLink.h:59
mps_fire.result
result
Definition:
mps_fire.py:311
edmMakeDummyCfis.base
base
Definition:
edmMakeDummyCfis.py:22
DTDigiSimLink::countsTDC
uint32_t countsTDC() const
Definition:
DTDigiSimLink.cc:39
DTDigiSimLink::theTDCBase
uint8_t theTDCBase
Definition:
DTDigiSimLink.h:58
DTDigiSimLink::eventId
EncodedEventId eventId() const
Definition:
DTDigiSimLink.cc:45
DTDigiSimLink::number
int number() const
Definition:
DTDigiSimLink.cc:37
DTDigiSimLink::theDigiNumber
uint8_t theDigiNumber
Definition:
DTDigiSimLink.h:57
std
Definition:
JetResolutionObject.h:76
DTDigiSimLink::SimTrackId
unsigned int SimTrackId() const
Definition:
DTDigiSimLink.cc:43
DTDigiSimLink::theWire
uint16_t theWire
Definition:
DTDigiSimLink.h:56
DTDigiSimLink::wire
int wire() const
Definition:
DTDigiSimLink.cc:35
createfilelist.int
int
Definition:
createfilelist.py:10
DTDigiSimLink.h
DTDigiSimLink::time
double time() const
Definition:
DTDigiSimLink.cc:41
DTDigiSimLink::ChannelType
uint32_t ChannelType
Definition:
DTDigiSimLink.h:8
DTDigiSimLink::DTDigiSimLink
DTDigiSimLink()
Definition:
DTDigiSimLink.cc:21
EncodedEventId
Definition:
EncodedEventId.h:11
DTDigiSimLink::theSimTrackId
uint32_t theSimTrackId
Definition:
DTDigiSimLink.h:60
DTDigiSimLink::theEventId
EncodedEventId theEventId
Definition:
DTDigiSimLink.h:61
Generated for CMSSW Reference Manual by
1.8.14