QwAnalysis
|
Hit patterns used in the tracking tree search. More...
#include <QwHitPattern.h>
Public Member Functions | |
QwHitPattern () | |
Default constructor. More... | |
QwHitPattern (const unsigned int levels) | |
Constructor with hit pattern depth. More... | |
QwHitPattern (const QwHitPattern &pattern) | |
Copy constructor. More... | |
virtual | ~QwHitPattern () |
Delete the hit pattern. More... | |
void | SetNumberOfLevels (const unsigned int levels) |
Set the hit pattern depth. More... | |
unsigned int | GetNumberOfLevels () const |
Get the hit pattern depth. More... | |
unsigned int | GetNumberOfBins () const |
Get the number of bins. More... | |
unsigned int | GetFinestBinWidth () const |
Get the finest bin width. More... | |
void | Reset () |
Reset the contents of the hit pattern. More... | |
void | SetHDCHit (double detectorwidth, QwHit *hit) |
Set the hit pattern bins for the specified HDC-type hit. More... | |
void | SetVDCHit (double detectorwidth, QwHit *hit) |
Set the hit pattern bins for the specified VDC-type hit. More... | |
void | SetHDCHitList (double detectorwidth, QwHitContainer *hitlist) |
Set the hit pattern bins for the specified HDC-type hit list. More... | |
void | SetVDCHitList (double detectorwidth, QwHitContainer *hitlist) |
Set the hit pattern bins for the specified VDC-type hit list. More... | |
bool | HasHits () const |
Has this pattern any hit? More... | |
void | GetPattern (char *pattern) const |
Get the hit pattern. More... | |
void | GetPatternHash (int *patternhash) const |
Get the hit pattern hash. More... | |
QwHitPattern & | operator= (const QwHitPattern &rhs) |
Assignment operator. More... | |
QwHitPattern & | operator+= (const QwHitPattern &rhs) |
Addition-assignment operator. More... | |
Public Member Functions inherited from VQwTrackingElement | |
VQwTrackingElement () | |
Default constructor. More... | |
VQwTrackingElement (const VQwTrackingElement &that) | |
virtual | ~VQwTrackingElement () |
Virtual destructor. More... | |
VQwTrackingElement & | operator= (const VQwTrackingElement &that) |
Assignment operator. More... | |
const QwDetectorInfo * | GetDetectorInfo () const |
Get the detector info pointer. More... | |
void | SetDetectorInfo (const QwDetectorInfo *detectorinfo) |
Set the detector info pointer. More... | |
EQwRegionID | GetRegion () const |
Get the region. More... | |
void | SetRegion (EQwRegionID region) |
Set the region. More... | |
EQwDetectorPackage | GetPackage () const |
Get the package. More... | |
void | SetPackage (EQwDetectorPackage package) |
Set the package. More... | |
int | GetOctant () const |
Get the octant number. More... | |
void | SetOctant (int octant) |
Set the octant number. More... | |
EQwDirectionID | GetDirection () const |
Get the direction. More... | |
void | SetDirection (EQwDirectionID direction) |
Set the direction. More... | |
int | GetPlane () const |
Get the plane number. More... | |
void | SetPlane (int plane) |
Set the plane number. More... | |
int | GetElement () const |
Get the element number. More... | |
void | SetElement (int element) |
Set the element number. More... | |
void | SetGeometryTo (const VQwTrackingElement &e) |
Copy the geometry info from another object. More... | |
Public Member Functions inherited from QwObjectCounter< QwHitPattern > | |
QwObjectCounter () | |
Default constructor. More... | |
QwObjectCounter (const QwObjectCounter &) | |
Copy constructor. More... | |
virtual | ~QwObjectCounter () |
Destructor. More... | |
Private Member Functions | |
void | _SetPoint (double position, double resolution, double detectorwidth) |
Recursive tree pattern method on a point with resolution. More... | |
void | _SetPoints (double pos_start, double pos_end, double detectorwidth) |
Recursive tree pattern method on a range of points. More... | |
ClassDef (QwHitPattern, 1) | |
Private Attributes | |
unsigned int | fLevels |
Depth of the tree search. More... | |
unsigned int | fBins |
Number of bins. More... | |
unsigned int | fBinWidth |
Width of each bin. More... | |
unsigned char * | fPattern |
unsigned int * | fPatternHash |
///< Hit pattern More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const QwHitPattern &hitpattern) |
///< Hash of the hit pattern More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from QwObjectCounter< QwHitPattern > | |
static size_t | GetObjectsCreated () |
Get number of objects ever created. More... | |
static size_t | GetObjectsAlive () |
Get number of objects still alive. More... | |
Protected Member Functions inherited from VQwTrackingElement | |
ClassDef (VQwTrackingElement, 1) | |
Protected Attributes inherited from VQwTrackingElement | |
const QwDetectorInfo * | fDetectorInfo |
EQwRegionID | fRegion |
///< Detector info pointer More... | |
EQwDetectorPackage | fPackage |
Package. More... | |
int | fOctant |
Octant number. More... | |
EQwDirectionID | fDirection |
Direction. More... | |
int | fPlane |
Plane number. More... | |
int | fElement |
Element number. More... | |
Hit patterns used in the tracking tree search.
The hit patterns used in the tree search have a rather peculiar format. Each level of depth in the pattern has a resolution that is twice as good as the previous level. The top level has a resolution of one, meaning that one bit indicates whether a track is present or not. The second level has two bits, etc.
A pattern is stored for every layer of the tracking detector (or every wire in the case of the VDCs, where the interpretation is rotated over 90 degrees).
The options file indicates the number of tree levels (how many times we go to finer binning). The total number of bits is determined using bit shift operators: Total number of bins + 1 = (1UL << levels) == 2^levels Number of bins at bottom = (1UL << (levels - 1)) == 2^(levels-1) For e.g. 4 levels we need 1 + 2 + 4 + 8 = 15 = (2^4 - 1) bits.
Definition at line 44 of file QwHitPattern.h.
|
inline |
Default constructor.
Definition at line 49 of file QwHitPattern.h.
|
inline |
Constructor with hit pattern depth.
Definition at line 53 of file QwHitPattern.h.
References Reset(), and SetNumberOfLevels().
|
inline |
Copy constructor.
Definition at line 60 of file QwHitPattern.h.
References fBins, fBinWidth, fPattern, and fPatternHash.
|
inlinevirtual |
Delete the hit pattern.
Definition at line 74 of file QwHitPattern.h.
References fLevels, fPattern, and fPatternHash.
|
private |
Recursive tree pattern method on a point with resolution.
Set the bins in the hit pattern for a range of positions around a central point within a specified distance/resolution by calling the setpoint() function.
position | Central position |
resolution | Resolution |
detectorwidth | Width of the detector |
Definition at line 204 of file QwHitPattern.cc.
References _SetPoints().
|
private |
Recursive tree pattern method on a range of points.
Set the bins in a hit pattern for a range of positions. The range of hit patterns is specified by a start and a stop position in the detector. This function turns on the bins in the hit pattern for each level of the bin-division used in the tree search algorithm.
pos_start | Start position |
pos_end | End position |
detectorwidth | Width of the detector |
Definition at line 224 of file QwHitPattern.cc.
References fBinWidth, fPattern, fPatternHash, and hashgen().
Referenced by _SetPoint(), SetHDCHit(), and SetVDCHit().
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the hit pattern hash.
Definition at line 125 of file QwHitPattern.h.
References fBinWidth, and fPatternHash.
|
inline |
Has this pattern any hit?
Definition at line 114 of file QwHitPattern.h.
References fBins, and fPattern.
QwHitPattern & QwHitPattern::operator+= | ( | const QwHitPattern & | that | ) |
Addition-assignment operator.
Addition-assignment operator for hit patterns. This is important for multiple hits on a single wire.
TODO figure out how this affects region 2 and region 3
Requirements are: hitpattern += 0 == hitpattern 0 += hitpattern == hitpattern hitpattern1 += hitpattern2 == hitpattern as obtained by TreeSearch code
The hash pattern is not so important, but the hit pattern has to match!
that | Right hand side |
Definition at line 73 of file QwHitPattern.cc.
References fBins, fLevels, and fPattern.
QwHitPattern & QwHitPattern::operator= | ( | const QwHitPattern & | that | ) |
Assignment operator.
Assignment operator for hit patterns.
that | Right hand side |
Definition at line 38 of file QwHitPattern.cc.
References fBins, fBinWidth, fLevels, fPattern, fPatternHash, VQwTrackingElement::operator=(), and SetNumberOfLevels().
|
inline |
Reset the contents of the hit pattern.
Definition at line 97 of file QwHitPattern.h.
References fBins, fBinWidth, fPattern, and fPatternHash.
Referenced by QwHitPattern().
void QwHitPattern::SetHDCHit | ( | double | detectorwidth, |
QwHit * | hit | ||
) |
Set the hit pattern bins for the specified HDC-type hit.
Set the hit pattern bins for the specified HDC-type hit.
The planes are treated as individual tree-detectors. In this case, a separate hit pattern is created for both planes and the above described searching for paired hits is not employed. (This method is the standard for the front chambers since they have only four planes per treeline).
detectorwidth | Width of the detector |
hit | Hit |
Definition at line 134 of file QwHitPattern.cc.
References _SetPoints(), VQwTrackingElement::GetDetectorInfo(), QwHit::GetDriftDistance(), VQwTrackingElement::GetElement(), QwDetectorInfo::GetElementSpacing(), and QwDetectorInfo::GetTrackResolution().
Referenced by SetHDCHitList().
void QwHitPattern::SetHDCHitList | ( | double | detectorwidth, |
QwHitContainer * | hitlist | ||
) |
Set the hit pattern bins for the specified HDC-type hit list.
Set the hit pattern bins for the specified HDC-type hit list.
detectorwidth | Width of the detector |
hitlist | Hit list |
Definition at line 93 of file QwHitPattern.cc.
References SetHDCHit().
Referenced by QwTrackingWorker::ProcessEvent().
|
inline |
Set the hit pattern depth.
Definition at line 81 of file QwHitPattern.h.
References fBins, fBinWidth, fLevels, fPattern, and fPatternHash.
Referenced by operator=(), and QwHitPattern().
void QwHitPattern::SetVDCHit | ( | double | detectorwidth, |
QwHit * | hit | ||
) |
Set the hit pattern bins for the specified VDC-type hit.
Set the hit pattern bins for the specified VDC-type hit.
(TODO Need to elaborate on how this is different exactly)
detectorwidth | Width of the detector |
hit | Hit |
Definition at line 172 of file QwHitPattern.cc.
References _SetPoints(), VQwTrackingElement::GetDetectorInfo(), QwHit::GetDriftDistance(), and QwDetectorInfo::GetTrackResolution().
Referenced by QwTrackingWorker::ProcessEvent(), and SetVDCHitList().
void QwHitPattern::SetVDCHitList | ( | double | detectorwidth, |
QwHitContainer * | hitlist | ||
) |
Set the hit pattern bins for the specified VDC-type hit list.
Set the hit pattern bins for the specified VDC-type hit list.
detectorwidth | Width of the detector |
hitlist | Hit list |
Definition at line 112 of file QwHitPattern.cc.
References SetVDCHit().
|
friend |
///< Hash of the hit pattern
Stream the hit pattern to an std::ostream.
Definition at line 291 of file QwHitPattern.cc.
|
private |
Number of bins.
Definition at line 146 of file QwHitPattern.h.
Referenced by GetNumberOfBins(), GetPattern(), HasHits(), operator+=(), operator<<(), operator=(), QwHitPattern(), Reset(), and SetNumberOfLevels().
|
private |
Width of each bin.
Definition at line 147 of file QwHitPattern.h.
Referenced by _SetPoints(), GetFinestBinWidth(), GetPatternHash(), operator=(), QwHitPattern(), Reset(), and SetNumberOfLevels().
|
private |
Depth of the tree search.
Definition at line 144 of file QwHitPattern.h.
Referenced by GetNumberOfLevels(), operator+=(), operator=(), SetNumberOfLevels(), and ~QwHitPattern().
|
private |
Definition at line 149 of file QwHitPattern.h.
Referenced by _SetPoints(), GetPattern(), HasHits(), operator+=(), operator<<(), operator=(), QwHitPattern(), Reset(), SetNumberOfLevels(), and ~QwHitPattern().
|
private |
///< Hit pattern
Definition at line 150 of file QwHitPattern.h.
Referenced by _SetPoints(), GetPatternHash(), operator=(), QwHitPattern(), Reset(), SetNumberOfLevels(), and ~QwHitPattern().