47 std::vector<MonitorElement*> hgcalMEs;
48 std::vector<std::string> fullDirPath = ig.
getSubdirs();
50 for (
unsigned int i=0;
i<fullDirPath.size();
i++) {
56 std::vector<std::string> fullSubDirPath = ig.
getSubdirs();
58 for (
unsigned int j=0; j<fullSubDirPath.size(); j++) {
61 << fullSubDirPath.at(j);
63 if (strcmp(fullSubDirPath.at(j).c_str(),
subDirectory_.c_str()) == 0) {
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);
std::vector< MonitorElement * > getContents(Args &&...args)
T getParameter(std::string const &) const
int geometryEndjob(const std::vector< MonitorElement * > &hcalMEs)
#define DEFINE_FWK_MODULE(type)
HGCalHitClient(const edm::ParameterSet &)
std::string subDirectory_
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override
~HGCalHitClient() override
void setCurrentFolder(const std::string &fullpath)
std::vector< std::string > getSubdirs()
void beginRun(const edm::Run &run, const edm::EventSetup &c) override