35 : nSigmas_(pset.getUntrackedParameter<unsigned
int>(
"nSigmasFitRange", 1)) {
37 rootFile_ =
new TFile(rootFileName.c_str(),
"READ");
63 throw cms::Exception(
"DTCalibration") <<
"Could not find vDrift entry in DB for" << slId << endl;
67 LogTrace(
"Calibration") <<
"[DTVDriftSegment]: RZ superlayer\n" 68 <<
" Will use original vDrift and resolution.";
71 TH1F* vDriftCorrHisto =
getHisto(slId);
73 if (vDriftCorrHisto->GetEntries() == 0) {
74 LogError(
"Calibration") <<
"[DTVDriftSegment]: Histogram " << vDriftCorrHisto->GetName() <<
" is empty.\n" 75 <<
" Will use original vDrift and resolution.";
79 LogTrace(
"Calibration") <<
"[DTVDriftSegment]: Fitting histogram " << vDriftCorrHisto->GetName();
81 LogTrace(
"Calibration") <<
"[DTVDriftSegment]: \n" 85 float vDriftCorr = fitResult.
fitMean;
86 float vDriftNew = vDrift * (1. - vDriftCorr);
94 TH1F*
histo =
static_cast<TH1F*
>(
rootFile_->Get(histoName.c_str()));
96 throw cms::Exception(
"DTCalibration") <<
"v-drift correction histogram not found:" << histoName << endl;
108 string chHistoName =
"_W" + wheel +
"_St" + station +
"_Sec" + sector;
110 return (slId.
superLayer() != 2) ? (
"hRPhiVDriftCorr" + chHistoName) : (
"hRZVDriftCorr" + chHistoName);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTChamberId chamberId() const
Return the corresponding ChamberId.
std::string getHistoName(const DTSuperLayerId &)
void setES(const edm::EventSetup &setup) override
int superLayer() const
Return the superlayer number.
const DTMtime * mTimeMap_
DTResidualFitResult fitResiduals(TH1F &histo, int nSigmas=1)
DTResidualFitter * fitter_
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
~DTVDriftSegment() override
int station() const
Return the station number.
TH1F * getHisto(const DTSuperLayerId &)
int wheel() const
Return the wheel number.
DTVDriftData compute(const DTSuperLayerId &) override