1 |
csander |
1.1 |
// -*- C++ -*-
|
2 |
|
|
//
|
3 |
|
|
// Package: MCResolutions
|
4 |
|
|
// Class: MCResolutions
|
5 |
|
|
//
|
6 |
|
|
/**\class MCResolutions MCResolutions.cc JetResolutionFromMC/MCResolutions/src/MCResolutions.cc
|
7 |
|
|
|
8 |
|
|
Description: [one line class summary]
|
9 |
|
|
|
10 |
|
|
Implementation:
|
11 |
|
|
[Notes on implementation]
|
12 |
|
|
*/
|
13 |
|
|
//
|
14 |
|
|
// Original Author: Christian Sander,,,
|
15 |
|
|
// Created: Wed Oct 6 18:22:21 CEST 2010
|
16 |
|
|
// $Id$
|
17 |
|
|
//
|
18 |
|
|
//
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
// system include files
|
22 |
|
|
#include <memory>
|
23 |
|
|
|
24 |
|
|
// user include files
|
25 |
|
|
#include "FWCore/Framework/interface/Frameworkfwd.h"
|
26 |
|
|
#include "FWCore/Framework/interface/EDAnalyzer.h"
|
27 |
|
|
|
28 |
|
|
#include "FWCore/Framework/interface/Event.h"
|
29 |
|
|
#include "FWCore/Framework/interface/MakerMacros.h"
|
30 |
|
|
|
31 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
32 |
|
|
//
|
33 |
|
|
// class declaration
|
34 |
|
|
//
|
35 |
|
|
|
36 |
|
|
class MCResolutions : public edm::EDAnalyzer {
|
37 |
|
|
public:
|
38 |
|
|
explicit MCResolutions(const edm::ParameterSet&);
|
39 |
|
|
~MCResolutions();
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
private:
|
43 |
|
|
virtual void beginJob() ;
|
44 |
|
|
virtual void analyze(const edm::Event&, const edm::EventSetup&);
|
45 |
|
|
virtual void endJob() ;
|
46 |
|
|
|
47 |
|
|
// ----------member data ---------------------------
|
48 |
|
|
};
|
49 |
|
|
|
50 |
|
|
//
|
51 |
|
|
// constants, enums and typedefs
|
52 |
|
|
//
|
53 |
|
|
|
54 |
|
|
//
|
55 |
|
|
// static data member definitions
|
56 |
|
|
//
|
57 |
|
|
|
58 |
|
|
//
|
59 |
|
|
// constructors and destructor
|
60 |
|
|
//
|
61 |
|
|
MCResolutions::MCResolutions(const edm::ParameterSet& iConfig)
|
62 |
|
|
|
63 |
|
|
{
|
64 |
|
|
//now do what ever initialization is needed
|
65 |
|
|
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
MCResolutions::~MCResolutions()
|
70 |
|
|
{
|
71 |
|
|
|
72 |
|
|
// do anything here that needs to be done at desctruction time
|
73 |
|
|
// (e.g. close files, deallocate resources etc.)
|
74 |
|
|
|
75 |
|
|
}
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
//
|
79 |
|
|
// member functions
|
80 |
|
|
//
|
81 |
|
|
|
82 |
|
|
// ------------ method called to for each event ------------
|
83 |
|
|
void
|
84 |
|
|
MCResolutions::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
|
85 |
|
|
{
|
86 |
|
|
using namespace edm;
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
#ifdef THIS_IS_AN_EVENT_EXAMPLE
|
91 |
|
|
Handle<ExampleData> pIn;
|
92 |
|
|
iEvent.getByLabel("example",pIn);
|
93 |
|
|
#endif
|
94 |
|
|
|
95 |
|
|
#ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
|
96 |
|
|
ESHandle<SetupData> pSetup;
|
97 |
|
|
iSetup.get<SetupRecord>().get(pSetup);
|
98 |
|
|
#endif
|
99 |
|
|
}
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
// ------------ method called once each job just before starting event loop ------------
|
103 |
|
|
void
|
104 |
|
|
MCResolutions::beginJob()
|
105 |
|
|
{
|
106 |
|
|
}
|
107 |
|
|
|
108 |
|
|
// ------------ method called once each job just after ending the event loop ------------
|
109 |
|
|
void
|
110 |
|
|
MCResolutions::endJob() {
|
111 |
|
|
}
|
112 |
|
|
|
113 |
|
|
//define this as a plug-in
|
114 |
|
|
DEFINE_FWK_MODULE(MCResolutions);
|