Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // Package:     SimDataFormats/Associations
0004 // Class  :     TrackToTrackingParticleAssociatorBaseImpl
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Christopher Jones
0010 //         Created:  Tue, 30 Dec 2014 21:35:35 GMT
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "SimDataFormats/Associations/interface/TrackToTrackingParticleAssociatorBaseImpl.h"
0017 
0018 //
0019 // constants, enums and typedefs
0020 //
0021 
0022 //
0023 // static data member definitions
0024 //
0025 
0026 //
0027 // constructors and destructor
0028 //
0029 reco::TrackToTrackingParticleAssociatorBaseImpl::TrackToTrackingParticleAssociatorBaseImpl() {}
0030 
0031 reco::TrackToTrackingParticleAssociatorBaseImpl::~TrackToTrackingParticleAssociatorBaseImpl() {}
0032 
0033 //
0034 // const member functions
0035 //
0036 reco::RecoToSimCollection reco::TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(
0037     const edm::Handle<edm::View<reco::Track>> &tCH, const edm::Handle<TrackingParticleCollection> &tPCH) const {
0038   edm::RefToBaseVector<reco::Track> tc;
0039   for (unsigned int j = 0; j < tCH->size(); j++)
0040     tc.push_back(tCH->refAt(j));
0041 
0042   edm::RefVector<TrackingParticleCollection> tpc(tPCH.id());
0043   for (unsigned int j = 0; j < tPCH->size(); j++)
0044     tpc.push_back(edm::Ref<TrackingParticleCollection>(tPCH, j));
0045 
0046   return associateRecoToSim(tc, tpc);
0047 }
0048 
0049 /// compare reco to sim the handle of reco::Track and TrackingParticle
0050 /// collections
0051 reco::SimToRecoCollection reco::TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(
0052     const edm::Handle<edm::View<reco::Track>> &tCH, const edm::Handle<TrackingParticleCollection> &tPCH) const {
0053   edm::RefToBaseVector<reco::Track> tc;
0054   for (unsigned int j = 0; j < tCH->size(); j++)
0055     tc.push_back(tCH->refAt(j));
0056 
0057   edm::RefVector<TrackingParticleCollection> tpc(tPCH.id());
0058   for (unsigned int j = 0; j < tPCH->size(); j++)
0059     tpc.push_back(edm::Ref<TrackingParticleCollection>(tPCH, j));
0060 
0061   return associateSimToReco(tc, tpc);
0062 }
0063 
0064 // TrajectorySeed
0065 reco::RecoToSimCollectionSeed reco::TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(
0066     const edm::Handle<edm::View<TrajectorySeed>> &, const edm::Handle<TrackingParticleCollection> &) const {
0067   reco::RecoToSimCollectionSeed empty;
0068   return empty;
0069 }
0070 
0071 reco::SimToRecoCollectionSeed reco::TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(
0072     const edm::Handle<edm::View<TrajectorySeed>> &, const edm::Handle<TrackingParticleCollection> &) const {
0073   reco::SimToRecoCollectionSeed empty;
0074   return empty;
0075 }
0076 
0077 // TrackCandidate
0078 reco::RecoToSimCollectionTCandidate reco::TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(
0079     const edm::Handle<TrackCandidateCollection> &, const edm::RefVector<TrackingParticleCollection> &) const {
0080   reco::RecoToSimCollectionTCandidate empty;
0081   return empty;
0082 }
0083 
0084 reco::SimToRecoCollectionTCandidate reco::TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(
0085     const edm::Handle<TrackCandidateCollection> &, const edm::RefVector<TrackingParticleCollection> &) const {
0086   reco::SimToRecoCollectionTCandidate empty;
0087   return empty;
0088 }