CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFPileUpAlgo.h
Go to the documentation of this file.
1 #ifndef CommonTools_PFCandProducer_PFPileUpAlgo_
2 #define CommonTools_PFCandProducer_PFPileUpAlgo_
3 
6 
8 
11 
12 class PFPileUpAlgo {
13  public:
15 
16  PFPileUpAlgo( bool checkClosestZVertex, bool verbose=false):
17  checkClosestZVertex_(checkClosestZVertex), verbose_(verbose) {;}
18 
20 
21  // the last parameter is needed if you want to use the sourceCandidatePtr
23  const reco::VertexCollection & vertices,
25 
26  inline void setVerbose(bool verbose) { verbose_ = verbose; }
27 
28  inline void setCheckClosestZVertex(bool val) { checkClosestZVertex_ = val;}
29 
31 
33 
34  int chargedHadronVertex(const reco::VertexCollection& vertices,
35  const reco::PFCandidate& pfcand ) const;
36 
37 
38  private :
39 
42 
43 
45  bool verbose_;
46 
49 
50 };
51 
52 #endif
const reco::PFCandidateCollection & getPFCandidatesFromPU() const
Definition: PFPileUpAlgo.h:30
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
reco::PFCandidateCollection pfCandidatesFromVtx_
Definition: PFPileUpAlgo.h:47
reco::PFCandidateCollection pfCandidatesFromPU_
Definition: PFPileUpAlgo.h:48
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
void setCheckClosestZVertex(bool val)
Definition: PFPileUpAlgo.h:28
bool verbose_
verbose ?
Definition: PFPileUpAlgo.h:45
tuple handle
Definition: patZpeak.py:22
PFPileUpAlgo(bool checkClosestZVertex, bool verbose=false)
Definition: PFPileUpAlgo.h:16
const reco::PFCandidateCollection & getPFCandidatesFromVtx() const
Definition: PFPileUpAlgo.h:32
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
int chargedHadronVertex(const reco::VertexCollection &vertices, const reco::PFCandidate &pfcand) const
Definition: PFPileUpAlgo.cc:44
bool checkClosestZVertex_
use the closest z vertex if a track is not in a vertex
Definition: PFPileUpAlgo.h:41
void process(const reco::PFCandidateCollection &pfCandidates, const reco::VertexCollection &vertices, const edm::Handle< reco::PFCandidateCollection > *handle=0)
Definition: PFPileUpAlgo.cc:5
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:33
void setVerbose(bool verbose)
Definition: PFPileUpAlgo.h:26