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

: Class representing a cluster of hits that arise from the same deposition of charge in space. Or at least, that is the assumtion that underlies the math in the class. More...

#include <AtHitClusterFull.h>

Inheritance diagram for AtHitClusterFull:
Inheritance graph
[legend]
Collaboration diagram for AtHitClusterFull:
Collaboration graph
[legend]

Public Member Functions

 AtHitClusterFull ()
 
 AtHitClusterFull (const AtHitClusterFull &cluster)=default
 
virtual ~AtHitClusterFull ()=default
 
virtual std::unique_ptr< AtHitClone () override
 
virtual void AddHit (const AtHit &hit) override
 Add hit to cluster. More...
 
XYZPoint GetPositionUnWeighted () const
 
TMatrixDSym GetCovMatrixFull () const
 
TMatrixDSym GetCovMatrixCharge () const
 
TMatrixDSym GetCovMatrixNoWeight () const
 
 ClassDefOverride (AtHitClusterFull, 1)
 
- Public Member Functions inherited from AtHitCluster
 AtHitCluster ()
 
 AtHitCluster (const AtHitCluster &cluster)=default
 
virtual ~AtHitCluster ()=default
 
void SetCovMatrix (TMatrixDSym matrix)
 
void SetCovMatrix (int i, int j, double val)
 Sets the cov[i,j] = cov[j,i] = val. More...
 
virtual void SetPositionVariance (const XYZVector &vec) override
 
void SetLength (Double_t length)
 
void SetClusterID (Int_t id)
 
Double_t GetLength () const
 
XYZPoint GetPositionCharge () const
 
const TMatrixDSym & GetCovMatrix () const
 
const TMatrixDSym & GetCovNumerator () const
 
Int_t GetClusterID () const
 
Int_t GetClusterSize () const
 
- Public Member Functions inherited from AtHit
 AtHit (Int_t hitID=-1)
 
 AtHit (Int_t padNum, XYZPoint location, Double_t charge)
 
 AtHit (Int_t hitID, Int_t padNum, XYZPoint location, Double_t charge)
 
 AtHit (const AtHit &)=default
 
 AtHit (AtHit &&)=default
 
AtHitoperator= (const AtHit &)=default
 
AtHitoperator= (AtHit &&)=default
 
virtual ~AtHit ()=default
 
H5::CompType GetHDF5Type ()
 Returns the type specification of a hit. More...
 
void SetCharge (Double_t charge)
 
void SetChargeVariance (Double_t chargeVar)
 
void SetPosition (const XYZPoint &pos)
 
void SetHitID (Int_t hitID)
 
void SetPadNum (Int_t padNum)
 
void SetTraceIntegral (Double_t integral)
 
void SetHitMult (Int_t HitMult)
 
void SetTimeStamp (Int_t Time)
 
void SetTimeStampCorr (Double_t TimeCorr)
 
void SetTimeStampCorrInter (Double_t TimeCorrInter)
 
void AddMCSimPoint (const AtHit::MCSimPoint &point)
 
Int_t GetHitID () const
 
const XYZPointGetPosition () const
 
const XYZVectorGetPositionVariance () const
 
XYZVector GetPositionSigma () const
 
Double_t GetCharge () const
 
Int_t GetPadNum () const
 
Double_t GetTraceIntegral () const
 
Int_t GetHitMult () const
 
Int_t GetTimeStamp () const
 
Double_t GetTimeStampCorr () const
 
Double_t GetTimeStampCorrInter () const
 
const std::vector< AtHit::MCSimPoint > & GetMCSimPointArray () const
 
 ClassDef (AtHit, 5)
 

Protected Attributes

std::vector< AtHitfHits
 
- Protected Attributes inherited from AtHitCluster
Int_t fClusterID {-1}
 
TMatrixDSym fCovMatrix {3}
 
TMatrixDSym fCovNumerator {3}
 
XYZVector fTotalWeight {0, 0, 0}
 
XYZVector fTotalWeight2 {0, 0, 0}
 
XYZVector fWeight {0, 0, 0}
 
XYZPoint fPositionCharge {0, 0, 0}
 
XYZPoint fPositionChargeOld {0, 0, 0}
 
XYZVector fPositionOld {0, 0, 0}
 
Double_t fLength {-999}
 
Int_t fClusterSize {0}
 
- Protected Attributes inherited from AtHit
Double_t fCharge
 
Double_t fChargeVariance {0}
 
XYZPoint fPosition
 
XYZVector fPositionVariance {}
 
Int_t fHitID
 
Int_t fPadNum
 
Double_t fTraceIntegral {-1}
 
Int_t fHitMult {1}
 
Int_t fTimeStamp {0}
 
Double_t fTimeStampCorr {0}
 
Double_t fTimeStampCorrInter {0}
 
