29 std::vector<MonitorElement*> hcalMEs;
33 std::vector<std::string> fullPathHLTFolders = igetter.
getSubdirs();
34 for (
unsigned int i = 0;
i < fullPathHLTFolders.size();
i++) {
36 std::cout <<
"\nfullPath: " << fullPathHLTFolders[
i] << std::endl;
39 std::vector<std::string> fullSubPathHLTFolders = igetter.
getSubdirs();
40 for (
unsigned int j = 0;
j < fullSubPathHLTFolders.size();
j++) {
42 std::cout <<
"fullSub: " << fullSubPathHLTFolders[
j] << std::endl;
44 if (strcmp(fullSubPathHLTFolders[
j].c_str(),
"CaloTowersV/CaloTowersTask") == 0) {
47 std::cout <<
"hltMES size : " << hcalMEs.size() << std::endl;
49 std::cout <<
"\nError in CaloTowersEndjob!" << std::endl << std::endl;
60 MonitorElement *mapEnergy_N =
nullptr, *mapEnergy_E =
nullptr, *mapEnergy_H =
nullptr, *mapEnergy_EH =
nullptr;
61 MonitorElement *occupancy_map =
nullptr, *occupancy_vs_ieta =
nullptr;
62 for (
unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
63 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"Ntowers_per_event_vs_ieta") == 0) {
64 Ntowers_vs_ieta = hcalMEs[ih];
66 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_Nentries") == 0) {
67 mapEnergy_N = hcalMEs[ih];
69 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_H") == 0) {
71 mapEnergy_H = hcalMEs[ih];
73 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_E") == 0) {
75 mapEnergy_E = hcalMEs[ih];
77 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_energy_EH") == 0) {
79 mapEnergy_EH = hcalMEs[ih];
81 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_map_occupancy") == 0) {
82 occupancy_map = hcalMEs[ih];
84 if (strcmp(hcalMEs[ih]->
getName().c_str(),
"CaloTowersTask_occupancy_vs_ieta") == 0) {
85 occupancy_vs_ieta = hcalMEs[ih];
88 if (useAllHistos != 0 && useAllHistos != 3)
93 std::cout <<
"nevent : " << nevent << std::endl;
99 float fev =
float(nevent);
101 for (
int i = 1;
i <= nx;
i++) {
116 for (
int i = 1;
i <= nx;
i++) {
120 for (
int j = 1;
j <= ny;
j++) {
124 if (cnorm > 0.000001 && useAllHistos) {
125 cont = mapEnergy_E->getBinContent(
i,
j) / cnorm;
126 econt = mapEnergy_E->getBinError(
i,
j) / cnorm;
127 mapEnergy_E->setBinContent(
i,
j, cont);
128 mapEnergy_E->setBinError(
i,
j, econt);
130 cont = mapEnergy_H->getBinContent(
i,
j) / cnorm;
131 econt = mapEnergy_H->getBinError(
i,
j) / cnorm;
132 mapEnergy_H->setBinContent(
i,
j, cont);
133 mapEnergy_H->setBinError(
i,
j, econt);
135 cont = mapEnergy_EH->getBinContent(
i,
j) / cnorm;
136 econt = mapEnergy_EH->getBinError(
i,
j) / cnorm;
137 mapEnergy_EH->setBinContent(
i,
j, cont);
138 mapEnergy_EH->setBinError(
i,
j, econt);
148 sumphie += enorm * enorm;
155 if (ieta >= -20 && ieta <= 20) {
158 if (ieta >= 40 || ieta <= -40) {
164 cnorm = sumphi / phi_factor;
165 enorm =
sqrt(sumphie) / phi_factor;
166 occupancy_vs_ieta->setBinContent(
i, cnorm);
167 occupancy_vs_ieta->setBinError(
i, enorm);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual int getNbinsY() const
get # of bins in Y-axis
std::vector< MonitorElement * > getContents(Args &&...args)
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
void beginJob(void) override
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
#define DEFINE_FWK_MODULE(type)
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getEntries() const
get # of entries
int CaloTowersEndjob(const std::vector< MonitorElement * > &hcalMEs)
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)
CaloTowersClient(const edm::ParameterSet &)
~CaloTowersClient() override
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
cont
load Luminosity info ##
void setCurrentFolder(std::string const &fullpath)
std::vector< std::string > getSubdirs()