31 minTime(config.getParameter<double>(
"minTime")),
32 maxTime(config.getParameter<double>(
"maxTime")),
34 debug(config.getUntrackedParameter<
bool>(
"debug",
"false"))
78 angle = atan(lDirLoc.
x()/-lDirLoc.
z());
82 leftPoint, rightPoint,
error, 1);
112 globPos, newHit1D, 3);
120 const float digiTime,
129 float driftTime = digiTime -
theSync->offset(layer, wireId, globPos);
132 if (step==1 && (driftTime < minTime || driftTime >
maxTime)) {
134 cout <<
"*** Drift time out of window for in-time hits " 135 << driftTime << endl;
145 if (driftTime<0.) driftTime=0;
166 cout <<
"[DTParametrizedDriftAlgo]*** WARNING: call to parametrization failed" << endl;
177 bool variableSigma =
false;
195 reso = (sigma_l+sigma_r)/2.;
201 }
else if (wheel==1) {
203 }
else if (wheel==2){
207 }
else if (step==2) {
208 reso = (sigma_l+sigma_r)/2.;
214 }
else if (wheel==1) {
216 }
else if (wheel==2){
220 }
else if (step==3) {
221 reso = (sigma_l+sigma_r)/2.;
227 }
else if (wheel==1) {
229 }
else if (wheel==2){
234 float sXDelays = sTDelays*DX.
v_drift/10.;
235 reso =
sqrt(reso*reso + sXDelays*sXDelays);
241 }
else if (wheel==1) {
243 }
else if (wheel==2){
249 }
else if (step==2) {
253 }
else if (wheel==1) {
255 }
else if (wheel==2){
261 }
else if (step==3) {
265 }
else if (wheel==1) {
267 }
else if (wheel==2){
292 int prevW =
cout.width();
294 <<
"[DTParametrizedDriftAlgo]: step " << step << endl
295 <<
" Global Position " << globPos << endl
296 <<
" Local Position " << layer->
toLocal(globPos) << endl
298 <<
" Digi time " << digiTime << endl
301 <<
" >Drif time " << driftTime << endl
302 <<
" >Angle " <<
angle * 180./
M_PI << endl
303 <<
" <Drift distance " << drift << endl
304 <<
" <sigma_l " << sigma_l << endl
305 <<
" <sigma_r " << sigma_r << endl
306 <<
" reso " << reso << endl
307 <<
" leftPoint " << leftPoint << endl
308 <<
" rightPoint " << rightPoint << endl
309 <<
" error " << error
310 << resetiosflags(ios::showpoint |
ios::fixed) << setw(prevW) << endl
321 const float digiTime,
330 if(
compute(layer, wireId, digiTime,
angle, globPos, leftPoint, rightPoint, error, step)) {
332 switch(newHit1D.
lrSide()) {
352 throw cms::Exception(
"InvalidDTCellSide") <<
"[DTParametrizedDriftAlgo] Compute at Step " 353 << step <<
", Hit side " 355 <<
" 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.
void setES(const edm::EventSetup &setup) override
Pass the Event Setup to the algo at each event.
Point3DBase< Scalar, LocalTag > LocalPoint
bool computeDriftDistance_mean(double time, double alpha, double by, double bz, short interpolate, drift_distance *dx) const
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 &)
Global3DPoint GlobalPoint
def setup(process, global_tag, zero_tesla=False)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
~DTParametrizedDriftAlgo() override
Destructor.
int wire() const
Return wire number.
const MagneticField * magField
const DTTopology & specificTopology() const
double time() const
Get time in ns.
Abs< T >::type abs(const T &t)
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
DTParametrizedDriftAlgo(const edm::ParameterSet &config)
Constructor.
int wire() const
Return the wire number.
int superlayer() const
Return the superlayer number (deprecated method name)
bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const override
std::unique_ptr< DTTTrigBaseSync > theSync
bool isWireValid(const int wireNumber) const
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
int wheel() const
Return the wheel number.
Structure used to return output values.
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.