CMS 3D CMS Logo

StripDigiSimLink.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_TrackerDigiSimLink_StripDigiSimLink_h
2 #define SimDataFormats_TrackerDigiSimLink_StripDigiSimLink_h
3 
5 #include <cstdint>
6 
8 public:
9  enum { LowTof, HighTof };
10 
12  unsigned int ch, unsigned int tkId, unsigned int counter, unsigned int tofBin, EncodedEventId e, float a)
13  : chan(ch),
14  simTkId(tkId),
15  CFpos(tofBin == LowTof ? counter & 0x7FFFFFFF : (counter & 0x7FFFFFFF) | 0x80000000),
16  eId(e),
17  fract(a) {
18  ;
19  }
20 
21  StripDigiSimLink(unsigned int ch, unsigned int tkId, unsigned int counter, EncodedEventId e, float a)
22  : chan(ch), simTkId(tkId), CFpos(counter & 0x7FFFFFFF), eId(e), fract(a) {
23  ;
24  }
25 
26  StripDigiSimLink(unsigned int ch, unsigned int tkId, EncodedEventId e, float a)
27  : chan(ch), simTkId(tkId), CFpos(0), eId(e), fract(a) {
28  ;
29  }
30 
31  StripDigiSimLink() : chan(0), simTkId(0), CFpos(0), eId(0), fract(0) { ; }
32 
34 
35  unsigned int channel() const { return chan; }
36  unsigned int SimTrackId() const { return simTkId; }
37  unsigned int CFposition() const { return CFpos & 0x7FFFFFFF; }
38  unsigned int TofBin() const { return (CFpos & 0x80000000) == 0 ? LowTof : HighTof; }
39  EncodedEventId eventId() const { return eId; }
40  float fraction() const { return fract; }
41 
42  inline bool operator<(const StripDigiSimLink& other) const { return channel() < other.channel(); }
43 
44 private:
45  unsigned int chan;
46  unsigned int simTkId;
47  uint32_t CFpos; // position of the PSimHit in the CrossingFrame vector
48  // for the subdetector collection; bit 31 set if from the HighTof collection
50  float fract;
51 };
52 #endif
counter
Definition: counter.py:1
EncodedEventId
Definition: EncodedEventId.h:11
trackingPlots.other
other
Definition: trackingPlots.py:1460
a
double a
Definition: hdecay.h:119
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EncodedEventId.h