79 std::string hist2[7] = {
"dzVsZ",
"dyVsY",
"dxVsX",
"RecVsSimZ",
"RecVsSimY",
80 "RecVsSimX",
"EnSimRec"};
82 std::vector<MonitorElement*> hist1_;
83 std::vector<MonitorElement*> hist2_;
86 for (
unsigned int idet=0; idet<3; ++idet) {
88 for (
unsigned int kh=0; kh<2; ++kh) {
89 sprintf(name,
"%s%s", dets[idet].c_str(), hist1[kh].c_str());
90 for (
unsigned int ih=0; ih<hgcalMEs.size(); ih++) {
91 if (strcmp(hgcalMEs[ih]->getName().c_str(), name) == 0) {
92 hist1_.push_back(hgcalMEs[ih]);
93 double nevent = hist1_.back()->getEntries();
94 int nbinsx = hist1_.back()->getNbinsX();
95 for (
int i=1;
i<= nbinsx; ++
i) {
96 double binValue = hist1_.back()->getBinContent(
i)/
nevent;
97 hist1_.back()->setBinContent(
i,binValue);
102 for (
unsigned int kh=0; kh<7; ++kh) {
103 sprintf(name,
"%s%s", dets[idet].c_str(), hist2[kh].c_str());
104 for (
unsigned int ih=0; ih<hgcalMEs.size(); ih++) {
105 if (strcmp(hgcalMEs[ih]->getName().c_str(), name) == 0) {
106 hist2_.push_back(hgcalMEs[ih]);
107 double nevent = hist2_.back()->getEntries();
108 int nbinsx = hist2_.back()->getNbinsX();
109 int nbinsy = hist2_.back()->getNbinsY();
110 for (
int i=1;
i<= nbinsx; ++
i) {
111 for (
int j=1;
j<= nbinsy; ++
j) {
112 double binValue = hist2_.back()->getBinContent(
i,
j)/
nevent;
113 hist2_.back()->setBinContent(
i,
j,binValue);