Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
L1Trigger
DTBti
src
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
//-----------------------
22
#include "
L1Trigger/DTBti/interface/DTBtiHit.h
"
23
24
//-------------------------------
25
// Collaborating Class Headers --
26
//-------------------------------
27
#include <
DataFormats/DTDigi/interface/DTDigiCollection.h
>
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
) :
49
_hitdigi(hitdigi), _config(config) {
50
51
//SV tdcunits 11V04: time in tdc units! setup time too!
52
_curTime
= hitdigi->
countsTDC
();
//@@ only DT>0
53
54
/*
55
// *** ATTENTION FOR RUNNING TESTBEAM DATA ***
56
// SV 26/IX/03 if digi are corrected with wire t0s in DTBXDigitizer
57
// tdrift values must be corrected with t0 mean instead because
58
// trigger hardware don't see cable length !
59
_curTime = hitdigi->countsTDC();
60
61
if( t0envFlag != " " ){
62
DTBXCalibration* calibration = Singleton<DTBXCalibration>::instance();
63
//the following for digitization procedure.... see DTBXDigitizer
64
int bmax = calibration->bitMax();
65
if ( _curTime >= ( bmax + calibration->recMin() ) )
66
_curTime -= bmax;
67
68
//SV tdcunits 11V04: add t0 and trig to have raw time in tdcunits
69
_curTime += ( calibration->t0( hitdigi->slayer(), hitdigi->layer(), hitdigi->wire() )
70
+ calibration->tTrig() );
71
72
//tdc clocks in 16 units
73
int delay16 = int( ( calibration->t0mean(hitdigi->slayer()) +
74
calibration->tTrig() )
75
/_stepTimeTdc );
76
77
//bti clocks of 16 tdc units
78
_clockTime = (int)( (_curTime +
79
_config->SetupTime())/_stepTimeTdc) - delay16;
80
}
81
82
*/
83
//bti clocks of 16 tdc units : first clock is number 1!
84
//_clockTime = (int)( (_curTime + _config->SetupTime()) / _stepTimeTdc ) + 1;
85
_clockTime
= (int)(
_curTime
/
_stepTimeTdc
) + 1;
86
87
}
88
89
DTBtiHit::DTBtiHit
(
int
clockTime,
DTConfigBti
*
config
) :
90
_config(config) {
91
_clockTime
=
clockTime
;
92
_hitdigi
= 0;
93
_curTime
= 4000;
94
}
95
96
DTBtiHit::DTBtiHit
(
const
DTBtiHit
&
hit
) :
97
_hitdigi(hit._hitdigi), _config(hit._config), _curTime(hit._curTime),
98
_clockTime(hit._clockTime) {
99
}
100
101
//--------------
102
// Destructor --
103
//--------------
104
DTBtiHit::~DTBtiHit
() {
105
}
106
107
//--------------
108
// Operations --
109
//--------------
110
111
DTBtiHit
&
112
DTBtiHit::operator=
(
const
DTBtiHit
&
hit
){
113
if
(
this
!= &hit){
114
_hitdigi
= hit.
_hitdigi
;
115
_config
= hit.
_config
;
116
_curTime
= hit.
_curTime
;
117
_clockTime
= hit.
_clockTime
;
118
}
119
return
*
this
;
120
}
DTBtiHit
Definition:
DTBtiHit.h:47
DTBtiHit::~DTBtiHit
~DTBtiHit()
Destructor.
Definition:
DTBtiHit.cc:104
DTBtiHit::_config
DTConfigBti * _config
Definition:
DTBtiHit.h:121
DTBtiHit::DTBtiHit
DTBtiHit(const DTDigi *, DTConfigBti *)
Constructor.
Definition:
DTBtiHit.cc:48
DTBtiHit::clockTime
int clockTime() const
Definition:
DTBtiHit.h:80
DTBtiHit::_clockTime
int _clockTime
Definition:
DTBtiHit.h:123
DTBtiHit::_stepTimeTdc
static const float _stepTimeTdc
Definition:
DTBtiHit.h:116
DTBtiHit.h
DTDigiCollection.h
DTBtiHit::_curTime
float _curTime
Definition:
DTBtiHit.h:122
DTDigi
Definition:
DTDigi.h:19
DTDigi::countsTDC
uint32_t countsTDC() const
Get raw TDC count.
Definition:
DTDigi.cc:67
DTBtiHit::operator=
DTBtiHit & operator=(const DTBtiHit &)
Assignment operator.
Definition:
DTBtiHit.cc:112
hit
Definition:
SiStripHitEffFromCalibTree.cc:87
DTBtiHit::_stepTime
static const float _stepTime
Definition:
DTBtiHit.h:115
cmsDriver.config
tuple config
Definition:
cmsDriver.py:17
DTBtiHit::_hitdigi
const DTDigi * _hitdigi
Definition:
DTBtiHit.h:120
DTConfigBti
Definition:
DTConfigBti.h:38
Generated for CMSSW Reference Manual by
1.8.5