Skip to content

Commit

Permalink
Revert "Removed the histograms that only contained the counts of the …
Browse files Browse the repository at this point in the history
…other histograms"

This reverts commit 8ef4256.
  • Loading branch information
vanbesien committed Nov 7, 2014
1 parent 7ddfbc6 commit 5c915f0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
23 changes: 23 additions & 0 deletions DQMOffline/EGamma/plugins/PhotonAnalyzer.cc
Expand Up @@ -145,10 +145,33 @@ void PhotonAnalyzer::bookHistograms(DQMStore::IBooker & iBooker,
edm::Run const & /* iRun */,
edm::EventSetup const & /* iSetup */)
{
bookHistogramsForHistogramCounts(iBooker);

bookHistogramsEfficiency(iBooker);
bookHistogramsInvMass(iBooker);
bookHistogramsPhotons(iBooker);
bookHistogramsConversions(iBooker);

fillHistogramsForHistogramCounts(iBooker);
}

void PhotonAnalyzer::bookHistogramsForHistogramCounts(DQMStore::IBooker & iBooker)
{
iBooker.setCurrentFolder("Egamma/"+fName_+"/");
// Int values stored in MEs to keep track of how many histograms are in each folder
totalNumberOfHistos_efficiencyFolder = iBooker.bookInt("numberOfHistogramsInEfficiencyFolder");
totalNumberOfHistos_invMassFolder = iBooker.bookInt("numberOfHistogramsInInvMassFolder");
totalNumberOfHistos_photonsFolder = iBooker.bookInt("numberOfHistogramsInPhotonsFolder");
totalNumberOfHistos_conversionsFolder = iBooker.bookInt("numberOfHistogramsInConversionsFolder");
}

void PhotonAnalyzer::fillHistogramsForHistogramCounts(DQMStore::IBooker & iBooker)
{
iBooker.setCurrentFolder("Egamma/"+fName_+"/");
totalNumberOfHistos_efficiencyFolder->Fill(histo_index_efficiency_);
totalNumberOfHistos_invMassFolder->Fill(histo_index_invMass_);
totalNumberOfHistos_photonsFolder->Fill(histo_index_photons_);
totalNumberOfHistos_conversionsFolder->Fill(histo_index_conversions_);
}

void PhotonAnalyzer::bookHistogramsEfficiency(DQMStore::IBooker & iBooker)
Expand Down
6 changes: 5 additions & 1 deletion DQMOffline/EGamma/plugins/PhotonAnalyzer.h
Expand Up @@ -175,7 +175,6 @@ class PhotonAnalyzer : public DQMEDAnalyzer

std::stringstream currentFolder_;

// These indexes are used to count the different types of booked elements
int histo_index_photons_;
int histo_index_conversions_;
int histo_index_efficiency_;
Expand Down Expand Up @@ -262,6 +261,11 @@ class PhotonAnalyzer : public DQMEDAnalyzer
int reducedR9Bin_;
int reducedSumBin_;

MonitorElement* totalNumberOfHistos_efficiencyFolder;
MonitorElement* totalNumberOfHistos_invMassFolder;
MonitorElement* totalNumberOfHistos_photonsFolder;
MonitorElement* totalNumberOfHistos_conversionsFolder;

MonitorElement* h_nRecoVtx_;

MonitorElement* h_phoEta_Loose_;
Expand Down

0 comments on commit 5c915f0

Please sign in to comment.