CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MatchMETBenchmarkAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
11 using namespace reco;
12 using namespace edm;
13 using namespace std;
14 
16  BenchmarkAnalyzer(parameterSet),
17  MatchMETBenchmark( (Benchmark::Mode) parameterSet.getParameter<int>("mode") )
18 {
19  matchedInputLabel_=parameterSet.getParameter<edm::InputTag>("MatchCollection");
20 // setRange( parameterSet.getParameter<double>("ptMin"),
21 // parameterSet.getParameter<double>("ptMax"),
22 // -0.1, 0.1, // range in eta for MET.
23 // parameterSet.getParameter<double>("phiMin"),
24 // parameterSet.getParameter<double>("phiMax") );
25 
26  myColl_ = consumes< View<MET> >(inputLabel_);
27  myMatchColl_ = consumes< View<MET> >(matchedInputLabel_);
28 }
29 
30 void
32 {
33 
35  setup();
36 }
37 
38 void
40  const edm::EventSetup& iSetup) {
41 
42 
44  iEvent.getByToken(myColl_, collection);
45 
46  Handle< View<MET> > matchedCollection;
47  iEvent.getByToken(myMatchColl_, matchedCollection);
48 
49  fillOne( (*collection)[0] , (*matchedCollection)[0]);
50 }
51 
53 }
T getParameter(std::string const &) const
void analyze(const edm::Event &, const edm::EventSetup &)
virtual void beginJob()=0
edm::EDGetTokenT< edm::View< reco::MET > > myColl_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void setup()
book histograms
abstract base class
Definition: Benchmark.h:21
void fillOne(const reco::MET &candidate, const reco::MET &matchedCandidate)
fill histograms with a given particle
edm::InputTag inputLabel_
input collection
edm::EDGetTokenT< edm::View< reco::MET > > myMatchColl_
int iEvent
Definition: GenABIO.cc:243
MatchMETBenchmarkAnalyzer(const edm::ParameterSet &parameterSet)
abtract base class for benchmark analyzers
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11