ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
|
Describes a shape in 3D space. More...
#include <AtPattern.h>
Public Types | |
using | XYZPoint = ROOT::Math::XYZPoint |
Public Member Functions | |
AtPattern (Int_t numPoints=0) | |
AtPattern (const AtPattern &)=default | |
AtPattern (AtPattern &&)=default | |
virtual | ~AtPattern ()=default |
Double_t | FitPattern (const std::vector< AtHit > &pointsToFit, Double_t qThreshold=-1) |
Fit the pattern. More... | |
Double_t | FitPattern (const std::vector< const AtHit * > &pointsToFit, Double_t qThreshold=-1) |
Double_t | FitPattern (const std::vector< XYZPoint > &pointsToFit) |
Fit the pattern shape. More... | |
virtual void | DefinePattern (const std::vector< XYZPoint > &points)=0 |
Define based on points. More... | |
virtual void | DefinePattern (std::vector< double > par) |
Define based on parameters. More... | |
virtual Double_t | DistanceToPattern (const XYZPoint &point) const =0 |
Closest distance to pattern. More... | |
virtual XYZPoint | ClosestPointOnPattern (const XYZPoint &point) const =0 |
Closest point on pattern. More... | |
virtual XYZPoint | GetPointAt (double t) const =0 |
Point on pattern at t. More... | |
TEveLine * | GetEveLine (double tMin, double tMax, int n) const |
Get visual representation of pattern. More... | |
virtual TEveElement * | GetEveElement () const =0 |
Get visual representation of pattern. More... | |
virtual std::unique_ptr< AtPattern > | Clone () const =0 |
Int_t | GetNumPoints () const |
Number of points to define the pattern. More... | |
Double_t | GetChi2 () const |
Int_t | GetNFree () const |
virtual std::vector< double > | GetPatternPar () const |
Get list or parameters that describe the pattern. More... | |
Double_t | GetTotCharge () const |
void | SetPatternPar (std::vector< double > par) |
void | SetChi2 (double chi2) |
Protected Types | |
using | TEveLineVec = std::vector< std::unique_ptr< TEveLine > > |
Protected Member Functions | |
virtual void | FitPattern (const std::vector< XYZPoint > &pointsToFit, const std::vector< double > &pointCharge)=0 |
Protected Attributes | |
std::vector< Double_t > | fPatternPar |
Double_t | fChi2 {NAN} |
Int_t | fNFree {0} |
const Int_t | fNumPoints |
Double_t | fTotCharge {0} |
Describes a shape in 3D space.
A base class that describes the pattern of a track. For example a 2D circle or a line These patterns are parameterized by some number (t)
Definition at line 40 of file AtPattern.h.
|
protected |
Definition at line 51 of file AtPattern.h.
using AtPatterns::AtPattern::XYZPoint = ROOT::Math::XYZPoint |
Definition at line 42 of file AtPattern.h.
AtPattern::AtPattern | ( | Int_t | numPoints = 0 | ) |
Definition at line 12 of file AtPattern.cxx.
|
default |
|
default |
|
virtualdefault |
|
pure virtual |
Implemented in AtPatterns::AtPatternY, AtPatterns::AtPatternLine, AtPatterns::AtPatternCircle2D, and AtPatterns::AtPatternRay.
|
pure virtual |
Closest point on pattern.
[in] | point | Point to get the closest point on the pattern. |
Implemented in AtPatterns::AtPatternY, AtPatterns::AtPatternLine, AtPatterns::AtPatternCircle2D, and AtPatterns::AtPatternRay.
|
pure virtual |
Define based on points.
Will set-up the pattern using the vector of XYZPoints. Assumes the size of points is equal to fNumPoints
[in] | points | 3D points to use when defining the pattern |
Implemented in AtPatterns::AtPatternY, AtPatterns::AtPatternLine, AtPatterns::AtPatternCircle2D, and AtPatterns::AtPatternRay.
|
inlinevirtual |
Define based on parameters.
Sets up the pattern according to the passed parameters. The internal implementation of what these parameters mean may change. It is the inverse operation of GetPatternPar()
Reimplemented in AtPatterns::AtPatternY.
Definition at line 79 of file AtPattern.h.
|
pure virtual |
Closest distance to pattern.
[in] | point | Point to get the distance from. |
Implemented in AtPatterns::AtPatternY, AtPatterns::AtPatternLine, AtPatterns::AtPatternCircle2D, and AtPatterns::AtPatternRay.
Double_t AtPattern::FitPattern | ( | const std::vector< AtHit > & | pointsToFit, |
Double_t | qThreshold = -1 |
||
) |
Fit the pattern.
Fit the pattern shape using all hits in pointsToFit. Does a charge weighted fit if qThreshold is not equal to -1. Sets fPatternPar parameters, and fChi2.
[in] | points | Points in 3D space to fit with charge information |
[in] | qThreshold | Only fit points that are above this charge threshold. |
Definition at line 24 of file AtPattern.cxx.
Double_t AtPattern::FitPattern | ( | const std::vector< const AtHit * > & | pointsToFit, |
Double_t | qThreshold = -1 |
||
) |
Definition at line 30 of file AtPattern.cxx.
Double_t AtPattern::FitPattern | ( | const std::vector< XYZPoint > & | pointsToFit | ) |
Fit the pattern shape.
Fit the pattern shape using all points in pointsToFit. Does not weight for charge. Sets fPatternPar parameters, and fChi2.
[in] | pointsToFit | Points in 3D space to fit |
Definition at line 56 of file AtPattern.cxx.
|
protectedpure virtual |
Called by other versions of FitPattern. If pointCharge is not empty does charge weighted fit. Sets fPatternPar, fChi2, and fNFree
Implemented in AtPatterns::AtPatternY, AtPatterns::AtPatternLine, AtPatterns::AtPatternCircle2D, and AtPatterns::AtPatternFission.
|
inline |
Definition at line 131 of file AtPattern.h.
|
pure virtual |
Get visual representation of pattern.
Calls GetEveLine(double tMin, double tMax, int n) with reasonable defaults for the shape
Implemented in AtPatterns::AtPatternY, AtPatterns::AtPatternLine, AtPatterns::AtPatternCircle2D, and AtPatterns::AtPatternRay.
TEveLine * AtPattern::GetEveLine | ( | double | tMin, |
double | tMax, | ||
int | n | ||
) | const |
Get visual representation of pattern.
Implemented for single-valued patterns (one point in space per value of parameter t)
[in] | tMin | Parameter to start drawing line at |
[in] | tMax | Parameter to stop drawing line at |
[in] | dt | Step size between points on polyline |
Definition at line 63 of file AtPattern.cxx.
|
inline |
Definition at line 132 of file AtPattern.h.
|
inline |
Number of points to define the pattern.
The minimum number of unique points needed to define the pattern.
Definition at line 130 of file AtPattern.h.
|
inlinevirtual |
Get list or parameters that describe the pattern.
It is the inverse operation of DefinePattern(std::vector<double>)
Reimplemented in AtPatterns::AtPatternY.
Definition at line 139 of file AtPattern.h.
|
pure virtual |
Point on pattern at t.
Get the point on the pattern at parameter t. What t physically represents is pattern dependent.
Implemented in AtPatterns::AtPatternY, AtPatterns::AtPatternLine, AtPatterns::AtPatternRay, and AtPatterns::AtPatternCircle2D.
|
inline |
Definition at line 141 of file AtPattern.h.
|
inline |
Definition at line 143 of file AtPattern.h.
|
inline |
Definition at line 142 of file AtPattern.h.
|
protected |
Definition at line 46 of file AtPattern.h.
|
protected |
Definition at line 47 of file AtPattern.h.
|
protected |
Definition at line 48 of file AtPattern.h.
|
protected |
Definition at line 45 of file AtPattern.h.
|
protected |
Definition at line 49 of file AtPattern.h.