Luiza
v03-01
|
Analytical line track fitting processor for LUIZA. More...
#include <FindLineTrajectory.h>
Public Member Functions | |
virtual Processor * | newProcessor () |
Returns a new instance of FindLineTrajectory. More... | |
FindLineTrajectory () | |
Default constructor. | |
virtual void | init () |
Called at the job beginning. More... | |
virtual void | startAnalysis (GloriaDataContainer *) |
Called before first data processing loop. More... | |
virtual void | processData (GloriaDataContainer *data) |
Called for every data processing loop. More... | |
virtual void | check (GloriaDataContainer *data) |
Called for every loop - right after processData() call. More... | |
virtual void | concludeAnalysis (GloriaDataContainer *) |
Called after all data processing loops. More... | |
virtual void | end () |
Called after data processing for clean up. More... | |
Public Member Functions inherited from luiza::Processor | |
Processor (const std::string &typeName) | |
Default constructor. More... | |
virtual | ~Processor () |
Destructor. | |
virtual const std::string & | type () const |
Return type name for the processor (as set in constructor). | |
virtual const std::string & | name () const |
Return name of this processor. | |
virtual const std::string & | logLevelName () const |
Return name of the local verbosity level of this processor - "" if not set. | |
virtual StringParameters * | parameters () |
Return parameters defined for this Processor. | |
virtual void | printDescription () |
Print information about this processor in ASCII steering file format. | |
virtual void | printDescriptionXML (std::ostream &stream=std::cout) |
Print information about this processor in XML steering file format. | |
template<class T > | |
void | printParameters () |
Print the parameters and their values depending on the given verbosity level. | |
void | printParameters () |
Print the parameters and their values with verbosity level MESSAGE. | |
const std::string & | description () |
Description of processor. | |
bool | isFirstEvent () |
True if first event in processEvent(evt) - use this e.g. to initialize histograms etc. | |
GloriaCollectionType | getGloriaInType (const std::string &colName) |
Return the input type for the collection colName. More... | |
GloriaCollectionType | getGloriaOutType (const std::string &colName) |
Return the output type for the collection colName. More... | |
bool | isInputCollectionName (const std::string ¶meterName) |
Check if parameter defines collection. More... | |
bool | isOutputCollectionName (const std::string ¶meterName) |
True if the given parameter defines an LCIO output collection */. | |
Protected Member Functions | |
bool | initFit (GloriaDataContainer *) |
Prepare fit environment and calculate nominal fit parameters. | |
void | endFit () |
Clean fit environment. | |
double | MatrixFit () |
Find track. More... | |
double | SingleFit () |
Find track assuming nominal errors. More... | |
double | NominalFit () |
Find track on all frames. More... | |
int | DoAnalFit (double *pos, double *err, double velocity=0.) |
double | GetFitChi2 () |
Calculate of the fit. More... | |
int | GaussjSolve (double *alfa, double *beta, int n) |
Solve matrix equation. | |
Protected Member Functions inherited from luiza::Processor | |
void | setReturnValue (bool val) |
Set the return value for this processor - typically at end of processEvent(). More... | |
void | setReturnValue (const std::string &name, bool val) |
Set a named return value for this processor - typically at end of processEvent() More... | |
template<class T > | |
void | registerProcessorParameter (const std::string &name, const std::string &description, T ¶meter, const T &defaultVal, int setSize=0) |
Register a steering variable for this processor - call in constructor of processor. More... | |
void | registerInputCollection (const GloriaCollectionType &type, const std::string &name, const std::string &description, std::string ¶meter, const std::string &defaultVal, int setSize=0) |
Register parameter describing input collection. More... | |
void | registerOutputCollection (const GloriaCollectionType &type, const std::string &name, const std::string &description, std::string ¶meter, const std::string &defaultVal, int setSize=0) |
Register parameter describing output collection. More... | |
void | registerInputCollections (const GloriaCollectionType &type, const std::string &name, const std::string &description, StringVec ¶meter, const StringVec &defaultVal, int setSize=0) |
Register parameter describing input collections. More... | |
template<class T > | |
void | registerOptionalParameter (const std::string &name, const std::string &description, T ¶meter, const T &defaultVal, int setSize=0) |
Same as registerProcessorParameter except that the parameter is optional. More... | |
bool | parameterSet (const std::string &name) |
Tests whether the parameter has been set in the steering file. | |
template<class T > | |
void | message (const std::string &message) const |
Print message according to verbosity level. More... | |
template<class T > | |
void | message (const std::basic_ostream< char, std::char_traits< char > > &m) const |
Similar to message(const std::string& message) More... | |
std::stringstream & | log () const |
Returns an empty stringstream that is used by the message method. | |
virtual void | setProcessorParameters (StringParameters *parameters) |
Allow friend class CCProcessor to change/reset processor parameters. | |
virtual void | updateParameters () |
Allow friend class CCProcessor to update processor parameters. | |
virtual void | updateTelescopeParameters (std::string name) |
Allow to update processor parameters for given telescope name. More... | |
virtual void | updateTelescopeParameters (GloriaFitsHeader *header) |
Update processor parameters based on FITS header. More... | |
Protected Attributes | |
std::string | _inputCollectionName |
Name of the input object list collection. | |
std::string | _outputTrackCollectionName |
Name of the output collection for storing track parameters. | |
std::string | _outputPositionCollectionName |
Name of the collection for storing fitted object positions on subsequent frames. | |
int | _maxFrameObjects |
Maximum number of objects considered per. | |
double | _chi2Max |
Maximum for accepted track fit. | |
std::vector< std::string > | _positionColumns |
Names of the columns, where object positions are stored. | |
std::vector< float > | _positionErrors |
Assumed errors on object positions in Ra and Dec. | |
std::string | _timeRecord |
Name of header record storing frame time. | |
bool | _searchMultipleTracks |
Flag for searching multiple tracks. | |
bool | _allowAmbiguousObjects |
Allow same object to be used in more than track. | |
int | _maximumAmbiguousObjects |
Number of objects than can be shared by two tracks. | |
int | _allowMissingObservations |
Allowed number of frames with missing object on the track. | |
double | _missingObservationPenalty |
"Penalty" added to track for each frame without track object | |
bool | _useVelocityConstraint |
Flag for using expected direction and angular velocity constraint in the fit. | |
double | _velocitySpread |
Assumed spread of the fitted object velocity. | |
double | _raVelocity |
Assumed object sky velocity in Ra [deg/s]. | |
double | _decVelocity |
Assumed object sky velocity in Dec [deg/s]. | |
bool | _usePreselection |
Use additional cuts, based on measured object position on the first frame. | |
int | _nLoops |
Total number of processing loops. | |
int | _nFrames |
Total number of processed frames. | |
int | _nTracks |
Total number of reconstructed tracks. | |
Protected Attributes inherited from luiza::Processor | |
std::string | _description |
Describes what the processor does. Set in constructor. | |
Analytical line track fitting processor for LUIZA.
This processor was adopted for fitting tracks to object positions on the sky reconstructed on subsequent frames. Input collection should contain object lists with objectc suspected to be satellites (based on shape, comparison with previous frame or matching with catalogue). There are usually multiple such objects in each frame, so main task of the processor is to look for the best track candidate considering all fit possibilities. All considered frames should be loaded in one loop.
InputCollectionName | Name of the input object list collection |
OutputTrackCollectionName | Name of the output collection for storing track parameters (main output of the processor). |
OutputPositionCollectionName | Name of the collection for storing fitted object positions on subsequent frames |
MaxFrameObjects | Maximum number of objects considered per frame. Should be large (default is 100) for high track finding efficiency even for frames with high object multiplicities (but have a look at preformance issues below). For low values algorithm runs much faster (reduced number of hypothesis), but the efficiency is lower. |
Chi2Max | Maximum for accepted track fit. |
PositionColumns | Names of the columns, where object positions, to be used in the fit, are stored |
PositionErrors | Assumed errors on object positions used in the fit (one number, or separate errors for Ra and Dec). |
TimeRecord | Keyword of the header record storing frame time (assumed to be in seconds; default is TIME_UT) |
SearchMultipleTracks | Flag for searching multiple tracks in lists with multiple objects. If false, only best (lowest ) track is taken. |
AllowAmbiguousObjects | Allow same object to be used in more than one track. |
MaximumAmbiguousObjects | Number of objects than can be shared by two tracks (when AllowAmbiguousObjects option is set) |
UseVelocityConstraint | Flag for using expected direction and angular velocity constraint in the fit. Can improve the fit, also improves track searching for multiple objects. |
RaVelocity | Assumed object sky velocity in Ra [deg/s] |
DecVelocity | Assumed object sky velocity in Dec [deg/s] |
VelocitySpread | Assumed spread of the fitted object velocity |
AllowMissingObservations | Allowed number of frames with missing object on the track |
MissingObservationPenalty | "Penalty" added to track for each frame without reconstructed object on the track |
UsePreselection | Use additional cuts, based on measured object position on the first frame and the expected object track direction (velocities given when UseVelocityConstraint option is used) to constraint number of considered hit combinations and speed up the processing. |
|
virtual |
Called for every loop - right after processData() call.
Can be used to check processing and/or produce check plots.
Reimplemented from luiza::Processor.
|
virtual |
Called after all data processing loops.
This method is called to finalize the analysis, after all input data was read (or required number of loops was reached). Analysis of data collected in permanent data collections is possible here.
Reimplemented from luiza::Processor.
|
protected |
Fit track in one coordinate (Ra or Dec), taking into account object velocity
References _useVelocityConstraint, _velocitySpread, and GaussjSolve().
Referenced by initFit(), MatrixFit(), and SingleFit().
|
virtual |
Called after data processing for clean up.
Used to release memory allocated in init() step
Reimplemented from luiza::Processor.
|
protected |
Calculate of the fit.
Calculate of the fit taking into account measured object positions in Ra and Dec
References _decVelocity, _raVelocity, _useVelocityConstraint, and _velocitySpread.
Referenced by MatrixFit(), NominalFit(), and SingleFit().
|
virtual |
Called at the job beginning.
This is executed only once in the whole execution.
Reimplemented from luiza::Processor.
References _inputCollectionName, _nFrames, _nLoops, _nTracks, _outputPositionCollectionName, _outputTrackCollectionName, _positionColumns, _positionErrors, luiza::Processor::name(), and luiza::Processor::parameters().
|
protected |
Find track.
Fit track in two coordinates (Ra and Dec) by solving two matrix equations and calculate
References _decVelocity, _raVelocity, DoAnalFit(), and GetFitChi2().
Referenced by processData().
|
inlinevirtual |
Returns a new instance of FindLineTrajectory.
This method returns an new instance of the this processor. It is called by Luiza execution framework and it shouldn't be called/used by the final user.
Implements luiza::Processor.
|
protected |
Find track on all frames.
Fit track in two coordinates: Ra and Dec. When same position error is assumed and objects are found on all frames, same inverse matrix can be used for all events.
References _decVelocity, _raVelocity, _useVelocityConstraint, _velocitySpread, and GetFitChi2().
Referenced by processData().
|
virtual |
Called for every data processing loop.
This is where most of the work (analysis) is done. Data is exchanged between processors via GloriaDataContainer
Reimplemented from luiza::Processor.
References _allowAmbiguousObjects, _allowMissingObservations, _chi2Max, _decVelocity, _inputCollectionName, _maxFrameObjects, _maximumAmbiguousObjects, _missingObservationPenalty, _nFrames, _nLoops, _nTracks, _outputPositionCollectionName, _outputTrackCollectionName, _positionColumns, _positionErrors, _raVelocity, _searchMultipleTracks, _timeRecord, _usePreselection, _useVelocityConstraint, _velocitySpread, gloria::GloriaFitsTable::AddColumn(), gloria::GloriaFitsTable::AddRow(), gloria::GloriaFitsTable::AdjustColumns(), gloria::GloriaFitsTable::ColumnExists(), gloria::GloriaFitsTable::CopyTableRow(), gloria::GloriaDataContainer::CreateTableCollection(), gloria::GloriaFitsTable::EmptyClone(), endFit(), gloria::GloriaFitsTable::GetRowNumber(), gloria::GloriaDataContainer::GetTableCollection(), gloria::GloriaFitsTable::GetVectorOf(), initFit(), MatrixFit(), NominalFit(), gloria::GloriaFitsTable::SetLast(), gloria::GloriaFitsTable::SetValue(), SingleFit(), and gloria::GloriaDataContainer::TableCollectionExists().
|
protected |
Find track assuming nominal errors.
Fit track in two coordinates (Ra and Dec). When single position error is used, only one matrix equation has to be solved and the inverse matrix can be applied to the second equation.
References _decVelocity, _raVelocity, _useVelocityConstraint, _velocitySpread, DoAnalFit(), and GetFitChi2().
Referenced by processData().
|
virtual |
Called before first data processing loop.
Can be used to initialize data collections required for analysis, eg. define permanent collections, or fill them with external data (from file, database or net). It is possible as GloriaDataContainer is already defined, contrary to init().
Reimplemented from luiza::Processor.