Concrete implementation of a DTTTrigBaseSync. This class define the offset for RecHit building of data and simulation. The offset is computes as:
offset = t0 + tTrig + wirePropCorr - tofCorr
where:
- t0 from test pulses (taken from DB, it is assumed to be in ns; can be switched off)
- ttrig from the fit of time boxrising edge (taken from DB, it is assumed to be in ns) (At the moment a single value is read for ttrig offset but this may change in the future)
- signal propagation along the wire (can be switched off): it is assumed the ttrig accounts on average for correction from the center of the wire to the frontend. Here we just have to correct for the distance of the hit from the wire center.
- TOF correction (can be switched off for cosmics): the ttrig already accounts for average TOF correction, depending on the granularity used for the ttrig computation we just have to correct for the TOF from the center of the chamber, SL, layer or wire to the hit position. NOTE: particles are assumed as coming from the IP.
The emulatorOffset is computed as:
offset = int(ttrig/BXspace)*BXspace + t0
where:
- t0 from test pulses (taken from DB, it is assumed to be in ns; can be switched off)
- ttrig from the fit of time box rising edge (taken from DB, it is assumed to be in ns)
- BXspace BX spacing (in ns). Can be configured.
NOTE: this should approximate what is seen online by the BTI
- Date:
- 2009/10/21 17:05:47
- Revision:
- 1.4
- Author
- G. Cerminara - INFN Torino
Definition at line 56 of file DTTTrigSyncFromDB.h.
double DTTTrigSyncFromDB::offset |
( |
const DTLayer * |
layer, |
|
|
const DTWireId & |
wireId, |
|
|
const GlobalPoint & |
globPos, |
|
|
double & |
tTrig, |
|
|
double & |
wirePropCorr, |
|
|
double & |
tofCorr |
|
) |
| |
|
virtual |
Time (ns) to be subtracted to the digi time, Parameters are the layer and the wireId to which the digi is referred and the estimation of the 3D hit position (globPos)
Implements DTTTrigBaseSync.
Definition at line 75 of file DTTTrigSyncFromDB.cc.
References DTTopology::cellLenght(), gather_cfg::cout, debug, edm::hlt::Exception, PV3DBase< T, PVType, FrameType >::mag(), mag(), evf::evtn::offset(), GloballyPositioned< T >::position(), DTLayer::specificTopology(), DTLayer::superLayer(), GeomDet::surface(), GeomDet::toGlobal(), GeomDet::toLocal(), DTWireId::wire(), DTTopology::wirePosition(), and PV3DBase< T, PVType, FrameType >::y().
97 float wireCoord = layer->
toLocal(globPos).
y();
105 float wireCoord = layer->
toLocal(globPos).
y();
106 float propgL = halfL - wireCoord;
112 cms::Exception(
"[DTTTrigSyncFromDB]") <<
" Invalid parameter: wirePropCorrType = "
124 float flightToHit = globPos.
mag();
125 static const float cSpeed = 29.9792458;
135 tofCorr = (flightToSL-flightToHit)/cSpeed;
144 tofCorr = (flightToWire-flightToHit)/cSpeed;
149 cms::Exception(
"[DTTTrigSyncFromDB]") <<
" Invalid parameter: tofCorrType = "
159 cout <<
"[DTTTrigSyncFromDB] Channel: " << wireId << endl
160 <<
" Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
161 <<
" various contributions are: " << endl
162 <<
" tTrig + t0 (ns): " << tTrig << endl
164 <<
" Propagation along wire delay (ns): " << wirePropCorr << endl
165 <<
" TOF correction (ns): " << tofCorr << endl
169 return tTrig + wirePropCorr - tofCorr;
bool doWirePropCorrection
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
const DTTopology & specificTopology() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr)
int wire() const
Return the wire number.
const DTSuperLayer * superLayer() const
const PositionType & position() const
const float cellLenght() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.