CMS 3D CMS Logo

GenMETProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: METProducers
4 // Class: GenMETProducer
5 //
6 //
7 
8 //____________________________________________________________________________||
10 
12 
14 
16 
20 
22 
23 #include <cstring>
24 
25 //____________________________________________________________________________||
26 namespace cms {
27 
28  //____________________________________________________________________________||
30  : inputToken_(consumes<edm::View<reco::Candidate> >(iConfig.getParameter<edm::InputTag>("src"))),
31  globalThreshold_(iConfig.getParameter<double>("globalThreshold")),
32  onlyFiducial_(iConfig.getParameter<bool>("onlyFiducialParticles")),
33  applyFiducialThresholdForFractions_(iConfig.getParameter<bool>("applyFiducialThresholdForFractions")),
34  usePt_(iConfig.getParameter<bool>("usePt")) {
35  std::string alias = iConfig.exists("alias") ? iConfig.getParameter<std::string>("alias") : "";
36  produces<reco::GenMETCollection>().setBranchAlias(alias);
37  }
38 
39  //____________________________________________________________________________||
42  event.getByToken(inputToken_, input);
43 
44  CommonMETData commonMETdata;
45 
47  auto genmetcoll = std::make_unique<reco::GenMETCollection>();
48  genmetcoll->push_back(gen.addInfo(
50  event.put(std::move(genmetcoll));
51  }
52 
53  //____________________________________________________________________________||
55 } // namespace cms
56 
57 //____________________________________________________________________________||
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
GenMETProducer(const edm::ParameterSet &)
bool exists(std::string const &parameterName) const
checks if a parameter exists
static std::string const input
Definition: EdmProvDump.cc:50
bool applyFiducialThresholdForFractions_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
def gen(fragment, howMuch)
Production test section ####.
Namespace of DDCMS conversion namespace.
fixed size matrix
HLT enums.
void produce(edm::Event &, const edm::EventSetup &) override
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1