test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
METBenchmarkAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
11 
12 using namespace reco;
13 using namespace edm;
14 using namespace std;
15 
16 
17 
19  BenchmarkAnalyzer(parameterSet),
20  METBenchmark( (Benchmark::Mode) parameterSet.getParameter<int>("mode") )
21 {
22 
23  setRange( parameterSet.getParameter<double>("ptMin"),
24  parameterSet.getParameter<double>("ptMax"),
25  -0.1, 0.1, // range in eta for MET.
26  parameterSet.getParameter<double>("phiMin"),
27  parameterSet.getParameter<double>("phiMax") );
28 
29  myColl_ = consumes< View<MET> >(inputLabel_);
30 }
31 
32 
33 void
35 {
36 
38  setup();
39 }
40 
41 void
43  const edm::EventSetup& iSetup) {
44 
45 
47  iEvent.getByToken(myColl_, collection);
48 
49  fill( *collection );
50 }
51 
52 
54 }
T getParameter(std::string const &) const
virtual void beginJob()=0
METBenchmarkAnalyzer(const edm::ParameterSet &parameterSet)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
abstract base class
Definition: Benchmark.h:21
void setup()
book histograms
Definition: METBenchmark.cc:22
void fill(const C &candidates)
fill a collection
Definition: METBenchmark.h:41
edm::InputTag inputLabel_
input collection
void analyze(const edm::Event &, const edm::EventSetup &)
To plot MET quantities.
Definition: METBenchmark.h:9
int iEvent
Definition: GenABIO.cc:230
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:52
abtract base class for benchmark analyzers
edm::EDGetTokenT< edm::View< reco::MET > > myColl_
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11