CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
DTBtiHit Class Reference

#include <DTBtiHit.h>

Public Member Functions

int clockTime () const
 
float curTime () const
 Return the current time. More...
 
 DTBtiHit (const DTDigi *, DTConfigBti *)
 Constructor. More...
 
 DTBtiHit (int clockTime, DTConfigBti *)
 Constructor from clock times. More...
 
 DTBtiHit (const DTBtiHit &)
 Copy constructor. More...
 
const DTDigihitDigi () const
 Return the associated DTDigi. More...
 
int isDrifting () const
 true if avalanche is still drifting More...
 
int isInsideReg () const
 true if signal is in the registers More...
 
int jtrig () const
 position in registers More...
 
DTBtiHitoperator= (const DTBtiHit &)
 Assignment operator. More...
 
void stepDownTime ()
 Move the hit forward in time one step. More...
 
 ~DTBtiHit ()
 Destructor. More...
 

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
 

Detailed Description

A class for hits in a drift cell

Author
C. Grandi, S. Vanini Modifications: 28/X/02 S.Vanini: tshift=425 included in register 1/IV/03 SV time in clock units included: _clockTime –> operation with drift time are commented 22/VI/04 SV: last trigger code update 15/I/07 SV : new config update

Definition at line 43 of file DTBtiHit.h.

Constructor & Destructor Documentation

DTBtiHit::DTBtiHit ( const DTDigi hitdigi,
DTConfigBti config 
)

Constructor.

Definition at line 48 of file DTBtiHit.cc.

References _clockTime, _curTime, _stepTimeTdc, DTDigi::countsTDC(), and createfilelist::int.

48  : _hitdigi(hitdigi), _config(config) {
49  //SV tdcunits 11V04: time in tdc units! setup time too!
50  _curTime = hitdigi->countsTDC(); //@@ only DT>0
51 
52  /*
53  // *** ATTENTION FOR RUNNING TESTBEAM DATA ***
54  // SV 26/IX/03 if digi are corrected with wire t0s in DTBXDigitizer
55  // tdrift values must be corrected with t0 mean instead because
56  // trigger hardware don't see cable length !
57  _curTime = hitdigi->countsTDC();
58 
59  if( t0envFlag != " " ){
60  DTBXCalibration* calibration = Singleton<DTBXCalibration>::instance();
61  //the following for digitization procedure.... see DTBXDigitizer
62  int bmax = calibration->bitMax();
63  if ( _curTime >= ( bmax + calibration->recMin() ) )
64  _curTime -= bmax;
65 
66  //SV tdcunits 11V04: add t0 and trig to have raw time in tdcunits
67  _curTime += ( calibration->t0( hitdigi->slayer(), hitdigi->layer(), hitdigi->wire() )
68  + calibration->tTrig() );
69 
70  //tdc clocks in 16 units
71  int delay16 = int( ( calibration->t0mean(hitdigi->slayer()) +
72  calibration->tTrig() )
73  /_stepTimeTdc );
74 
75  //bti clocks of 16 tdc units
76  _clockTime = (int)( (_curTime +
77  _config->SetupTime())/_stepTimeTdc) - delay16;
78 }
79 
80 */
81  //bti clocks of 16 tdc units : first clock is number 1!
82  //_clockTime = (int)( (_curTime + _config->SetupTime()) / _stepTimeTdc ) + 1;
84 }
DTConfigBti * _config
Definition: DTBtiHit.h:115
int _clockTime
Definition: DTBtiHit.h:117
static const float _stepTimeTdc
Definition: DTBtiHit.h:110
float _curTime
Definition: DTBtiHit.h:116
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
int32_t countsTDC() const
Get raw TDC count.
Definition: DTDigi.cc:39
DTBtiHit::DTBtiHit ( int  clockTime,
DTConfigBti config 
)

Constructor from clock times.

Definition at line 86 of file DTBtiHit.cc.

References _clockTime, _curTime, _hitdigi, and clockTime().

86  : _config(config) {
88  _hitdigi = nullptr;
89  _curTime = 4000;
90 }
DTConfigBti * _config
Definition: DTBtiHit.h:115
int clockTime() const
Definition: DTBtiHit.h:74
int _clockTime
Definition: DTBtiHit.h:117
float _curTime
Definition: DTBtiHit.h:116
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
DTBtiHit::DTBtiHit ( const DTBtiHit hit)

Copy constructor.

Definition at line 92 of file DTBtiHit.cc.

