CMS 3D CMS Logo

Public Member Functions | Protected Attributes

PFCandidateBenchmark Class Reference

#include <PFCandidateBenchmark.h>

Inheritance diagram for PFCandidateBenchmark:
Benchmark PFCandidateBenchmarkAnalyzer

List of all members.

Public Member Functions

void fill (const reco::PFCandidateCollection &pfCands)
void fillOne (const reco::PFCandidate &pfCand)
 fill histograms with a given particle
 PFCandidateBenchmark (Mode mode)
void setup ()
 book histograms
virtual ~PFCandidateBenchmark ()

Protected Attributes

TH1F * ecalEnergy_
TH1F * elementsInBlocksSize_
TH1F * hcalEnergy_
TH1F * mva_e_pi_
TH1F * particleId_

Detailed Description

To plot specific PFCandidate quantities the name of the histograms corresponds to the name of the PFCandidate accessors.

Definition at line 11 of file PFCandidateBenchmark.h.


Constructor & Destructor Documentation

PFCandidateBenchmark::PFCandidateBenchmark ( Mode  mode) [inline]

Definition at line 15 of file PFCandidateBenchmark.h.

PFCandidateBenchmark::~PFCandidateBenchmark ( ) [virtual]

Definition at line 18 of file PFCandidateBenchmark.cc.

{}

Member Function Documentation

void PFCandidateBenchmark::fill ( const reco::PFCandidateCollection pfCands)

Definition at line 50 of file PFCandidateBenchmark.cc.

References i.

Referenced by PFCandidateBenchmarkAnalyzer::analyze().

                                                                         {

  for(unsigned i=0; i<pfCands.size(); ++i) {
    fillOne(pfCands[i]);
  }
}
void PFCandidateBenchmark::fillOne ( const reco::PFCandidate pfCand)

fill histograms with a given particle

Definition at line 58 of file PFCandidateBenchmark.cc.

References reco::PFCandidate::ecalEnergy(), reco::PFCandidate::elementsInBlocks(), reco::LeafCandidate::eta(), reco::PFCandidate::hcalEnergy(), reco::PFCandidate::mva_e_pi(), reco::PFCandidate::particleId(), reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

Referenced by PFCandidateManager::fill().

                                                                  {

  if( !isInRange(pfCand.pt(), pfCand.eta(), pfCand.phi() ) ) return;

  particleId_->Fill( pfCand.particleId() );
  ecalEnergy_->Fill( pfCand.ecalEnergy() );
  hcalEnergy_->Fill( pfCand.hcalEnergy() );
  mva_e_pi_->Fill( pfCand.mva_e_pi() );
  elementsInBlocksSize_->Fill( pfCand.elementsInBlocks().size() );
}
void PFCandidateBenchmark::setup ( void  )

book histograms

Definition at line 21 of file PFCandidateBenchmark.cc.

References Benchmark::PhaseSpace::m, Benchmark::PhaseSpace::M, and Benchmark::PhaseSpace::n.

Referenced by PFCandidateBenchmarkAnalyzer::beginJob().

                                 {

  PhaseSpace ecalEnergyPS(100,0,100);
  PhaseSpace hcalEnergyPS(100,0,100);
  PhaseSpace mva_e_piPS(100,-1,1);
  switch(mode_) {
  case VALIDATION:
    break;
  case DQMOFFLINE:
  default:
    ecalEnergyPS.n = 50;
    hcalEnergyPS.n = 50;
    mva_e_piPS.n = 50;
    break;
    break;
  }

  particleId_ = book1D("particleId_", "particle ID", 7,1,8);
  ecalEnergy_ = book1D("ecalEnergy_", "ECAL energy, corrected;E_{ECAL} (GeV)",
                       ecalEnergyPS.n, ecalEnergyPS.m, ecalEnergyPS.M);
  hcalEnergy_ = book1D("hcalEnergy_", "HCAL energy, corrected;E_{HCAL} (GeV)",
                       ecalEnergyPS.n, ecalEnergyPS.m, ecalEnergyPS.M);
  mva_e_pi_ = book1D("mva_e_pi_", "e VS #pi MVA output;MVA", 
                     mva_e_piPS.n, mva_e_piPS.m, mva_e_piPS.M);
  elementsInBlocksSize_ = book1D("elementsInBlocksSize_", "number of elements used", 10, 0, 10);
}

Member Data Documentation

Definition at line 29 of file PFCandidateBenchmark.h.

Definition at line 32 of file PFCandidateBenchmark.h.

Definition at line 30 of file PFCandidateBenchmark.h.

Definition at line 31 of file PFCandidateBenchmark.h.

Definition at line 28 of file PFCandidateBenchmark.h.