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 DTBtiHit &)
 Copy constructor. More...
 
 DTBtiHit (const DTDigi *, DTConfigBti *)
 Constructor. More...
 
 DTBtiHit (int clockTime, DTConfigBti *)
 Constructor from clock times. 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() [1/3]

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

Constructor.

Definition at line 48 of file DTBtiHit.cc.

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 }

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

◆ DTBtiHit() [2/3]

DTBtiHit::DTBtiHit ( int  clockTime,
DTConfigBti config 
)

Constructor from clock times.

Definition at line 86 of file DTBtiHit.cc.

86  : _config(config) {
88  _hitdigi = nullptr;
89  _curTime = 4000;
90 }

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

◆ DTBtiHit() [3/3]

DTBtiHit::DTBtiHit ( const DTBtiHit hit)

Copy constructor.

Definition at line 92 of file DTBtiHit.cc.

93  : _hitdigi(hit._hitdigi), _config(hit._config), _curTime(hit._curTime), _clockTime(hit._clockTime) {}

◆ ~DTBtiHit()

DTBtiHit::~DTBtiHit ( )

Destructor.

Definition at line 98 of file DTBtiHit.cc.

98 {}

Member Function Documentation

◆ clockTime()

int DTBtiHit::clockTime ( ) const
inline

Definition at line 74 of file DTBtiHit.h.

74 { return _clockTime; }

References _clockTime.

Referenced by DTBtiHit().

◆ curTime()

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.

73 { return _curTime; }

References _curTime.

◆ hitDigi()

const DTDigi* DTBtiHit::hitDigi ( ) const
inline

Return the associated DTDigi.

Definition at line 66 of file DTBtiHit.h.

66 { return _hitdigi; }

References _hitdigi.

◆ isDrifting()

int DTBtiHit::isDrifting ( ) const
inline

true if avalanche is still drifting

Definition at line 77 of file DTBtiHit.h.

77  { //return _curTime>=0 && _curTime<4000;
78  return _clockTime > 1 && _clockTime < 400;
79  }

References _clockTime.

◆ isInsideReg()

int DTBtiHit::isInsideReg ( ) const
inline

true if signal is in the registers

Definition at line 83 of file DTBtiHit.h.

83  {
84  //return _curTime<0 && jtrig()<=_config->ST();
85  return (_clockTime <= 0 && jtrig() <= _config->ST()); //SV bug fix 17XII03
86  }

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

◆ jtrig()

int DTBtiHit::jtrig ( ) const
inline

position in registers

Definition at line 89 of file DTBtiHit.h.

89  {
90  //return (int)(fabs(_curTime)/_stepTime);
91  return -_clockTime;
92  }

References _clockTime.

Referenced by isInsideReg().

◆ operator=()

DTBtiHit & DTBtiHit::operator= ( const DTBtiHit hit)

Assignment operator.

Definition at line 104 of file DTBtiHit.cc.

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 }

References _clockTime, _config, _curTime, and _hitdigi.

◆ stepDownTime()

void DTBtiHit::stepDownTime ( )
inline

Move the hit forward in time one step.

Definition at line 61 of file DTBtiHit.h.

61  { //_curTime-=_stepTime;
62  _clockTime -= 1;
63  }

References _clockTime.

Member Data Documentation

◆ _clockTime

int DTBtiHit::_clockTime
private

Definition at line 117 of file DTBtiHit.h.

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

◆ _config

DTConfigBti* DTBtiHit::_config
private

Definition at line 115 of file DTBtiHit.h.

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

◆ _curTime

float DTBtiHit::_curTime
private

Definition at line 116 of file DTBtiHit.h.

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

◆ _hitdigi

const DTDigi* DTBtiHit::_hitdigi
private

Definition at line 114 of file DTBtiHit.h.

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

◆ _stepTime

const float DTBtiHit::_stepTime = 12.5
static

Definition at line 109 of file DTBtiHit.h.

◆ _stepTimeTdc

const float DTBtiHit::_stepTimeTdc = 16.
static

Definition at line 110 of file DTBtiHit.h.

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

◆ t0envFlag

std::string DTBtiHit::t0envFlag
static

Definition at line 111 of file DTBtiHit.h.

DTBtiHit::_config
DTConfigBti * _config
Definition: DTBtiHit.h:115
DTBtiHit::_curTime
float _curTime
Definition: DTBtiHit.h:116
DTBtiHit::_hitdigi
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
config
Definition: config.py:1
DTBtiHit::_clockTime
int _clockTime
Definition: DTBtiHit.h:117
DTDigi::countsTDC
int32_t countsTDC() const
Get raw TDC count.
Definition: DTDigi.cc:39
DTBtiHit::jtrig
int jtrig() const
position in registers
Definition: DTBtiHit.h:89
createfilelist.int
int
Definition: createfilelist.py:10
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
DTBtiHit::_stepTimeTdc
static const float _stepTimeTdc
Definition: DTBtiHit.h:110
hit
Definition: SiStripHitEffFromCalibTree.cc:88