40 std::vector<MonitorElement*> hcalMEs;
44 std::vector<std::string> fullPathHLTFolders = igetter.
getSubdirs();
45 for(
unsigned int i=0;
i<fullPathHLTFolders.size();
i++) {
50 std::vector<std::string> fullSubPathHLTFolders = igetter.
getSubdirs();
51 for(
unsigned int j=0;
j<fullSubPathHLTFolders.size();
j++) {
55 if( strcmp(fullSubPathHLTFolders[
j].c_str(),
"CaloTowersV/CaloTowersTask") ==0 ){
73 MonitorElement* mapEnergy_N =0, *mapEnergy_E =0, *mapEnergy_H =0, *mapEnergy_EH =0;
75 for(
unsigned int ih=0; ih<hcalMEs.size(); ih++){
76 if( strcmp(hcalMEs[ih]->getName().c_str(),
"Ntowers_per_event_vs_ieta") ==0 ){
77 Ntowers_vs_ieta = hcalMEs[ih];
79 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_Nentries") ==0 ){
80 mapEnergy_N = hcalMEs[ih];
82 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_H") ==0 ){
83 useAllHistos++; mapEnergy_H = hcalMEs[ih];
85 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_E") ==0 ){
86 useAllHistos++; mapEnergy_E = hcalMEs[ih];
88 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_EH") ==0 ){
89 useAllHistos++; mapEnergy_EH = hcalMEs[ih];
91 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_occupancy") ==0 ){
92 occupancy_map = hcalMEs[ih];
94 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_occupancy_vs_ieta") ==0 ){
95 occupancy_vs_ieta = hcalMEs[ih];
99 if( useAllHistos !=0 && useAllHistos !=3 )
return 0;
107 float fev = float(nevent);
109 for (
int i = 1;
i <= nx;
i++) {
110 cont = Ntowers_vs_ieta -> getBinContent(
i) / fev ;
111 Ntowers_vs_ieta -> setBinContent(
i,cont);
121 for (
int i = 1;
i <= nx;
i++) {
124 for (
int j = 1;
j <= ny;
j++) {
127 cnorm = mapEnergy_N -> getBinContent(
i,
j);
129 if(cnorm > 0.000001 && useAllHistos) {
131 cont = mapEnergy_E -> getBinContent(
i,
j) / cnorm ;
132 mapEnergy_E -> setBinContent(
i,
j,cont);
134 cont = mapEnergy_H -> getBinContent(
i,
j) / cnorm ;
135 mapEnergy_H -> setBinContent(
i,
j,cont);
137 cont = mapEnergy_EH -> getBinContent(
i,
j) / cnorm ;
138 mapEnergy_EH -> setBinContent(
i,
j,cont);
142 cnorm = occupancy_map -> getBinContent(
i,
j) / fev;
143 if(cnorm > 1.
e-30) occupancy_map -> setBinContent(
i,
j,cnorm);
152 if(ieta >=0 ) ieta +=1;
154 if(ieta >= -20 && ieta <= 20 )
157 if(ieta >= 40 || ieta <= -40 ) {phi_factor = 18.;}
161 if(ieta >= 0) ieta -= 1;
163 cnorm = sumphi / phi_factor;
164 occupancy_vs_ieta->Fill(
double(ieta), cnorm);
std::vector< MonitorElement * > getContents(Args &&...args)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void beginJob(void)
tuple cont
load Luminosity info ##
#define DEFINE_FWK_MODULE(type)
double getEntries(void) const
get # of entries
int getNbinsY(void) const
get # of bins in Y-axis
virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
int CaloTowersEndjob(const std::vector< MonitorElement * > &hcalMEs)
virtual ~CaloTowersClient()
std::vector< std::string > getSubdirs(void)
void setCurrentFolder(const std::string &fullpath)
CaloTowersClient(const edm::ParameterSet &)
int getNbinsX(void) const
get # of bins in X-axis