93 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
94 <<
"DTChamberEfficiencyClient: endRun";
99 for(
int wheel=-2;wheel<=2;wheel++){
100 stringstream wheel_str; wheel_str << wheel;
104 MonitorElement* MECountAll =
dbe->
get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_All_W" + wheel_str.str());
105 MonitorElement* MECountQual =
dbe->
get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_Qual_W" + wheel_str.str());
106 MonitorElement* MEExtrap =
dbe->
get(
"DT/05-ChamberEff/Task/hExtrapSectVsChamb_W" + wheel_str.str());
109 if(!MECountAll)
cout<<
"fucking ME is null"<<endl;
110 if(!(MECountAll->
getTH2F()))
cout<<
"fucking puntator is null!"<<endl;
111 TH2F* hCountAll = MECountAll->
getTH2F();
112 TH2F* hCountQual = MECountQual->
getTH2F();
113 TH2F* hExtrap = MEExtrap->
getTH2F();
120 for(
int j=1;
j<=nBinX;
j++){
121 for(
int k=1;
k<=nBinY;
k++){
125 const float numerAll = hCountAll->GetBinContent(
j,
k);
126 const float numerQual = hCountQual->GetBinContent(
j,
k);
127 const float denom = hExtrap->GetBinContent(
j,
k);
130 const float effAll= numerAll/denom;
131 const float eff_error_All =
sqrt((effAll+effAll*effAll)/denom);
133 const float effQual= numerQual/denom;
134 const float eff_error_Qual =
sqrt((effQual+effQual*effQual)/denom);
155 for(
int wheel=-2; wheel<=2; wheel++) {
158 if(segmentWheelSummary != 0) {
160 for(
int sector=1; sector<=12; sector++) {
161 float nFailingChambers = 0.;
164 double errorsum = 0.;
173 if(tmpefficiency < 0.2 || tmpvariance == 0){
178 meaneff += tmpefficiency/tmpvariance;
179 errorsum += 1./tmpvariance;
181 LogTrace(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
182 <<
"Wheel: " << wheel <<
" Stat: " <<
station
183 <<
" Sect: " << sector <<
" status: " << meaneff/errorsum << endl;
186 if(sector == 4 || sector == 10) {
187 int whichSector = (sector == 4) ? 13 : 14;
189 const double tmpefficiency = segmentWheelSummary->
getBinContent(whichSector, 4);
190 const double tmpvariance =
pow(segmentWheelSummary->
getBinError(whichSector, 4),2);
192 if(tmpefficiency > 0.2 && tmpvariance != 0) {
193 meaneff += tmpefficiency/tmpvariance;
194 errorsum += 1./tmpvariance;
196 else nFailingChambers++;
200 double eff_result = 0;
201 if(errorsum != 0) eff_result = meaneff/errorsum;
203 if(nFailingChambers != 0) {
204 if(sector != 4 && sector != 10) eff_result = eff_result*(4.-nFailingChambers)/4.;
205 else eff_result = eff_result*(5.-nFailingChambers)/5.;
void setBinContent(int binx, double content)
set content of bin (1-D)
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::map< int, MonitorElement * > EffDistrPerWh
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
MonitorElement * summaryHistos[5][2]
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * globalEffSummary
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * globalEffDistr
Power< A, B >::type pow(const A &a, const B &b)