39 granularity_(pset.getUntrackedParameter<
string>(
"calibGranularity",
"bySL")),
45 LogVerbatim(
"Calibration") <<
"[DTVDriftWriter]Constructor called!";
47 if (granularity_ !=
"bySL")
49 <<
"[DTVDriftWriter] Check parameter calibGranularity: " << granularity_ <<
" option not available.";
52 writeLegacyVDriftDB =
pset.getParameter<
bool>(
"writeLegacyVDriftDB");
66 throw cms::Exception(
"Configuration") <<
"only version 1 is presently supported for VDriftDB";
92 const vector<const DTSuperLayer*>& superLayers =
dtGeom_->superLayers();
93 auto sl = superLayers.begin();
94 auto sl_end = superLayers.end();
95 for (; sl != sl_end; ++sl) {
99 float vDriftNew = -1.;
100 float resolutionNew = -1;
103 vDriftNew = vDriftData.
vdrift;
105 LogVerbatim(
"Calibration") <<
"vDrift for: " << slId <<
" Mean " << vDriftNew <<
" Resolution "
122 LogVerbatim(
"Calibration") <<
"Keep original vDrift for: " << slId <<
" Mean " << vDriftNew <<
" Resolution "
130 vector<double>
params = {vDriftNew};
137 LogVerbatim(
"Calibration") <<
"[DTVDriftWriter]Writing vdrift object to DB!";
139 string record =
"DTMtimeRcd";
140 DTCalibDBUtils::writeToDB<DTMtime>(
record, mTimeNewMap);
142 DTCalibDBUtils::writeToDB<DTRecoConditions>(
"DTRecoConditionsVdriftRcd", vDriftNewMap);
const edm::ESGetToken< DTRecoConditions, DTRecoConditionsVdriftRcd > vDriftMapToken_
Log< level::Info, true > LogVerbatim
edm::ESHandle< DTGeometry > dtGeom_
int version() const
Version numer specifying the structure of the payload. See .cc file for details.
void setVersion(int version)
void set(const DTWireId &wireid, const std::vector< double > &values)
Fill the payload.
int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
virtual std::string explainSelf() const
const DTRecoConditions * vDriftMap_
constexpr uint32_t rawId() const
get the raw id
Log< level::Error, false > LogError
bool getData(T &iHolder) const
DTVDriftWriter(const edm::ParameterSet &pset)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const edm::ESGetToken< DTMtime, DTMtimeRcd > mTimeMapToken_
float get(const DTWireId &wireid, double *x=nullptr) const
Get the value correspoding to the given WireId, / using x[] as parameters of the parametrization whe...
~DTVDriftWriter() override
std::unique_ptr< dtCalibration::DTVDriftBaseAlgo > vDriftAlgo_
T getParameter(std::string const &) const
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
const DTMtime * mTimeMap_
void setFormulaExpr(const std::string &expr)
Set the expression representing the formula used for parametrization.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_