59 edm::LogVerbatim(
"DTLocalReco") <<
"[DTLinearDriftFromDBAlgo] setES called" << endl;
72 throw cms::Exception(
"Configuration") <<
"only version 1 is presently supported for VDriftDB";
106 if (!
layer->specificTopology().isWireValid(digi.
wire()))
127 if (!
layer->specificTopology().isWireValid(wireId.
wire()))
147 const float digiTime,
154 float driftTime = digiTime -
theSync->offset(
layer, wireId, globPos);
157 if (driftTime < minTime || driftTime >
maxTime) {
159 edm::LogWarning(
"DTLocalReco") <<
"[DTLinearDriftFromDBAlgo]*** Drift time out of window for in-time hits " 160 << driftTime << endl;
190 double args[1] = {double(
step - 1)};
200 const float k_param = 1.2e-04;
202 vDrift = vDrift * (1. - k_param * local_pos.
y());
207 float drift = driftTime * vDrift;
210 if (!
layer->specificTopology().isWireValid(wireId.
wire()))
219 edm::LogWarning(
"DTLocalReco") <<
"[DTLinearDriftFromDBAlgo] Compute drift distance, for digi at wire: " << wireId
221 <<
" Step: " <<
step << endl
222 <<
" Digi time: " << digiTime << endl
223 <<
" Drift time: " << driftTime << endl
224 <<
" Drift distance: " <<
drift << endl
226 <<
" Left point: " << leftPoint << endl
227 <<
" Right point: " << rightPoint << endl
228 <<
" Error: " <<
error << endl;
237 const float digiTime,
247 switch (newHit1D.
lrSide()) {
264 throw cms::Exception(
"InvalidDTCellSide") <<
"[DTLinearDriftFromDBAlgo] Compute at Step " <<
step 265 <<
", Hit side " << newHit1D.
lrSide() <<
" is invalid!" << endl;
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
DTLinearDriftFromDBAlgo(const edm::ParameterSet &config, edm::ConsumesCollector cc)
Constructor.
float get(const DTWireId &wireid, double *x=nullptr) const
Get the value correspoding to the given WireId, / using x[] as parameters of the parametrization when...
Point3DBase< Scalar, LocalTag > LocalPoint
int superLayer() const
Return the superlayer number.
edm::ESGetToken< DTRecoConditions, DTRecoConditionsUncertRcd > uncertMapToken_
int wire() const
Return the wire number.
uint32_t cc[maxCellsPerHit]
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
int version() const
Version numer specifying the structure of the payload. See .cc file for details.
edm::ESGetToken< DTRecoConditions, DTRecoConditionsVdriftRcd > vDriftMapToken_
const DTRecoConditions * vDriftMap
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
int wire() const
Return wire number.
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
double time() const
Get time in ns.
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
edm::ESGetToken< DTMtime, DTMtimeRcd > mTimeMapToken_
const std::string & version() const
access version
DTEnums::DTCellSide lrSide() const
The side of the cell.
Abs< T >::type abs(const T &t)
const DTRecoConditions * uncertMap
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > fieldToken_
const MagneticField * field
std::unique_ptr< DTTTrigBaseSync > theSync
~DTLinearDriftFromDBAlgo() override
Destructor.
const bool stepTwoFromDigi
void setES(const edm::EventSetup &setup) override
Pass the Event Setup to the algo at each event.
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
int wheel() const
Return the wheel number.
DTWireId wireId() const
Return the wireId.
int nominalValue() const
The nominal field value for this map in kGauss.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Log< level::Warning, false > LogWarning
LocalPoint localPosition() const override
Return the 3-dimensional local position.
bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const override
T angle(T x1, T y1, T z1, T x2, T y2, T z2)