MarlinTrk  2.2.0
DiagnosticsController.h
1 #ifndef DiagnosticsController_h
2 #define DiagnosticsController_h
3 
4 #include "MarlinTrk/MarlinTrkDiagnostics.h"
5 
6 #ifdef MARLINTRK_DIAGNOSTICS_ON
7 
8 class TFile;
9 class TH1F;
10 class TTree;
11 class TKalMatrix;
12 
13 namespace EVENT {
14  class MCParticle;
15 }
16 
17 class ILDVTrackHit;
18 class TKalTrackSite;
19 class MarlinTrkNtuple;
20 
21 namespace MarlinTrk{
22 
23  class MarlinKalTestTrack;
24  class IMarlinTrack;
25 
26 
27  class DiagnosticsController {
28 
29  public:
30 
32  DiagnosticsController();
33 
35  virtual ~DiagnosticsController();
36 
37 
38  void init(std::string root_file_name, std::string root_Tree_name, bool _recording_on=true ) ;
39 
40  void new_track(MarlinKalTestTrack* trk) ;
41 
42  void set_intial_track_parameters(double d0, double phi0, double omega, double z0, double tanL, double pivot_x, double pivot_y, double pivot_z, TKalMatrix& cov);
43 
44  void record_site(ILDVTrackHit* hit, TKalTrackSite* site);
45 
46  void record_rejected_site(ILDVTrackHit* hit, TKalTrackSite* site);
47 
48  void skip_current_track();
49 
50  void end_track() ;
51 
52  void end();
53 
54 
55  private:
56 
57  DiagnosticsController(const DiagnosticsController&) ; // Prevent copy-construction
58  DiagnosticsController& operator=(const DiagnosticsController&) ; // Prevent assignment
59 
60  void clear_track_record();
61 
62  bool _initialised;
63  bool _recording_on;
64 
65  int _ntracks_written;
66  int _ntracks_skipped;
67 
68  std::string _root_file_name;
69  std::string _root_tree_name;
70 
71  TFile* _root_file;
72  TTree* _tree;
73  MarlinTrkNtuple* _track_record;
74 
75  MarlinKalTestTrack* _current_track;
76 
77  EVENT::MCParticle* _currentMCP;
78 
79  bool _mcpInfoStored;
80  bool _skip_track;
81 
82 
83  };
84 
85 
86 }
87 
88 #endif
89 
90 #endif
Definition: MarlinTrkNtuple.h:17