79 double& tofCorr)
const override;
118 debug(config.getUntrackedParameter<bool>(
"debug")),
120 theVPropWire(config.getParameter<double>(
"vPropWire")),
122 doT0Correction(config.getParameter<bool>(
"doT0Correction")),
124 doTOFCorrection(config.getParameter<bool>(
"doTOFCorrection")),
125 theTOFCorrType(config.getParameter<int>(
"tofCorrType")),
127 doWirePropCorrection(config.getParameter<bool>(
"doWirePropCorrection")),
128 theWirePropCorrType(config.getParameter<int>(
"wirePropCorrType")),
130 theBXspace(config.getUntrackedParameter<double>(
"bxSpace", 25.)) {
158 double& wirePropCorr,
159 double& tofCorr)
const {
176 float wireCoord = layer->
toLocal(globPos).
y();
184 float wireCoord = layer->
toLocal(globPos).
y();
185 float propgL = halfL - wireCoord;
201 float flightToHit = globPos.
mag();
202 static const float cSpeed = 29.9792458;
212 tofCorr = (flightToSL - flightToHit) / cSpeed;
221 tofCorr = (flightToWire - flightToHit) / cSpeed;
226 <<
" Invalid parameter: tofCorrType = " <<
theTOFCorrType << std::endl;
233 cout <<
"[DTTTrigSyncFromDB] Channel: " << wireId << endl
234 <<
" Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
235 <<
" various contributions are: " << endl
236 <<
" tTrig + t0 (ns): " << tTrig
239 <<
" Propagation along wire delay (ns): " << wirePropCorr << endl
240 <<
" TOF correction (ns): " << tofCorr << endl
244 return tTrig + wirePropCorr - tofCorr;
257 float ttrigSigma = 0;
261 cout <<
"[DTTTrigSyncFromDB]*Error: ttrig not found for SL: " << wireId.
superlayerId() << endl;
265 return t0 + ttrigMean + kFactor * ttrigSigma;
278 float ttrigSigma = 0;
282 cout <<
"[DTTTrigSyncFromDB]*Error: ttrig not found for SL: " << wireId.
superlayerId() << endl;
286 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
constexpr std::array< uint8_t, layerIndexSize > layer
bool getData(T &iHolder) const
const DTTopology & specificTopology() const
edm::ESGetToken< DTT0, DTT0Rcd > t0Token_
int wire() const
Return the wire number.
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
DTTTrigSyncFromDB(const edm::ParameterSet &config, edm::ConsumesCollector)
Constructor.
T getParameter(std::string const &) const
const DTSuperLayer * superLayer() const
tuple config
parse the configuration file
#define DEFINE_EDM_PLUGIN(factory, type, name)
const std::string & version() const
access version
double emulatorOffset(const DTWireId &wireId, double &tTrig, double &t0cell) const override
const edm::ESGetToken< DTTtrig, DTTtrigRcd > ttrigToken_
const PositionType & position() const