CMS 3D CMS Logo

PixelDigiSimLink.h
Go to the documentation of this file.
1 #ifndef TRACKINGOBJECTS_PIXELDIGISIMLINK_H
2 #define TRACKINGOBJECTS_PIXELDIGISIMLINK_H
3 
4 #include "boost/cstdint.hpp"
6 
7 //typedef std::pair<unsigned int ,unsigned int > PixelDigiSimLink;
9 public:
10  enum {LowTof, HighTof};
11 
12  PixelDigiSimLink(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  fract=a;
17  eId=e;
18  };
19  PixelDigiSimLink(unsigned int ch, unsigned int tkId, EncodedEventId e, float a ){
20  chan=ch;
21  simTkId=tkId;
22  CFpos = 0;
23  fract=a;
24  eId=e;
25  };
27  chan=0;
28  simTkId=0;
29  CFpos = 0;
30  fract=0;
31  };
33  unsigned int channel() const{return chan;};
34  unsigned int SimTrackId() const{return simTkId;};
35  unsigned int CFposition() const {return CFpos & 0x7FFFFFFF;}
36  unsigned int TofBin() const {return (CFpos & 0x80000000) == 0 ? LowTof : HighTof;}
37  EncodedEventId eventId() const{return eId;}
38  float fraction() const{return fract;};
39 
40 
41  inline bool operator< ( const PixelDigiSimLink& other ) const { return fraction() < other.fraction(); }
42 
43  private:
44  unsigned int chan;
45  unsigned int simTkId;
46  uint32_t CFpos; // position of the PSimHit in the CrossingFrame vector
47  // for the subdetector collection; bit 31 set if from the HighTof collection
49  float fract;
50  };
51 #endif
double a
Definition: hdecay.h:121