QwAnalysis
QwTrackingTreeRegion.h
Go to the documentation of this file.
1 /*!
2  * \file QwTrackingTree.h
3  * \brief Definition of the track search tree
4  *
5  * \author Wouter Deconinck
6  * \date 2009-12-11
7  */
8 
9 #ifndef QWTRACKINGTREEREGION_H
10 #define QWTRACKINGTREEREGION_H
11 
12 // System headers
13 #include <iostream>
14 
15 // Qweak headers
16 #include "VQwTrackingElement.h"
17 #include "shortnode.h"
18 #include "shorttree.h"
21 
22 /**
23  * \class QwTrackingTreeRegion
24  * \ingroup QwTracking
25  *
26  * \author Burnham Stokes <bestokes@jlab.org>
27  * \author Wouter Deconinck <wdconinc@jlab.org>
28  * \date 2009-09-04 18:06:23
29  *
30  * \brief A container for the pattern databases for each detector region.
31  *
32  * It is useful to separate the pattern database into multiple detector regions
33  * to reduce the extent by which a set of hits are compared to a pattern.
34  * For instance, there are two databases for the region 3 set of detectors.
35  * One for the 'upper' and one for the 'lower' detector sets. Track segments
36  * in the area downstream of the QTOR magnet are approximated by straight lines.
37  * Only the VDC is designed to measure track positions, so these two databases
38  * designed to contain patterns which ressemble tracks passing through the VDC.
39  *
40  * The structure of a tree region is as follows. The tree region contains a
41  * flat list of shorttree objects which is read in sequentially from the cached
42  * tree file. The shorttree objects have son pointers to shortnode objects.
43  * For each shorttree there is a linked list of shortnode objects using the
44  * next pointers, which branches off to other trees using the tree pointers.
45  */
47  public VQwTrackingElement,
48  public QwObjectCounter<QwTrackingTreeRegion> {
49 
50  public:
51 
52  /// Default constructor
54  /// \brief Destructor
55  virtual ~QwTrackingTreeRegion();
56 
57  /// \brief Is this region searchable?
58  bool IsSearchable() const { return fSearchable; };
59  /// \brief Set this tree region to searchable
60  void SetSearchable(bool searchable = true) { fSearchable = searchable; };
61 
62  /// \brief Get the node to this tree region
63  shortnode* GetNode() { return &fNode; };
64 
65  /// \brief Get the width
66  double GetWidth() const { return fWidth; };
67  /// \brief Set the width
68  void SetWidth(double width) { fWidth = width; };
69 
70  /// Print the lists of trees and nodes
71  void Print(const Option_t* options = 0) const { PrintTrees(); PrintNodes(); };
72  /// \brief Print the list of trees
73  void PrintTrees() const;
74  /// \brief Print the list of nodes
75  void PrintNodes() const;
76 
77  private:
78 
79  int fDebug; ///< Debug level
80 
81  bool fSearchable; ///< Is this tree region searchable?
82 
83  shortnode fNode; ///< Top node of this tree region
84 
85  double fWidth; ///< Width of the detector plane (i.e. number of wires * wire spacing)
86 
87 }; // class QwTrackingTreeRegion
88 
89 #endif // QWTRACKINGTREEREGION_H
bool IsSearchable() const
Is this region searchable?
void PrintTrees() const
Print the list of trees.
shortnode * GetNode()
Get the node to this tree region.
void SetSearchable(bool searchable=true)
Set this tree region to searchable.
A container for the pattern databases for each detector region.
void PrintNodes() const
Print the list of nodes.
Memory management structure to count objects.
bool fSearchable
Is this tree region searchable?
void Print(const Option_t *options=0) const
Print the lists of trees and nodes.
Similar to a treenode.
Definition: shorttree.h:44
virtual ~QwTrackingTreeRegion()
Destructor.
void SetWidth(double width)
Set the width.
double fWidth
Width of the detector plane (i.e. number of wires * wire spacing)
Definition of a shortnode, the short version of a nodenode.
Definition of virtual base class for all tracking elements.
Similar to a nodenode.
Definition: shortnode.h:38
double GetWidth() const
Get the width.
QwTrackingTreeRegion()
Default constructor.
shortnode fNode
Top node of this tree region.
Virtual base class for all tracking elements.