26 msm_ =
new std::map<std::string, MonitorElement*>();
40 HistLim ietaLim(85, -42.5, 42.5);
43 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth" +
str(
depth) +
"_" + subdetopt;
44 book1D(ib,strtmp, ietaLim);
51 std::vector<MonitorElement*> hcalMEs;
54 std::vector<std::string> fullPathHLTFolders = ig.
getSubdirs();
55 for (
unsigned int i = 0;
i < fullPathHLTFolders.size();
i++) {
57 std::vector<std::string> fullSubPathHLTFolders = ig.
getSubdirs();
58 for (
unsigned int j = 0;
j < fullSubPathHLTFolders.size();
j++) {
59 if (strcmp(fullSubPathHLTFolders[
j].c_str(),
"HcalDigisV/HcalDigiTask") == 0) {
62 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HB";
64 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HE";
66 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HO";
68 edm::LogError(
"HcalDigisClient") <<
"Error in HcalDigisEndjob! HF"; }
88 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
90 if (hcalMEs[ih]->getName() ==
"nevtot") nevtot = hcalMEs[ih];
92 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" + subdet_;
93 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map1 = hcalMEs[ih];
94 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" + subdet_;
95 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map2 = hcalMEs[ih];
96 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" + subdet_;
97 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map3 = hcalMEs[ih];
98 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" + subdet_;
99 if (hcalMEs[ih]->getName() == strtmp) ieta_iphi_occupancy_map4 = hcalMEs[ih];
104 ieta_iphi_occupancy_map1 == 0 ||
105 ieta_iphi_occupancy_map2 == 0 ||
106 ieta_iphi_occupancy_map3 == 0 ||
107 ieta_iphi_occupancy_map4 == 0
109 edm::LogError(
"HcalDigisClient") <<
"No nevtot or maps histo found...";
115 edm::LogError(
"HcalDigisClient") <<
"normalization factor <= 0!";
121 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
125 int nx = ieta_iphi_occupancy_map1->
getNbinsX();
126 int ny = ieta_iphi_occupancy_map1->
getNbinsY();
128 for (
int i = 1;
i <= nx;
i++) {
129 for (
int j = 1;
j <= ny;
j++) {
133 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" + subdet_;
137 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" + subdet_;
141 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" + subdet_;
145 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" + subdet_;
152 for (
int i = 1;
i <= 82;
i++) {
155 if (ieta >= 0) ieta += 1;
157 if (ieta >= -20 && ieta <= 20) {
160 if (ieta >= 40 || ieta <= -40)
171 for (
int iphi = 1; iphi <= 72; iphi++) {
172 sumphi_1 += ieta_iphi_occupancy_map1->
getTH1()->GetBinContent(ieta_iphi_occupancy_map1->
getTH1()->FindFixBin(
double(ieta),
double(iphi)));
173 sumphi_2 += ieta_iphi_occupancy_map2->
getTH1()->GetBinContent(ieta_iphi_occupancy_map2->
getTH1()->FindFixBin(
double(ieta),
double(iphi)));
174 sumphi_3 += ieta_iphi_occupancy_map3->
getTH1()->GetBinContent(ieta_iphi_occupancy_map3->
getTH1()->FindFixBin(
double(ieta),
double(iphi)));
175 sumphi_4 += ieta_iphi_occupancy_map4->
getTH1()->GetBinContent(ieta_iphi_occupancy_map4->
getTH1()->FindFixBin(
double(ieta),
double(iphi)));
179 double deta = double(ieta);
182 cnorm = sumphi_1 / phi_factor;
183 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth1_" + subdet_;
184 fill1D(strtmp, deta, cnorm);
186 cnorm = sumphi_2 / phi_factor;
187 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth2_" + subdet_;
188 fill1D(strtmp, deta, cnorm);
190 cnorm = sumphi_3 / phi_factor;
191 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth3_" + subdet_;
192 fill1D(strtmp, deta, cnorm);
194 cnorm = sumphi_4 / phi_factor;
195 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth4_" + subdet_;
196 fill1D(strtmp, deta, cnorm);
204 if (!
msm_->count(name))
return NULL;
205 else return msm_->find(name)->second;
209 std::stringstream
out;
216 for (
int i = i0;
i <= i1;
i++) {
217 for (
int j = j0;
j <= j1;
j++) {
230 for (
int i = 1;
i <= nx;
i++) {
231 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