45 std::vector<MonitorElement*> hgcalMEs;
46 std::vector<std::string> fullDirPath = ig.
getSubdirs();
48 for (
unsigned int i=0;
i<fullDirPath.size();
i++) {
54 std::vector<std::string> fullSubDirPath = ig.
getSubdirs();
56 for (
unsigned int j=0; j<fullSubDirPath.size(); j++) {
59 << fullSubDirPath.at(j);
61 if (strcmp(fullSubDirPath.at(j).c_str(),
subDirectory_.c_str()) == 0) {
76 std::string hist1[4] = {
"TotEdepStep",
"dX",
"dY",
"dZ"};
77 std::string hist2[10]= {
"LayerVsEnStep",
"XG4VsId",
"YG4VsId",
"ZG4VsId",
"dxVsX",
78 "dyVsY",
"dzVsZ",
"dxVsLayer",
"dyVsLayer",
"dzVsLayer"};
79 std::vector<MonitorElement*> hist1_;
80 std::vector<MonitorElement*> hist2_;
83 for (
unsigned int idet=0; idet<3; ++idet) {
85 for (
unsigned int kh=0; kh<4; ++kh) {
86 sprintf(name,
"%s%s", dets[idet].c_str(), hist1[kh].c_str());
87 for (
unsigned int ih=0; ih<hgcalMEs.size(); ih++) {
88 if (strcmp(hgcalMEs[ih]->
getName().c_str(), name) == 0) {
89 hist1_.push_back(hgcalMEs[ih]);
90 double nevent = hist1_.back()->getEntries();
91 int nbinsx = hist1_.back()->getNbinsX();
92 for (
int i=1;
i<= nbinsx; ++
i) {
93 double binValue = hist1_.back()->getBinContent(
i)/
nevent;
94 hist1_.back()->setBinContent(
i,binValue);
99 for (
unsigned int kh=0; kh<10; ++kh) {
100 sprintf(name,
"%s%s", dets[idet].c_str(), hist2[kh].c_str());
101 for (
unsigned int ih=0; ih<hgcalMEs.size(); ih++) {
102 if (strcmp(hgcalMEs[ih]->
getName().c_str(), name) == 0) {
103 hist2_.push_back(hgcalMEs[ih]);
104 double nevent = hist2_.back()->getEntries();
105 int nbinsx = hist2_.back()->getNbinsX();
106 int nbinsy = hist2_.back()->getNbinsY();
107 for (
int i=1;
i<= nbinsx; ++
i) {
108 for (
int j=1; j<= nbinsy; ++j) {
109 double binValue = hist2_.back()->getBinContent(
i,j)/
nevent;
110 hist2_.back()->setBinContent(
i,j,binValue);
T getParameter(std::string const &) const
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override
int geometryEndjob(const std::vector< MonitorElement * > &hcalMEs)
std::string subDirectory_
void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
HGCalGeometryClient(const edm::ParameterSet &)
std::vector< MonitorElement * > getContents(Args &&...args)
TString getName(TString structure, int layer, TString geometry)
~HGCalGeometryClient() override
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
std::vector< std::string > getSubdirs()