12 : dirName_(iConfig.getParameter<
std::
string>(
"DQMDirName")),
13 verbose_(iConfig.getUntrackedParameter<
bool>(
"Verbosity",
false)),
36 std::vector<MonitorElement *> hcalMEs;
38 std::vector<std::string> fullPathHLTFolders = ig.
getSubdirs();
39 for (
unsigned int i = 0;
i < fullPathHLTFolders.size();
i++) {
44 std::vector<std::string> fullSubPathHLTFolders = ig.
getSubdirs();
45 for (
unsigned int j = 0;
j < fullSubPathHLTFolders.size();
j++) {
47 edm::LogVerbatim(
"HitsValidationHcal") <<
"fullSub: " << fullSubPathHLTFolders[
j];
49 if (strcmp(fullSubPathHLTFolders[
j].c_str(),
"HcalHitsV/SimHitsValidationHcal") == 0) {
52 edm::LogVerbatim(
"HitsValidationHcal") <<
"hltMES size : " << hcalMEs.size();
66 MonitorElement *HitEnergyvsieta[divisions.size()], *HitTimevsieta[divisions.size()];
70 char name[40], name1[40],
name2[40], name3[40], name4[40];
74 Time_weighteden[
k] =
nullptr;
75 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
76 sprintf(name1,
"Energy_%s", detdivision[
k].c_str());
77 sprintf(
name2,
"Time_Enweighted_%s", detdivision[
k].c_str());
78 if (strcmp(hcalMEs[ih]->
getName().c_str(), name1) == 0) {
81 if (strcmp(hcalMEs[ih]->
getName().c_str(),
name2) == 0) {
82 Time_weighteden[
k] = hcalMEs[ih];
88 for (
unsigned int j = 0;
j < divisions.size();
j++) {
89 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
90 sprintf(
name,
"HcalHitE%s%s",
time[
i].c_str(), divisions[
j].c_str());
91 if (strcmp(hcalMEs[ih]->
getName().c_str(),
name) == 0) {
92 Occupancy_map[
i][
j] = hcalMEs[ih];
98 for (
unsigned int k = 0;
k < divisions.size();
k++) {
99 HitEnergyvsieta[
k] =
nullptr;
100 HitTimevsieta[
k] =
nullptr;
101 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
102 sprintf(name3,
"HcalHitEta%s", divisions[
k].c_str());
103 sprintf(name4,
"HcalHitTimeAEta%s", divisions[
k].c_str());
104 if (strcmp(hcalMEs[ih]->
getName().c_str(), name3) == 0) {
105 HitEnergyvsieta[
k] = hcalMEs[ih];
107 if (strcmp(hcalMEs[ih]->
getName().c_str(), name4) == 0) {
108 HitTimevsieta[
k] = hcalMEs[ih];
121 float hitenergy[divisions.size()], hittime[divisions.size()];
124 for (
int dettype = 0; dettype <
nType1; dettype++) {
125 int nx1 =
Energy[dettype]->getNbinsX();
126 for (
int i = 0;
i <= nx1;
i++) {
127 en[dettype] =
Energy[dettype]->getBinContent(
i) / fev;
128 Energy[dettype]->setBinContent(
i, en[dettype]);
130 int nx2 = Time_weighteden[dettype]->
getNbinsX();
131 for (
int i = 0;
i <= nx2;
i++) {
137 for (
unsigned int dettype = 0; dettype < divisions.size(); dettype++) {
138 int nx1 = HitEnergyvsieta[dettype]->
getNbinsX();
139 for (
int i = 0;
i <= nx1;
i++) {
140 hitenergy[dettype] = HitEnergyvsieta[dettype]->
getBinContent(
i) / fev;
143 int nx2 = HitTimevsieta[dettype]->
getNbinsX();
144 for (
int i = 0;
i <= nx2;
i++) {
145 hittime[dettype] = HitTimevsieta[dettype]->
getBinContent(
i) / fev;
150 for (
int itime = 0; itime <
nTime; itime++) {
151 for (
unsigned int det = 0; det < divisions.size(); det++) {
152 int ny = Occupancy_map[itime][det]->
getNbinsY();
153 int nx = Occupancy_map[itime][det]->
getNbinsX();
154 for (
int i = 1;
i < nx + 1;
i++) {
155 for (
int j = 1;
j < ny + 1;
j++) {
176 std::vector<std::string> divisions;
181 sprintf(name1,
"HC%d",
depth);
186 sprintf(name1,
"HB%d",
depth);
191 sprintf(name1,
"HE%d+z",
depth);
193 sprintf(name1,
"HE%d-z",
depth);
199 sprintf(name1,
"HO%d",
depth);
204 for (
int k = 0;
k < 4; ++
k) {
206 sprintf(name1,
"HF%s%d+z", hfty1[
k].c_str(),
depth);
208 sprintf(name1,
"HF%s%d-z", hfty1[
k].c_str(),
depth);
Log< level::Info, true > LogVerbatim
void beginRun(edm::Run const &run, edm::EventSetup const &c) override
int SimHitsEndjob(const std::vector< MonitorElement *> &hcalMEs)
virtual void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
std::vector< std::string > getHistogramTypes()
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
const HcalDDDRecConstants * hcons
const std::string dirName_
virtual void runClient_(DQMStore::IBooker &, DQMStore::IGetter &)
int getMaxDepth(const int &type) const
virtual int getNbinsY() const
get # of bins in Y-axis
TString getName(TString structure, int layer, TString geometry)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
HcalSimHitsClient(const edm::ParameterSet &)
virtual int getNbinsX() const
get # of bins in X-axis
Log< level::Warning, false > LogWarning
cont
load Luminosity info ##
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const