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];
103 for (
int i = 1;
i <= nx;
i++) {
118 for (
int i = 1;
i <= nx;
i++) {
122 for (
int j = 1;
j <= ny;
j++) {
127 cont = mapEnergy_E->getBinContent(
i,
j) / cnorm;
128 econt = mapEnergy_E->getBinError(
i,
j) / cnorm;
129 mapEnergy_E->setBinContent(
i,
j,
cont);
130 mapEnergy_E->setBinError(
i,
j, econt);
132 cont = mapEnergy_H->getBinContent(
i,
j) / cnorm;
133 econt = mapEnergy_H->getBinError(
i,
j) / cnorm;
134 mapEnergy_H->setBinContent(
i,
j,
cont);
135 mapEnergy_H->setBinError(
i,
j, econt);
137 cont = mapEnergy_EH->getBinContent(
i,
j) / cnorm;
138 econt = mapEnergy_EH->getBinError(
i,
j) / cnorm;
139 mapEnergy_EH->setBinContent(
i,
j,
cont);
140 mapEnergy_EH->setBinError(
i,
j, econt);
151 sumphie += enorm * enorm;
167 cnorm = sumphi / phi_factor;
168 enorm =
sqrt(sumphie) / phi_factor;
169 assert(occupancy_vs_ieta);
170 occupancy_vs_ieta->setBinContent(
i, cnorm);
171 occupancy_vs_ieta->setBinError(
i, enorm);
T getParameter(std::string const &) const
virtual void setCurrentFolder(std::string const &fullpath)
void beginJob(void) override
T getUntrackedParameter(std::string const &, T const &) const
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
#define DEFINE_FWK_MODULE(type)
virtual double getEntries() const
get # of entries
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
CaloTowersClient(const edm::ParameterSet &)
~CaloTowersClient() override
std::string getName(const G4String &)
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
int CaloTowersEndjob(const std::vector< MonitorElement *> &hcalMEs)
cont
load Luminosity info ##
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const