Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AssociationMap in TrackRefitter (81X) #13446

Merged
merged 3 commits into from
Feb 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions TrackingTools/TrackRefitter/plugins/TracksToTrajectories.cc
Original file line number Diff line number Diff line change
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