34 : subDirectory_(iConfig.getParameter<
std::
string>(
"DirectoryName")) {}
41 std::vector<MonitorElement*> hgcalMEs;
42 std::vector<std::string> fullDirPath = ig.
getSubdirs();
44 for (
unsigned int i = 0;
i < fullDirPath.size();
i++) {
46 edm::LogVerbatim(
"HGCalValid") <<
"HGCalHitValidation::fullPath: " << fullDirPath.at(
i);
49 std::vector<std::string> fullSubDirPath = ig.
getSubdirs();
51 for (
unsigned int j = 0;
j < fullSubDirPath.size();
j++) {
53 edm::LogVerbatim(
"HGCalValid") <<
"HGCalHitValidation:: fullSubPath: " << fullSubDirPath.at(
j);
55 if (strcmp(fullSubDirPath.at(
j).c_str(),
subDirectory_.c_str()) == 0) {
58 edm::LogVerbatim(
"HGCalValid") <<
"HGCalHitValidation:: hgcalMES size : " << hgcalMEs.size();
70 std::string hist2[7] = {
"dzVsZ",
"dyVsY",
"dxVsX",
"RecVsSimZ",
"RecVsSimY",
"RecVsSimX",
"EnSimRec"};
72 std::vector<MonitorElement*> hist1_;
73 std::vector<MonitorElement*> hist2_;
76 for (
unsigned int idet = 0; idet < 3; ++idet) {
78 for (
unsigned int kh = 0; kh < 2; ++kh) {
79 sprintf(
name,
"%s%s", dets[idet].c_str(), hist1[kh].c_str());
80 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
81 if (strcmp(hgcalMEs[ih]->
getName().c_str(),
name) == 0) {
82 hist1_.push_back(hgcalMEs[ih]);
83 double nevent = hist1_.back()->getEntries();
84 int nbinsx = hist1_.back()->getNbinsX();
86 double binValue = hist1_.back()->getBinContent(
i) /
nevent;
87 hist1_.back()->setBinContent(
i, binValue);
92 for (
unsigned int kh = 0; kh < 7; ++kh) {
93 sprintf(
name,
"%s%s", dets[idet].c_str(), hist2[kh].c_str());
94 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
95 if (strcmp(hgcalMEs[ih]->
getName().c_str(),
name) == 0) {
96 hist2_.push_back(hgcalMEs[ih]);
97 double nevent = hist2_.back()->getEntries();
98 int nbinsx = hist2_.back()->getNbinsX();
99 int nbinsy = hist2_.back()->getNbinsY();
102 double binValue = hist2_.back()->getBinContent(
i,
j) /
nevent;
103 hist2_.back()->setBinContent(
i,
j, binValue);
Log< level::Info, true > LogVerbatim
int geometryEndjob(const std::vector< MonitorElement *> &hcalMEs)
virtual void setCurrentFolder(std::string const &fullpath)
HGCalHitClient(const edm::ParameterSet &)
const std::string subDirectory_
#define DEFINE_FWK_MODULE(type)
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override
~HGCalHitClient() override=default
std::string getName(const G4String &)
Log< level::Warning, false > LogWarning
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const