CMS 3D CMS Logo

PFClusterMETProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: METProducers
4 // Class: PFClusterMETProducer
5 //
6 //
7 
8 //____________________________________________________________________________||
10 
13 
15 
20 
22 
25 
26 #include <cstring>
27 
28 //____________________________________________________________________________||
29 namespace cms
30 {
31 
32 //____________________________________________________________________________||
34  : inputToken_(consumes<edm::View<reco::Candidate> >(iConfig.getParameter<edm::InputTag>("src")))
35  , globalThreshold_(iConfig.getParameter<double>("globalThreshold"))
36  {
37  std::string alias = iConfig.exists("alias") ? iConfig.getParameter<std::string>("alias") : "";
38  produces<reco::PFClusterMETCollection>().setBranchAlias(alias);
39  }
40 
41 
42 //____________________________________________________________________________||
44  {
46  event.getByToken(inputToken_, input);
47 
48  METAlgo algo;
49  CommonMETData commonMETdata = algo.run(*input.product(), globalThreshold_);
50 
51  PFClusterSpecificAlgo pfcluster;
52  auto pfclustermetcoll = std::make_unique<reco::PFClusterMETCollection>();
53 
54  pfclustermetcoll->push_back(pfcluster.addInfo(input, commonMETdata));
55  event.put(std::move(pfclustermetcoll));
56  }
57 
58 //____________________________________________________________________________||
60 }
61 
62 //____________________________________________________________________________||
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool exists(std::string const &parameterName) const
checks if a parameter exists
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
PFClusterMETProducer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
reco::PFClusterMET addInfo(edm::Handle< edm::View< reco::Candidate > > PFClusterCandidates, const CommonMETData &met)
static std::string const input
Definition: EdmProvDump.cc:44
CommonMETData run(const edm::View< reco::Candidate > &candidates, double globalThreshold=0.0)
Definition: METAlgo.cc:16
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
Namespace of DDCMS conversion namespace.
T const * product() const
Definition: Handle.h:81
fixed size matrix
HLT enums.
def move(src, dest)
Definition: eostools.py:510
Definition: event.py:1
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_