Skip to content

Commit

Permalink
Merge pull request #13445 from aysent/track-refitter-association-map
Browse files Browse the repository at this point in the history
Fix AssociationMap in TrackRefitter
  • Loading branch information
cmsbuild committed Mar 1, 2016
2 parents fdddf7a + 8441d53 commit 0e27df5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions TrackingTools/TrackRefitter/plugins/TracksToTrajectories.cc
Expand Up @@ -121,19 +121,19 @@ void TracksToTrajectories::produce(Event& event, const EventSetup& setup){
theTrackTransformer->setServices(setup);

// Collection of Trajectory
auto_ptr<vector<Trajectory> > trajectoryCollection(new vector<Trajectory>);
unique_ptr<vector<Trajectory> > trajectoryCollection(new vector<Trajectory>);

// Get the reference
RefProd<vector<Trajectory> > trajectoryCollectionRefProd
= event.getRefBeforePut<vector<Trajectory> >("Refitted");

// Association map between Trajectory and Track
auto_ptr<TrajTrackAssociationCollection> trajTrackMap(new TrajTrackAssociationCollection);

// Get the RecTrack collection from the event
Handle<reco::TrackCollection> tracks;
event.getByToken(theTracksToken, tracks);

// Association map between Trajectory and Track
unique_ptr<TrajTrackAssociationCollection> trajTrackMap(new TrajTrackAssociationCollection(trajectoryCollectionRefProd, tracks));

Ref<vector<Trajectory> >::key_type trajectoryIndex = 0;
reco::TrackRef::key_type trackIndex = 0;

Expand All @@ -159,8 +159,8 @@ void TracksToTrajectories::produce(Event& event, const EventSetup& setup){
}
}
LogTrace(metname)<<"Load the Trajectory Collection";
event.put(trajectoryCollection,"Refitted");
event.put(trajTrackMap,"Refitted");
event.put(move(trajectoryCollection),"Refitted");
event.put(move(trajTrackMap),"Refitted");
}

#include "FWCore/Framework/interface/MakerMacros.h"
Expand Down

0 comments on commit 0e27df5

Please sign in to comment.