CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/CommonTools/RecoAlgos/src/PFClusterToRefCandidate.h

Go to the documentation of this file.
00001 #ifndef RecoAlgos_PFClusterToRefCandidate_h
00002 #define RecoAlgos_PFClusterToRefCandidate_h
00003 #include "CommonTools/RecoAlgos/src/MassiveCandidateConverter.h"
00004 #include "CommonTools/RecoAlgos/src/CandidateProducer.h"
00005 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00006 #include "DataFormats/ParticleFlowReco/interface/RecoPFClusterRefCandidate.h"
00007 #include "DataFormats/ParticleFlowReco/interface/RecoPFClusterRefCandidateFwd.h"
00008 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00009 
00010 namespace converter {
00011 
00012   struct PFClusterToRefCandidate : public MassiveCandidateConverter {
00013     typedef reco::PFCluster value_type;
00014     typedef reco::PFClusterCollection Components;
00015     typedef reco::RecoPFClusterRefCandidate Candidate;
00016     PFClusterToRefCandidate(const edm::ParameterSet & cfg) : 
00017       MassiveCandidateConverter(cfg) {
00018     }
00019     void convert(reco::PFClusterRef pfclusterRef, reco::RecoPFClusterRefCandidate & c) const {
00020       c = reco::RecoPFClusterRefCandidate( pfclusterRef, sqrt(massSqr_) );
00021     }  
00022   };
00023 
00024   namespace helper {
00025     template<>
00026     struct CandConverter<reco::PFCluster> { 
00027       typedef PFClusterToRefCandidate type;
00028     };
00029   }
00030 
00031 }
00032 
00033 #endif