Friday, June 15, 2007

I've now got a working producer. I've implemented my own Candidate class, reco::V0Candidate, which will be included in CVS soon under DataFormats/V0Candidate. This was after long correspondence with Luca Lista.

I'm now starting work on making the producer take a generic TrackCollection and loop over the tracks to find the candidate oppositely-charged tracks to pass to the KalmanVertexFitter. We have various ideas about how to deal with cutting down the bad tracks that won't produce a good vertex, but I'm first going to implement the looping functionality. This is actually kinda nontrivial at this point, although I'm sure it's easier than I'm thinking.

Friday, June 1, 2007

The EDProducer is now working in its current form, namely, simple K0s->pi+ pi- events are being correctly reconstructed and written to the Event. I found that I had to manually load references to the original tracks and also manually load the refitted tracks into the reco::Vertex object before storage.

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.