110 int useAllHistos = 0;
112 MonitorElement* mapEnergy_N =0, *mapEnergy_E =0, *mapEnergy_H =0, *mapEnergy_EH =0;
114 for(
unsigned int ih=0; ih<hcalMEs.size(); ih++){
115 if( strcmp(hcalMEs[ih]->getName().c_str(),
"Ntowers_per_event_vs_ieta") ==0 ){
116 Ntowers_vs_ieta = hcalMEs[ih];
118 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_Nentries") ==0 ){
119 mapEnergy_N = hcalMEs[ih];
121 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_H") ==0 ){
122 useAllHistos++; mapEnergy_H = hcalMEs[ih];
124 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_E") ==0 ){
125 useAllHistos++; mapEnergy_E = hcalMEs[ih];
127 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_EH") ==0 ){
128 useAllHistos++; mapEnergy_EH = hcalMEs[ih];
130 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_occupancy") ==0 ){
131 occupancy_map = hcalMEs[ih];
133 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_occupancy_vs_ieta") ==0 ){
134 occupancy_vs_ieta = hcalMEs[ih];
138 if( useAllHistos !=0 && useAllHistos !=3 )
return 0;
146 float fev = float(nevent);
148 for (
int i = 1;
i <= nx;
i++) {
149 cont = Ntowers_vs_ieta -> getBinContent(
i) / fev ;
150 Ntowers_vs_ieta -> setBinContent(
i,cont);
160 for (
int i = 1;
i <= nx;
i++) {
163 for (
int j = 1;
j <= ny;
j++) {
166 cnorm = mapEnergy_N -> getBinContent(
i,
j);
168 if(cnorm > 0.000001 && useAllHistos) {
170 cont = mapEnergy_E -> getBinContent(
i,
j) / cnorm ;
171 mapEnergy_E -> setBinContent(
i,
j,cont);
173 cont = mapEnergy_H -> getBinContent(
i,
j) / cnorm ;
174 mapEnergy_H -> setBinContent(
i,
j,cont);
176 cont = mapEnergy_EH -> getBinContent(
i,
j) / cnorm ;
177 mapEnergy_EH -> setBinContent(
i,
j,cont);
181 cnorm = occupancy_map -> getBinContent(
i,
j) / fev;
182 if(cnorm > 1.
e-30) occupancy_map -> setBinContent(
i,
j,cnorm);
191 if(ieta >=0 ) ieta +=1;
193 if(ieta >= -20 && ieta <= 20 )
196 if(ieta >= 40 || ieta <= -40 ) {phi_factor = 18.;}
200 if(ieta >= 0) ieta -= 1;
202 cnorm = sumphi / phi_factor;
203 occupancy_vs_ieta->Fill(
double(ieta), cnorm);
double getEntries(void) const
get # of entries
int getNbinsY(void) const
get # of bins in Y-axis
int getNbinsX(void) const
get # of bins in X-axis