CMS 3D CMS Logo

DTBtiHit.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
17 //
18 //--------------------------------------------------
19 #ifndef DT_BTI_HIT_H
20 #define DT_BTI_HIT_H
21 
22 //------------------------------------
23 // Collaborating Class Declarations --
24 //------------------------------------
25 class DTDigi;
26 
27 //----------------------
28 // Base Class Headers --
29 //----------------------
32 
33 //---------------
34 // C++ Headers --
35 //---------------
36 #include <cmath>
37 #include <string>
38 
39 // ---------------------
40 // -- Class Interface --
41 // ---------------------
42 
43 class DTBtiHit {
44 public:
46  DTBtiHit(const DTDigi*, DTConfigBti*);
47 
50 
52  DTBtiHit(const DTBtiHit&);
53 
55  ~DTBtiHit();
56 
58  DTBtiHit& operator=(const DTBtiHit&);
59 
61  inline void stepDownTime() { //_curTime-=_stepTime;
62  _clockTime -= 1;
63  }
64 
66  inline const DTDigi* hitDigi() const { return _hitdigi; }
67 
69 
73  inline float curTime() const { return _curTime; }
74  inline int clockTime() const { return _clockTime; }
75 
77  inline int isDrifting() const { //return _curTime>=0 && _curTime<4000;
78  return _clockTime > 1 && _clockTime < 400;
79  }
80 
82  //SV jtrig()=_config->ST() added: is for tdrift==0
83  inline int isInsideReg() const {
84  //return _curTime<0 && jtrig()<=_config->ST();
85  return (_clockTime <= 0 && jtrig() <= _config->ST()); //SV bug fix 17XII03
86  }
87 
89  inline int jtrig() const {
90  //return (int)(fabs(_curTime)/_stepTime);
91  return -_clockTime;
92  }
93  //inline float jtrig() const { return fabs(_curTime)/_stepTime; } //prova SV
94  //SV 13/XI/02 half-int simulation added
95  /*inline float jtrig() const {
96  int idt = int(fabs(_curTime/_stepTime));
97  float rest = fmod( fabs(_curTime), _stepTime );
98  int irest = 0;
99  if(rest==0.0)
100  irest = 1;
101  else
102  irest = int( rest / (_stepTime*0.5) );
103  float jtrig_int4 = float(idt) + float(irest)*0.5;
104  return jtrig_int4;
105  }
106 */
107 
108 public:
109  static const float _stepTime;
110  static const float _stepTimeTdc;
112 
113 private:
114  const DTDigi* _hitdigi;
116  float _curTime;
118 };
119 
120 #endif
DTBtiHit::DTBtiHit
DTBtiHit(const DTDigi *, DTConfigBti *)
Constructor.
Definition: DTBtiHit.cc:48
DTBtiHit::_config
DTConfigBti * _config
Definition: DTBtiHit.h:115
DTBtiHit::curTime
float curTime() const
Return the current time.
Definition: DTBtiHit.h:73
DTBtiHit::_curTime
float _curTime
Definition: DTBtiHit.h:116
DTBtiHit::stepDownTime
void stepDownTime()
Move the hit forward in time one step.
Definition: DTBtiHit.h:61
DTBtiHit
Definition: DTBtiHit.h:43
DTBtiHit::_hitdigi
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
DTConfigBti
Definition: DTConfigBti.h:36
DTBtiHit::isInsideReg
int isInsideReg() const
true if signal is in the registers
Definition: DTBtiHit.h:83
DTBtiHit::~DTBtiHit
~DTBtiHit()
Destructor.
Definition: DTBtiHit.cc:98
DTBtiHit::operator=
DTBtiHit & operator=(const DTBtiHit &)
Assignment operator.
Definition: DTBtiHit.cc:104
DTBtiHit::_clockTime
int _clockTime
Definition: DTBtiHit.h:117
DTBtiHit::hitDigi
const DTDigi * hitDigi() const
Return the associated DTDigi.
Definition: DTBtiHit.h:66
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTBtiHit::jtrig
int jtrig() const
position in registers
Definition: DTBtiHit.h:89
DTBtiHit::isDrifting
int isDrifting() const
true if avalanche is still drifting
Definition: DTBtiHit.h:77
DTConfig.h
DTBtiHit::_stepTime
static const float _stepTime
Definition: DTBtiHit.h:109
DTBtiHit::clockTime
int clockTime() const
Definition: DTBtiHit.h:74
DTConfigBti::ST
float ST() const
Max drift time in 12.5 ns steps.
Definition: DTConfigBti.h:61
DTDigi
Definition: DTDigi.h:17
DTConfigBti.h
DTBtiHit::_stepTimeTdc
static const float _stepTimeTdc
Definition: DTBtiHit.h:110
DTBtiHit::t0envFlag
static std::string t0envFlag
Definition: DTBtiHit.h:111