CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTDigiSimLink.cc
Go to the documentation of this file.
2 
3 using namespace std;
4 const double DTDigiSimLink::reso = 25./32.; //ns
5 
6 DTDigiSimLink::DTDigiSimLink(int wireNr, int digiNr, int nTDC, unsigned int trackId, EncodedEventId evId):
7  theWire(wireNr),
8  theDigiNumber(digiNr),
9  theCounts(nTDC),
10  theSimTrackId(trackId),
11  theEventId(evId)
12 {}
13 
14 DTDigiSimLink::DTDigiSimLink(int wireNr, int digiNr, double tdrift, unsigned int trackId, EncodedEventId evId):
15  theWire(wireNr),
16  theDigiNumber(digiNr),
17  theCounts(static_cast<int>(tdrift/reso)),
18  theSimTrackId(trackId),
19  theEventId(evId)
20 {}
21 
23  theWire(0),
24  theDigiNumber(0),
25  theCounts(0),
26  theSimTrackId(0),
27  theEventId(0)
28 {}
29 
32  result.wi = theWire;
33  result.num = theDigiNumber;
34  DTDigiSimLink::ChannelType* p_result = reinterpret_cast<DTDigiSimLink::ChannelType*>(&result);
35  return *p_result;
36 }
37 
38 int DTDigiSimLink::wire() const {return theWire;}
39 
40 int DTDigiSimLink::number() const {return theDigiNumber;}
41 
42 uint32_t DTDigiSimLink::countsTDC() const { return theCounts; }
43 
44 double DTDigiSimLink::time() const { return theCounts*reso; }
45 
46 unsigned int DTDigiSimLink::SimTrackId() const {return theSimTrackId;}
47 
tuple result
Definition: query.py:137