44 std::vector<MonitorElement*> hgcalMEs;
45 std::vector<std::string> fullDirPath = ig.
getSubdirs();
47 for (
unsigned int i = 0;
i < fullDirPath.size();
i++) {
49 edm::LogVerbatim(
"HGCalValid") <<
"HGCalHitValidation::fullPath: " << fullDirPath.at(
i);
52 std::vector<std::string> fullSubDirPath = ig.
getSubdirs();
54 for (
unsigned int j = 0;
j < fullSubDirPath.size();
j++) {
56 edm::LogVerbatim(
"HGCalValid") <<
"HGCalHitValidation:: fullSubPath: " << fullSubDirPath.at(
j);
58 if (strcmp(fullSubDirPath.at(
j).c_str(),
subDirectory_.c_str()) == 0) {
61 edm::LogVerbatim(
"HGCalValid") <<
"HGCalHitValidation:: hgcalMES size : " << hgcalMEs.size();
73 std::string hist2[7] = {
"dzVsZ",
"dyVsY",
"dxVsX",
"RecVsSimZ",
"RecVsSimY",
"RecVsSimX",
"EnSimRec"};
75 std::vector<MonitorElement*> hist1_;
76 std::vector<MonitorElement*> hist2_;
79 for (
unsigned int idet = 0; idet < 3; ++idet) {
81 for (
unsigned int kh = 0; kh < 2; ++kh) {
82 sprintf(name,
"%s%s", dets[idet].c_str(), hist1[kh].c_str());
83 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
84 if (strcmp(hgcalMEs[ih]->
getName().c_str(), name) == 0) {
85 hist1_.push_back(hgcalMEs[ih]);
86 double nevent = hist1_.back()->getEntries();
87 int nbinsx = hist1_.back()->getNbinsX();
88 for (
int i = 1;
i <= nbinsx; ++
i) {
89 double binValue = hist1_.back()->getBinContent(
i) /
nevent;
90 hist1_.back()->setBinContent(
i, binValue);
95 for (
unsigned int kh = 0; kh < 7; ++kh) {
96 sprintf(name,
"%s%s", dets[idet].c_str(), hist2[kh].c_str());
97 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
98 if (strcmp(hgcalMEs[ih]->
getName().c_str(), name) == 0) {
99 hist2_.push_back(hgcalMEs[ih]);
100 double nevent = hist2_.back()->getEntries();
101 int nbinsx = hist2_.back()->getNbinsX();
102 int nbinsy = hist2_.back()->getNbinsY();
103 for (
int i = 1;
i <= nbinsx; ++
i) {
104 for (
int j = 1;
j <= nbinsy; ++
j) {
105 double binValue = hist2_.back()->getBinContent(
i,
j) /
nevent;
106 hist2_.back()->setBinContent(
i,
j, binValue);
Log< level::Info, true > LogVerbatim
const edm::EventSetup & c
int geometryEndjob(const std::vector< MonitorElement * > &hcalMEs)
virtual void setCurrentFolder(std::string const &fullpath)
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
#define DEFINE_FWK_MODULE(type)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
HGCalHitClient(const edm::ParameterSet &)
std::string subDirectory_
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override
TString getName(TString structure, int layer, TString geometry)
T getParameter(std::string const &) const
~HGCalHitClient() override
Log< level::Warning, false > LogWarning
void beginRun(const edm::Run &run, const edm::EventSetup &c) override