Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
; }
newFWLiteAna.base
tuple base
Main Program
Definition:
newFWLiteAna.py:92
DTDigiSimLink::ChannelPacking
Definition:
DTDigiSimLink.h:46
DTDigiSimLink::ChannelPacking::wi
uint16_t wi
Definition:
DTDigiSimLink.h:47
DTDigiSimLink::countsTDC
uint32_t countsTDC() const
Definition:
DTDigiSimLink.cc:39
DTDigiSimLink::theCounts
int32_t theCounts
Definition:
DTDigiSimLink.h:59
DTDigiSimLink::time
double time() const
Definition:
DTDigiSimLink.cc:41
DTDigiSimLink::theTDCBase
uint8_t theTDCBase
Definition:
DTDigiSimLink.h:58
DTDigiSimLink::theDigiNumber
uint8_t theDigiNumber
Definition:
DTDigiSimLink.h:57
DTDigiSimLink::number
int number() const
Definition:
DTDigiSimLink.cc:37
mps_fire.result
tuple result
Definition:
mps_fire.py:311
DTDigiSimLink::theWire
uint16_t theWire
Definition:
DTDigiSimLink.h:56
DTDigiSimLink::channel
ChannelType channel() const
Definition:
DTDigiSimLink.cc:24
DTDigiSimLink.h
DTDigiSimLink::SimTrackId
unsigned int SimTrackId() const
Definition:
DTDigiSimLink.cc:43
DTDigiSimLink::eventId
EncodedEventId eventId() const
Definition:
DTDigiSimLink.cc:45
DTDigiSimLink::ChannelType
uint32_t ChannelType
Definition:
DTDigiSimLink.h:8
DTDigiSimLink::wire
int wire() const
Definition:
DTDigiSimLink.cc:35
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
DTDigiSimLink::ChannelPacking::num
uint16_t num
Definition:
DTDigiSimLink.h:48
Generated for CMSSW Reference Manual by
1.8.5