MarlinTPC
1.2.0
|
The TrackFitterFactory is an interface to handle track fitters. More...
#include <TrackFitterFactory.h>
Classes | |
class | FitterTypeException |
Define a new exception class for unkonwn fitter types. More... | |
Static Public Member Functions | |
static TrackFitterBase * | getTrackFitter (unsigned char fitterType, EVENT::LCParameters const *collectionParameters, EVENT::LCEvent const *event=0) |
Get a track fitter and reinitialise its parameters. More... | |
The TrackFitterFactory is an interface to handle track fitters.
Analysis processors use the calculateResiduals
function of the track fitters so this code does not have to be implemented twice. Especially for analysis processors the abstract interface means that the analysis code is independent from the track fitter used, but all the specialities of a track fitter like geometry dependence, dependence on the gas mixture and whatever the special fitter requires are taken into accout.
The getTrackFitter function is called in every event. It is passed an instance of LCParametes, which are the collection parameters of the collection containing the tracks. These parameters contain information about the parameters the track fitter might need. The TrackFitter is only created once and with every new call the parameters are reset. This code is neither reentrant nor thread safe.
Every developer of a new track fitter has to add his processor to the getTrackFitter function.
|
static |
Get a track fitter and reinitialise its parameters.
A fitter of the given type is returned Parameters for the fitter are defined in the LCParameters.
Some fitter types might need information from the conditions data or the full collection of hits to revisit which hit belongs to the track. This is transferred by giving a pointer to the event. If the specific fitter type does not need the event it can be ommitted. Note: The fitter shall not modify the event, this it is a pointer to a const object. !TO BE DISCUSSED! Throws !!!FIXME what kind of exception in case the fitter need conditon data but event
= 0.
References marlintpc::TrackFitterSimpleChiSquare::getInstance(), marlintpc::TrackFitterSimpleHelix::getInstance(), marlintpc::TrackFitterLinearRegression::getInstance(), marlintpc::TrackFitterSimpleMinimizer::getInstance(), marlintpc::TrackFitterSimpleChiSquarePads::getInstance(), marlintpc::TrackFitterKalman::getInstance(), marlintpc::TrackFitterBase::FitterTypes::KALMAN, marlintpc::TrackFitterBase::FitterTypes::LIKELIHOOD, marlintpc::TrackFitterBase::FitterTypes::LINEARREGRESSION, marlintpc::TrackFitterBase::FitterTypes::SIMPLECHISQUARE, marlintpc::TrackFitterBase::FitterTypes::SIMPLECHISQUAREPADS, marlintpc::TrackFitterBase::FitterTypes::SIMPLEHELIXFIT, and marlintpc::TrackFitterBase::FitterTypes::SIMPLEMINIMIZER.
Referenced by marlintpc::TimePixHoughTransformNormalProcessor::AddHits(), marlintpc::BiasedResidualsProcessor::processEvent(), marlintpc::GeometricMeanResidualsTupleProcessor::processEvent(), marlintpc::PadResponseProcessor::processEvent(), marlintpc::TrackFitterSimpleMinimizerProcessor::processEvent(), and marlintpc::TrackFitterSimpleChiSquareProcessor::processEvent().