CMS 3D CMS Logo

DTDigiSimLink.cc
Go to the documentation of this file.
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 
22  : theWire(0), theDigiNumber(0), theTDCBase(32), theCounts(0), theSimTrackId(0), theEventId(0) {}
23 
26  result.wi = theWire;
27  result.num = theDigiNumber;
28  DTDigiSimLink::ChannelType* p_result = reinterpret_cast<DTDigiSimLink::ChannelType*>(&result);
29  return *p_result;
30 }
31 
32 int DTDigiSimLink::wire() const { return theWire; }
33 
34 int DTDigiSimLink::number() const { return theDigiNumber; }
35 
36 uint32_t DTDigiSimLink::countsTDC() const { return theCounts; }
37 
38 double DTDigiSimLink::time() const { return theCounts * 25. / theTDCBase; }
39 
40 unsigned int DTDigiSimLink::SimTrackId() const { return theSimTrackId; }
41 
EncodedEventId
Definition: EncodedEventId.h:11
createfilelist.int
int
Definition: createfilelist.py:10
std
Definition: JetResolutionObject.h:76
mps_fire.result
result
Definition: mps_fire.py:303
newFWLiteAna.base
base
Definition: newFWLiteAna.py:92