QwAnalysis
QwHitPattern Class Reference

Hit patterns used in the tracking tree search. More...

#include <QwHitPattern.h>

+ Inheritance diagram for QwHitPattern:
+ Collaboration diagram for QwHitPattern:

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...
 
QwHitPatternoperator= (const QwHitPattern &rhs)
 Assignment operator. More...
 
QwHitPatternoperator+= (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...
 
VQwTrackingElementoperator= (const VQwTrackingElement &that)
 Assignment operator. More...
 
const QwDetectorInfoGetDetectorInfo () 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 QwDetectorInfofDetectorInfo
 
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...
 

Detailed Description

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.

Constructor & Destructor Documentation

QwHitPattern::QwHitPattern ( )
inline

Default constructor.

Definition at line 49 of file QwHitPattern.h.

51  { };
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146
QwHitPattern::QwHitPattern ( const unsigned int  levels)
inline

Constructor with hit pattern depth.

Definition at line 53 of file QwHitPattern.h.

References Reset(), and SetNumberOfLevels().

54  : fLevels(levels),fBins(0),fBinWidth(0),fPattern(0),fPatternHash(0)
55  {
56  SetNumberOfLevels(levels);
57  Reset();
58  };
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned char * fPattern
Definition: QwHitPattern.h:149
void SetNumberOfLevels(const unsigned int levels)
Set the hit pattern depth.
Definition: QwHitPattern.h:81
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146
void Reset()
Reset the contents of the hit pattern.
Definition: QwHitPattern.h:97

+ Here is the call graph for this function:

QwHitPattern::QwHitPattern ( const QwHitPattern pattern)
inline

Copy constructor.

Definition at line 60 of file QwHitPattern.h.

References fBins, fBinWidth, fPattern, and fPatternHash.

62  fLevels(pattern.fLevels),
63  fBins(pattern.fBins),fBinWidth(pattern.fBinWidth)
64  {
65  fPattern = new unsigned char[fBins];
66  for (unsigned int bin = 0; bin < fBins; bin++)
67  fPattern[bin] = pattern.fPattern[bin];
68  fPatternHash = new unsigned int[fBinWidth];
69  for (unsigned int hash = 0; hash < fBinWidth; hash++)
70  fPatternHash[hash] = pattern.fPatternHash[hash];
71  };
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned char * fPattern
Definition: QwHitPattern.h:149
VQwTrackingElement()
Default constructor.
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146
virtual QwHitPattern::~QwHitPattern ( )
inlinevirtual

Delete the hit pattern.

Definition at line 74 of file QwHitPattern.h.

References fLevels, fPattern, and fPatternHash.

74  {
75  if (fLevels == 0) return;
76  if (fPattern) delete[] fPattern;
77  if (fPatternHash) delete[] fPatternHash;
78  };
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150

Member Function Documentation

void QwHitPattern::_SetPoint ( double  position,
double  resolution,
double  detectorwidth 
)
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.

Parameters
positionCentral position
resolutionResolution
detectorwidthWidth of the detector

Definition at line 204 of file QwHitPattern.cc.

References _SetPoints().

208 {
209  _SetPoints (position - resolution, position + resolution, detectorwidth);
210 }
void _SetPoints(double pos_start, double pos_end, double detectorwidth)
Recursive tree pattern method on a range of points.

+ Here is the call graph for this function:

void QwHitPattern::_SetPoints ( double  pos_start,
double  pos_end,
double  detectorwidth 
)
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.

Parameters
pos_startStart position
pos_endEnd position
detectorwidthWidth of the detector

Definition at line 224 of file QwHitPattern.cc.

References fBinWidth, fPattern, fPatternHash, and hashgen().

Referenced by _SetPoint(), SetHDCHit(), and SetVDCHit().

228 {
229  int ia, ie;
230  int hashint = hashgen();
231  unsigned int binwidth = fBinWidth;
232  unsigned char* pattern = fPattern;
233 
234 
235 /* ---- compute the first bin in the deepest tree level to turn on ---- */
236 
237  ia = (int) floor (pos_start / detectorwidth * fBinWidth);
238 
239 
240 /* ---- compute the last bin in the deepest tree level to turn on ---- */
241 
242  ie = (int) floor (pos_end / detectorwidth * fBinWidth);
243 
244 /* ---- step through each of the bins at the deepest bin-division
245  level in the hit pattern and turn on the bits in the
246  pattern at all the bin-division levels for this bin. ---- */
247 
248  for (int j = ia; j <= ie; j++) { /* loop over the bins to be set */
249 
250  int i = j; /* remember the bin at the deepest level which is turned on */
251 
252  binwidth = fBinWidth; /* the size of the bit pattern for the detector
253  at the deepest level of bin-division. */
254  pattern = fPattern; /* pointer to start of the bit pattern */
255 
256 /* ---- check if the bin is inside the detector ---- */
257  if (i >= (signed int) binwidth)
258  return;
259  if (i < 0)
260  continue;
261 
262 /* ---- compute the hash value ---- */
263  //NOTE:why like this?
264  fPatternHash[i] = ((fPatternHash[i] << 1) + hashint) | 1;
265 // std::cout << "fPatternHash[" << i << "]=" << fPatternHash[i] << std::endl;
266 /* ---- set the bits in the bit pattern at all depths of bin-division ---- */
267  if (pattern) {
268  while (binwidth) { /* starting at maximum depth, loop over
269  each depth of the treesearch */
270 // if(binwidth==1) std::cout << "set i" << i << " " << pos_start << std::endl;
271  pattern[i] = 1; /* turn on the bit in this bin */
272  pattern += binwidth; /* set ahead to the part of the bit
273  pattern in which the bits for the
274  next higher bin-division are stored */
275  i >>= 1; /* go up one depth of the depth */
276  binwidth >>= 1; /* size of the bit pattern for the next
277  higher bin-division is half of the
278  size of the bit pattern for a given
279  level of bin-division. */
280 
281  } /* end of loop over the depths of the treesearch */
282  }
283  } /* end of loop over the bins to be set */
284 }
static int hashgen()
Definition: QwHitPattern.cc:24
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QwHitPattern::ClassDef ( QwHitPattern  ,
 
)
private
unsigned int QwHitPattern::GetFinestBinWidth ( ) const
inline

Get the finest bin width.

Definition at line 94 of file QwHitPattern.h.

References fBinWidth.

94 { return fBinWidth; };
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned int QwHitPattern::GetNumberOfBins ( ) const
inline

Get the number of bins.

Definition at line 92 of file QwHitPattern.h.

References fBins.

92 { return fBins; };
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146
unsigned int QwHitPattern::GetNumberOfLevels ( ) const
inline

Get the hit pattern depth.

Definition at line 90 of file QwHitPattern.h.

References fLevels.

90 { return fLevels; };
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
void QwHitPattern::GetPattern ( char *  pattern) const
inline

Get the hit pattern.

Definition at line 120 of file QwHitPattern.h.

References fBins, and fPattern.

120  {
121  for (unsigned int bin = 0; bin < fBins; bin++)
122  pattern[bin] = fPattern[bin];
123  };
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146
void QwHitPattern::GetPatternHash ( int *  patternhash) const
inline

Get the hit pattern hash.

Definition at line 125 of file QwHitPattern.h.

References fBinWidth, and fPatternHash.

125  {
126  for (unsigned int hash = 0; hash < fBinWidth; hash++)
127  patternhash[hash] = fPatternHash[hash];
128  };
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150
bool QwHitPattern::HasHits ( ) const
inline

Has this pattern any hit?

Definition at line 114 of file QwHitPattern.h.

References fBins, and fPattern.

114  {
115  if (fPattern == 0) return false;
116  else return fPattern[fBins-2] == 1;
117  };
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146
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!

Parameters
thatRight hand side
Returns
Left hand side

Definition at line 73 of file QwHitPattern.cc.

References fBins, fLevels, and fPattern.

74 {
75  // If lhs is zero we assign that and return
76  if (fLevels == 0) return *this = that;
77  // Check whether levels is equal
78  if (fLevels == that.fLevels) {
79  for (unsigned int bin = 0; bin < fBins; bin++)
80  fPattern[bin] |= that.fPattern[bin];
81  }
82  return *this;
83 }
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146
QwHitPattern & QwHitPattern::operator= ( const QwHitPattern that)

Assignment operator.

Assignment operator for hit patterns.

Parameters
thatRight hand side
Returns
Left hand side

Definition at line 38 of file QwHitPattern.cc.

References fBins, fBinWidth, fLevels, fPattern, fPatternHash, VQwTrackingElement::operator=(), and SetNumberOfLevels().

39 {
40  if (this == &that) return *this;
41 
43 
45  // If lhs is zero we assign that and return
46  if (fLevels == 0) return *this;
47  // Copy the levels and pattern data
48  for (unsigned int bin = 0; bin < fBins; bin++)
49  fPattern[bin] = that.fPattern[bin];
50  for (unsigned int hash = 0; hash < fBinWidth; hash++)
51  fPatternHash[hash] = that.fPatternHash[hash];
52  return *this;
53 }
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned char * fPattern
Definition: QwHitPattern.h:149
VQwTrackingElement & operator=(const VQwTrackingElement &that)
Assignment operator.
void SetNumberOfLevels(const unsigned int levels)
Set the hit pattern depth.
Definition: QwHitPattern.h:81
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146

+ Here is the call graph for this function:

void QwHitPattern::Reset ( )
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().

97  {
98  for (unsigned int bin = 0; bin < fBins; bin++)
99  fPattern[bin] = 0;
100  for (unsigned int hash = 0; hash < fBinWidth; hash++)
101  fPatternHash[hash] = 0;
102  };
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146

+ Here is the caller graph for this function:

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).

