Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
5
#include "
DataFormats/JetReco/interface/PFJet.h
"
6
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
7
#include "
CommonTools/ParticleFlow/interface/PFJetSelectorDefinition.h
"
8
#include "
CommonTools/Utils/interface/StringCutObjectSelector.h
"
9
10
namespace
pf2pat {
11
12
struct
GenericPFJetSelectorDefinition
:
public
PFJetSelectorDefinition
{
13
14
GenericPFJetSelectorDefinition
(
const
edm::ParameterSet
& cfg ) :
15
selector_
( cfg.getParameter< std::string >(
"cut"
) ) { }
16
17
void
select
(
const
HandleToCollection
& hc,
18
const
edm::Event
&
e
,
19
const
edm::EventSetup
&
s
) {
20
selected_
.clear();
21
22
unsigned
key
=0;
23
for
( collection::const_iterator pfc = hc->begin();
24
pfc != hc->end(); ++pfc, ++
key
) {
25
26
if
(
selector_
(*pfc) ) {
27
selected_
.push_back(
reco::PFJet
(*pfc) );
28
reco::CandidatePtr
ptrToMother( hc, key );
29
selected_
.back().setSourceCandidatePtr( ptrToMother );
30
31
}
32
}
33
}
34
35
private
:
36
StringCutObjectSelector<reco::PFJet>
selector_
;
37
};
38
}
39
40
#endif
PFJetSelectorDefinition.h
StringCutObjectSelector< reco::PFJet >
edm::Handle
Definition:
AssociativeIterator.h:48
reco::PFJet
Jets made from PFObjects.
Definition:
PFJet.h:22
edm::Ptr< Candidate >
pf2pat::GenericPFJetSelectorDefinition::select
void select(const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s)
Definition:
GenericPFJetSelectorDefinition.h:17
StringCutObjectSelector.h
pf2pat::GenericPFJetSelectorDefinition
Definition:
GenericPFJetSelectorDefinition.h:12
edm::EventSetup
Definition:
EventSetup.h:44
pf2pat::PFJetSelectorDefinition
Definition:
PFJetSelectorDefinition.h:11
pf2pat::GenericPFJetSelectorDefinition::selector_
StringCutObjectSelector< reco::PFJet > selector_
Definition:
GenericPFJetSelectorDefinition.h:36
pf2pat::PFJetSelectorDefinition::selected_
container selected_
Definition:
PFJetSelectorDefinition.h:35
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
combine.key
list key
Definition:
combine.py:13
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:50
PFCandidateFwd.h
PFJet.h
pf2pat::GenericPFJetSelectorDefinition::GenericPFJetSelectorDefinition
GenericPFJetSelectorDefinition(const edm::ParameterSet &cfg)
Definition:
GenericPFJetSelectorDefinition.h:14
Generated for CMSSW Reference Manual by
1.8.5