Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
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 "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
8
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
9
#include "
CommonTools/ParticleFlow/interface/PFCandidateSelectorDefinition.h
"
10
11
namespace
pf2pat {
12
13
class
PtMinPFCandidateSelectorDefinition
:
public
PFCandidateSelectorDefinition
{
14
public
:
15
PtMinPFCandidateSelectorDefinition
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&& iC)
16
:
ptMin_
(cfg.getParameter<double>(
"ptMin"
)) {}
17
18
void
select
(
const
HandleToCollection
& hc,
const
edm::EventBase
&
e
,
const
edm::EventSetup
&
s
) {
19
selected_
.clear();
20
21
assert
(hc.
isValid
());
22
23
unsigned
key
= 0;
24
for
(collection::const_iterator pfc = hc->begin(); pfc != hc->end(); ++pfc, ++
key
) {
25
if
(pfc->pt() >
ptMin_
) {
26
selected_
.push_back(
reco::PFCandidate
(*pfc));
27
reco::PFCandidatePtr
ptrToMother(hc, key);
28
selected_
.back().setSourceCandidatePtr(ptrToMother);
29
}
30
}
31
}
32
33
/* const container& selected() const {return selected_;} */
34
35
private
:
36
double
ptMin_
;
37
};
38
39
}
// namespace pf2pat
40
41
#endif
pf2pat::PtMinPFCandidateSelectorDefinition::select
void select(const HandleToCollection &hc, const edm::EventBase &e, const edm::EventSetup &s)
Definition:
PtMinPFCandidateSelectorDefinition.h:18
looper.cfg
tuple cfg
Definition:
looper.py:296
Event.h
edm::Handle
Definition:
AssociativeIterator.h:50
pf2pat::PtMinPFCandidateSelectorDefinition::ptMin_
double ptMin_
Definition:
PtMinPFCandidateSelectorDefinition.h:36
cms::cuda::assert
assert(be >=bs)
ParameterSet.h
PFCandidateSelectorDefinition.h
submitPVResolutionJobs.key
tuple key
prepare the HTCondor submission files and eventually submit them
Definition:
submitPVResolutionJobs.py:398
edm::EventSetup
Definition:
EventSetup.h:59
edm::Ptr< PFCandidate >
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:70
edm::EventBase
Definition:
EventBase.h:46
alignCSCRings.s
list s
Definition:
alignCSCRings.py:92
pf2pat::PFCandidateSelectorDefinition::selected_
container selected_
Definition:
PFCandidateSelectorDefinition.h:33
alignCSCRings.e
list e
Definition:
alignCSCRings.py:91
pf2pat::PtMinPFCandidateSelectorDefinition::PtMinPFCandidateSelectorDefinition
PtMinPFCandidateSelectorDefinition(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition:
PtMinPFCandidateSelectorDefinition.h:15
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition:
PFCandidate.h:41
pf2pat::PFCandidateSelectorDefinition
Definition:
PFCandidateSelectorDefinition.h:10
edm::ParameterSet
Definition:
ParameterSet.h:47
pf2pat::PtMinPFCandidateSelectorDefinition
Definition:
PtMinPFCandidateSelectorDefinition.h:13
PFCandidate.h
PFCandidateFwd.h
ConsumesCollector.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.5