CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes | Static Private Attributes
DTDigiSimLink Class Reference

#include <DTDigiSimLink.h>

Classes

struct  ChannelPacking
 

Public Types

typedef uint32_t ChannelType
 

Public Member Functions

ChannelType channel () const
 
uint32_t countsTDC () const
 
 DTDigiSimLink (int wireNr, int digiNr, int nTDC, unsigned int trackId, EncodedEventId evId, int base=32)
 
 DTDigiSimLink (int wireNr, int digiNr, double tdrift, unsigned int trackId, EncodedEventId evId, int base=32)
 
 DTDigiSimLink ()
 
EncodedEventId eventId () const
 
int number () const
 
unsigned int SimTrackId () const
 
double time () const
 
int wire () const
 

Private Attributes

int32_t theCounts
 
uint8_t theDigiNumber
 
EncodedEventId theEventId
 
uint32_t theSimTrackId
 
uint8_t theTDCBase
 
uint16_t theWire
 

Static Private Attributes

static const double reso
 

Detailed Description

Definition at line 6 of file DTDigiSimLink.h.

Member Typedef Documentation

◆ ChannelType

typedef uint32_t DTDigiSimLink::ChannelType

Definition at line 8 of file DTDigiSimLink.h.

Constructor & Destructor Documentation

◆ DTDigiSimLink() [1/3]

DTDigiSimLink::DTDigiSimLink ( int  wireNr,
int  digiNr,
int  nTDC,
unsigned int  trackId,
EncodedEventId  evId,
int  base = 32 
)
explicit

Definition at line 5 of file DTDigiSimLink.cc.

6  : theWire(wireNr),
7  theDigiNumber(digiNr),
9  theCounts(nTDC),
10  theSimTrackId(trackId),
11  theEventId(evId) {}

◆ DTDigiSimLink() [2/3]

DTDigiSimLink::DTDigiSimLink ( int  wireNr,
int  digiNr,
double  tdrift,
unsigned int  trackId,
EncodedEventId  evId,
int  base = 32 
)
explicit

Definition at line 13 of file DTDigiSimLink.cc.

14  : theWire(wireNr),
15  theDigiNumber(digiNr),
17  theCounts(static_cast<int>(tdrift * base / 25.)),
18  theSimTrackId(trackId),
19  theEventId(evId) {}

◆ DTDigiSimLink() [3/3]

DTDigiSimLink::DTDigiSimLink ( )

Definition at line 21 of file DTDigiSimLink.cc.

Member Function Documentation

◆ channel()

DTDigiSimLink::ChannelType DTDigiSimLink::channel ( ) const

Definition at line 24 of file DTDigiSimLink.cc.

References mps_fire::result, theDigiNumber, and theWire.

24  {
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 }

◆ countsTDC()

uint32_t DTDigiSimLink::countsTDC ( ) const

Definition at line 39 of file DTDigiSimLink.cc.

References theCounts.

39 { return theCounts; }

◆ eventId()

EncodedEventId DTDigiSimLink::eventId ( ) const

Definition at line 45 of file DTDigiSimLink.cc.

References theEventId.

Referenced by ntupleDataFormat.Event::eventIdStr(), and operator<<().

45 { return theEventId; }

◆ number()

int DTDigiSimLink::number ( ) const

Definition at line 37 of file DTDigiSimLink.cc.

References theDigiNumber.

Referenced by operator<<().

37 { return theDigiNumber; }

◆ SimTrackId()

unsigned int DTDigiSimLink::SimTrackId ( ) const

Definition at line 43 of file DTDigiSimLink.cc.

References theSimTrackId.

Referenced by operator<<().

43 { return theSimTrackId; }

◆ time()

double DTDigiSimLink::time ( ) const

Definition at line 41 of file DTDigiSimLink.cc.

References theCounts, and theTDCBase.

Referenced by operator<<().

41 { return theCounts * 25. / theTDCBase; }

◆ wire()

int DTDigiSimLink::wire ( ) const

Definition at line 35 of file DTDigiSimLink.cc.

References theWire.

Referenced by operator<<().

35 { return theWire; }

Member Data Documentation

◆ reso

const double DTDigiSimLink::reso
staticprivate

Definition at line 53 of file DTDigiSimLink.h.

◆ theCounts

int32_t DTDigiSimLink::theCounts
private

Definition at line 59 of file DTDigiSimLink.h.

Referenced by countsTDC(), and time().

◆ theDigiNumber

uint8_t DTDigiSimLink::theDigiNumber
private

Definition at line 57 of file DTDigiSimLink.h.

Referenced by channel(), and number().

◆ theEventId

EncodedEventId DTDigiSimLink::theEventId
private

Definition at line 61 of file DTDigiSimLink.h.

Referenced by eventId().

◆ theSimTrackId

uint32_t DTDigiSimLink::theSimTrackId
private

Definition at line 60 of file DTDigiSimLink.h.

Referenced by SimTrackId().

◆ theTDCBase

uint8_t DTDigiSimLink::theTDCBase
private

Definition at line 58 of file DTDigiSimLink.h.

Referenced by time().

◆ theWire

uint16_t DTDigiSimLink::theWire
private

Definition at line 56 of file DTDigiSimLink.h.

Referenced by channel(), and wire().