Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:50:56

0001 //
0002 //
0003 
0004 #ifndef DataFormats_PatCandidates_PFParticle_h
0005 #define DataFormats_PatCandidates_PFParticle_h
0006 
0007 /**
0008   \class    pat::PFParticle PFParticle.h "DataFormats/PatCandidates/interface/PFParticle.h"
0009   \brief    Analysis-level class for reconstructed particles
0010 
0011    PFParticle is the equivalent of reco::PFCandidate in the PAT namespace, 
0012    to be used in the analysis. All the PFCandidates that are not used as 
0013    isolated leptons or photons, or inside jets, end up as pat::PFParticles.
0014 
0015   \author   Colin Bernet
0016 */
0017 
0018 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0019 #include "DataFormats/PatCandidates/interface/PATObject.h"
0020 
0021 // Define typedefs for convenience
0022 namespace pat {
0023   class PFParticle;
0024   typedef std::vector<PFParticle> PFParticleCollection;
0025   typedef edm::Ref<PFParticleCollection> PFParticleRef;
0026   typedef edm::RefVector<PFParticleCollection> PFParticleRefVector;
0027 }  // namespace pat
0028 
0029 // Class definition
0030 namespace pat {
0031 
0032   class PFParticle : public PATObject<reco::PFCandidate> {
0033   public:
0034     /// default constructor
0035     PFParticle() {}
0036     /// constructor from ref
0037     PFParticle(const edm::RefToBase<reco::PFCandidate>& aPFParticle);
0038     /// destructor
0039     ~PFParticle() override {}
0040 
0041     /// required reimplementation of the Candidate's clone method
0042     PFParticle* clone() const override { return new PFParticle(*this); }
0043   };
0044 
0045 }  // namespace pat
0046 
0047 #endif