26 :
debug(config.getUntrackedParameter<
bool>(
"debug")),
28 theVPropWire(config.getParameter<double>(
"vPropWire")),
33 theTOFCorrType(config.getParameter<
int>(
"tofCorrType")),
36 theWirePropCorrType(config.getParameter<
int>(
"wirePropCorrType")),
38 theBXspace(config.getUntrackedParameter<double>(
"bxSpace", 25.)),
39 thetTrigLabel(config.getParameter<
string>(
"tTrigLabel")) {}
68 double& tofCorr)
const {
85 float wireCoord = layer->
toLocal(globPos).
y();
93 float wireCoord = layer->
toLocal(globPos).
y();
94 float propgL = halfL - wireCoord;
110 float flightToHit = globPos.
mag();
111 static const float cSpeed = 29.9792458;
121 tofCorr = (flightToSL - flightToHit) / cSpeed;
130 tofCorr = (flightToWire - flightToHit) / cSpeed;
135 <<
" Invalid parameter: tofCorrType = " <<
theTOFCorrType << std::endl;
142 cout <<
"[DTTTrigSyncFromDB] Channel: " << wireId << endl
143 <<
" Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
144 <<
" various contributions are: " << endl
145 <<
" tTrig + t0 (ns): " << tTrig
148 <<
" Propagation along wire delay (ns): " << wirePropCorr << endl
149 <<
" TOF correction (ns): " << tofCorr << endl
153 return tTrig + wirePropCorr - tofCorr;
166 float ttrigSigma = 0;
170 cout <<
"[DTTTrigSyncFromDB]*Error: ttrig not found for SL: " << wireId.
superlayerId() << endl;
174 return t0 + ttrigMean + kFactor * ttrigSigma;
187 float ttrigSigma = 0;
191 cout <<
"[DTTTrigSyncFromDB]*Error: ttrig not found for SL: " << wireId.
superlayerId() << endl;
195 tTrig = ttrigMean + kFactor * ttrigSigma;
bool doWirePropCorrection
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Point3DBase< Scalar, LocalTag > LocalPoint
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) const override
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
const std::string & version() const
access version
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
void setES(const edm::EventSetup &setup) override
Pass the Event Setup to the algo at each event.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
~DTTTrigSyncFromDB() override
Destructor.
const Plane & surface() const
The nominal surface of the GeomDet.
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
double emulatorOffset(const DTWireId &wireId, double &tTrig, double &t0cell) const override
const DTTopology & specificTopology() const
int wire() const
Return the wire number.
std::string thetTrigLabel
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
const DTSuperLayer * superLayer() const
DTTTrigSyncFromDB(const edm::ParameterSet &config)
Constructor.
const std::string & version() const
access version
const PositionType & position() const