51 std::stringstream meName1;
54 std::stringstream meName2;
57 std::stringstream binName;
70 for(
int i=-3;
i<=3;
i++){
72 for(
int j=2;
j<=3;
j++){
76 meName1<<globalFolder_<<
"Azimutal/ExGregDistroDm"<<
abs(
i)<<
"R"<<
j;
77 meName2<<globalFolder_<<
"Azimutal/OcGregDistroDm"<<
abs(
i)<<
"R"<<
j;
81 binName<<
"RE-"<<
i<<
"/"<<
j;
84 meName1<<globalFolder_<<
"Azimutal/ExGregDistroD"<<
abs(
i)<<
"R"<<
j;
85 meName2<<globalFolder_<<
"Azimutal/OcGregDistroD"<<
abs(
i)<<
"R"<<
j;
89 binName<<
"RE+"<<
abs(
i)<<
"/"<<
j;
92 myMe1 =
dbe_->
get(meName1.str());
93 myMe2 =
dbe_->
get(meName2.str());
94 TH1 * histo1 = myMe1->
getTH1();
95 TH1 * histo2 = myMe2->
getTH1();
98 int exg = histo1->Integral();
99 int obg = histo2->Integral();
103 eff = (double)obg/(
double)exg;
104 err =
sqrt(eff*(1-eff)/(
double)exg);}
106 if(k%2 != 0 && k < 7){
110 else if(k%2 == 0 && k < 7){
124 for(
int i=1;
i<=6;
i++){
131 for(
int j=-2;
j<=2;
j++){
135 meName1<<globalFolder_<<
"BarrelPerLayer/ExpLayerWm"<<
abs(
j);
136 meName2<<globalFolder_<<
"BarrelPerLayer/ObsLayerWm"<<
abs(
j);}
138 meName1<<globalFolder_<<
"BarrelPerLayer/ExpLayerW"<<
j;
139 meName2<<globalFolder_<<
"BarrelPerLayer/ObsLayerW"<<
j;}
142 myMe1 =
dbe_->
get(meName1.str());
143 myMe2 =
dbe_->
get(meName2.str());
151 eff = (double)Obs/(
double)Exp;
152 err =
sqrt(eff*(1-eff)/(
double)Exp);}
156 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 save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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
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)
virtual ~RPCEfficiencyPerRingLayer()
Destructor.
std::string globalFolder_
void setCurrentFolder(const std::string &fullpath)