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)
 
 DTDigiSimLink (int wireNr, int digiNr, double tdrift, unsigned int trackId, EncodedEventId evId)
 
 DTDigiSimLink ()
 
EncodedEventId eventId () const
 
int number () const
 
unsigned int SimTrackId () const
 
double time () const
 
int wire () const
 

Private Attributes

uint32_t theCounts
 
uint16_t theDigiNumber
 
EncodedEventId theEventId
 
uint32_t theSimTrackId
 
uint16_t theWire
 

Static Private Attributes

static const double reso = 25. / 32.
 

Detailed Description

Definition at line 7 of file DTDigiSimLink.h.

Member Typedef Documentation

typedef uint32_t DTDigiSimLink::ChannelType

Definition at line 9 of file DTDigiSimLink.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file DTDigiSimLink.cc.

7  : theWire(wireNr), theDigiNumber(digiNr), theCounts(nTDC), theSimTrackId(trackId), theEventId(evId) {}
DTDigiSimLink::DTDigiSimLink ( int  wireNr,
int  digiNr,
double  tdrift,
unsigned int  trackId,
EncodedEventId  evId 
)
explicit

Definition at line 9 of file DTDigiSimLink.cc.

10  : theWire(wireNr),
11  theDigiNumber(digiNr),
12  theCounts(static_cast<int>(tdrift / reso)),
13  theSimTrackId(trackId),
14  theEventId(evId) {}
DTDigiSimLink::DTDigiSimLink ( )

Definition at line 16 of file DTDigiSimLink.cc.

Member Function Documentation

DTDigiSimLink::ChannelType DTDigiSimLink::channel ( ) const

Definition at line 18 of file DTDigiSimLink.cc.

References DTDigiSimLink::ChannelPacking::num, mps_fire::result, theDigiNumber, theWire, and DTDigiSimLink::ChannelPacking::wi.

18  {
19  ChannelPacking result;
20  result.wi = theWire;
21  result.num = theDigiNumber;
22  DTDigiSimLink::ChannelType* p_result = reinterpret_cast<DTDigiSimLink::ChannelType*>(&result);
23  return *p_result;
24 }
uint32_t DTDigiSimLink::countsTDC ( ) const

Definition at line 30 of file DTDigiSimLink.cc.

References theCounts.

30 { return theCounts; }
EncodedEventId DTDigiSimLink::eventId ( ) const

Definition at line 36 of file DTDigiSimLink.cc.

References theEventId.

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

36 { return theEventId; }
int DTDigiSimLink::number ( ) const

Definition at line 28 of file DTDigiSimLink.cc.

References theDigiNumber.

Referenced by operator<<().

28 { return theDigiNumber; }
unsigned int DTDigiSimLink::SimTrackId ( ) const

Definition at line 34 of file DTDigiSimLink.cc.

References theSimTrackId.

Referenced by operator<<().

34 { return theSimTrackId; }
double DTDigiSimLink::time ( ) const

Definition at line 32 of file DTDigiSimLink.cc.

References reso, and theCounts.

Referenced by operator<<().

32 { return theCounts * reso; }
int DTDigiSimLink::wire ( ) const

Definition at line 26 of file DTDigiSimLink.cc.

References theWire.

Referenced by operator<<().

26 { return theWire; }

Member Data Documentation

const double DTDigiSimLink::reso = 25. / 32.
staticprivate

Definition at line 52 of file DTDigiSimLink.h.

Referenced by time().

uint32_t DTDigiSimLink::theCounts
private

Definition at line 57 of file DTDigiSimLink.h.

Referenced by countsTDC(), and time().

uint16_t DTDigiSimLink::theDigiNumber
private

Definition at line 56 of file DTDigiSimLink.h.

Referenced by channel(), and number().

EncodedEventId DTDigiSimLink::theEventId
private

Definition at line 59 of file DTDigiSimLink.h.

Referenced by eventId().

uint32_t DTDigiSimLink::theSimTrackId
private

Definition at line 58 of file DTDigiSimLink.h.

Referenced by SimTrackId().

uint16_t DTDigiSimLink::theWire
private

Definition at line 55 of file DTDigiSimLink.h.

Referenced by channel(), and wire().