28 :
debug(config.getUntrackedParameter<bool>(
"debug")),
30 theVPropWire(config.getParameter<double>(
"vPropWire")),
32 doT0Correction(config.getParameter<bool>(
"doT0Correction")),
34 doTOFCorrection(config.getParameter<bool>(
"doTOFCorrection")),
35 theTOFCorrType(config.getParameter<int>(
"tofCorrType")),
37 doWirePropCorrection(config.getParameter<bool>(
"doWirePropCorrection")),
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;
virtual ~DTTTrigSyncFromDB()
Destructor.
bool doWirePropCorrection
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
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.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
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
virtual double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr)
virtual void setES(const edm::EventSetup &setup)
Pass the Event Setup to the algo at each event.
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
virtual double emulatorOffset(const DTWireId &wireId, double &tTrig, double &t0cell)
DTTTrigSyncFromDB(const edm::ParameterSet &config)
Constructor.
const std::string & version() const
access version
const PositionType & position() const