std::vector< AtHit::MCSimPointfMCSimPointArray
 

Additional Inherited Members

- Public Types inherited from AtHit
using XYZPoint = ROOT::Math::XYZPoint
 
using XYZVector = ROOT::Math::XYZVector
 
- Static Public Member Functions inherited from AtHit
static Bool_t SortHit (const AtHit &lhs, const AtHit &rhs)
 
static Bool_t SortHit (const std::unique_ptr< AtHit > &lhs, const std::unique_ptr< AtHit > &rhs)
 
static Bool_t SortHitTimePtr (const std::unique_ptr< AtHit > &lhs, const std::unique_ptr< AtHit > &rhs)
 
static Bool_t SortHitTime (const AtHit &lhs, const AtHit &rhs)
 
- Protected Member Functions inherited from AtHitCluster
template<class A , class B >
XYZVector ElementMult (const A &a, const B &b)
 
template<class A , class B >
XYZVector ElementDiv (const A &a, const B &b)
 
template<class T >
ElementInvert (const T &b)
 
void updateWeightsAndCharge (const AtHit &hit)
 
void updatePosition (const AtHit &hit)
 
void updateCovariance (const AtHit &hit)
 
 ClassDefOverride (AtHitCluster, 4)
 

Detailed Description

: Class representing a cluster of hits that arise from the same deposition of charge in space. Or at least, that is the assumtion that underlies the math in the class.

In addition to the information tracked by AtHitCluster, it also saves a copy of every hit that is part of the cluster. This allows for a larger number of estimates of the variance and covariance to be calcualted.

Three estimates of the mean are stored in the cluster: fPosition is the position using the full information(charge and hit position variance). fPositionCharge is the position from just charge weighting. fPositionUnweighted is the position without any weighting applied.

There are four estimates of the covariances accessable: GetCovMatrix() returns the best online covariance matrix described above (same as AtHitCluster). GetCovMatrixFull() returns the covariance matrix using fPositionFull and charge weighting. There is no special treatment of the variance. GetCovMatrixCharge() returns a simple charge weighted covariance matrix using fPositionCharge. GetCovMatrixNoWeight() returns a covariance matrix using fPosition and no weighting.

Definition at line 38 of file AtHitClusterFull.h.

Constructor & Destructor Documentation

◆ AtHitClusterFull() [1/2]

AtHitClusterFull::AtHitClusterFull ( )
inline

Definition at line 43 of file AtHitClusterFull.h.

◆ AtHitClusterFull() [2/2]

AtHitClusterFull::AtHitClusterFull ( const AtHitClusterFull cluster)
default

◆ ~AtHitClusterFull()

virtual AtHitClusterFull::~AtHitClusterFull ( )
virtualdefault

Member Function Documentation

◆ AddHit()

void AtHitClusterFull::AddHit ( const AtHit hit)
overridevirtual

Add hit to cluster.

Adds a hit, updating the clusters position and charge. As well as the covariance matrix. The variance is updated using the charge-weighted variance of the passed hit. The off diagonal elements of the covariance matrix are updated according to the "standard" textbook definition of the covariance matrix $ COV_{x,y} = \frac{\Sigma_i^N (x_i - \hat{x})(y_i - \hat{y})}{N-1}$.

The on diagonal elements of the covariance matrix (i.e. the variance) are updated assuming both a charge weighting, and a "reliablility" weighting from the variance in the position of the hits used to construct the hit cluster.

Reimplemented from AtHitCluster.

Definition at line 11 of file AtHitClusterFull.cxx.

◆ ClassDefOverride()

AtHitClusterFull::ClassDefOverride ( AtHitClusterFull  ,
 
)

◆ Clone()

virtual std::unique_ptr<AtHit> AtHitClusterFull::Clone ( )
overridevirtual

Reimplemented from AtHitCluster.

◆ GetCovMatrixCharge()

TMatrixDSym AtHitClusterFull::GetCovMatrixCharge ( ) const

Definition at line 45 of file AtHitClusterFull.cxx.

◆ GetCovMatrixFull()

TMatrixDSym AtHitClusterFull::GetCovMatrixFull ( ) const

Definition at line 63 of file AtHitClusterFull.cxx.

◆ GetCovMatrixNoWeight()

TMatrixDSym AtHitClusterFull::GetCovMatrixNoWeight ( ) const

Definition at line 27 of file AtHitClusterFull.cxx.

◆ GetPositionUnWeighted()

AtHit::XYZPoint AtHitClusterFull::GetPositionUnWeighted ( ) const

Definition at line 17 of file AtHitClusterFull.cxx.

Member Data Documentation

◆ fHits

std::vector<AtHit> AtHitClusterFull::fHits
protected

Definition at line 40 of file AtHitClusterFull.h.


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