QwAnalysis
QwTrackingWorker.h
Go to the documentation of this file.
1 /*!
2  * \file QwTrackingWorker.h
3  * \brief Controls all the routines involved in finding tracks in an event
4  *
5  * \author Wolfgang Wander <wwc@hermes.desy.de>
6  * \author Burnham Stokes <bestokes@jlab.org>
7  * \author Wouter Deconinck <wdconinc@mit.edu>
8  * \date 2009-09-04 18:06:23
9  */
10 
11 #ifndef QWTRACKINGWORKER_H
12 #define QWTRACKINGWORKER_H
13 
14 // Qweak headers
15 #include "QwTypes.h"
16 #include "QwOptions.h"
17 #include "QwGeometry.h"
18 #include "QwRayTracer.h"
19 
20 // Forward declarations
23 class QwTrackingTree;
24 class QwHitContainer;
25 class QwPartialTrack;
26 class QwTrack;
27 class QwEvent;
29 class QwMatrixLookup;
30 
31 // Forward declarations (modules)
34 class QwTrackingTreeSort;
36 
37 
38 /**
39  * \class QwTrackingWorker
40  * \ingroup QwTracking
41  * \brief Controls all the routines involved in finding tracks in an event
42  *
43  * The tracking worker coordinates the track finding based on the hit list
44  * provided to the ProcessHits() method.
45  */
47 
48  public:
49 
50  int ngood; ///< number of good events
51  int nbad; ///< number of bad events
52 
53  int R2Good;
54  int R2Bad;
55  int R3Good;
56  int R3Bad;
57 
58  int nbridged; ///< number of beidged tracks
59 
60  /// \brief Default constructor with name
61  QwTrackingWorker(QwOptions& options, const QwGeometry& geometry);
62  /// \brief Destructor
63  virtual ~QwTrackingWorker();
64 
65  /// \brief Define command line and config file options
66  static void DefineOptions(QwOptions& options);
67  /// \brief Process command line and config file options
68  void ProcessOptions(QwOptions& options);
69 
70  /// \brief Get the debug level
71  int GetDebugLevel() const { return fDebug; };
72  /// \brief Set the debug level
73  void SetDebugLevel(const int debug) { fDebug = debug; };
74 
75  /// \brief Get the geometry
76  const QwGeometry GetGeometry() const { return fGeometry; };
77  /// \brief Set the geometry
78  void SetGeometry(const QwGeometry& geometry) { fGeometry = geometry; };
79 
80  /// Get the magnetic field current
81  double GetMagneticFieldCurrent() const {
83  else return 0.0;
84  }
85  /// Set the magnetic field current
86  void SetMagneticFieldCurrent(const double current) {
88  }
89 
90  /// \brief Process the hit list and construct the event
91  void ProcessEvent (const QwSubsystemArrayTracking *detectors, QwEvent *event);
92 
93  private:
94 
95  /// \brief Detector geometry
97 
98  /// \brief Debug level
99  int fDebug;
100 
101  /// \brief Regenerate the search tree
103 
104  /// \brief Region 2 levels
106  /// \brief Region 3 levels
108 
109  /// \brief Initialize the pattern search tree
110  void InitTree(const QwGeometry& geometry);
111 
112  /// \name Momentum determination bridging methods
113  //@{
114  /// Track filter
116  /// Ray tracing bridging method
118  //@}
119 
120 
121  /// \name Parsed configuration options
122  //@{
123  bool fDisableTracking; ///< Disable all tracking
124  bool fPrintPatternDatabase; ///< Print the pattern database
125  bool fShowEventPattern; ///< Show all event patterns
126  bool fShowMatchingPattern; ///< Show matching event patterns
127  bool fDisableMomentum; ///< Disable momentum reconstruction
128  bool fDisableMatrixLookup; ///< Disable matrix lookup momentum reconstruction
129  bool fDisableRayTracer; ///< Disable ray tracer momentum reconstruction
130  bool fMismatchPkg; ///< Indicates if the pkg for R2 and R3 is differnt at the same octant
131  std::string fFilenameFieldmap; ///< Filename of the fieldmap in QW_FIELDMAP
132  std::string fFilenameLookupTable; ///< Filename of the lookup table in QW_LOOKUP
133  //@}
134 
135  private:
136 
137  /// \name Helper modules
138  //@{
139  QwTrackingTreeSearch* fTreeSearch; ///< Module that handles the tree search
140  QwTrackingTreeCombine* fTreeCombine; ///< Module that combines treelines and partial tracks
141  QwTrackingTreeSort* fTreeSort; ///< Module that sorts lists of treelines and partial tracks
142  QwTrackingTreeMatch* fTreeMatch; ///< Module that matches up VDC front and back treelines
143  //@}
144 
145  /// Internal list of search trees created by QwTrackingWorker
146  std::vector<QwTrackingTreeRegion*> fSearchTrees;
147 
148  private:
149 
150  // Disabled default constructor
152 
153 }; // class QwTrackingWorker
154 
155 #endif // QWTRACKINGWORKER_H
Definition of the ray-tracing bridging method for R2/R3 partial tracks.
bool fDisableTracking
Disable all tracking.
double GetMagneticFieldCurrent() const
Get the magnetic field current.
bool fPrintPatternDatabase
Print the pattern database.
An options class.
Definition: QwOptions.h:133
int GetDebugLevel() const
Get the debug level.
A container for the pattern databases for each detector region.
int fLevelsR2
Region 2 levels.
virtual ~QwTrackingWorker()
Destructor.
int nbad
number of bad events
QwTrackingTreeSort * fTreeSort
Module that sorts lists of treelines and partial tracks.
void ProcessEvent(const QwSubsystemArrayTracking *detectors, QwEvent *event)
Process the hit list and construct the event.
std::vector< QwTrackingTreeRegion * > fSearchTrees
Internal list of search trees created by QwTrackingWorker.
void SetGeometry(const QwGeometry &geometry)
Set the geometry.
QwRayTracer * fRayTracer
Ray tracing bridging method.
int fDebug
Debug level.
QwTrackingTreeMatch * fTreeMatch
Module that matches up VDC front and back treelines.
bool fDisableMatrixLookup
Disable matrix lookup momentum reconstruction.
Track filter for the bridging methods.
Controls all the routines involved in finding tracks in an event.
Contains a tracked event, i.e. all information from hits to tracks.
Definition: QwEvent.h:156
void SetDebugLevel(const int debug)
Set the debug level.
double GetMagneticFieldCurrent() const
Get magnetic field current.
Definition: QwRayTracer.h:61
void ProcessOptions(QwOptions &options)
Process command line and config file options.
QwTrackingTreeSearch * fTreeSearch
Module that handles the tree search.
QwTrackingTreeCombine * fTreeCombine
Module that combines treelines and partial tracks.
Contains the complete track as a concatenation of partial tracks.
Definition: QwTrack.h:30
static void DefineOptions(QwOptions &options)
Define command line and config file options.
Module that matches track segments for pairs of wire planes.
bool fShowMatchingPattern
Show matching event patterns.
void SetMagneticFieldCurrent(const double current)
Set the magnetic field current.
Creates and manages the treesearch pattern database.
const QwGeometry GetGeometry() const
Get the geometry.
QwBridgingTrackFilter * fBridgingTrackFilter
Track filter.
This module is used to identify good track segments versus ghost tracks/hits.
QwGeometry fGeometry
Detector geometry.
bool fShowEventPattern
Show all event patterns.
int ngood
number of good events
bool fDisableRayTracer
Disable ray tracer momentum reconstruction.
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
Definition: QwGeometry.h:27
void InitTree(const QwGeometry &geometry)
Initialize the pattern search tree.
An options class which parses command line, config file and environment.
Combines track segments and performs line fitting.
std::string fFilenameLookupTable
Filename of the lookup table in QW_LOOKUP.
int fLevelsR3
Region 3 levels.
int nbridged
number of beidged tracks
Contains the straight part of a track in one region only.
bool fMismatchPkg
Indicates if the pkg for R2 and R3 is differnt at the same octant.
bool fRegenerate
Regenerate the search tree.
void SetMagneticFieldCurrent(const double current)
Set magnetic field current.
Definition: QwRayTracer.h:66
std::string fFilenameFieldmap
Filename of the fieldmap in QW_FIELDMAP.
bool fDisableMomentum
Disable momentum reconstruction.