Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64431
b: "refs/heads/CMSSW_7_1_X"
c: 81c7349
h: "refs/heads/CMSSW_7_1_X"
i:
  64429: 26ce5aa
  64427: 953e39c
  64423: b54213c
  64415: c11e529
v: v3
  • Loading branch information
Mario Pelliccioni committed Apr 7, 2009
1 parent 88cda40 commit 6701092
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 82f76fd1a3f5d9423d7c163d852a0c36647fc4ea
"refs/heads/CMSSW_7_1_X": 62864742873523a671ebe93fa08a71fa169970c6
"refs/heads/CMSSW_7_1_X": 81c7349de983258238d12e77bb92dc6b197dd582
41 changes: 32 additions & 9 deletions trunk/DQM/DTMonitorClient/src/DTChamberEfficiencyClient.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* See header file for a description of this class.
*
* $Date: 2008/12/15 10:38:39 $
* $Revision: 1.3 $
* $Date: 2009/03/27 14:46:12 $
* $Revision: 1.4 $
* \author M. Pelliccioni - INFN Torino
*/

Expand Down Expand Up @@ -108,8 +108,8 @@ void DTChamberEfficiencyClient::endLuminosityBlock(LuminosityBlock const& lumiSe
TH2F* hCountQual = MECountQual->getTH2F();
TH2F* hExtrap = MEExtrap->getTH2F();

int nBinX = summaryHistos[wheel+2][0]->getNbinsX();
int nBinY = summaryHistos[wheel+2][0]->getNbinsY();
const int nBinX = summaryHistos[wheel+2][0]->getNbinsX();
const int nBinY = summaryHistos[wheel+2][0]->getNbinsY();

for(int j=1;j<=nBinX;j++){
for(int k=1;k<=nBinY;k++){
Expand All @@ -127,6 +127,8 @@ void DTChamberEfficiencyClient::endLuminosityBlock(LuminosityBlock const& lumiSe
const float effQual= numerQual/denom;
const float eff_error_Qual = sqrt((effQual+effQual*effQual)/denom);

//if(wheel == 2 && k == 2 && j == 2) cout << "Eff ch " << effAll << " " << lumiSeg.id() << endl;

summaryHistos[wheel+2][0]->setBinContent(j,k,effAll);
summaryHistos[wheel+2][0]->setBinError(j,k,eff_error_All);

Expand All @@ -143,9 +145,9 @@ void DTChamberEfficiencyClient::endLuminosityBlock(LuminosityBlock const& lumiSe
// retrieve the chamber efficiency summary
MonitorElement * segmentWheelSummary = summaryHistos[wheel+2][0];
if(segmentWheelSummary != 0) {
float nFailingChambers = 0.;

for(int sector=1; sector<=12; sector++) { // loop over sectors
float nFailingChambers = 0.;

double meaneff = 0.;
double errorsum = 0.;
Expand All @@ -154,29 +156,50 @@ void DTChamberEfficiencyClient::endLuminosityBlock(LuminosityBlock const& lumiSe

const double tmpefficiency = segmentWheelSummary->getBinContent(sector, station);
const double tmpvariance = pow(segmentWheelSummary->getBinError(sector, station),2);

//if(wheel == 2 && sector == 9) cout << "ch " << station << " " << tmpefficiency << " " << tmpvariance << " " << lumiSeg.id() << endl;

if(tmpefficiency == 0 || tmpvariance == 0){
if(tmpefficiency < 0.2 || tmpvariance == 0){
nFailingChambers++;
continue;
}

meaneff += tmpefficiency/tmpvariance;
errorsum += 1./tmpvariance;

if(tmpefficiency < 0.2) nFailingChambers++;

LogTrace("DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
<< "Wheel: " << wheel << " Stat: " << station
<< " Sect: " << sector << " status: " << meaneff/errorsum << endl;
}

const double eff_result = meaneff/errorsum;
if(sector == 4 || sector == 10) {
int whichSector = (sector == 4) ? 13 : 14;

const double tmpefficiency = segmentWheelSummary->getBinContent(whichSector, 4);
const double tmpvariance = pow(segmentWheelSummary->getBinError(whichSector, 4),2);

if(tmpefficiency > 0.2 && tmpvariance != 0) {
meaneff += tmpefficiency/tmpvariance;
errorsum += 1./tmpvariance;
}
else nFailingChambers++;

}

double eff_result = meaneff/errorsum;
if(nFailingChambers != 0) {
if(sector != 4 && sector != 10) eff_result = eff_result*(4.-nFailingChambers)/4.;
else eff_result = eff_result*(5.-nFailingChambers)/5.;
}

if(eff_result > 0.7) globalEffSummary->Fill(sector,wheel,1.);
else if(eff_result < 0.7 && eff_result > 0.5) globalEffSummary->Fill(sector,wheel,0.6);
else if(eff_result < 0.5 && eff_result > 0.3) globalEffSummary->Fill(sector,wheel,0.4);
else if(eff_result < 0.3 && eff_result > 0.) globalEffSummary->Fill(sector,wheel,0.15);

//if(wheel == 2 && sector == 9) cout << "eff_result " << eff_result << endl;
//if(wheel == 2 && sector == 9) cout << "nfail " << nFailingChambers++ << endl;

}
}
}
Expand Down

0 comments on commit 6701092

Please sign in to comment.