Genfit Reco Task [message #10230] |
Thu, 18 February 2010 17:42 |
StefanoSpataro
Messages: 2736 Registered: June 2005 Location: Torino
|
first-grade participant |
From: *to.infn.it
|
|
Dear all,
I have done some work around genfit, in order to unify all the existing kalman tasks, to have all the genfit stuff in one package separated from the detectors.
I have created a folder GenfitTools/recotask, which creates the library libRecoTasks.
In this folder, at present, there are two classes:
PndRecoKalmanFit -> single track fitter
PndRecoKalmanTask -> task for track fitting
PndrecoKalmanTask substitutes PndLheKalmanTask, which soon will disappear.
PndrecoKalmanTask is fitting a TCA of PndTrack, creating a new TCA of PndTrack. The user can set the names of the input TCA and of the output. This can be used with all the possible tracking code using PndTrack and the standard definition of detectors in PndDetectorList (mvd tpc stt gem dch mdt).
Macros in macros/pid are already updated. You can check there how to use it.
PndRecoKalmanFit is able to do the kalman fit track by track.
In order to use it, you have to create it, init, and then to fit a PndTrack object:
PndRecoKalmanFit *fitter = new PndRecoKalmanFitter();
if (!fitter->Init()) continue;
for(Int_t itr=0;itr<ntracks;++itr)
{
PndTrack *prefitTrack = (PndTrack*)fTrackArray->At(itr);
Int_t fCharge= prefitTrack->GetParamFirst().GetQ();
Int_t PDGCode= -13*fCharge;
PndTrack *fitTrack = new PndTrack();
fitTrack = fFitter->Fit(prefitTrack, PDGCode);
if (fitTrack==NULL) continue;
...
}
This is a way on how to use the code with a muon hypothesis. PndRecoKalmanTask is just a for loop retrieving PndTrack objects and fitting them by PndRecoKalmanFit.
What is important is that:
a) nobody should take care of the genfit conversions and of the recohitfactory anymore;
b) one can run a single track fitter, without being forced to process all the tracks inside a task (the job of the PneRecokalmanTask;
c) one can change the particle hypothesis, even refitting according to something different from the hardcoded muons, i.e. after PID.
Once all the other macros will be updated, I will remove the old PndLhekalmanTask.
I wait for some feedback.
|
|
|