ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
|
: 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 <AtHitCluster.h>
Public Member Functions | |
AtHitCluster () | |
AtHitCluster (const AtHitCluster &cluster)=default | |
virtual | ~AtHitCluster ()=default |
virtual std::unique_ptr< AtHit > | Clone () override |
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) |
virtual void | AddHit (const AtHit &hit) |
Add hit to cluster. More... | |
Double_t | GetLength () const |
XYZPoint | GetPositionCharge () const |
const TMatrixDSym & | GetCovMatrix () const |
const TMatrixDSym & | GetCovNumerator () const |
Int_t | GetClusterID () const |
Int_t | GetClusterSize () const |
![]() | |
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 | |
AtHit & | operator= (const AtHit &)=default |
AtHit & | operator= (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 XYZPoint & | GetPosition () const |
const XYZVector & | GetPositionVariance () 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 Member Functions | |
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 > | |
T | ElementInvert (const T &b) |
void | updateWeightsAndCharge (const AtHit &hit) |
void | updatePosition (const AtHit &hit) |
void | updateCovariance (const AtHit &hit) |
ClassDefOverride (AtHitCluster, 4) | |
Protected Attributes | |
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} |
![]() | |
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::MCSimPoint > | fMCSimPointArray |
Additional Inherited Members | |
![]() | |
using | XYZPoint = ROOT::Math::XYZPoint |
using | XYZVector = ROOT::Math::XYZVector |
![]() | |
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) |
: 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.
Will update the position, charge, variance, and covariance as additional hits are added to the cluster. The variance is calcualted using both frequency weights (the charge) and reliability weights (the inverse of the position variance of the hit). The covariance is calculated just using the frequency weights (charge) w.r.t. the charge-weighted estimator for the true mean (not the frequency and reliability estimator of the mean). Eventually, I will sit down and work out a recursive expression for the covariance using the best estimate of the mean instead of just their charge weighted.
The covariance and matrix can also be manually set like the old version of the class.
Three positions are stored in the cluster: fPositionFull is the position using the full information(charge and hit position variance). fPositionCharge is the position from just charge weighting. fPosition is the position without any weighting applied.
Definition at line 37 of file AtHitCluster.h.
AtHitCluster::AtHitCluster | ( | ) |
Definition at line 22 of file AtHitCluster.cxx.
|
default |
|
virtualdefault |
|
virtual |
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 .
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 in AtHitClusterFull.
Definition at line 52 of file AtHitCluster.cxx.
|
protected |
|
overridevirtual |
Reimplemented from AtHit.
Reimplemented in AtHitClusterFull.
Definition at line 17 of file AtHitCluster.cxx.
|
inlineprotected |
Definition at line 88 of file AtHitCluster.h.
|
inlineprotected |
Definition at line 93 of file AtHitCluster.h.
|
inlineprotected |
Definition at line 83 of file AtHitCluster.h.
|
inline |
Definition at line 78 of file AtHitCluster.h.
|
inline |
Definition at line 79 of file AtHitCluster.h.
|
inline |
Definition at line 75 of file AtHitCluster.h.
|
inline |
Definition at line 76 of file AtHitCluster.h.
|
inline |
Definition at line 72 of file AtHitCluster.h.
|
inline |
Definition at line 73 of file AtHitCluster.h.
|
inline |
Definition at line 69 of file AtHitCluster.h.
void AtHitCluster::SetCovMatrix | ( | int | i, |
int | j, | ||
double | val | ||
) |
Sets the cov[i,j] = cov[j,i] = val.
Definition at line 32 of file AtHitCluster.cxx.
|
inline |
Definition at line 65 of file AtHitCluster.h.
|
inline |
Definition at line 68 of file AtHitCluster.h.
|
overridevirtual |
Reimplemented from AtHit.
Definition at line 149 of file AtHitCluster.cxx.
|
protected |
Updates the off diagonal covariance numerator according to eqn 15 and the off diagonal variance according to eqn 24. Updates the diagonal elements of the covariance according to eqns 20 and 24
Definition at line 66 of file AtHitCluster.cxx.
|
protected |
Update the position based on eqn 21.
[in] | hit | Hit to update the position with |
Definition at line 113 of file AtHitCluster.cxx.
|
protected |
[in] | hit | Hit to add to the wights |
Definition at line 129 of file AtHitCluster.cxx.
|
protected |
Definition at line 39 of file AtHitCluster.h.
|
protected |
Definition at line 57 of file AtHitCluster.h.
|
protected |
Definition at line 42 of file AtHitCluster.h.
|
protected |
Definition at line 45 of file AtHitCluster.h.
|
protected |
Definition at line 56 of file AtHitCluster.h.
|
protected |
Definition at line 52 of file AtHitCluster.h.
|
protected |
Definition at line 53 of file AtHitCluster.h.
|
protected |
Definition at line 54 of file AtHitCluster.h.
|
protected |
Definition at line 48 of file AtHitCluster.h.
|
protected |
Definition at line 49 of file AtHitCluster.h.
|
protected |
Definition at line 50 of file AtHitCluster.h.