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:
14 
15 
16  typedef std::vector< edm::FwdPtr<reco::PFCandidate> > PFCollection;
17 
19 
20  PFPileUpAlgo( bool checkClosestZVertex, bool verbose=false):
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 
31  inline void setCheckClosestZVertex(bool val) { checkClosestZVertex_ = val;}
32 
34 
36 
38  const reco::PFCandidate& pfcand ) const;
39 
40 
41  private :
42 
45 
46 
48  bool verbose_;
49 
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
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
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
volatile std::atomic< bool > shutdown_flag false
const PFCollection & getPFCandidatesFromPU() const
Definition: PFPileUpAlgo.h:33
void setVerbose(bool verbose)
Definition: PFPileUpAlgo.h:29