MarlinTrkProcessors  2.4.1
RefitProcessor.h
1 #ifndef RefitProcessor_h
2 #define RefitProcessor_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 
8 #include <UTIL/LCRelationNavigator.h>
9 
10 #include <EVENT/TrackerHit.h>
11 
12 namespace MarlinTrk{
13  class IMarlinTrkSystem ;
14 }
15 
16 
35 class RefitProcessor : public marlin::Processor {
36 
37 public:
38 
39  virtual marlin::Processor* newProcessor() { return new RefitProcessor ; }
40 
41  RefitProcessor() ;
42 
46  virtual void init() ;
47 
50  virtual void processRunHeader( lcio::LCRunHeader* run ) ;
51 
54  virtual void processEvent( lcio::LCEvent * evt ) ;
55 
56 
57  virtual void check( lcio::LCEvent * evt ) ;
58 
59 
62  virtual void end() ;
63 
64 
65 
66  struct compare_r {
67  bool operator()( EVENT::TrackerHit* a, EVENT::TrackerHit* b) const {
68  double r_a_sqd = a->getPosition()[0] * a->getPosition()[0] + a->getPosition()[1] * a->getPosition()[1] ;
69  double r_b_sqd = b->getPosition()[0] * b->getPosition()[0] + b->getPosition()[1] * b->getPosition()[1] ;
70  return ( r_a_sqd < r_b_sqd ) ;
71  }
72  } ;
73 
74 
75 
76 protected:
77 
78  /* helper function to get collection using try catch block */
79  lcio::LCCollection* GetCollection( lcio::LCEvent * evt, std::string colName ) ;
80 
81  /* helper function to get relations using try catch block */
82  lcio::LCRelationNavigator* GetRelations(lcio::LCEvent * evt, std::string RelName ) ;
83 
86  std::string _input_track_col_name ;
87 
90  std::string _input_track_rel_name ;
91 
94  std::string _output_track_col_name ;
95 
98  std::string _output_track_rel_name ;
99 
102  MarlinTrk::IMarlinTrkSystem* _trksystem ;
103 
104  bool _MSOn ;
105  bool _ElossOn ;
106  bool _SmoothOn ;
107 
108  float _initialTrackError_d0;
109  float _initialTrackError_phi0;
110  float _initialTrackError_omega;
111  float _initialTrackError_z0;
112  float _initialTrackError_tanL;
113  float _maxChi2PerHit;
114  double _mass ;
115 
116  int _n_run ;
117  int _n_evt ;
118 
119  int _initialTrackState;
120  int _fitDirection ;
121 
122  std::string _trkSystemName ;
123 
124  float _bField;
125 
126 } ;
127 
128 #endif
129 
130 
131 
MarlinTrk::IMarlinTrkSystem * _trksystem
pointer to the IMarlinTrkSystem instance
Definition: RefitProcessor.h:102
std::string _input_track_rel_name
Input track relations name for refitting.
Definition: RefitProcessor.h:90
virtual void end()
Called after data processing for clean up.
Definition: RefitProcessor.cc:429
std::string _output_track_col_name
refitted track collection name.
Definition: RefitProcessor.h:94
virtual void processRunHeader(lcio::LCRunHeader *run)
Called for every run.
Definition: RefitProcessor.cc:175
virtual void init()
Called at the begin of the job before anything is read.
Definition: RefitProcessor.cc:142
std::string _output_track_rel_name
Output track relations name for refitting.
Definition: RefitProcessor.h:98
std::string _input_track_col_name
Input track collection name for refitting.
Definition: RefitProcessor.h:86
virtual void processEvent(lcio::LCEvent *evt)
Called for every event - the working horse.
Definition: RefitProcessor.cc:180
Track Refitter processor for marlin.
Definition: RefitProcessor.h:35
Definition: RefitProcessor.h:66