27 string t0SegRootFile = pset.
getParameter<
string>(
"t0SegRootFile");
28 rootFile_ =
new TFile(t0SegRootFile.c_str(),
"READ");
44 float tTrigMean,tTrigSigma,kFactor;
46 if(status != 0)
throw cms::Exception(
"[DTTTrigT0SegCorrection]") <<
"Could not find tTrig entry in DB for"
49 const TH1F* t0SegHisto =
getHisto(slId);
50 double corrMean = tTrigMean;
51 double corrSigma = tTrigSigma;
53 double corrKFact = (kFactor*tTrigSigma + t0SegHisto->GetMean())/tTrigSigma;
59 TH1F*
histo =
static_cast<TH1F*
>(rootFile_->Get(histoName.c_str()));
60 if(!histo)
throw cms::Exception(
"[DTTTrigT0SegCorrection]") <<
"t0-seg histogram not found:"
69 stringstream wheel; wheel << chId.
wheel();
71 stringstream sector; sector << chId.
sector();
75 "_St" + station.str() +
76 "_Sec" + sector.str();
78 return (slId.
superLayer() != 2)?(
"hRPhiSegT0"+chHistoName):(
"hRZSegT0"+chHistoName);
virtual ~DTTTrigT0SegCorrection()
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 &slID)
const TH1F * getHisto(const DTSuperLayerId &)
virtual DTTTrigData correction(const DTSuperLayerId &)
virtual void setES(const edm::EventSetup &setup)
int superLayer() const
Return the superlayer number.
DTTTrigT0SegCorrection(const edm::ParameterSet &)
int station() const
Return the station number.
int wheel() const
Return the wheel number.
TH1F * getHisto(std::string name, std::string process, DQMStore *dbe_, bool verb=false, bool clone=false)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")