22 vDrift(config.getParameter<double>(
"driftVelocity")),
23 hitResolution(config.getParameter<double>(
"hitResolution")),
25 minTime(config.getParameter<double>(
"minTime")),
26 maxTime(config.getParameter<double>(
"maxTime")),
28 debug(config.getUntrackedParameter<bool>(
"debug")) {}
47 return compute(layer, wireId, digi.
time(), globWirePos, leftPoint, rightPoint,
error, 1);
78 float driftTime = digiTime -
theSync->offset(layer, wireId, globPos);
81 if (driftTime < minTime || driftTime >
maxTime) {
83 cout <<
"[DTLinearDriftAlgo]*** Drift time out of window for in-time hits " << driftTime << endl;
116 cout <<
"[DTLinearDriftAlgo] Compute drift distance, for digi at wire: " << wireId << endl
117 <<
" Step: " << step << endl
118 <<
" Digi time: " << digiTime << endl
119 <<
" Drift time: " << driftTime << endl
120 <<
" Drift distance: " << drift << endl
121 <<
" Hit Resolution: " << hitResolution << endl
122 <<
" Left point: " << leftPoint << endl
123 <<
" Right point: " << rightPoint << endl
124 <<
" Error: " << error << endl;
133 const float digiTime,
141 if (
compute(layer, wireId, digiTime, globPos, leftPoint, rightPoint, error, step)) {
143 switch (newHit1D.
lrSide()) {
160 throw cms::Exception(
"InvalidDTCellSide") <<
"[DTLinearDriftAlgo] Compute at Step " << step <<
", Hit side "
161 << newHit1D.
lrSide() <<
" is invalid!" << endl;
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.
DTLayerId id() const
Return the DetId of this SL.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
int wire() const
Return wire number.
constexpr std::array< uint8_t, layerIndexSize > layer
const DTTopology & specificTopology() const
~DTLinearDriftAlgo() override
Destructor.
double time() const
Get time in ns.
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
std::vector< DeviationSensor2D * > vd
int wire() const
Return the wire number.
const float hitResolution
std::unique_ptr< DTTTrigBaseSync > theSync
DTLinearDriftAlgo(const edm::ParameterSet &config, edm::ConsumesCollector)
Constructor.
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
tuple config
parse the configuration file
bool isWireValid(const int wireNumber) const
bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const override
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
LocalPoint localPosition() const override
Return the 3-dimensional local position.
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.