CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/PhysicsTools/PFCandProducer/interface/PFIsoDepositAlgo.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_PFCandProducer_PFIsoDepositAlgo_
00002 #define PhysicsTools_PFCandProducer_PFIsoDepositAlgo_
00003 
00004 // system include files
00005 #include <memory>
00006 #include <string>
00007 
00008 // user include files
00009 #include "FWCore/Framework/interface/Frameworkfwd.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 
00012 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00013 
00014 //not a fwd declaration, to save the pain to the user to include the necessary DF header as well
00015 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
00016 
00024 namespace pf2pat {
00025   
00026   class PFIsoDepositAlgo {
00027   public:
00028     
00029     // can be a template parameter (IsoDeposits from GenParticles? )
00030     typedef reco::PFCandidate   Particle;
00031     typedef std::vector< Particle > ParticleCollection;
00032     
00033     // random access to the IsoDeposit corresponding to a given particle
00034     typedef std::vector< reco::IsoDeposit > IsoDeposits;
00035 
00036     explicit PFIsoDepositAlgo(const edm::ParameterSet&);
00037 
00038     ~PFIsoDepositAlgo();
00039     
00044     const IsoDeposits&  produce(const ParticleCollection& toBeIsolated,
00045                                 const ParticleCollection& forIsolation );
00046     
00047   private:    
00048     
00050     reco::IsoDeposit buildIsoDeposit( const Particle& particle, 
00051                                       const ParticleCollection& forIsolation ) const; 
00052     
00054     bool sameParticle( const Particle& particle1,
00055                        const Particle& particle2 ) const;
00056 
00057     
00059     IsoDeposits  isoDeposits_;
00060 
00061     bool verbose_;
00062   };
00063 }
00064 
00065 #endif