79 double& tofCorr)
const override;
120 theVPropWire(
config.getParameter<double>(
"vPropWire")),
125 theTOFCorrType(
config.getParameter<
int>(
"tofCorrType")),
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();
183 float halfL =
layer->specificTopology().cellLenght() / 2;
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;
bool doWirePropCorrection
Point3DBase< Scalar, LocalTag > LocalPoint
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) const override
int wire() const
Return the wire number.
uint32_t cc[maxCellsPerHit]
const std::string & version() const
access version
void setES(const edm::EventSetup &setup) override
Pass the Event Setup to the algo at each event.
~DTTTrigSyncFromDB() override
Destructor.
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
edm::ESGetToken< DTT0, DTT0Rcd > t0Token_
const Plane & surface() const
The nominal surface of the GeomDet.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
DTTTrigSyncFromDB(const edm::ParameterSet &config, edm::ConsumesCollector)
Constructor.
const PositionType & position() const
const std::string & version() const
access version
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
#define DEFINE_EDM_PLUGIN(factory, type, name)
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
double emulatorOffset(const DTWireId &wireId, double &tTrig, double &t0cell) const override
const edm::ESGetToken< DTTtrig, DTTtrigRcd > ttrigToken_