Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-04 02:02:58

0001 #ifndef SimDataFormats_Associations_MuonToTrackingParticleAssociator_h
0002 #define SimDataFormats_Associations_MuonToTrackingParticleAssociator_h
0003 
0004 #include "DataFormats/Common/interface/Handle.h"
0005 #include "DataFormats/Common/interface/Ref.h"
0006 #include "DataFormats/MuonReco/interface/Muon.h"
0007 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0008 #include "SimDataFormats/Associations/interface/MuonToTrackingParticleAssociatorBaseImpl.h"
0009 #include "SimDataFormats/Associations/interface/MuonTrackType.h"
0010 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
0011 
0012 #include <memory>
0013 
0014 namespace reco {
0015   class MuonToTrackingParticleAssociator {
0016   public:
0017     MuonToTrackingParticleAssociator() = default;
0018     ~MuonToTrackingParticleAssociator() = default;
0019 #ifndef __GCCXML__
0020     MuonToTrackingParticleAssociator(std::unique_ptr<MuonToTrackingParticleAssociatorBaseImpl>);
0021 #endif
0022     MuonToTrackingParticleAssociator(MuonToTrackingParticleAssociator &&) = default;
0023     MuonToTrackingParticleAssociator &operator=(MuonToTrackingParticleAssociator &&) = default;
0024     MuonToTrackingParticleAssociator(const MuonToTrackingParticleAssociator &) = delete;
0025     MuonToTrackingParticleAssociator &operator=(const MuonToTrackingParticleAssociator &) = delete;
0026 
0027     void associateMuons(MuonToSimCollection &recoToSim,
0028                         SimToMuonCollection &simToReco,
0029                         const edm::RefToBaseVector<reco::Muon> &muons,
0030                         MuonTrackType type,
0031                         const edm::RefVector<TrackingParticleCollection> &tpColl) const {
0032       impl_->associateMuons(recoToSim, simToReco, muons, type, tpColl);
0033     }
0034     void associateMuons(MuonToSimCollection &recoToSim,
0035                         SimToMuonCollection &simToReco,
0036                         const edm::Handle<edm::View<reco::Muon>> &muons,
0037                         MuonTrackType type,
0038                         const edm::Handle<TrackingParticleCollection> &tpColl) const {
0039       impl_->associateMuons(recoToSim, simToReco, muons, type, tpColl);
0040     }
0041 
0042   private:
0043     std::unique_ptr<MuonToTrackingParticleAssociatorBaseImpl const> impl_;
0044   };
0045 }  // namespace reco
0046 
0047 #endif