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  //____________________________________________________________________________||
33  : inputToken_(consumes<edm::View<reco::Candidate> >(iConfig.getParameter<edm::InputTag>("src"))),
34  globalThreshold_(iConfig.getParameter<double>("globalThreshold")) {
35  std::string alias = iConfig.exists("alias") ? iConfig.getParameter<std::string>("alias") : "";
36  produces<reco::PFClusterMETCollection>().setBranchAlias(alias);
37  }
38 
39  //____________________________________________________________________________||
42  event.getByToken(inputToken_, input);
43 
44  METAlgo algo;
45  CommonMETData commonMETdata = algo.run(*input.product(), globalThreshold_);
46 
47  PFClusterSpecificAlgo pfcluster;
48  auto pfclustermetcoll = std::make_unique<reco::PFClusterMETCollection>();
49 
50  pfclustermetcoll->push_back(pfcluster.addInfo(input, commonMETdata));
51  event.put(std::move(pfclustermetcoll));
52  }
53 
54  //____________________________________________________________________________||
56 } // namespace cms
57 
58 //____________________________________________________________________________||
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool exists(std::string const &parameterName) const
checks if a parameter exists
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:50
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
Namespace of DDCMS conversion namespace.
fixed size matrix
HLT enums.
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_