|
|
Go to the documentation of this file.
36 : granularity_(
pset.getUntrackedParameter<
string>(
"calibGranularity",
"bySL")),
41 LogVerbatim(
"Calibration") <<
"[DTVDriftWriter]Constructor called!";
43 if (granularity_ !=
"bySL")
45 <<
"[DTVDriftWriter] Check parameter calibGranularity: " << granularity_ <<
" option not available.";
47 readLegacyVDriftDB =
pset.getParameter<
bool>(
"readLegacyVDriftDB");
48 writeLegacyVDriftDB =
pset.getParameter<
bool>(
"writeLegacyVDriftDB");
66 throw cms::Exception(
"Configuration") <<
"only version 1 is presently supported for VDriftDB";
92 auto sl = superLayers.begin();
93 auto sl_end = superLayers.end();
94 for (; sl != sl_end; ++sl) {
98 float vDriftNew = -1.;
99 float resolutionNew = -1;
102 vDriftNew = vDriftData.
vdrift;
104 LogVerbatim(
"Calibration") <<
"vDrift for: " << slId <<
" Mean " << vDriftNew <<
" Resolution "
107 LogError(
"Calibration") <<
e.explainSelf();
121 LogVerbatim(
"Calibration") <<
"Keep original vDrift for: " << slId <<
" Mean " << vDriftNew <<
" Resolution "
129 vector<double>
params = {vDriftNew};
136 LogVerbatim(
"Calibration") <<
"[DTVDriftWriter]Writing vdrift object to DB!";
138 string record =
"DTMtimeRcd";
139 DTCalibDBUtils::writeToDB<DTMtime>(
record, mTimeNewMap);
141 DTCalibDBUtils::writeToDB<DTRecoConditions>(
"DTRecoConditionsVdriftRcd", vDriftNewMap);
edm::ESHandle< DTGeometry > dtGeom_
const DTMtime * mTimeMap_
DTVDriftWriter(const edm::ParameterSet &pset)
int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
float get(const DTWireId &wireid, double *x=nullptr) const
Get the value correspoding to the given WireId, / using x[] as parameters of the parametrization when...
void setFormulaExpr(const std::string &expr)
Set the expression representing the formula used for parametrization.
int version() const
Version numer specifying the structure of the payload. See .cc file for details.
std::unique_ptr< dtCalibration::DTVDriftBaseAlgo > vDriftAlgo_
void setVersion(int version)
const DTRecoConditions * vDriftMap_
const std::vector< const DTSuperLayer * > & superLayers() const
Return a vector of all SuperLayer.
Log< level::Error, false > LogError
constexpr uint32_t rawId() const
get the raw id
Log< level::Info, true > LogVerbatim
void set(const DTWireId &wireid, const std::vector< double > &values)
Fill the payload.
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
~DTVDriftWriter() override