42 std::vector<MonitorElement*> hgcalMEs;
43 std::vector<std::string> fullDirPath = ig.
getSubdirs();
45 for (
unsigned int i = 0;
i < fullDirPath.size();
i++) {
47 edm::LogVerbatim(
"HGCalValid") <<
"HGCalGeometry::fullPath: " << fullDirPath.at(
i);
50 std::vector<std::string> fullSubDirPath = ig.
getSubdirs();
52 for (
unsigned int j = 0;
j < fullSubDirPath.size();
j++) {
54 edm::LogVerbatim(
"HGCalValid") <<
"HGCalGeometry:: fullSubPath: " << fullSubDirPath.at(
j);
56 if (strcmp(fullSubDirPath.at(
j).c_str(),
subDirectory_.c_str()) == 0) {
59 edm::LogVerbatim(
"HGCalValid") <<
"HGCalGeometry:: hgcalMES size : " << hgcalMEs.size();
70 std::string hist1[4] = {
"TotEdepStep",
"dX",
"dY",
"dZ"};
81 std::vector<MonitorElement*> hist1_;
82 std::vector<MonitorElement*> hist2_;
85 for (
unsigned int idet = 0; idet < 3; ++idet) {
87 for (
unsigned int kh = 0; kh < 4; ++kh) {
88 sprintf(
name,
"%s%s", dets[idet].c_str(), hist1[kh].c_str());
89 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
90 if (strcmp(hgcalMEs[ih]->
getName().c_str(),
name) == 0) {
91 hist1_.push_back(hgcalMEs[ih]);
92 double nevent = hist1_.back()->getEntries();
93 int nbinsx = hist1_.back()->getNbinsX();
94 for (
int i = 1;
i <= nbinsx; ++
i) {
95 double binValue = hist1_.back()->getBinContent(
i) /
nevent;
96 hist1_.back()->setBinContent(
i, binValue);
101 for (
unsigned int kh = 0; kh < 10; ++kh) {
102 sprintf(
name,
"%s%s", dets[idet].c_str(), hist2[kh].c_str());
103 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
104 if (strcmp(hgcalMEs[ih]->
getName().c_str(),
name) == 0) {
105 hist2_.push_back(hgcalMEs[ih]);
106 double nevent = hist2_.back()->getEntries();
107 int nbinsx = hist2_.back()->getNbinsX();
108 int nbinsy = hist2_.back()->getNbinsY();
109 for (
int i = 1;
i <= nbinsx; ++
i) {
110 for (
int j = 1;
j <= nbinsy; ++
j) {
111 double binValue = hist2_.back()->getBinContent(
i,
j) /
nevent;
112 hist2_.back()->setBinContent(
i,
j, binValue);