30 MonitorElement *mapEnergy_N =
nullptr, *mapEnergy_E =
nullptr, *mapEnergy_H =
nullptr, *mapEnergy_EH =
nullptr;
31 MonitorElement *occupancy_map =
nullptr, *occupancy_vs_ieta =
nullptr;
32 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
33 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"Ntowers_per_event_vs_ieta") == 0) {
34 Ntowers_vs_ieta = hcalMEs[ih];
36 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_Nentries") == 0) {
37 mapEnergy_N = hcalMEs[ih];
39 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_H") == 0) {
41 mapEnergy_H = hcalMEs[ih];
43 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_E") == 0) {
45 mapEnergy_E = hcalMEs[ih];
47 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_EH") == 0) {
49 mapEnergy_EH = hcalMEs[ih];
51 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_occupancy") == 0) {
52 occupancy_map = hcalMEs[ih];
54 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_occupancy_vs_ieta") == 0) {
55 occupancy_vs_ieta = hcalMEs[ih];
58 if (useAllHistos != 0 && useAllHistos != 3)
63 std::cout <<
"nevent : " << nevent << std::endl;
69 float fev =
float(nevent);
71 for (
int i = 1;
i <= nx;
i++) {
86 for (
int i = 1;
i <= nx;
i++) {
89 for (
int j = 1; j <= ny; j++) {
93 if (cnorm > 0.000001 && useAllHistos) {
94 cont = mapEnergy_E->getBinContent(
i, j) / cnorm;
95 conte = mapEnergy_E->getBinError(
i, j) / cnorm;
96 mapEnergy_E->setBinContent(
i, j, cont);
97 mapEnergy_E->setBinError(
i, j, conte);
99 cont = mapEnergy_H->getBinContent(
i, j) / cnorm;
100 conte = mapEnergy_H->getBinError(
i, j) / cnorm;
101 mapEnergy_H->setBinContent(
i, j, cont);
102 mapEnergy_H->setBinError(
i, j, conte);
104 cont = mapEnergy_EH->getBinContent(
i, j) / cnorm;
105 conte = mapEnergy_EH->getBinError(
i, j) / cnorm;
106 mapEnergy_EH->setBinContent(
i, j, cont);
107 mapEnergy_EH->setBinError(
i, j, conte);
113 if (fev > 0. && cnorm > 1.
e-30) {
127 if (ieta >= -20 && ieta <= 20) {
130 if (ieta >= 40 || ieta <= -40) {
136 cnorm = sumphi / phi_factor;
137 cnorme =
pow(sumphi, 0.5) / phi_factor;
138 if (fev > 0. && cnorm > 1.
e-30) {
139 occupancy_vs_ieta->setBinContent(
i, cnorm / fev);
140 occupancy_vs_ieta->setBinError(
i, cnorme / fev);
153 std::vector<MonitorElement *> hcalMEs;
158 std::vector<std::string> fullPathHLTFolders = igetter.
getSubdirs();
159 for (
unsigned int i = 0;
i < fullPathHLTFolders.size();
i++) {
161 std::cout <<
"\nfullPath: " << fullPathHLTFolders[
i] << std::endl;
164 std::vector<std::string> fullSubPathHLTFolders = igetter.
getSubdirs();
165 for (
unsigned int j = 0; j < fullSubPathHLTFolders.size(); j++) {
167 std::cout <<
"fullSub: " << fullSubPathHLTFolders[j] << std::endl;
169 if (strcmp(fullSubPathHLTFolders[j].c_str(),
"CaloTowersD/CaloTowersTask") == 0) {
170 hcalMEs = igetter.
getContents(fullSubPathHLTFolders[j]);
172 std::cout <<
"hltMES size : " << hcalMEs.size() << std::endl;
174 std::cout <<
"\nError in CaloTowersEndjob!" << std::endl << std::endl;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int CaloTowersEndjob(const std::vector< MonitorElement * > &hcalMEs)
void setBinContent(int binx, double content)
set content of bin (1-D)
void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
~CaloTowersDQMClient() override
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
std::vector< MonitorElement * > getContents(Args &&...args)
TString getName(TString structure, int layer, TString geometry)
double getEntries() const
get # of entries
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
int getNbinsY() const
get # of bins in Y-axis
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > getSubdirs()
void beginJob(void) override
int getNbinsX() const
get # of bins in X-axis
CaloTowersDQMClient(const edm::ParameterSet &)
Power< A, B >::type pow(const A &a, const B &b)