CMS 3D CMS Logo

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:
14 
15 
16  typedef std::vector< edm::FwdPtr<reco::PFCandidate> > PFCollection;
17 
19 
21  checkClosestZVertex_(checkClosestZVertex), verbose_(verbose) {;}
22 
24 
25  // the last parameter is needed if you want to use the sourceCandidatePtr
26  void process(const PFCollection & pfCandidates,
28 
29  inline void setVerbose(bool verbose) { verbose_ = verbose; }
30 
32 
33  const PFCollection & getPFCandidatesFromPU() const {return pfCandidatesFromPU_;}
34 
35  const PFCollection & getPFCandidatesFromVtx() const {return pfCandidatesFromVtx_;}
36 
37  int chargedHadronVertex(const reco::VertexCollection& vertices,
38  const reco::PFCandidate& pfcand ) const;
39 
40 
41  private :
42 
45 
46 
48  bool verbose_;
49 
50  PFCollection pfCandidatesFromVtx_;
51  PFCollection pfCandidatesFromPU_;
52 
53 };
54 
55 #endif
const PFCollection & getPFCandidatesFromVtx() const
Definition: PFPileUpAlgo.h:35
bool verbose
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
PFCollection pfCandidatesFromVtx_
Definition: PFPileUpAlgo.h:50
void setCheckClosestZVertex(bool val)
Definition: PFPileUpAlgo.h:31
bool verbose_
verbose ?
Definition: PFPileUpAlgo.h:48
PFPileUpAlgo(bool checkClosestZVertex, bool verbose=false)
Definition: PFPileUpAlgo.h:20
PFCollection pfCandidatesFromPU_
Definition: PFPileUpAlgo.h:51
int chargedHadronVertex(const reco::VertexCollection &vertices, const reco::PFCandidate &pfcand) const
Definition: PFPileUpAlgo.cc:43
bool checkClosestZVertex_
use the closest z vertex if a track is not in a vertex
Definition: PFPileUpAlgo.h:44
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCollection
Definition: PFPileUpAlgo.h:16
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
void process(const PFCollection &pfCandidates, const reco::VertexCollection &vertices)
Definition: PFPileUpAlgo.cc:5
const PFCollection & getPFCandidatesFromPU() const
Definition: PFPileUpAlgo.h:33
void setVerbose(bool verbose)
Definition: PFPileUpAlgo.h:29