MarlinTPC  1.2.0
TrackFitterSimpleMinimizerProcessor.h
1 #ifndef TRACK_FITTER_SIMPLE_MINIMIZER_PROCESSOR_H
2 #define TRACK_FITTER_SIMPLE_MINIMIZER_PROCESSOR_H 1
3 
4 #include "marlin/Processor.h"
5 //#include "lcio.h"
6 //#include <string>
7 #include <vector>
8 #include "TrackFitterFactory.h"
9 
10 //#include <EVENT/TrackerHit.h>
11 
12 //namespace AIDA {
13 //
14 // class IHistogram1D;
15 // class IHistogram2D;
16 //
17 //
18 //}
19 
20 
21 namespace marlintpc
22 {
23 
51 class TrackFitterSimpleMinimizerProcessor : public marlin::Processor
52 {
53 
54  public:
55 
59 
60 
64 
65 
68  Processor * newProcessor();
69 
70 
74  void init();
75 
76 
79  void processRunHeader(lcio::LCRunHeader *run);
80 
81 
87  virtual void processEvent(lcio::LCEvent *evt);
88 
89 
93  virtual void check(lcio::LCEvent *evt);
94 
95 
101  virtual void end();
102 
103 
104  protected:
105 
109 
113 
114  bool _writeOutput; //< Flag wheter to write the output to storage
115 
116  int _maxIterations; //< Maximum number of iterations for the outlier rejection
117 
118  bool _rejectOutliers; //< Flag whether to reject outliers
119 
120  float _cutValue; //< Cut outliers wich are _cutValue*RMS away from the fitted track.
121 
122  EVENT::LCParameters * _trackCollectionParameters;
123 
125  std::vector<double> calculateMeanAndRMS( EVENT::Track *track, TrackFitterBase *fitter);
126 };
127 
128 }// namespace marlintoc
129 
130 #endif // TRACKSEEDERPROCESSOR_H
131 
132 
133 
virtual void check(lcio::LCEvent *evt)
Called for every event - right after processEvent() has been called.
Definition: TrackFitterSimpleMinimizerProcessor.cc:332
std::string _input_seed_tracks_collection_name
The name of the input collection of seed tracks.
Definition: TrackFitterSimpleMinimizerProcessor.h:108
void processRunHeader(lcio::LCRunHeader *run)
Called once per run to process the event's header.
Definition: TrackFitterSimpleMinimizerProcessor.cc:97
void init()
In this processor the init function set the collection parameters for the track collection.
Definition: TrackFitterSimpleMinimizerProcessor.cc:81
std::vector< double > calculateMeanAndRMS(EVENT::Track *track, TrackFitterBase *fitter)
Returns meanXY, meanZ, rmsXY, rmsZ (in this order)
Definition: TrackFitterSimpleMinimizerProcessor.cc:343
virtual void end()
Called after data processing for clean up in the inverse order of the init() method so that resources...
Definition: TrackFitterSimpleMinimizerProcessor.cc:337
The TrackFitterBase is a virtual class from which the actual track fitters are derived.
Definition: TrackFitterBase.h:44
~TrackFitterSimpleMinimizerProcessor()
Destructor.
Definition: TrackFitterSimpleMinimizerProcessor.cc:75
std::string _output_tracks_collection_name
The name of the output collection with the fitted tracks.
Definition: TrackFitterSimpleMinimizerProcessor.h:112
virtual void processEvent(lcio::LCEvent *evt)
Process event requests a track fitter from the TrackFitterFactory for each event (to update possible ...
Definition: TrackFitterSimpleMinimizerProcessor.cc:112
TrackFitterSimpleMinimizerProcessor()
Default constructor.
Definition: TrackFitterSimpleMinimizerProcessor.cc:38
Processor * newProcessor()
Return a new instance of this processor.
Definition: TrackFitterSimpleMinimizerProcessor.cc:325
A processor which instantiates a TrackFitterSimpleMinimizer and fits the tracks with it...
Definition: TrackFitterSimpleMinimizerProcessor.h:51