CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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:
14  typedef std::vector<edm::FwdPtr<reco::PFCandidate> > PFCollection;
15 
17 
18  PFPileUpAlgo(bool checkClosestZVertex, bool verbose = false)
19  : checkClosestZVertex_(checkClosestZVertex), verbose_(verbose) {
20  ;
21  }
22 
23  ~PFPileUpAlgo() { ; }
24 
25  // the last parameter is needed if you want to use the sourceCandidatePtr
27 
28  inline void setVerbose(bool verbose) { verbose_ = verbose; }
29 
31 
33 
35 
37 
38 private:
41 
43  bool verbose_;
44 
47 };
48 
49 #endif
const PFCollection & getPFCandidatesFromVtx() const
Definition: PFPileUpAlgo.h:34
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCollection
Definition: PFPileUpAlgo.h:14
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
PFCollection pfCandidatesFromVtx_
Definition: PFPileUpAlgo.h:45
void setCheckClosestZVertex(bool val)
Definition: PFPileUpAlgo.h:30
static constexpr int verbose
bool verbose_
verbose ?
Definition: PFPileUpAlgo.h:43
PFPileUpAlgo(bool checkClosestZVertex, bool verbose=false)
Definition: PFPileUpAlgo.h:18
PFCollection pfCandidatesFromPU_
Definition: PFPileUpAlgo.h:46
int chargedHadronVertex(const reco::VertexCollection &vertices, const reco::PFCandidate &pfcand) const
Definition: PFPileUpAlgo.cc:38
bool checkClosestZVertex_
use the closest z vertex if a track is not in a vertex
Definition: PFPileUpAlgo.h:40
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
void process(const PFCollection &pfCandidates, const reco::VertexCollection &vertices)
Definition: PFPileUpAlgo.cc:6
const PFCollection & getPFCandidatesFromPU() const
Definition: PFPileUpAlgo.h:32
void setVerbose(bool verbose)
Definition: PFPileUpAlgo.h:28