Skip to content

Commit

Permalink
Merge pull request #13570 from makortel/fixQuickTrackAssociatorByHits
Browse files Browse the repository at this point in the history
Fix QuickTrackAssociatorByHits for empty TrackingParticleRefVector
  • Loading branch information
davidlange6 committed Mar 3, 2016
2 parents db25ba1 + 23ad1a6 commit b399646
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -167,6 +167,8 @@ template<class T_TrackCollection, class T_TrackingParticleCollection, class T_hi
reco::RecoToSimCollection QuickTrackAssociatorByHitsImpl::associateRecoToSimImplementation( const T_TrackCollection& trackCollection, const T_TrackingParticleCollection& trackingParticleCollection, const TrackingParticleRefKeySet *trackingParticleKeys, T_hitOrClusterAssociator hitOrClusterAssociator ) const
{
reco::RecoToSimCollection returnValue(productGetter_);
if(::collectionSize(trackingParticleCollection) == 0)
return returnValue;

checkClusterMapProductID(hitOrClusterAssociator, trackingParticleCollection);

Expand Down Expand Up @@ -216,6 +218,8 @@ template<class T_TrackCollection, class T_TrackingParticleCollection, class T_hi
reco::SimToRecoCollection QuickTrackAssociatorByHitsImpl::associateSimToRecoImplementation( const T_TrackCollection& trackCollection, const T_TrackingParticleCollection& trackingParticleCollection, const TrackingParticleRefKeySet *trackingParticleKeys, T_hitOrClusterAssociator hitOrClusterAssociator ) const
{
reco::SimToRecoCollection returnValue(productGetter_);
if(::collectionSize(trackingParticleCollection) == 0)
return returnValue;

checkClusterMapProductID(hitOrClusterAssociator, trackingParticleCollection);

Expand Down Expand Up @@ -615,6 +619,8 @@ reco::SimToRecoCollectionSeed QuickTrackAssociatorByHitsImpl::associateSimToReco
<< " #TPs=" << trackingParticleCollectionHandle->size();

reco::SimToRecoCollectionSeed returnValue(productGetter_);
if(trackingParticleCollectionHandle->empty())
return returnValue;

if(clusterToTPMap_) {
checkClusterMapProductID(*clusterToTPMap_, trackingParticleCollectionHandle);
Expand Down

0 comments on commit b399646

Please sign in to comment.