26 msm_ =
new std::map<std::string, MonitorElement*>();
38 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth" +
str(
depth) +
"_" + subdetopt;
39 book1D(ib,strtmp, ietaLim);
46 std::vector<MonitorElement*> hcalMEs;
49 std::vector<std::string> fullPathHLTFolders = ig.
getSubdirs();
50 for (
unsigned int i = 0;
i < fullPathHLTFolders.size();
i++) {
52 std::vector<std::string> fullSubPathHLTFolders = ig.
getSubdirs();
53 for (
unsigned int j = 0;
j < fullSubPathHLTFolders.size();
j++) {
54 if (strcmp(fullSubPathHLTFolders[
j].c_str(),
"HcalDigisV/HcalDigiTask") == 0) {
57 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HB";
59 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HE";
61 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HO";
63 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HF"; }
81 std::cout <<
" Number of histos " << hcalMEs.size() << std::endl;
83 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
84 if (hcalMEs[ih]->getName() ==
"nevtot") nevtot = hcalMEs[ih];
86 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" + subdet_;
87 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map1 = hcalMEs[ih];
88 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" + subdet_;
89 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map2 = hcalMEs[ih];
90 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" + subdet_;
91 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map3 = hcalMEs[ih];
92 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" + subdet_;
93 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map4 = hcalMEs[ih];
98 ieta_iphi_occupancy_map1 == 0 ||
99 ieta_iphi_occupancy_map2 == 0 ||
100 ieta_iphi_occupancy_map3 == 0 ||
101 ieta_iphi_occupancy_map4 == 0
103 edm::LogError(
"HcalDigisClient") <<
"No nevtot or maps histo found...";
109 edm::LogError(
"HcalDigisClient") <<
"normalization factor <= 0!";
115 int nx = ieta_iphi_occupancy_map1->
getNbinsX();
116 int ny = ieta_iphi_occupancy_map1->
getNbinsY();
117 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
121 for (
int i = 1;
i <= nx;
i++) {
127 for (
int j = 1;
j <= ny;
j++) {
131 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" + subdet_;
136 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" + subdet_;
141 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" + subdet_;
146 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" + subdet_;
154 if (ieta >= 0) ieta += 1;
156 if (ieta >= -20 && ieta <= 20) {
159 if (ieta >= 40 || ieta <= -40)
165 if (ieta >= 0) ieta -= 1;
166 double deta = double(ieta);
169 cnorm = sumphi_1 / phi_factor;
170 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth1_" + subdet_;
171 fill1D(strtmp, deta, cnorm);
173 cnorm = sumphi_2 / phi_factor;
174 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth2_" + subdet_;
175 fill1D(strtmp, deta, cnorm);
177 cnorm = sumphi_3 / phi_factor;
178 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth3_" + subdet_;
179 fill1D(strtmp, deta, cnorm);
181 cnorm = sumphi_4 / phi_factor;
182 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth4_" + subdet_;
183 fill1D(strtmp, deta, cnorm);
191 if (!
msm_->count(name))
return NULL;
192 else return msm_->find(name)->second;
196 std::stringstream
out;
203 for (
int i = i0;
i <= i1;
i++) {
204 for (
int j = j0;
j <= j1;
j++) {
217 for (
int i = 1;
i <= nx;
i++) {
218 for (
int j = 1;
j <= ny;
j++) {
std::vector< MonitorElement * > getContents(Args &&...args)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
#define DEFINE_FWK_MODULE(type)
void scaleMETH2D(MonitorElement *ME, double s)
virtual void runClient(DQMStore::IBooker &ib, DQMStore::IGetter &ig)
int HcalDigisEndjob(const std::vector< MonitorElement * > &hcalMEs, std::string subdet_)
double getEntries(void) const
get # of entries
HcalDigisClient(const edm::ParameterSet &)
int getNbinsY(void) const
get # of bins in Y-axis
void fill1D(std::string name, double X, double weight=1)
MonitorElement * monitor(std::string name)
void booking(DQMStore::IBooker &ib, std::string subdetopt)
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
std::map< std::string, MonitorElement * > * msm_
double integralMETH2D(MonitorElement *ME, int i0, int i1, int j0, int j1)
std::vector< std::string > getSubdirs(void)
void setCurrentFolder(const std::string &fullpath)
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis