28 :
debug(config.getUntrackedParameter<
bool>(
"debug")),
30 theVPropWire(config.getParameter<double>(
"vPropWire")),
35 theTOFCorrType(config.getParameter<
int>(
"tofCorrType")),
38 theWirePropCorrType(config.getParameter<
int>(
"wirePropCorrType")),
40 theBXspace(config.getUntrackedParameter<double>(
"bxSpace", 25.)),
41 thetTrigLabel(config.getParameter<
string>(
"tTrigLabel"))
95 float wireCoord = layer->
toLocal(globPos).
y();
103 float wireCoord = layer->
toLocal(globPos).
y();
104 float propgL = halfL - wireCoord;
110 cms::Exception(
"[DTTTrigSyncFromDB]") <<
" Invalid parameter: wirePropCorrType = " 122 float flightToHit = globPos.
mag();
123 static const float cSpeed = 29.9792458;
133 tofCorr = (flightToSL-flightToHit)/cSpeed;
142 tofCorr = (flightToWire-flightToHit)/cSpeed;
147 cms::Exception(
"[DTTTrigSyncFromDB]") <<
" Invalid parameter: tofCorrType = " 157 cout <<
"[DTTTrigSyncFromDB] Channel: " << wireId << endl
158 <<
" Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
159 <<
" various contributions are: " << endl
160 <<
" tTrig + t0 (ns): " << tTrig << endl
162 <<
" Propagation along wire delay (ns): " << wirePropCorr << endl
163 <<
" TOF correction (ns): " << tofCorr << endl
167 return tTrig + wirePropCorr - tofCorr;
185 float ttrigSigma = 0;
193 cout <<
"[DTTTrigSyncFromDB]*Error: ttrig not found for SL: " << wireId.
superlayerId() << endl;
197 return t0 + ttrigMean + kFactor * ttrigSigma;
218 float ttrigSigma = 0;
226 cout <<
"[DTTTrigSyncFromDB]*Error: ttrig not found for SL: " << wireId.
superlayerId() << endl;
230 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
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
def setup(process, global_tag, zero_tesla=False)
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
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
double emulatorOffset(const DTWireId &wireId, double &tTrig, double &t0cell) override
const DTSuperLayer * superLayer() const
DTTTrigSyncFromDB(const edm::ParameterSet &config)
Constructor.
const std::string & version() const
access version
const PositionType & position() const
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) override