Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:39

0001 #ifndef SimDataFormats_Associations_TrackToTrackingParticleAssociator_h
0002 #define SimDataFormats_Associations_TrackToTrackingParticleAssociator_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     SimDataFormats/Associations
0006 // Class  :     TrackToTrackingParticleAssociator
0007 //
0008 /**\class TrackToTrackingParticleAssociator TrackToTrackingParticleAssociator.h
0009  "SimDataFormats/Associations/interface/TrackToTrackingParticleAssociator.h"
0010 
0011  Description: Interface for accessing a Track to TrackingParticle associator
0012 
0013  Usage:
0014     <usage>
0015 
0016 */
0017 //
0018 // Original Author:  Christopher Jones
0019 //         Created:  Tue, 30 Dec 2014 20:47:00 GMT
0020 //
0021 
0022 // system include files
0023 #include <memory>
0024 
0025 // user include files
0026 #include "SimDataFormats/Associations/interface/TrackAssociation.h"
0027 
0028 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
0029 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0030 
0031 #include "SimDataFormats/Associations/interface/TrackToTrackingParticleAssociatorBaseImpl.h"
0032 
0033 // forward declarations
0034 
0035 namespace reco {
0036   class TrackToTrackingParticleAssociator {
0037   public:
0038 #ifndef __GCCXML__
0039     TrackToTrackingParticleAssociator(std::unique_ptr<reco::TrackToTrackingParticleAssociatorBaseImpl>);
0040 #endif
0041     TrackToTrackingParticleAssociator() = default;
0042     TrackToTrackingParticleAssociator(TrackToTrackingParticleAssociator &&) = default;
0043     TrackToTrackingParticleAssociator &operator=(TrackToTrackingParticleAssociator &&) = default;
0044     TrackToTrackingParticleAssociator(const TrackToTrackingParticleAssociator &) = delete;  // stop default
0045     const TrackToTrackingParticleAssociator &operator=(const TrackToTrackingParticleAssociator &) =
0046         delete;  // stop default
0047 
0048     ~TrackToTrackingParticleAssociator() = default;
0049 
0050     // ---------- const member functions ---------------------
0051     /// compare reco to sim the handle of reco::Track and TrackingParticle
0052     /// collections
0053     reco::RecoToSimCollection associateRecoToSim(const edm::Handle<edm::View<reco::Track>> &tCH,
0054                                                  const edm::Handle<TrackingParticleCollection> &tPCH) const {
0055       return m_impl->associateRecoToSim(tCH, tPCH);
0056     }
0057 
0058     /// compare reco to sim the handle of reco::Track and TrackingParticle
0059     /// collections
0060     reco::SimToRecoCollection associateSimToReco(const edm::Handle<edm::View<reco::Track>> &tCH,
0061                                                  const edm::Handle<TrackingParticleCollection> &tPCH) const {
0062       return m_impl->associateSimToReco(tCH, tPCH);
0063     }
0064 
0065     /// Association Reco To Sim with Collections
0066     reco::RecoToSimCollection associateRecoToSim(const edm::RefToBaseVector<reco::Track> &tc,
0067                                                  const edm::RefVector<TrackingParticleCollection> &tpc) const {
0068       return m_impl->associateRecoToSim(tc, tpc);
0069     }
0070 
0071     /// Association Sim To Reco with Collections
0072     reco::SimToRecoCollection associateSimToReco(const edm::RefToBaseVector<reco::Track> &tc,
0073                                                  const edm::RefVector<TrackingParticleCollection> &tpc) const {
0074       return m_impl->associateSimToReco(tc, tpc);
0075     }
0076 
0077     // TrajectorySeed
0078     reco::RecoToSimCollectionSeed associateRecoToSim(const edm::Handle<edm::View<TrajectorySeed>> &ts,
0079                                                      const edm::Handle<TrackingParticleCollection> &tpc) const {
0080       return m_impl->associateRecoToSim(ts, tpc);
0081     }
0082 
0083     reco::SimToRecoCollectionSeed associateSimToReco(const edm::Handle<edm::View<TrajectorySeed>> &ts,
0084                                                      const edm::Handle<TrackingParticleCollection> &tpc) const {
0085       return m_impl->associateSimToReco(ts, tpc);
0086     }
0087 
0088     // TrackCandidate
0089     reco::RecoToSimCollectionTCandidate associateRecoToSim(
0090         const edm::Handle<TrackCandidateCollection> &tc, const edm::RefVector<TrackingParticleCollection> &tpc) const {
0091       return m_impl->associateRecoToSim(tc, tpc);
0092     }
0093 
0094     reco::SimToRecoCollectionTCandidate associateSimToReco(
0095         const edm::Handle<TrackCandidateCollection> &tc, const edm::RefVector<TrackingParticleCollection> &tpc) const {
0096       return m_impl->associateSimToReco(tc, tpc);
0097     }
0098 
0099   private:
0100     // ---------- member data --------------------------------
0101     std::unique_ptr<TrackToTrackingParticleAssociatorBaseImpl> m_impl;
0102   };
0103 }  // namespace reco
0104 
0105 #endif