ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AtPatterns::AtPatternY Class Reference

Describes a Y track. More...

#include <AtPatternY.h>

Inheritance diagram for AtPatterns::AtPatternY:
Inheritance graph
[legend]
Collaboration diagram for AtPatterns::AtPatternY:
Collaboration graph
[legend]

Public Types

using XYZPoint = ROOT::Math::XYZPoint
 
using XYZVector = ROOT::Math::XYZVector
 
- Public Types inherited from AtPatterns::AtPattern
using XYZPoint = ROOT::Math::XYZPoint
 

Public Member Functions

 AtPatternY ()
 
XYZPoint GetVertex () const
 Get the vertex of the Y shape. More...
 
XYZVector GetBeamDirection () const
 Get the direction of the beam ray. More...
 
XYZVector GetFragmentDirection (int frag) const
 Get the direction of the fragment rays. More...
 
int GetPointAssignment (const XYZPoint &point) const
 
virtual void DefinePattern (const std::vector< XYZPoint > &points) override
 Define based on points. More...
 
virtual void DefinePattern (std::vector< double > par) override
 
virtual Double_t DistanceToPattern (const XYZPoint &point) const override
 Closest distance to pattern. More...
 
virtual XYZPoint ClosestPointOnPattern (const XYZPoint &point) const override
 Closest point on pattern. More...
 
virtual XYZPoint GetPointAt (double z) const override
 Get point along the beam axis at z. More...
 
virtual TEveElement * GetEveElement () const override
 Get visual representation of pattern. More...
 
virtual std::unique_ptr< AtPatternClone () const override
 
virtual std::vector< double > GetPatternPar () const override
 Get list or parameters that describe the pattern. More...
 
- Public Member Functions inherited from AtPatterns::AtPattern
 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...
 
TEveLine * GetEveLine (double tMin, double tMax, int n) const
 Get visual representation of pattern. More...
 
Int_t GetNumPoints () const
 Number of points to define the pattern. More...
 
Double_t GetChi2 () const
 
Int_t GetNFree () const
 
Double_t GetTotCharge () const
 
void SetPatternPar (std::vector< double > par)
 
void SetChi2 (double chi2)
 

Protected Member Functions

virtual void FitPattern (const std::vector< XYZPoint > &points, const std::vector< double > &charge) override
 
void DefinePattern (const XYZPoint &vertex, const XYZVector &beamDir, const std::array< XYZVector, 2 > &fragDir)
 

Protected Attributes

AtPatternRay fBeam
 
std::array< AtPatternRay, 2 > fFragments
 
- Protected Attributes inherited from AtPatterns::AtPattern
std::vector< Double_t > fPatternPar
 
Double_t fChi2 {NAN}
 
Int_t fNFree {0}
 
const Int_t fNumPoints
 
Double_t fTotCharge {0}
 

Additional Inherited Members

- Protected Types inherited from AtPatterns::AtPattern
using TEveLineVec = std::vector< std::unique_ptr< TEveLine > >
 

Detailed Description

Describes a Y track.

Definition at line 29 of file AtPatternY.h.

Member Typedef Documentation

◆ XYZPoint

using AtPatterns::AtPatternY::XYZPoint = ROOT::Math::XYZPoint

Definition at line 35 of file AtPatternY.h.

◆ XYZVector

using AtPatterns::AtPatternY::XYZVector = ROOT::Math::XYZVector

Definition at line 36 of file AtPatternY.h.

Constructor & Destructor Documentation

◆ AtPatternY()

AtPatternY::AtPatternY ( )

Definition at line 29 of file AtPatternY.cxx.

Member Function Documentation

◆ Clone()

virtual std::unique_ptr<AtPattern> AtPatterns::AtPatternY::Clone ( ) const
inlineoverridevirtual

Implements AtPatterns::AtPattern.

Definition at line 69 of file AtPatternY.h.

◆ ClosestPointOnPattern()

AtPatternY::XYZPoint AtPatternY::ClosestPointOnPattern ( const XYZPoint point) const
overridevirtual

Closest point on pattern.

Parameters
[in]pointPoint to get the closest point on the pattern.
Returns
Closest point on pattern

Implements AtPatterns::AtPattern.

Definition at line 65 of file AtPatternY.cxx.

◆ DefinePattern() [1/3]

