CMS 3D CMS Logo

DTBtiHit.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTBtiHit
4 //
5 // Description: A class for hits in a drift cell
6 //
7 //
8 // Author List:
9 // C. Grandi
10 // Modifications:
11 // S. Vanini
12 // 17/V/04 SV: tdrift in tdc units, phase is included!!
13 // 22/VI/04 SV: last trigger code update
14 // 05/II/07 SV: move setuptime to BtiCard
15 //--------------------------------------------------
16 
17 //#include "Utilities/Configuration/interface/Architecture.h"
18 
19 //-----------------------
20 // This Class's Header --
21 //-----------------------
23 
24 //-------------------------------
25 // Collaborating Class Headers --
26 //-------------------------------
28 //#include "Utilities/UI/interface/SimpleConfigurable.h"
29 //#include "Utilities/Notification/interface/Singleton.h"
30 //#include "TestBeams/DTBXAnalysis/interface/DTBXCalibration.h"
31 //---------------
32 // C++ Headers --
33 //---------------
34 
35 // Internal clock (time of a step: 12.5 ns or 16 tdc counts ==> 80 MHz)
36 const float DTBtiHit::_stepTime = 12.5;
37 const float DTBtiHit::_stepTimeTdc = 16.;
38 //const float DTBtiHit::_stepTime = 6.25;
39 
40 //SV only for TestBeam version
41 //string DTBtiHit::t0envFlag = SimpleConfigurable<string>( " ",
42 // "TestBeams:DTBXAnalysis:T0SetUpFlag" );
43 
44 //----------------
45 // Constructors --
46 //----------------
47 
48 DTBtiHit::DTBtiHit(const DTDigi* hitdigi, DTConfigBti* config) : _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 }
85 
86 DTBtiHit::DTBtiHit(int clockTime, DTConfigBti* config) : _config(config) {
88  _hitdigi = nullptr;
89  _curTime = 4000;
90 }
91 
93  : _hitdigi(hit._hitdigi), _config(hit._config), _curTime(hit._curTime), _clockTime(hit._clockTime) {}
94 
95 //--------------
96 // Destructor --
97 //--------------
99 
100 //--------------
101 // Operations --
102 //--------------
103 
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 }
DTBtiHit::DTBtiHit
DTBtiHit(const DTDigi *, DTConfigBti *)
Constructor.
Definition: DTBtiHit.cc:48
DTBtiHit::_config
DTConfigBti * _config
Definition: DTBtiHit.h:115
DTBtiHit::_curTime
float _curTime
Definition: DTBtiHit.h:116
DTBtiHit
Definition: DTBtiHit.h:43
DTBtiHit::_hitdigi
const DTDigi * _hitdigi
Definition: DTBtiHit.h:114
DTConfigBti
Definition: DTConfigBti.h:36
DTBtiHit.h
config
Definition: config.py:1
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
DTDigi::countsTDC
int32_t countsTDC() const
Get raw TDC count.
Definition: DTDigi.cc:39
createfilelist.int
int
Definition: createfilelist.py:10
DTBtiHit::_stepTime
static const float _stepTime
Definition: DTBtiHit.h:109
DTBtiHit::clockTime
int clockTime() const
Definition: DTBtiHit.h:74
DTDigi
Definition: DTDigi.h:17
DTDigiCollection.h
DTBtiHit::_stepTimeTdc
static const float _stepTimeTdc
Definition: DTBtiHit.h:110
hit
Definition: SiStripHitEffFromCalibTree.cc:88