MarlinTrkProcessors  2.4.1
TruthTrackFinder.h
1 #ifndef TruthTrackFinder_h
2 #define TruthTrackFinder_h 1
3 
4 #include "marlin/Processor.h"
5 
6 #include "lcio.h"
7 
8 #include <string>
9 #include <vector>
10 #include <map>
11 
12 #include <gsl/gsl_rng.h>
13 #include "DDRec/Surface.h"
14 #include <EVENT/LCCollection.h>
15 #include "MarlinTrk/IMarlinTrkSystem.h"
16 #include "EVENT/TrackerHit.h"
17 
18 #include <AIDA/AIDA.h>
19 
20 using namespace lcio ;
21 using namespace marlin ;
22 using namespace AIDA ;
23 
24 class TruthTrackFinder : public Processor {
25 
26  public:
27 
28  virtual Processor* newProcessor() { return new TruthTrackFinder ; }
29 
31 
32  // Initialisation - run at the beginning to start histograms, etc.
33  virtual void init() ;
34 
35  // Called at the beginning of every run
36  virtual void processRunHeader( LCRunHeader* run ) ;
37 
38  // Run over each event - the main algorithm
39  virtual void processEvent( LCEvent * evt ) ;
40 
41  // Run at the end of each event
42  virtual void check( LCEvent * evt ) ;
43 
44  // Called at the very end for cleanup, histogram saving, etc.
45  virtual void end() ;
46 
47  // Call to get collections
48  void getCollection(LCCollection*&, std::string, LCEvent*);
49 
50  // Sort hits by radius
51 
52 
53  protected:
54 
55  // Collection names for (in/out)put
56  std::vector<std::string> m_inputTrackerHitCollections ;
57  std::vector<std::string> m_inputTrackerHitRelationCollections ;
58  std::string m_inputParticleCollection ;
59  std::string m_outputTrackCollection ;
60  std::string m_outputTrackRelationCollection;
61 
62  bool m_useTruthInPrefit;
63  bool m_fitForward;
64 
65  // Run and event counters
66  int m_eventNumber ;
67  int m_runNumber ;
68 
69  // Track fit factory
70  MarlinTrk::IMarlinTrkSystem* trackFactory;
71 
72  // Track fit parameters
73  double m_initialTrackError_d0;
74  double m_initialTrackError_phi0;
75  double m_initialTrackError_omega;
76  double m_initialTrackError_z0;
77  double m_initialTrackError_tanL;
78  double m_maxChi2perHit;
79  double m_magneticField;
80  int m_fitFails;
81 
82 
83 } ;
84 
85 bool sort_by_radius(EVENT::TrackerHit*, EVENT::TrackerHit*);
86 
87 
88 #endif
89 
90 
91 
Definition: TruthTrackFinder.h:24