void AtPatternY::DefinePattern ( const std::vector< XYZPoint > &  points)
overridevirtual

Define based on points.

Will set-up the pattern using the vector of XYZPoints. Assumes the size of points is equal to fNumPoints

Parameters
[in]points3D points to use when defining the pattern

Implements AtPatterns::AtPattern.

Definition at line 150 of file AtPatternY.cxx.

◆ DefinePattern() [2/3]

void AtPatternY::DefinePattern ( const XYZPoint vertex,
const XYZVector beamDir,
const std::array< XYZVector, 2 > &  fragDir 
)
protected

Definition at line 142 of file AtPatternY.cxx.

◆ DefinePattern() [3/3]

void AtPatternY::DefinePattern ( std::vector< double >  par)
overridevirtual

Defines the pattern using the following parameters vertex = (par[0], par[1], par[2]) beamDir = (par[3], par[4], par[5]) fragDir[0] = (par[6], par[7], par[8]) fragDir[1] = (par[9], par[10], par[11])

Reimplemented from AtPatterns::AtPattern.

Definition at line 127 of file AtPatternY.cxx.

◆ DistanceToPattern()

Double_t AtPatternY::DistanceToPattern ( const XYZPoint point) const
overridevirtual

Closest distance to pattern.

Parameters
[in]pointPoint to get the distance from.
Returns
distance from point to pattern in mm.

Implements AtPatterns::AtPattern.

Definition at line 81 of file AtPatternY.cxx.

◆ FitPattern()

void AtPatternY::FitPattern ( const std::vector< XYZPoint > &  pointsToFit,
const std::vector< double > &  pointCharge 
)
overrideprotectedvirtual

Called by other versions of FitPattern. If pointCharge is not empty does charge weighted fit. Sets fPatternPar, fChi2, and fNFree

Implements AtPatterns::AtPattern.

Reimplemented in AtPatterns::AtPatternFission.

Definition at line 186 of file AtPatternY.cxx.

◆ GetBeamDirection()

XYZVector AtPatterns::AtPatternY::GetBeamDirection ( ) const
inline

Get the direction of the beam ray.

Returns
Direction of beam (points from vertex to window).

Definition at line 48 of file AtPatternY.h.

◆ GetEveElement()

TEveElement * AtPatternY::GetEveElement ( ) const
overridevirtual

Get visual representation of pattern.

Calls GetEveLine(double tMin, double tMax, int n) with reasonable defaults for the shape

Implements AtPatterns::AtPattern.

Definition at line 31 of file AtPatternY.cxx.

◆ GetFragmentDirection()

XYZVector AtPatterns::AtPatternY::GetFragmentDirection ( int  frag) const
inline

Get the direction of the fragment rays.

Parameters
[in]fragID of the fragment (0 or 1)
Returns
Direction of fragment (points away from vertex).

Definition at line 55 of file AtPatternY.h.

◆ GetPatternPar()

std::vector< double > AtPatternY::GetPatternPar ( ) const
overridevirtual

Get list or parameters that describe the pattern.

It is the inverse operation of DefinePattern(std::vector<double>)

Reimplemented from AtPatterns::AtPattern.

Definition at line 102 of file AtPatternY.cxx.

◆ GetPointAssignment()

int AtPatternY::GetPointAssignment ( const XYZPoint point) const

Returns an integer specifying which ray the point is closest to. 0 -> fragment 0. 1 -> fragment 1. 2 -> beam.

Definition at line 90 of file AtPatternY.cxx.

◆ GetPointAt()

AtPatternY::XYZPoint AtPatternY::GetPointAt ( double  z) const
overridevirtual

Get point along the beam axis at z.

The parameter passed has no defined physical interpretation.

Parameters
[in]zLocation of point at parameter.

Implements AtPatterns::AtPattern.

Definition at line 180 of file AtPatternY.cxx.

◆ GetVertex()

XYZPoint AtPatterns::AtPatternY::GetVertex ( ) const
inline

Get the vertex of the Y shape.

Definition at line 42 of file AtPatternY.h.

Member Data Documentation

◆ fBeam

AtPatternRay AtPatterns::AtPatternY::fBeam
protected

Definition at line 31 of file AtPatternY.h.

◆ fFragments

std::array<AtPatternRay, 2> AtPatterns::AtPatternY::fFragments
protected

Definition at line 32 of file AtPatternY.h.


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