#include <L1Trigger/DTBti/interface/DTBtiHit.h>
Public Member Functions | |
int | clockTime () const |
float | curTime () const |
Return the current time. | |
DTBtiHit (const DTBtiHit &) | |
Copy constructor. | |
DTBtiHit (int clockTime, DTConfigBti *) | |
Constructor from clock times. | |
DTBtiHit (const DTDigi *, DTConfigBti *) | |
Constructor. | |
const DTDigi * | hitDigi () const |
Return the associated DTDigi. | |
int | isDrifting () const |
true if avalanche is still drifting | |
int | isInsideReg () const |
true if signal is in the registers | |
int | jtrig () const |
position in registers | |
DTBtiHit & | operator= (const DTBtiHit &) |
Assignment operator. | |
void | stepDownTime () |
Move the hit forward in time one step. | |
~DTBtiHit () | |
Destructor. | |
Static Public Attributes | |
static const float | _stepTime = 12.5 |
static const float | _stepTimeTdc = 16. |
static std::string | t0envFlag |
Private Attributes | |
int | _clockTime |
DTConfigBti * | _config |
float | _curTime |
const DTDigi * | _hitdigi |
Definition at line 47 of file DTBtiHit.h.
DTBtiHit::DTBtiHit | ( | const DTDigi * | hitdigi, | |
DTConfigBti * | config | |||
) |
Constructor.
Definition at line 48 of file DTBtiHit.cc.
References _clockTime, _curTime, _stepTimeTdc, DTDigi::countsTDC(), and int.
00048 : 00049 _hitdigi(hitdigi), _config(config) { 00050 00051 //SV tdcunits 11V04: time in tdc units! setup time too! 00052 _curTime = hitdigi->countsTDC(); //@@ only DT>0 00053 00054 /* 00055 // *** ATTENTION FOR RUNNING TESTBEAM DATA *** 00056 // SV 26/IX/03 if digi are corrected with wire t0s in DTBXDigitizer 00057 // tdrift values must be corrected with t0 mean instead because 00058 // trigger hardware don't see cable length ! 00059 _curTime = hitdigi->countsTDC(); 00060 00061 if( t0envFlag != " " ){ 00062 DTBXCalibration* calibration = Singleton<DTBXCalibration>::instance(); 00063 //the following for digitization procedure.... see DTBXDigitizer 00064 int bmax = calibration->bitMax(); 00065 if ( _curTime >= ( bmax + calibration->recMin() ) ) 00066 _curTime -= bmax; 00067 00068 //SV tdcunits 11V04: add t0 and trig to have raw time in tdcunits 00069 _curTime += ( calibration->t0( hitdigi->slayer(), hitdigi->layer(), hitdigi->wire() ) 00070 + calibration->tTrig() ); 00071 00072 //tdc clocks in 16 units 00073 int delay16 = int( ( calibration->t0mean(hitdigi->slayer()) + 00074 calibration->tTrig() ) 00075 /_stepTimeTdc ); 00076 00077 //bti clocks of 16 tdc units 00078 _clockTime = (int)( (_curTime + 00079 _config->SetupTime())/_stepTimeTdc) - delay16; 00080 } 00081 00082 */ 00083 //bti clocks of 16 tdc units : first clock is number 1! 00084 //_clockTime = (int)( (_curTime + _config->SetupTime()) / _stepTimeTdc ) + 1; 00085 _clockTime = (int)( _curTime / _stepTimeTdc ) + 1; 00086 00087 }
DTBtiHit::DTBtiHit | ( | int | clockTime, | |
DTConfigBti * | config | |||
) |
Constructor from clock times.
Definition at line 89 of file DTBtiHit.cc.
References _clockTime, _curTime, and _hitdigi.
00089 : 00090 _config(config) { 00091 _clockTime = clockTime; 00092 _hitdigi = 0; 00093 _curTime = 4000; 00094 }
DTBtiHit::DTBtiHit | ( | const DTBtiHit & | hit | ) |
Copy constructor.
Definition at line 96 of file DTBtiHit.cc.
00096 : 00097 _hitdigi(hit._hitdigi), _config(hit._config), _curTime(hit._curTime), 00098 _clockTime(hit._clockTime) { 00099 }
DTBtiHit::~DTBtiHit | ( | ) |
int DTBtiHit::clockTime | ( | ) | const [inline] |
float DTBtiHit::curTime | ( | ) | const [inline] |
Return the current time.
hits with curTime >0 correspond to avalanches drifting to wires <0 " " signals already in the registers SV curTime=4000 if digis are given in clock units....
Definition at line 79 of file DTBtiHit.h.
References _curTime.
Referenced by DTBtiChip::tick().
00079 { return _curTime; }
const DTDigi* DTBtiHit::hitDigi | ( | ) | const [inline] |
Return the associated DTDigi.
Definition at line 72 of file DTBtiHit.h.
References _hitdigi.
Referenced by DTBtiChip::store().
00072 { return _hitdigi; }
int DTBtiHit::isDrifting | ( | ) | const [inline] |
true if avalanche is still drifting
Definition at line 83 of file DTBtiHit.h.
References _clockTime.
00083 { //return _curTime>=0 && _curTime<4000; 00084 return _clockTime>1 && _clockTime<400; 00085 }
int DTBtiHit::isInsideReg | ( | ) | const [inline] |
true if signal is in the registers
Definition at line 89 of file DTBtiHit.h.
References _clockTime, _config, jtrig(), and DTConfigBti::ST().
00089 { 00090 //return _curTime<0 && jtrig()<=_config->ST(); 00091 return ( _clockTime<=0 && jtrig()<=_config->ST() ); //SV bug fix 17XII03 00092 }
int DTBtiHit::jtrig | ( | ) | const [inline] |
position in registers
Definition at line 95 of file DTBtiHit.h.
References _clockTime.
Referenced by DTBtiChip::computeEqs(), isInsideReg(), DTBtiChip::sum(), and DTBtiChip::tick().
00095 { 00096 //return (int)(fabs(_curTime)/_stepTime); 00097 return -_clockTime; 00098 }
Assignment operator.
Definition at line 112 of file DTBtiHit.cc.
References _clockTime, _config, _curTime, and _hitdigi.
00112 { 00113 if(this != &hit){ 00114 _hitdigi = hit._hitdigi; 00115 _config = hit._config; 00116 _curTime = hit._curTime; 00117 _clockTime = hit._clockTime; 00118 } 00119 return *this; 00120 }
void DTBtiHit::stepDownTime | ( | ) | [inline] |
Move the hit forward in time one step.
Definition at line 67 of file DTBtiHit.h.
References _clockTime.
00067 { //_curTime-=_stepTime; 00068 _clockTime-=1; 00069 }
int DTBtiHit::_clockTime [private] |
Definition at line 123 of file DTBtiHit.h.
Referenced by clockTime(), DTBtiHit(), isDrifting(), isInsideReg(), jtrig(), operator=(), and stepDownTime().
DTConfigBti* DTBtiHit::_config [private] |
float DTBtiHit::_curTime [private] |
const DTDigi* DTBtiHit::_hitdigi [private] |
const float DTBtiHit::_stepTime = 12.5 [static] |
Definition at line 115 of file DTBtiHit.h.
const float DTBtiHit::_stepTimeTdc = 16. [static] |
std::string DTBtiHit::t0envFlag [static] |
Definition at line 117 of file DTBtiHit.h.