Luiza  v03-01
FindLineTrajectory.h
1 // -*- mode: c++; mode: auto-fill; mode: flyspell-prog; -*-
2 
3 
4 #ifndef FindLineTrajectory_h
5 #define FindLineTrajectory_h 1
6 
7 #include "luiza/Processor.h"
8 
9 using namespace gloria;
10 
11 namespace luiza {
12 
14  typedef long long int type_fitcount;
15 
16 
18 
139  class FindLineTrajectory : public Processor {
140 
141  public:
142 
143 
144 
146 
152  virtual Processor* newProcessor() { return new FindLineTrajectory ; }
153 
156 
158 
161  virtual void init() ;
162 
163 
165 
170  virtual void startAnalysis( GloriaDataContainer* ) ;
171 
173 
176  virtual void processData( GloriaDataContainer* data ) ;
177 
178 
180 
183  virtual void check( GloriaDataContainer* data ) ;
184 
185 
187 
192  virtual void concludeAnalysis( GloriaDataContainer* ) ;
193 
195 
197  virtual void end() ;
198 
199  protected:
200 
202  bool initFit(GloriaDataContainer*);
203 
204 
206  void endFit();
207 
209 
212  double MatrixFit();
213 
215 
219  double SingleFit();
220 
222 
226  double NominalFit();
227 
230  int DoAnalFit(double * pos, double *err, double velocity=0.);
231 
233 
236  double GetFitChi2();
237 
239  int GaussjSolve(double * alfa, double * beta, int n);
240 
241 
242  // Global processor parameters
243 
245  std::string _inputCollectionName ;
246 
249 
252 
253 
254  // Parameters of the algorithm
255 
258 
260  double _chi2Max ;
261 
263  std::vector<std::string> _positionColumns;
264 
266  std::vector<float> _positionErrors;
267 
269  std::string _timeRecord;
270 
273 
276 
279 
282 
285 
288 
291 
293  double _raVelocity;
294 
296  double _decVelocity;
297 
300 
301 
302  // Setup description
303 
304  int _allFrameCount;
305  int _goodFrameCount;
306 
307  int * _frameSort;
308  int * _frameID;
309  double * _frameTime;
310  double * _frameResolution;
311 
312  double _timeOffset;
313 
314  // Internal processor variables
315  // ----------------------------
316 
317  // Arrays for selecting different hit combinations
318 
319  int * _frameHits;
320  int * _frameChoice;
321  type_fitcount * _frameMod;
322 
323  // Fitting algorithm arrays
324 
325  double * _frameX ;
326  double * _frameEx ;
327  double * _frameY ;
328  double * _frameEy ;
329 
330  double * _fitX ;
331  double * _fitEx ;
332  double * _fitY ;
333  double * _fitEy ;
334 
335  int _vecDim;
336  int _arrayDim;
337 
338  double * _parVec;
339  double * _fitArray;
340  double * _parVecX;
341  double * _parVecY;
342  double * _parErrX;
343  double * _parErrY;
344 
345  double * _nominalFitArrayX ;
346  double * _nominalErrorX ;
347  double * _nominalFitArrayY ;
348  double * _nominalErrorY ;
349 
350  // Track table
351 
352  GloriaFitsTable * _trackTable;
353 
354  // few counter to show the final summary
355 
357  int _nLoops;
358 
360  int _nFrames;
361 
363  int _nTracks;
364 
365 
366 
367  } ;
368 
369 }
370 
371 #endif
372 
373 
374 
std::string _timeRecord
Name of header record storing frame time.
Definition: FindLineTrajectory.h:269
namespace for data storing and exchange formats
Definition: GloriaAstrometry.h:15
int _maximumAmbiguousObjects
Number of objects than can be shared by two tracks.
Definition: FindLineTrajectory.h:278
std::vector< std::string > _positionColumns
Names of the columns, where object positions are stored.
Definition: FindLineTrajectory.h:263
virtual Processor * newProcessor()
Returns a new instance of FindLineTrajectory.
Definition: FindLineTrajectory.h:152
double _velocitySpread
Assumed spread of the fitted object velocity.
Definition: FindLineTrajectory.h:290
std::string _outputPositionCollectionName
Name of the collection for storing fitted object positions on subsequent frames.
Definition: FindLineTrajectory.h:251
std::string _outputTrackCollectionName
Name of the output collection for storing track parameters.
Definition: FindLineTrajectory.h:248
bool _useVelocityConstraint
Flag for using expected direction and angular velocity constraint in the fit.
Definition: FindLineTrajectory.h:287
bool _usePreselection
Use additional cuts, based on measured object position on the first frame.
Definition: FindLineTrajectory.h:299
Class for storing all data processed in Luiza.
Definition: GloriaDataContainer.h:82
double _missingObservationPenalty
"Penalty" added to track for each frame without track object
Definition: FindLineTrajectory.h:284
Base class for Luiza processors.
Definition: Processor.h:55
int _nTracks
Total number of reconstructed tracks.
Definition: FindLineTrajectory.h:363
int _nLoops
Total number of processing loops.
Definition: FindLineTrajectory.h:357
int _allowMissingObservations
Allowed number of frames with missing object on the track.
Definition: FindLineTrajectory.h:281
int _nFrames
Total number of processed frames.
Definition: FindLineTrajectory.h:360
long long int type_fitcount
Type used for numbering of fit possibilities (can be large)
Definition: FindLineTrajectory.h:14
std::vector< float > _positionErrors
Assumed errors on object positions in Ra and Dec.
Definition: FindLineTrajectory.h:266
Class for reading and processing fits tables in Luiza.
Definition: GloriaFitsTable.h:109
bool _allowAmbiguousObjects
Allow same object to be used in more than track.
Definition: FindLineTrajectory.h:275
int _maxFrameObjects
Maximum number of objects considered per.
Definition: FindLineTrajectory.h:257
Namespace for Luiza framework.
Definition: CCCollection.h:6
double _raVelocity
Assumed object sky velocity in Ra [deg/s].
Definition: FindLineTrajectory.h:293
double _chi2Max
Maximum for accepted track fit.
Definition: FindLineTrajectory.h:260
std::string _inputCollectionName
Name of the input object list collection.
Definition: FindLineTrajectory.h:245
Analytical line track fitting processor for LUIZA.
Definition: FindLineTrajectory.h:139
double _decVelocity
Assumed object sky velocity in Dec [deg/s].
Definition: FindLineTrajectory.h:296
bool _searchMultipleTracks
Flag for searching multiple tracks.
Definition: FindLineTrajectory.h:272