Plots also look better with the refitted tracks. The KalmanVertexFitter's track smoother apparently didn't work very well before, so it was non-functional until CMSSW_1_3_0. It seems to be working now.
I also found that I needed to be able to create references to tracks already stored in the event, so they can be referenced from the reco::Vertex object. These are also needed for Candidate objects, so it's good to know how to use them. Here's the code for creating references given a Handle
reco::TrackRef trackRef1(theTrackHandle, 0);
reco::TrackRef trackRef2(theTrackHandle, 1);
The integer argument to the constructor above is the index of the TrackCollection containing the track you're interested in. (The TrackCollection is accessed through the Handle, which apparently can act just like an iterator.)
I'm most likely going to start coding my module using Candidates. I've yet to hear back from Steve on this, but it seems Candidates are the preferred data format for analysis in CMS these days, and the storage isn't bad, especially now that I can use track references.
No comments:
Post a Comment