Parameters
detectorwidthWidth of the detector
hitHit

Definition at line 134 of file QwHitPattern.cc.

References _SetPoints(), VQwTrackingElement::GetDetectorInfo(), QwHit::GetDriftDistance(), VQwTrackingElement::GetElement(), QwDetectorInfo::GetElementSpacing(), and QwDetectorInfo::GetTrackResolution().

Referenced by SetHDCHitList().

137 {
138  // Get the wire number
139  int wire = hit->GetElement();
140  double drift_distance = hit->GetDriftDistance();
141  double wire_spacing = hit->GetDetectorInfo()->GetElementSpacing();
142  double track_resolution = hit->GetDetectorInfo()->GetTrackResolution();
143 
144 
145  // Set the points on the front/bottom side of the wire (R3/R2)
146  //NOTE:why wire+1,not wire?
147 // std::cout << "r2 bottom: " << hit->GetDirection() << " " << hit->GetPlane() << std::endl;
148  _SetPoints(wire_spacing * (wire-0.5) - drift_distance - track_resolution,
149  wire_spacing * (wire-0.5) - drift_distance + track_resolution,
150  detectorwidth);
151 
152 // std::cout << "r2 up: " << hit->GetDirection() << " " << hit->GetPlane() << std::endl;
153  // Set the points on the back/top side of the wire (R3/R2)
154  _SetPoints(wire_spacing * (wire-0.5) + drift_distance - track_resolution,
155  wire_spacing * (wire-0.5) + drift_distance + track_resolution,
156  detectorwidth);
157 
158 
159  return;
160 }
int GetElement() const
Get the element number.
const Double_t & GetDriftDistance() const
Definition: QwHit.h:92
double GetElementSpacing() const
const QwDetectorInfo * GetDetectorInfo() const
Get the detector info pointer.
void _SetPoints(double pos_start, double pos_end, double detectorwidth)
Recursive tree pattern method on a range of points.
double GetTrackResolution() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

