21 vDrift(config.getParameter<double>(
"driftVelocity")),
24 minTime(config.getParameter<double>(
"minTime")),
25 maxTime(config.getParameter<double>(
"maxTime")),
27 debug(config.getUntrackedParameter<
bool>(
"debug"))
57 return compute(layer, wireId, digi.
time(), globWirePos, leftPoint, rightPoint,
error, 1);
94 float driftTime = digiTime -
theSync->
offset(layer, wireId, globPos);
97 if (driftTime < minTime || driftTime >
maxTime) {
98 if (
debug)
cout <<
"[DTLinearDriftAlgo]*** Drift time out of window for in-time hits " 109 if (driftTime<0.) driftTime=0;
135 cout <<
"[DTLinearDriftAlgo] Compute drift distance, for digi at wire: " << wireId << endl
136 <<
" Step: " << step << endl
137 <<
" Digi time: " << digiTime << endl
138 <<
" Drift time: " << driftTime << endl
139 <<
" Drift distance: " << drift << endl
140 <<
" Hit Resolution: " << hitResolution << endl
141 <<
" Left point: " << leftPoint << endl
142 <<
" Right point: " << rightPoint << endl
143 <<
" Error: " << error << endl;
154 const float digiTime,
162 if(
compute(layer, wireId, digiTime, globPos, leftPoint, rightPoint, error, step)) {
164 switch(newHit1D.
lrSide()) {
184 throw cms::Exception(
"InvalidDTCellSide") <<
"[DTLinearDriftAlgo] Compute at Step " 185 << step <<
", Hit side " 187 <<
" is invalid!" << endl;
LocalPoint localPosition() const override
Return the 3-dimensional local position.
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Point3DBase< Scalar, LocalTag > LocalPoint
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.
DTLayerId id() const
Return the DetId of this SL.
bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos)
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
def setup(process, global_tag, zero_tesla=False)
int wire() const
Return wire number.
virtual void setES(const edm::EventSetup &setup)=0
Pass the Event Setup to the synchronization module at each event.
const DTTopology & specificTopology() const
~DTLinearDriftAlgo() override
Destructor.
double time() const
Get time in ns.
std::vector< DeviationSensor2D * > vd
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
DTTTrigBaseSync * theSync
int wire() const
Return the wire number.
const float hitResolution
DTLinearDriftAlgo(const edm::ParameterSet &config)
Constructor.
bool isWireValid(const int wireNumber) const
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
DTEnums::DTCellSide lrSide() const
The side of the cell.
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
DTWireId wireId() const
Return the wireId.