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 //____________________________________________________________________________||
PFClusterSpecificAlgo::addInfo
reco::PFClusterMET addInfo(edm::Handle< edm::View< reco::Candidate > > PFClusterCandidates, const CommonMETData &met)
Definition: PFClusterSpecificAlgo.cc:15
cms::PFClusterMETProducer
Definition: PFClusterMETProducer.h:33
METAlgo
Definition: METAlgo.h:29
Handle.h
input
static const std::string input
Definition: EdmProvDump.cc:48
configurableAnalysis::Candidate
char Candidate[]
Definition: modules.cc:20
sistrip::View
View
Definition: ConstantsForView.h:26
METAlgo.h
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
CommonMETData
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
cmsdt::algo
algo
Definition: constants.h:164
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PFClusterSpecificAlgo.h
cms::PFClusterMETProducer::inputToken_
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
Definition: PFClusterMETProducer.h:40
PFClusterMETProducer.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::ParameterSet
Definition: ParameterSet.h:47
cms::PFClusterMETProducer::globalThreshold_
double globalThreshold_
Definition: PFClusterMETProducer.h:42
cms::PFClusterMETProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: PFClusterMETProducer.cc:40
PFClusterFwd.h
CommonMETData.h
edm::EventSetup
Definition: EventSetup.h:57
InputTag.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
PFClusterSpecificAlgo
Definition: PFClusterSpecificAlgo.h:30
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
METFwd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFClusterMETFwd.h
ConsumesCollector.h
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
cms::PFClusterMETProducer::PFClusterMETProducer
PFClusterMETProducer(const edm::ParameterSet &)
Definition: PFClusterMETProducer.cc:32
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21