src
CommonTools
ParticleFlow
interface
GenericPFJetSelectorDefinition.h
Go to the documentation of this file.
1
#ifndef CommonTools_ParticleFlow_GenericPFJetSelectorDefinition
2
#define CommonTools_ParticleFlow_GenericPFJetSelectorDefinition
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
#include "
DataFormats/JetReco/interface/PFJet.h
"
8
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
9
#include "
CommonTools/ParticleFlow/interface/PFJetSelectorDefinition.h
"
10
#include "
CommonTools/Utils/interface/StringCutObjectSelector.h
"
11
12
namespace
pf2pat
{
13
14
struct
GenericPFJetSelectorDefinition
:
public
PFJetSelectorDefinition
{
15
GenericPFJetSelectorDefinition
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&& iC)
16
:
selector_
(
cfg
.getParameter<
std
::
string
>(
"cut"
)) {}
17
18
void
select
(
const
HandleToCollection
& hc,
const
edm::Event
&
e
,
const
edm::EventSetup
&
s
) {
19
selected_
.clear();
20
21
unsigned
key
= 0;
22
for
(collection::const_iterator pfc = hc->begin(); pfc != hc->end(); ++pfc, ++
key
) {
23
if
(
selector_
(*pfc)) {
24
selected_
.push_back(
reco::PFJet
(*pfc));
25
reco::CandidatePtr
ptrToMother(hc,
key
);
26
selected_
.back().setSourceCandidatePtr(ptrToMother);
27
}
28
}
29
}
30
31
private
:
32
StringCutObjectSelector<reco::PFJet>
selector_
;
33
};
34
}
// namespace pf2pat
35
36
#endif
pf2pat::GenericPFJetSelectorDefinition::GenericPFJetSelectorDefinition
GenericPFJetSelectorDefinition(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition:
GenericPFJetSelectorDefinition.h:15
PFJetSelectorDefinition.h
Event.h
StringCutObjectSelector< reco::PFJet >
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
edm::Handle
Definition:
AssociativeIterator.h:50
std
Definition:
JetResolutionObject.h:76
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
reco::PFJet
Jets made from PFObjects.
Definition:
PFJet.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ParameterSet.h
pf2pat::GenericPFJetSelectorDefinition::select
void select(const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s)
Definition:
GenericPFJetSelectorDefinition.h:18
StringCutObjectSelector.h
pf2pat::GenericPFJetSelectorDefinition
Definition:
GenericPFJetSelectorDefinition.h:14
submitPVResolutionJobs.key
key
prepare the HTCondor submission files and eventually submit them
Definition:
submitPVResolutionJobs.py:398
edm::EventSetup
Definition:
EventSetup.h:56
edm::Ptr< Candidate >
looper.cfg
cfg
Definition:
looper.py:296
pf2pat::PFJetSelectorDefinition
Definition:
PFJetSelectorDefinition.h:10
pf2pat::GenericPFJetSelectorDefinition::selector_
StringCutObjectSelector< reco::PFJet > selector_
Definition:
GenericPFJetSelectorDefinition.h:32
pf2pat
Definition:
ElectronIDPFCandidateSelectorDefinition.h:22
pf2pat::PFJetSelectorDefinition::selected_
container selected_
Definition:
PFJetSelectorDefinition.h:33
edm::ParameterSet
Definition:
ParameterSet.h:48
edm::Event
Definition:
Event.h:73
PFCandidateFwd.h
PFJet.h
ConsumesCollector.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.14