Parameters
detectorwidthWidth of the detector
hitlistHit list

Definition at line 93 of file QwHitPattern.cc.

References SetHDCHit().

Referenced by QwTrackingWorker::ProcessEvent().

96 {
97  QwHitContainer::iterator end=hitlist->end();
98  for (QwHitContainer::iterator hit = hitlist->begin();
99  hit != end; ++hit){
100  if(hit->GetDriftDistance()<0 || hit->GetHitNumber()!=0) continue;
101  SetHDCHit(detectorwidth,&(*hit));
102  }
103 }
void SetHDCHit(double detectorwidth, QwHit *hit)
Set the hit pattern bins for the specified HDC-type hit.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwHitPattern::SetNumberOfLevels ( const unsigned int  levels)
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().

81  {
82  fLevels = levels;
83  if (fLevels == 0) return;
84  fBins = (1UL << fLevels); // total number of bins, i.e. 2^fLevels
85  fBinWidth = (1UL << (fLevels - 1)); // maximum bin division, i.e. 2^(fLevels-1)
86  fPattern = new unsigned char[fBins];
87  fPatternHash = new unsigned int[fBinWidth];
88  };
unsigned int fLevels
Depth of the tree search.
Definition: QwHitPattern.h:144
unsigned int fBinWidth
Width of each bin.
Definition: QwHitPattern.h:147
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int * fPatternHash
///&lt; Hit pattern
Definition: QwHitPattern.h:150
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146

