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 //____________________________________________________________________________||
Handle.h
GenSpecificAlgo.h
electrons_cff.bool
bool
Definition: electrons_cff.py:393
input
static const std::string input
Definition: EdmProvDump.cc:48
cms::GenMETProducer::applyFiducialThresholdForFractions_
bool applyFiducialThresholdForFractions_
Definition: GenMETProducer.h:48
configurableAnalysis::Candidate
char Candidate[]
Definition: modules.cc:20
sistrip::View
View
Definition: ConstantsForView.h:26
edm
HLT enums.
Definition: AlignableModifier.h:19
cms::GenMETProducer::inputToken_
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
Definition: GenMETProducer.h:42
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
cms::GenMETProducer::usePt_
bool usePt_
Definition: GenMETProducer.h:50
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
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
GenMETFwd.h
gen
Definition: PythiaDecays.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cms::GenMETProducer::GenMETProducer
GenMETProducer(const edm::ParameterSet &)
Definition: GenMETProducer.cc:29
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
GenSpecificAlgo
Definition: GenSpecificAlgo.h:29
cms::GenMETProducer::onlyFiducial_
bool onlyFiducial_
Definition: GenMETProducer.h:46
cms::GenMETProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: GenMETProducer.cc:40
CommonMETData.h
edm::EventSetup
Definition: EventSetup.h:57
InputTag.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
GenMETProducer.h
cms::GenMETProducer
Definition: GenMETProducer.h:35
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
METFwd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
relval_steps.gen
def gen(fragment, howMuch)
Production test section ####.
Definition: relval_steps.py:509
ConsumesCollector.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
cms::GenMETProducer::globalThreshold_
double globalThreshold_
Definition: GenMETProducer.h:44