47 MonitorElement* mapEnergy_N =0, *mapEnergy_E =0, *mapEnergy_H =0, *mapEnergy_EH =0;
49 for(
unsigned int ih=0; ih<hcalMEs.size(); ih++){
50 if( strcmp(hcalMEs[ih]->getName().c_str(),
"Ntowers_per_event_vs_ieta") ==0 ){
51 Ntowers_vs_ieta = hcalMEs[ih];
53 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_Nentries") ==0 ){
54 mapEnergy_N = hcalMEs[ih];
56 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_H") ==0 ){
57 useAllHistos++; mapEnergy_H = hcalMEs[ih];
59 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_E") ==0 ){
60 useAllHistos++; mapEnergy_E = hcalMEs[ih];
62 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_energy_EH") ==0 ){
63 useAllHistos++; mapEnergy_EH = hcalMEs[ih];
65 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_map_occupancy") ==0 ){
66 occupancy_map = hcalMEs[ih];
68 if( strcmp(hcalMEs[ih]->getName().c_str(),
"CaloTowersTask_occupancy_vs_ieta") ==0 ){
69 occupancy_vs_ieta = hcalMEs[ih];
73 if( useAllHistos !=0 && useAllHistos !=3 )
return 0;
81 float fev = float(nevent);
83 for (
int i = 1;
i <= nx;
i++) {
84 cont = Ntowers_vs_ieta -> getBinContent(
i) / fev ;
85 Ntowers_vs_ieta -> setBinContent(
i,cont);
95 for (
int i = 1;
i <= nx;
i++) {
98 for (
int j = 1;
j <= ny;
j++) {
101 cnorm = mapEnergy_N -> getBinContent(
i,
j);
103 if(cnorm > 0.000001 && useAllHistos) {
105 cont = mapEnergy_E -> getBinContent(
i,
j) / cnorm ;
106 mapEnergy_E -> setBinContent(
i,
j,cont);
108 cont = mapEnergy_H -> getBinContent(
i,
j) / cnorm ;
109 mapEnergy_H -> setBinContent(
i,
j,cont);
111 cont = mapEnergy_EH -> getBinContent(
i,
j) / cnorm ;
112 mapEnergy_EH -> setBinContent(
i,
j,cont);
116 cnorm = occupancy_map -> getBinContent(
i,
j) / fev;
117 if(cnorm > 1.
e-30) occupancy_map -> setBinContent(
i,
j,cnorm);
126 if(ieta >=0 ) ieta +=1;
128 if(ieta >= -20 && ieta <= 20 )
131 if(ieta >= 40 || ieta <= -40 ) {phi_factor = 18.;}
135 if(ieta >= 0) ieta -= 1;
137 cnorm = sumphi / phi_factor;
138 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