+ Here is the caller graph for this function:

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)

Parameters
detectorwidthWidth of the detector
hitHit

Definition at line 172 of file QwHitPattern.cc.

References _SetPoints(), VQwTrackingElement::GetDetectorInfo(), QwHit::GetDriftDistance(), and QwDetectorInfo::GetTrackResolution().

Referenced by QwTrackingWorker::ProcessEvent(), and SetVDCHitList().

175 {
176  double halfwidth = (detectorwidth / 2.0); /* half-width of the detector (in cm) */
177  double drift_distance = hit->GetDriftDistance();
178  double track_resolution = hit->GetDetectorInfo()->GetTrackResolution();
179 
180  // Set the points on the front/top side of the wire (R3/R2)
181  _SetPoints(halfwidth - drift_distance - track_resolution,
182  halfwidth - drift_distance + track_resolution,
183  detectorwidth);
184 
185  // Set the points on the back/bottom side of the wire (R3/R2)
186  _SetPoints(halfwidth + drift_distance - track_resolution,
187  halfwidth + drift_distance + track_resolution,
188  detectorwidth);
189 
190  return;
191 }
const Double_t & GetDriftDistance() const
Definition: QwHit.h:92
const QwDetectorInfo * GetDetectorInfo() const
Get the detector info pointer.
void _SetPoints(double pos_start, double pos_end, double detectorwidth)
Recursive tree pattern method on a range of points.
double GetTrackResolution() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

Parameters
detectorwidthWidth of the detector
hitlistHit list

Definition at line 112 of file QwHitPattern.cc.

References SetVDCHit().

115 {
116  for (QwHitContainer::iterator hit = hitlist->begin();
117  hit != hitlist->end(); hit++)
118  SetVDCHit(detectorwidth, &(*hit));
119 }
void SetVDCHit(double detectorwidth, QwHit *hit)
Set the hit pattern bins for the specified VDC-type hit.

+ Here is the call graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const QwHitPattern hitpattern 
)
friend

///< Hash of the hit pattern

Stream the hit pattern to an std::ostream.

Definition at line 291 of file QwHitPattern.cc.

292 {
293  for (unsigned int bin = 0; bin < hitpattern.fBins - 1; bin++) {
294  if (hitpattern.fPattern[bin] == 1)
295  stream << "|";
296  else
297  stream << ".";
298  }
299  return stream;
300 }
unsigned char * fPattern
Definition: QwHitPattern.h:149
unsigned int fBins
Number of bins.
Definition: QwHitPattern.h:146

Field Documentation

unsigned int QwHitPattern::fBins
private
unsigned int QwHitPattern::fBinWidth
private

Width of each bin.

Definition at line 147 of file QwHitPattern.h.

Referenced by _SetPoints(), GetFinestBinWidth(), GetPatternHash(), operator=(), QwHitPattern(), Reset(), and SetNumberOfLevels().

unsigned int QwHitPattern::fLevels
private

Depth of the tree search.

Definition at line 144 of file QwHitPattern.h.

Referenced by GetNumberOfLevels(), operator+=(), operator=(), SetNumberOfLevels(), and ~QwHitPattern().

unsigned char* QwHitPattern::fPattern
private
unsigned int* QwHitPattern::fPatternHash
private

///< Hit pattern

Definition at line 150 of file QwHitPattern.h.

Referenced by _SetPoints(), GetPatternHash(), operator=(), QwHitPattern(), Reset(), SetNumberOfLevels(), and ~QwHitPattern().


The documentation for this class was generated from the following files: