17 <<
"unable to get DQMStore service, upshot is no client histograms will be made";
77 LogDebug(
"JetMETDQMOfflineClient") <<
"runClient" << std::endl;
80 std::vector<MonitorElement*> MEs;
94 tlumisec = meLumiSec->
getTH1F();
95 for (
int i=0;
i<500;
i++){
96 if (tlumisec->GetBinContent(
i+1)) totlsec++;
100 totltime = totlsec * 90.;
119 for(
unsigned int i=0;
i<fullPathDQMFolders.size();
i++) {
125 std::vector<std::string> fullPathDQMSubFolders =
dbe_->
getSubdirs();
126 for(
unsigned int j=0;
j<fullPathDQMSubFolders.size();
j++) {
134 if (
dbe_->
get(fullPathDQMSubFolders[j]+
"/"+
"METTask_MET") ) METMEName=
"METTask_MET";
135 if (
dbe_->
get(fullPathDQMSubFolders[j]+
"/"+
"METTask_PfMET")) METMEName=
"METTask_PfMET";
137 me =
dbe_->
get(fullPathDQMSubFolders[j]+
"/"+METMEName);
154 tMETRate = (TH1F*) tMET->Clone((METMEName+
"Rate").c_str());
155 for (
int i = tMETRate->GetNbinsX()-1; i>=0; i--){
156 tMETRate->SetBinContent(i+1,tMETRate->GetBinContent(i+2)+tMET->GetBinContent(i+1));
162 for (
int i=tMETRate->GetNbinsX()-1;i>=0;i--){
163 tMETRate->SetBinContent(i+1,tMETRate->GetBinContent(i+1)/double(totltime));
168 hMETRate =
dbe_->
book1D(METMEName+
"Rate",tMETRate);
169 hMETRate->
setTitle(METMEName+
" Rate");
187 fullPathDQMFolders.clear();
189 for(
unsigned int i=0;
i<fullPathDQMFolders.size();
i++) {
194 std::vector<std::string> getMEs =
dbe_->
getMEs();
196 std::vector<std::string>::const_iterator cii;
197 for(cii=getMEs.begin(); cii!=getMEs.end(); cii++) {
198 if ((*cii).find(
"_binom")!=std::string::npos)
continue;
199 if ((*cii).find(
"JIDPassFractionVS")!=std::string::npos){
200 me =
dbe_->
get(fullPathDQMFolders[i]+
"/"+(*cii));
205 TH1F *tPassFraction =
new TH1F(((*cii)+
"_binom").c_str(),((*cii)+
"_binom").c_str(),
206 tpro->GetNbinsX(),tpro->GetBinLowEdge(1),tpro->GetBinLowEdge(tpro->GetNbinsX()+1));
207 for (
int ibin=0; ibin<tpro->GetNbinsX(); ibin++){
208 double nentries = tpro->GetBinEntries(ibin+1);
209 double epsilon = tpro->GetBinContent(ibin+1);
210 if (epsilon>1. || epsilon<0.)
continue;
211 tPassFraction->SetBinContent(ibin+1,epsilon);
212 if(nentries>0) tPassFraction->SetBinError(ibin+1,
pow(epsilon*(1.-epsilon)/nentries,0.5));
virtual ~JetMETDQMOfflineClient()
T getUntrackedParameter(std::string const &, T const &) const
virtual void runClient_()
std::vector< std::string > getSubdirs(void) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void removeElement(const std::string &name)
virtual void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void setVerbose(unsigned level)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
virtual void endRun(const edm::Run &run, const edm::EventSetup &c)
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
TObject * getRootObject(void) const
TH1F * getTH1F(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
JetMETDQMOfflineClient(const edm::ParameterSet &)
virtual void beginJob(void)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Power< A, B >::type pow(const A &a, const B &b)
void setCurrentFolder(const std::string &fullpath)