RecoMET
METProducers
src
PFClusterMETProducer.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: METProducers
4
// Class: PFClusterMETProducer
5
//
6
//
7
8
//____________________________________________________________________________||
9
#include "
RecoMET/METProducers/interface/PFClusterMETProducer.h
"
10
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
13
14
#include "
FWCore/Utilities/interface/InputTag.h
"
15
16
#include "
DataFormats/Common/interface/Handle.h
"
17
#include "
DataFormats/METReco/interface/METFwd.h
"
18
#include "
DataFormats/METReco/interface/PFClusterMETFwd.h
"
19
#include "
DataFormats/METReco/interface/CommonMETData.h
"
20
21
#include "
DataFormats/ParticleFlowReco/interface/PFClusterFwd.h
"
22
23
#include "
RecoMET/METAlgorithms/interface/METAlgo.h
"
24
#include "
RecoMET/METAlgorithms/interface/PFClusterSpecificAlgo.h
"
25
26
#include <cstring>
27
28
//____________________________________________________________________________||
29
namespace
cms
{
30
31
//____________________________________________________________________________||
32
PFClusterMETProducer::PFClusterMETProducer
(
const
edm::ParameterSet
& iConfig)
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
//____________________________________________________________________________||
40
void
PFClusterMETProducer::produce
(
edm::Event
&
event
,
const
edm::EventSetup
&
setup
) {
41
edm::Handle<edm::View<reco::Candidate>
>
input
;
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
//____________________________________________________________________________||
55
DEFINE_FWK_MODULE
(
PFClusterMETProducer
);
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:89285
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:165
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 ¶meterName) 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:58
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
Generated for CMSSW Reference Manual by
1.8.16