Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CommonTools
ParticleFlow
interface
PtMinPFCandidateSelectorDefinition.h
Go to the documentation of this file.
1
#ifndef CommonTools_ParticleFlow_PtMinPFCandidateSelectorDefinition
2
#define CommonTools_ParticleFlow_PtMinPFCandidateSelectorDefinition
3
4
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
5
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
6
#include "
CommonTools/ParticleFlow/interface/PFCandidateSelectorDefinition.h
"
7
8
namespace
pf2pat {
9
10
class
PtMinPFCandidateSelectorDefinition
:
public
PFCandidateSelectorDefinition
{
11
12
public
:
13
PtMinPFCandidateSelectorDefinition
(
const
edm::ParameterSet
& cfg ) :
14
ptMin_
( cfg.getParameter< double >(
"ptMin"
) ) { }
15
16
17
void
select
(
const
HandleToCollection
& hc,
18
const
edm::EventBase
&
e
,
19
const
edm::EventSetup
&
s
20
) {
21
selected_
.clear();
22
23
assert( hc.
isValid
() );
24
25
26
unsigned
key
=0;
27
for
( collection::const_iterator pfc = hc->begin();
28
pfc != hc->end(); ++pfc, ++
key
) {
29
30
if
( pfc->pt() >
ptMin_
) {
31
selected_
.push_back(
reco::PFCandidate
(*pfc) );
32
reco::PFCandidatePtr
ptrToMother( hc, key );
33
selected_
.back().setSourceCandidatePtr( ptrToMother );
34
35
}
36
}
37
}
38
39
/* const container& selected() const {return selected_;} */
40
41
private
:
42
double
ptMin_
;
43
};
44
45
}
46
47
#endif
pf2pat::PtMinPFCandidateSelectorDefinition::select
void select(const HandleToCollection &hc, const edm::EventBase &e, const edm::EventSetup &s)
Definition:
PtMinPFCandidateSelectorDefinition.h:17
pf2pat::PtMinPFCandidateSelectorDefinition::PtMinPFCandidateSelectorDefinition
PtMinPFCandidateSelectorDefinition(const edm::ParameterSet &cfg)
Definition:
PtMinPFCandidateSelectorDefinition.h:13
pf2pat::PtMinPFCandidateSelectorDefinition::ptMin_
double ptMin_
Definition:
PtMinPFCandidateSelectorDefinition.h:42
edm::Handle
Definition:
AssociativeIterator.h:48
edm::Ptr< PFCandidate >
PFCandidateSelectorDefinition.h
PFCandidate.h
edm::EventSetup
Definition:
EventSetup.h:44
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:76
edm::EventBase
Definition:
EventBase.h:45
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
pf2pat::PFCandidateSelectorDefinition::selected_
container selected_
Definition:
PFCandidateSelectorDefinition.h:35
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition:
PFCandidate.h:33
combine.key
list key
Definition:
combine.py:13
pf2pat::PFCandidateSelectorDefinition
Definition:
PFCandidateSelectorDefinition.h:11
edm::ParameterSet
Definition:
ParameterSet.h:35
pf2pat::PtMinPFCandidateSelectorDefinition
Definition:
PtMinPFCandidateSelectorDefinition.h:10
PFCandidateFwd.h
Generated for CMSSW Reference Manual by
1.8.5