CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
PFJetBenchmarkAnalyzer Class Reference

#include <PFJetBenchmarkAnalyzer.cc>

Inheritance diagram for PFJetBenchmarkAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 PFJetBenchmarkAnalyzer (const edm::ParameterSet &)
 
 ~PFJetBenchmarkAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

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

Implementation:

Definition at line 51 of file PFJetBenchmarkAnalyzer.cc.

Constructor & Destructor Documentation

PFJetBenchmarkAnalyzer::PFJetBenchmarkAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 90 of file PFJetBenchmarkAnalyzer.cc.

References benchmarkLabel_, dbe_, deltaRMax, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), maxEta, onlyTwoJets, cppFunctionSkipper::operator, outjetfilename, pfjBenchmarkDebug, PFJetBenchmark_, plotAgainstReco, recPt, PFJetBenchmark::setup(), sGenJetAlgo, and sJetAlgo.

92 {
93  //now do what ever initialization is needed
94  sGenJetAlgo =
95  iConfig.getParameter<InputTag>("InputTruthLabel");
96  sJetAlgo =
97  iConfig.getParameter<InputTag>("InputRecoLabel");
99  iConfig.getUntrackedParameter<string>("OutputFile");
101  iConfig.getParameter<bool>("pfjBenchmarkDebug");
102  plotAgainstReco =
103  iConfig.getParameter<bool>("PlotAgainstRecoQuantities");
104  onlyTwoJets =
105  iConfig.getParameter<bool>("OnlyTwoJets");
106  deltaRMax =
107  iConfig.getParameter<double>("deltaRMax");
108  benchmarkLabel_ =
109  iConfig.getParameter<string>("BenchmarkLabel");
110  recPt =
111  iConfig.getParameter<double>("recPt");
112  maxEta =
113  iConfig.getParameter<double>("maxEta");
114 
116 
121  onlyTwoJets,
122  deltaRMax,
124  recPt,
125  maxEta,
126  dbe_);
127 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool onlyTwoJets
double deltaRMax
PFJetBenchmark PFJetBenchmark_
PFJet Benchmark.
double maxEta
string outjetfilename
void setup(std::string Filename, bool debug, bool plotAgainstReco=0, bool onlyTwoJets=1, double deltaRMax=0.1, std::string benchmarkLabel_="ParticleFlow", double recPt=-1, double maxEta=-1, DQMStore *dbe_store=NULL)
string benchmarkLabel_
DQMStore * dbe_
bool plotAgainstReco
InputTag sJetAlgo
bool pfjBenchmarkDebug
InputTag sGenJetAlgo
double recPt
PFJetBenchmarkAnalyzer::~PFJetBenchmarkAnalyzer ( )

Definition at line 130 of file PFJetBenchmarkAnalyzer.cc.

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

Member Function Documentation

void PFJetBenchmarkAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 143 of file PFJetBenchmarkAnalyzer.cc.

References gather_cfg::cout, edm::Event::getByLabel(), PFJetBenchmark_, PFJetBenchmark::process(), sGenJetAlgo, and sJetAlgo.

145 {
146  // get gen jet collection
147  Handle<GenJetCollection> genjets;
148  bool isGen = iEvent.getByLabel(sGenJetAlgo, genjets);
149  if (!isGen) {
150  std::cout << "Warning : no Gen jets in input !" << std::endl;
151  return;
152  }
153 
154  // get rec PFJet collection
156  bool isReco = iEvent.getByLabel(sJetAlgo, pfjets);
157  if (!isReco) {
158  std::cout << "Warning : no PF jets in input !" << std::endl;
159  return;
160  }
161  // Analyse (no "z" in "analyse" : we are in Europe, dammit!)
162  PFJetBenchmark_.process(*pfjets, *genjets);
163 }
PFJetBenchmark PFJetBenchmark_
PFJet Benchmark.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void process(const reco::PFJetCollection &, const reco::GenJetCollection &)
InputTag sJetAlgo
InputTag sGenJetAlgo
tuple cout
Definition: gather_cfg.py:121
void PFJetBenchmarkAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 168 of file PFJetBenchmarkAnalyzer.cc.

169 {
170 
171 }
void PFJetBenchmarkAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 175 of file PFJetBenchmarkAnalyzer.cc.

References PFJetBenchmark_, and PFJetBenchmark::write().

175  {
176 // PFJetBenchmark_.save();
178 }
PFJetBenchmark PFJetBenchmark_
PFJet Benchmark.