93 float tTrigMean,tTrigSigma,
kFactor;
95 if(status != 0)
throw cms::Exception(
"[DTTTrigResidualCorrection]") <<
"Could not find tTrig entry in DB for" 100 if(status != 0)
throw cms::Exception(
"[DTTTrigResidualCorrection]") <<
"Could not find vDrift entry in DB for" 102 TH1F residualHisto = *(
getHisto(slId));
103 LogTrace(
"Calibration") <<
"[DTTTrigResidualCorrection]: \n" 104 <<
" Mean, RMS = " << residualHisto.GetMean() <<
", " << residualHisto.GetRMS();
106 double fitMean = -1.;
107 double fitSigma = -1.;
109 LogTrace(
"Calibration") <<
"[DTTTrigResidualCorrection]: Fitting histogram " << residualHisto.GetName();
116 LogTrace(
"Calibration") <<
"[DTTTrigResidualCorrection]: \n" 117 <<
" Fit Mean = " << fitMean <<
"\n" 118 <<
" Fit Sigma = " << fitSigma;
120 double resMean = (
useFit_) ? fitMean : residualHisto.GetMean();
123 int sector = slId.
sector();
128 double vdrift_eff =
vDriftEff_[wheel+2][sector-1][station-1][superLayer-1];
129 if(vdrift_eff == 0) vdrift_eff = vDrift;
131 if(vdrift_eff) resTime = resMean/vdrift_eff;
133 LogTrace(
"Calibration") <<
"[DTTTrigResidualCorrection]: Effective vDrift, correction to tTrig = " 134 << vdrift_eff <<
", " << resTime;
136 if(vDrift) resTime = resMean/vDrift;
138 LogTrace(
"Calibration") <<
"[DTTTrigResidualCorrection]: vDrift from DB, correction to tTrig = " 139 << vDrift <<
", " << resTime;
142 double corrMean = tTrigMean;
143 double corrSigma = (tTrigSigma != 0.) ? tTrigSigma : 1.;
144 double corrKFact = (tTrigSigma != 0.) ? (kFactor + resTime/tTrigSigma) : resTime;
146 return DTTTrigData(corrMean,corrSigma,corrKFact);
double vDriftEff_[5][14][4][3]
const TH1F * getHisto(const DTSuperLayerId &)
int superLayer() const
Return the superlayer number.
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
DTResidualFitResult fitResiduals(TH1F &histo, int nSigmas=1)
DTResidualFitter * fitter_
const DTTtrig * tTrigMap_
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
int station() const
Return the station number.
int wheel() const
Return the wheel number.
const DTMtime * mTimeMap_