test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 10 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.

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

Definition at line 14 of file DTDigiSimLink.cc.

14  :
15  theWire(wireNr),
16  theDigiNumber(digiNr),
17  theCounts(static_cast<int>(tdrift/reso)),
18  theSimTrackId(trackId),
19  theEventId(evId)
20 {}
DTDigiSimLink::DTDigiSimLink ( )

Definition at line 22 of file DTDigiSimLink.cc.

22  :
23  theWire(0),
24  theDigiNumber(0),
25  theCounts(0),
26  theSimTrackId(0),
27  theEventId(0)
28 {}

Member Function Documentation

DTDigiSimLink::ChannelType DTDigiSimLink::channel ( ) const

Definition at line 30 of file DTDigiSimLink.cc.

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

30  {
31  ChannelPacking result;
32  result.wi = theWire;
33  result.num = theDigiNumber;
34  DTDigiSimLink::ChannelType* p_result = reinterpret_cast<DTDigiSimLink::ChannelType*>(&result);
35  return *p_result;
36 }
tuple result
Definition: query.py:137
uint32_t DTDigiSimLink::countsTDC ( ) const

Definition at line 42 of file DTDigiSimLink.cc.

References theCounts.

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

Definition at line 48 of file DTDigiSimLink.cc.

References theEventId.

Referenced by operator<<().

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

Definition at line 40 of file DTDigiSimLink.cc.

References theDigiNumber.

Referenced by operator<<().

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

Definition at line 46 of file DTDigiSimLink.cc.

References theSimTrackId.

Referenced by operator<<().

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

Definition at line 44 of file DTDigiSimLink.cc.

References reso, and theCounts.

Referenced by operator<<().

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

Definition at line 38 of file DTDigiSimLink.cc.

References theWire.

Referenced by operator<<().

38 {return theWire;}

Member Data Documentation

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

Definition at line 53 of file DTDigiSimLink.h.

Referenced by time().

uint32_t DTDigiSimLink::theCounts
private

Definition at line 58 of file DTDigiSimLink.h.

Referenced by countsTDC(), and time().

uint16_t DTDigiSimLink::theDigiNumber
private

Definition at line 57 of file DTDigiSimLink.h.

Referenced by channel(), and number().

EncodedEventId DTDigiSimLink::theEventId
private

Definition at line 60 of file DTDigiSimLink.h.

Referenced by eventId().

uint32_t DTDigiSimLink::theSimTrackId
private

Definition at line 59 of file DTDigiSimLink.h.

Referenced by SimTrackId().

uint16_t DTDigiSimLink::theWire
private

Definition at line 56 of file DTDigiSimLink.h.

Referenced by channel(), and wire().