DTConfigBti * _config
Definition: DTBtiHit.h:115
int _clockTime
Definition: DTBtiHit.h:117
float _curTime
Definition: DTBtiHit.h:116
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
DTBtiHit::~DTBtiHit ( )

Destructor.

Definition at line 98 of file DTBtiHit.cc.

98 {}

Member Function Documentation

int DTBtiHit::clockTime ( ) const
inline

Definition at line 74 of file DTBtiHit.h.

References _clockTime.

Referenced by DTBtiHit().

74 { return _clockTime; }
int _clockTime
Definition: DTBtiHit.h:117
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 73 of file DTBtiHit.h.

References _curTime.

73 { return _curTime; }
float _curTime
Definition: DTBtiHit.h:116
const DTDigi* DTBtiHit::hitDigi ( ) const
inline

Return the associated DTDigi.

Definition at line 66 of file DTBtiHit.h.

References _hitdigi.

66 { return _hitdigi; }
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
int DTBtiHit::isDrifting ( ) const
inline

true if avalanche is still drifting

Definition at line 77 of file DTBtiHit.h.

References _clockTime.

77  { //return _curTime>=0 && _curTime<4000;
78  return _clockTime > 1 && _clockTime < 400;
79  }
int _clockTime
Definition: DTBtiHit.h:117
int DTBtiHit::isInsideReg ( ) const
inline

true if signal is in the registers

Definition at line 83 of file DTBtiHit.h.

References _clockTime, _config, jtrig(), and DTConfigBti::ST().

83  {
84  //return _curTime<0 && jtrig()<=_config->ST();
85  return (_clockTime <= 0 && jtrig() <= _config->ST()); //SV bug fix 17XII03
86  }
float ST() const
Max drift time in 12.5 ns steps.
Definition: DTConfigBti.h:61
DTConfigBti * _config
Definition: DTBtiHit.h:115
int _clockTime
Definition: DTBtiHit.h:117
int jtrig() const
position in registers
Definition: DTBtiHit.h:89
int DTBtiHit::jtrig ( ) const
inline

position in registers

Definition at line 89 of file DTBtiHit.h.

References _clockTime.

Referenced by isInsideReg().

89  {
90  //return (int)(fabs(_curTime)/_stepTime);
91  return -_clockTime;
92  }
int _clockTime
Definition: DTBtiHit.h:117
DTBtiHit & DTBtiHit::operator= ( const DTBtiHit hit)

Assignment operator.

Definition at line 104 of file DTBtiHit.cc.

References _clockTime, _config, _curTime, and _hitdigi.

104  {
105  if (this != &hit) {
106  _hitdigi = hit._hitdigi;
107  _config = hit._config;
108  _curTime = hit._curTime;
109  _clockTime = hit._clockTime;
110  }
111  return *this;
112 }
DTConfigBti * _config
Definition: DTBtiHit.h:115
int _clockTime
Definition: DTBtiHit.h:117
float _curTime
Definition: DTBtiHit.h:116
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
void DTBtiHit::stepDownTime ( )
inline

Move the hit forward in time one step.

Definition at line 61 of file DTBtiHit.h.

References _clockTime.

61  { //_curTime-=_stepTime;
62  _clockTime -= 1;
63  }
int _clockTime
Definition: DTBtiHit.h:117

Member Data Documentation

int DTBtiHit::_clockTime
private

Definition at line 117 of file DTBtiHit.h.

Referenced by clockTime(), DTBtiHit(), isDrifting(), isInsideReg(), jtrig(), operator=(), and stepDownTime().

DTConfigBti* DTBtiHit::_config
private

Definition at line 115 of file DTBtiHit.h.

Referenced by isInsideReg(), and operator=().

float DTBtiHit::_curTime
private

Definition at line 116 of file DTBtiHit.h.

Referenced by curTime(), DTBtiHit(), and operator=().

const DTDigi* DTBtiHit::_hitdigi
private

Definition at line 114 of file DTBtiHit.h.

Referenced by DTBtiHit(), hitDigi(), and operator=().

const float DTBtiHit::_stepTime = 12.5
static

Definition at line 109 of file DTBtiHit.h.

const float DTBtiHit::_stepTimeTdc = 16.
static

Definition at line 110 of file DTBtiHit.h.

Referenced by DTBtiChip::add_digi(), and DTBtiHit().

std::string DTBtiHit::t0envFlag
static

Definition at line 111 of file DTBtiHit.h.