CMS 3D CMS Logo

Public Member Functions | Private Member Functions

PFMETBenchmarkAnalyzer Class Reference

#include <PFMETBenchmarkAnalyzer.cc>

Inheritance diagram for PFMETBenchmarkAnalyzer:
edm::EDAnalyzer

List of all members.

Public Member Functions

 PFMETBenchmarkAnalyzer (const edm::ParameterSet &)
 ~PFMETBenchmarkAnalyzer ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void endJob ()

Detailed Description

Description: <one line="" class="" summary>="">

Implementation:

Definition at line 53 of file PFMETBenchmarkAnalyzer.cc.


Constructor & Destructor Documentation

PFMETBenchmarkAnalyzer::PFMETBenchmarkAnalyzer ( const edm::ParameterSet iConfig) [explicit]
PFMETBenchmarkAnalyzer::~PFMETBenchmarkAnalyzer ( )

Definition at line 121 of file PFMETBenchmarkAnalyzer.cc.

{
  // do anything here that needs to be done at desctruction time
  // (e.g. close files, deallocate resources etc.)
}

Member Function Documentation

void PFMETBenchmarkAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 134 of file PFMETBenchmarkAnalyzer.cc.

References gather_cfg::cout, edm::Event::getByLabel(), PFMETBenchmark_, PFMETBenchmark::process(), sInputCaloLabel, sInputRecoLabel, sInputTCLabel, and sInputTruthLabel.

{
 // get gen jet collection
  Handle<GenParticleCollection> genparticles;
  bool isGen = iEvent.getByLabel(sInputTruthLabel, genparticles);
  if (!isGen) { 
    std::cout << "Warning : no Gen Particles in input !" << std::endl;
    return;
  }

  // get rec PFMet collection
  Handle<PFMETCollection> pfmets;
  bool isReco = iEvent.getByLabel(sInputRecoLabel, pfmets);   
  if (!isReco) { 
    std::cout << "Warning : no PF MET in input !" << std::endl;
    return;
  }

  // get rec TCMet collection
  Handle<METCollection> tcmets;
  bool isTC = iEvent.getByLabel(sInputTCLabel, tcmets);   
  if (!isTC) { 
    std::cout << "Warning : no TC MET in input !" << std::endl;
    return;
  }

  Handle<CaloMETCollection> calomets;
  bool isCalo = iEvent.getByLabel(sInputCaloLabel, calomets);   
  if (!isCalo) { 
    std::cout << "Warning : no Calo MET in input !" << std::endl;
    return;
  }

  // Analyse (no "z" in "analyse" : we are in Europe, dammit!) 
  PFMETBenchmark_.process(*pfmets, *genparticles, *calomets, *tcmets);
}
void PFMETBenchmarkAnalyzer::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 174 of file PFMETBenchmarkAnalyzer.cc.

{

}
void PFMETBenchmarkAnalyzer::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 181 of file PFMETBenchmarkAnalyzer.cc.

References PFMETBenchmark::analyse(), PFMETBenchmark_, and PFMETBenchmark::write().

                               {
//  PFMETBenchmark_.save();
  PFMETBenchmark_.analyse();
  PFMETBenchmark_.write();
}