47 std::stringstream meName1;
50 std::stringstream meName2;
53 std::stringstream binName;
72 meName1<<globalFolder_<<
"Azimutal/ExGregDistroDm"<<
abs(
i)<<
"R"<<
j;
73 meName2<<globalFolder_<<
"Azimutal/OcGregDistroDm"<<
abs(
i)<<
"R"<<
j;
77 binName<<
"RE-"<<
i<<
"/"<<
j;
80 meName1<<globalFolder_<<
"Azimutal/ExGregDistroD"<<
abs(
i)<<
"R"<<
j;
81 meName2<<globalFolder_<<
"Azimutal/OcGregDistroD"<<
abs(
i)<<
"R"<<
j;
85 binName<<
"RE+"<<
abs(
i)<<
"/"<<
j;
89 myMe1 =
dbe_->
get(meName1.str());
90 myMe2 =
dbe_->
get(meName2.str());
93 TH1 * histo1 = myMe1->
getTH1();
94 TH1 * histo2 = myMe2->
getTH1();
96 int exg = histo1->Integral();
97 int obg = histo2->Integral();
101 eff = (double)obg/(
double)exg;
102 err =
sqrt(eff*(1-eff)/(
double)exg);}
104 if(k%2 != 0 && k < 7){
108 else if(k%2 == 0 && k < 7){
122 for(
int i=1;
i<=6;
i++){
129 for(
int j=-2;
j<=2;
j++){
133 meName1<<globalFolder_<<
"BarrelPerLayer/ExpLayerWm"<<
abs(
j);
134 meName2<<globalFolder_<<
"BarrelPerLayer/ObsLayerWm"<<
abs(
j);}
136 meName1<<globalFolder_<<
"BarrelPerLayer/ExpLayerW"<<
j;
137 meName2<<globalFolder_<<
"BarrelPerLayer/ObsLayerW"<<
j;}
139 myMe1 =
dbe_->
get(meName1.str());
140 myMe2 =
dbe_->
get(meName2.str());
148 eff = (double)Obs/(
double)Exp;
149 err =
sqrt(eff*(1-eff)/(
double)Exp);}
153 binName<<
"Layer "<<
i;
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * EfficiencyPerLayer
Abs< T >::type abs(const T &t)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Analyze.
void beginRun(const edm::Run &r, const edm::EventSetup &c)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
MonitorElement * EfficiencyPerRing
void endRun(const edm::Run &r, const edm::EventSetup &c)
RPCEfficiencyPerRingLayer(const edm::ParameterSet &iConfig)
Constructor.
double getBinContent(int binx) const
get content of bin (1-D)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
virtual ~RPCEfficiencyPerRingLayer()
Destructor.
std::string globalFolder_
void setCurrentFolder(const std::string &fullpath)