31 minTime(config.getParameter<double>(
"minTime")),
32 maxTime(config.getParameter<double>(
"maxTime")),
33 doVdriftCorr(config.getParameter<bool>(
"doVdriftCorr")),
35 stepTwoFromDigi(config.getParameter<bool>(
"stepTwoFromDigi")),
38 debug(config.getUntrackedParameter<bool>(
"debug"))
41 cout<<
"[DTLinearDriftFromDBAlgo] Constructor called"<<endl;
44 if (config.
existsAs<
bool>(
"useUncertDB")) {
58 cout<<
"[DTLinearDriftFromDBAlgo] setES called"<<endl;
103 return compute(layer, wireId, digi.
time(), globWirePos, leftPoint, rightPoint,
error, 1);
126 return compute(layer, wireId, recHit1D.
digiTime(), globWirePos, newHit1D, 2);
146 const float digiTime,
153 float driftTime = digiTime -
theSync->
offset(layer, wireId, globPos);
156 if (driftTime < minTime || driftTime >
maxTime) {
157 if (
debug)
cout <<
"[DTLinearDriftFromDBAlgo]*** Drift time out of window for in-time hits "
158 << driftTime << endl;
168 if (driftTime<0.) driftTime=0;
172 float hitResolution = 0;
192 const float k_param = 1.2e-04;
194 vDrift = vDrift*(1. - k_param*local_pos.
y());
199 float drift = driftTime * vDrift;
211 error =
LocalError(hitResolution*hitResolution,0.,0.);
215 cout <<
"[DTLinearDriftFromDBAlgo] Compute drift distance, for digi at wire: " << wireId << endl
216 <<
" Step: " << step << endl
217 <<
" Digi time: " << digiTime << endl
218 <<
" Drift time: " << driftTime << endl
219 <<
" Drift distance: " << drift << endl
220 <<
" Hit Resolution: " << hitResolution << endl
221 <<
" Left point: " << leftPoint << endl
222 <<
" Right point: " << rightPoint << endl
223 <<
" Error: " << error << endl;
234 const float digiTime,
242 if(
compute(layer, wireId, digiTime, globPos, leftPoint, rightPoint, error, step)) {
244 switch(newHit1D.
lrSide()) {
264 throw cms::Exception(
"InvalidDTCellSide") <<
"[DTLinearDriftFromDBAlgo] Compute at Step "
265 << step <<
", Hit side "
267 <<
" is invalid!" << endl;
T getParameter(std::string const &) const
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
float get(const DTWireId &wireid, unsigned int index) const
get the uncertainties for the SL correspoding to the given WireId and for the correct step as defined...
int nominalValue() const
The nominal field value for this map in kGauss.
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.
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos)
virtual bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
const DTRecoUncertainties * uncertMap
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
int wire() const
Return wire number.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
virtual void setES(const edm::EventSetup &setup)=0
Pass the Event Setup to the synchronization module at each event.
const DTTopology & specificTopology() const
double time() const
Get time in ns.
int superLayer() const
Return the superlayer number.
Abs< T >::type abs(const T &t)
virtual ~DTLinearDriftFromDBAlgo()
Destructor.
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
virtual void setES(const edm::EventSetup &setup)
Pass the Event Setup to the algo at each event.
const MagneticField * field
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
DTTTrigBaseSync * theSync
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
int wire() const
Return the wire number.
DTLinearDriftFromDBAlgo(const edm::ParameterSet &config)
Constructor.
const bool stepTwoFromDigi
const std::string & version() const
access version
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
bool isWireValid(const int wireNumber) const
volatile std::atomic< bool > shutdown_flag false
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
int station() const
Return the station number.
int wheel() const
Return the wheel number.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
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.