29 MonitorElement *mapEnergy_N =
nullptr, *mapEnergy_E =
nullptr, *mapEnergy_H =
nullptr, *mapEnergy_EH =
nullptr;
30 MonitorElement *occupancy_map =
nullptr, *occupancy_vs_ieta =
nullptr;
31 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
32 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"Ntowers_per_event_vs_ieta") == 0) {
33 Ntowers_vs_ieta = hcalMEs[ih];
35 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_Nentries") == 0) {
36 mapEnergy_N = hcalMEs[ih];
38 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_H") == 0) {
40 mapEnergy_H = hcalMEs[ih];
42 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_E") == 0) {
44 mapEnergy_E = hcalMEs[ih];
46 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_EH") == 0) {
48 mapEnergy_EH = hcalMEs[ih];
50 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_occupancy") == 0) {
51 occupancy_map = hcalMEs[ih];
53 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_occupancy_vs_ieta") == 0) {
54 occupancy_vs_ieta = hcalMEs[ih];
57 if (useAllHistos != 0 && useAllHistos != 3)
62 std::cout <<
"nevent : " << nevent << std::endl;
68 float fev = float(nevent);
70 for (
int i = 1;
i <= nx;
i++) {
85 for (
int i = 1;
i <= nx;
i++) {
88 for (
int j = 1;
j <= ny;
j++) {
92 if (cnorm > 0.000001 && useAllHistos) {
93 cont = mapEnergy_E->getBinContent(
i,
j) / cnorm;
94 conte = mapEnergy_E->getBinError(
i,
j) / cnorm;
95 mapEnergy_E->setBinContent(
i,
j, cont);
96 mapEnergy_E->setBinError(
i,
j, conte);
98 cont = mapEnergy_H->getBinContent(
i,
j) / cnorm;
99 conte = mapEnergy_H->getBinError(
i,
j) / cnorm;
100 mapEnergy_H->setBinContent(
i,
j, cont);
101 mapEnergy_H->setBinError(
i,
j, conte);
103 cont = mapEnergy_EH->getBinContent(
i,
j) / cnorm;
104 conte = mapEnergy_EH->getBinError(
i,
j) / cnorm;
105 mapEnergy_EH->setBinContent(
i,
j, cont);
106 mapEnergy_EH->setBinError(
i,
j, conte);
112 if (fev > 0. && cnorm > 1.
e-30) {
126 if (ieta >= -20 && ieta <= 20) {
129 if (ieta >= 40 || ieta <= -40) {
135 cnorm = sumphi / phi_factor;
136 cnorme =
pow(sumphi, 0.5) / phi_factor;
137 if (fev > 0. && cnorm > 1.
e-30) {
138 occupancy_vs_ieta->setBinContent(
i, cnorm / fev);
139 occupancy_vs_ieta->setBinError(
i, cnorme / fev);
152 std::vector<MonitorElement *> hcalMEs;
157 std::vector<std::string> fullPathHLTFolders = igetter.
getSubdirs();
158 for (
unsigned int i = 0;
i < fullPathHLTFolders.size();
i++) {
160 std::cout <<
"\nfullPath: " << fullPathHLTFolders[
i] << std::endl;
163 std::vector<std::string> fullSubPathHLTFolders = igetter.
getSubdirs();
164 for (
unsigned int j = 0;
j < fullSubPathHLTFolders.size();
j++) {
166 std::cout <<
"fullSub: " << fullSubPathHLTFolders[
j] << std::endl;
168 if (strcmp(fullSubPathHLTFolders[
j].c_str(),
"CaloTowersD/CaloTowersTask") == 0) {
169 hcalMEs = igetter.
getContents(fullSubPathHLTFolders[
j]);
171 std::cout <<
"hltMES size : " << hcalMEs.size() << std::endl;
173 std::cout <<
"\nError in CaloTowersEndjob!" << std::endl << std::endl;
T getUntrackedParameter(std::string const &, T const &) const
int CaloTowersEndjob(const std::vector< MonitorElement * > &hcalMEs)
const edm::EventSetup & c
tuple cont
load Luminosity info ##
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setCurrentFolder(std::string const &fullpath)
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
#define DEFINE_FWK_MODULE(type)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getEntries() const
get # of entries
~CaloTowersDQMClient() override
virtual double getBinContent(int binx) const
get content of bin (1-D)
TString getName(TString structure, int layer, TString geometry)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
T getParameter(std::string const &) const
void beginJob(void) override
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
CaloTowersDQMClient(const edm::ParameterSet &)
Power< A, B >::type pow(const A &a, const B &b)