34 granularity_( pset.getUntrackedParameter<
string>(
"calibGranularity",
"bySL") ) {
36 LogVerbatim(
"Calibration") <<
"[DTVDriftWriter]Constructor called!";
39 throw cms::Exception(
"Configuration") <<
"[DTVDriftWriter] Check parameter calibGranularity: " <<
granularity_ <<
" option not available.";
48 LogVerbatim(
"Calibration") <<
"[DTVDriftWriter]Destructor called!";
71 auto sl = superLayers.begin();
72 auto sl_end = superLayers.end();
73 for(; sl != sl_end; ++sl){
83 float vDriftNew = vDriftData.
vdrift;
86 mTimeNewMap->
set(slId,
90 LogVerbatim(
"Calibration") <<
"vDrift for: " << slId
91 <<
" Mean " << vDriftNew
92 <<
" Resolution " << resolutionNew;
97 mTimeNewMap->
set(slId,
101 LogVerbatim(
"Calibration") <<
"Keep original vDrift for: " << slId
102 <<
" Mean " << vDrift
110 LogVerbatim(
"Calibration") <<
"[DTVDriftWriter]Writing vdrift object to DB!";
111 string record =
"DTMtimeRcd";
112 DTCalibDBUtils::writeToDB<DTMtime>(
record, mTimeNewMap);
T getParameter(std::string const &) const
edm::ESHandle< DTGeometry > dtGeom_
virtual DTVDriftData compute(const DTSuperLayerId &)=0
int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
virtual std::string explainSelf() const
def setup(process, global_tag, zero_tesla=False)
DTVDriftWriter(const edm::ParameterSet &pset)
dtCalibration::DTVDriftBaseAlgo * vDriftAlgo_
~DTVDriftWriter() override
virtual void setES(const edm::EventSetup &setup)=0
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
const DTMtime * mTimeMap_
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
T get(const Candidate &c)
const std::vector< const DTSuperLayer * > & superLayers() const
Return a vector of all SuperLayer.