50 theSync->setES(setup);
54 magField = &*magneticField;
84 angle = atan(lDirLoc.
x()/-lDirLoc.
z());
88 leftPoint, rightPoint,
error, 1);
118 globPos, newHit1D, 3);
126 const float digiTime,
135 float driftTime = digiTime - theSync->offset(layer, wireId, globPos);
138 if (step==1 && (driftTime < minTime || driftTime > maxTime)) {
140 cout <<
"*** Drift time out of window for in-time hits "
141 << driftTime << endl;
151 if (driftTime<0.) driftTime=0;
156 layer->
toLocal(magField->inTesla(globPos));
172 cout <<
"[DTParametrizedDriftAlgo]*** WARNING: call to parametrization failed" << endl;
183 bool variableSigma =
false;
201 reso = (sigma_l+sigma_r)/2.;
207 }
else if (wheel==1) {
209 }
else if (wheel==2){
213 }
else if (step==2) {
214 reso = (sigma_l+sigma_r)/2.;
220 }
else if (wheel==1) {
222 }
else if (wheel==2){
226 }
else if (step==3) {
227 reso = (sigma_l+sigma_r)/2.;
233 }
else if (wheel==1) {
235 }
else if (wheel==2){
240 float sXDelays = sTDelays*DX.
v_drift/10.;
241 reso =
sqrt(reso*reso + sXDelays*sXDelays);
247 }
else if (wheel==1) {
249 }
else if (wheel==2){
255 }
else if (step==2) {
259 }
else if (wheel==1) {
261 }
else if (wheel==2){
267 }
else if (step==3) {
271 }
else if (wheel==1) {
273 }
else if (wheel==2){
298 int prevW =
cout.width();
299 cout << setiosflags(ios::showpoint | ios::fixed) << setw(3)
300 <<
"[DTParametrizedDriftAlgo]: step " << step << endl
301 <<
" Global Position " << globPos << endl
302 <<
" Local Position " << layer->
toLocal(globPos) << endl
304 <<
" Digi time " << digiTime << endl
307 <<
" >Drif time " << driftTime << endl
308 <<
" >Angle " << angle * 180./
M_PI << endl
309 <<
" <Drift distance " << drift << endl
310 <<
" <sigma_l " << sigma_l << endl
311 <<
" <sigma_r " << sigma_r << endl
312 <<
" reso " << reso << endl
313 <<
" leftPoint " << leftPoint << endl
314 <<
" rightPoint " << rightPoint << endl
315 <<
" error " << error
316 << resetiosflags(ios::showpoint | ios::fixed) << setw(prevW) << endl
327 const float digiTime,
336 if(
compute(layer, wireId, digiTime, angle, globPos, leftPoint, rightPoint, error, step)) {
338 switch(newHit1D.
lrSide()) {
358 throw cms::Exception(
"InvalidDTCellSide") <<
"[DTParametrizedDriftAlgo] Compute at Step "
359 << step <<
", Hit side "
361 <<
" is invalid!" << endl;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
virtual void setES(const edm::EventSetup &setup)
Pass the Event Setup to the algo at each event.
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
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
virtual bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const
virtual ~DTParametrizedDriftAlgo()
Destructor.
int wire() const
Return wire number.
const DTTopology & specificTopology() const
double time() const
Get time in ns.
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
DTParametrizedDriftAlgo(const edm::ParameterSet &config)
Constructor.
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
int wire() const
Return the wire number.
int superlayer() const
Return the superlayer number (deprecated method name)
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.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
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.