74 if (that == 0)
return;
121 for (
int i = 0; i < 3; i++)
143 if (
this == &that)
return *
this;
153 for (
size_t i = 0; i < 3; i++)
203 for (
size_t i = 0; i <
fQwHits.size(); i++)
228 for (std::vector<QwHit*>::const_iterator hit = hitlist.begin();
229 hit != hitlist.end(); hit++)
268 return weight *
fChi;
279 double best_position = 9999.9;
283 double position = fabs(
GetHit(hit)->GetDriftPosition() - offset);
284 if (position < best_position) {
285 best_position = position;
299 double sumResiduals = 0.0;
319 std::cout << *
this << std::endl;
329 if (this->
IsValid()) std::cout << *
this << std::endl;
343 stream << tl.
a_beg <<
"," << tl.
a_end <<
" -- ";
350 stream <<
"/" << tl.
GetPlane() <<
")";
356 stream <<
", fSlope = " << tl.
fSlope;
358 stream <<
", fChi = " << tl.
fChi;
359 stream <<
"; hits (" << tl.
fQwHits.size() <<
"):";
360 for (
size_t hit = 0; hit < tl.
fQwHits.size(); hit++)
361 stream <<
" " << tl.
fQwHits.at(hit)->GetPlane() <<
":" << tl.
fQwHits.at(hit)->GetElement();
363 if (tl.
IsVoid()) stream <<
" (void)";
369 std::vector<int>::iterator iter = box.begin();
370 while (iter != box.end())
376 std::pair<double,double> boundary(0,0);
379 double dx = width / bins, lower = 0, upper = 0;
381 if (bin <= (
int) (bins/2)) bin = bins - bin + 1;
382 lower = (bin - 1) * dx - width / 2 - resolution;
383 upper = bin * dx - width / 2 + resolution;
384 boundary.first = lower;
385 boundary.second = upper;
double fChi
chi squared(?)
#define QwMessage
Predefined log drain for regular messages.
void SetPlane(int plane)
Set the plane number.
int fHashArray[2 *MAX_LAYERS]
///< all hits that satisfy road requirement
std::ostream & operator<<(std::ostream &out, const QwColor &color)
Output stream operator which uses the enum-to-escape-code mapping.
double fOffset
track offset
void SetMatchingPattern(std::vector< int > &box)
Set the matching pattern.
bool fIsUsed
has been used (part of parttrack)
void DeleteHits()
Delete the hits in the list.
int fR3Offset
offset of demultiplexed group of 8
Int_t GetNumberOfHits() const
Get the number of hits.
const Bool_t & IsUsed() const
bool fIsVoid
has been found void
void SetRegion(EQwRegionID region)
Set the region.
QwHit * GetBestWireHit(double offset=0.0)
Get the hit with the smallest drift distance.
double fAverageResidual
///< link to next list element
std::vector< QwHit * > fQwHits
List of hits in this tree line.
double fCov[3]
covariance matrix of offset and slope
double GetChiWeight()
Get the weighted chi^2.
void SetPackage(EQwDetectorPackage package)
Set the package.
int fR3LastWire
first and last wire in group of 8
void AddHitList(const std::vector< QwHit * > &fQwHits)
Add a list of hits.
Definition of the hit patterns used in the tracking tree search.
EQwRegionID GetRegion() const
Get the region.
int GetPlane() const
Get the plane number.
VQwTrackingElement & operator=(const VQwTrackingElement &that)
Assignment operator.
QwHit * GetHit(int i=0)
Get a specific hit.
Draft skeleton for the decoding-to-QTR interface class.
const Double_t & GetTreeLineResidual() const
void Print(const Option_t *options=0) const
int b_end
bin in last layer
int fNumHits
number of hits on this treeline
void Initialize()
Initialization.
Definition of the one-dimensional track stubs.
bool IsVoid() const
Is this tree line void?
void SetDirection(EQwDirectionID direction)
Set the direction.
std::vector< int > fMatchingPattern
One-dimensional (u, v, or x) track stubs and associated hits.
int fNumMiss
number of planes without hits
std::pair< double, double > CalculateDistance(int row, double width, unsigned int bins, double error)
calculate the upper and lower bound of the drift distance give the row number
QwTreeLine()
Default constructor.
static std::ostream & endl(std::ostream &)
End of the line.
void DeleteHit(const size_t i)
Delete a single hit.
QwTreeLine & operator=(const QwTreeLine &treeline)
Assignment operator.
void AddHit(const QwHit *hit)
Add a single hit.
virtual ~QwTreeLine()
Destructor.
bool IsValid() const
Is this tree line valid?
QwHit * fHits[2 *MAX_LAYERS]
Hit structure uniquely defining each hit.
int a_end
bin in first layer
EQwDirectionID GetDirection() const
Get the direction.
Int_t fNQwHits
Number of hits in this tree line.
double CalculateAverageResidual()
Calculate the average residuals.
void ClearHits()
Clear the list of hits without deleting.
EQwDetectorPackage GetPackage() const
Get the package.
static const double cm
Length units: base unit is mm.
Virtual base class for all tracking elements.