ROOT logo
Podd » SRC » THaVDCCluster

class THaVDCCluster: public TObject


A group of VDC hits and routines for linear and non-linear fitting of
drift distances.

Function Members (Methods)

THaVDCCluster(THaVDCPlane* owner = 0)
THaVDCCluster(const THaVDCCluster&)
voidTObject::AbstractMethod(const char* method) const
virtual voidAddHit(THaVDCHit* hit)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual voidCalcChisquare(Double_t& chi2, Int_t& nhits) const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* opt = "")
virtual voidClearFit()
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tCompare(const TObject* obj) const
virtual voidConvertTimeToDist()
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidEstTrackParameters()
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual voidFitTrack(THaVDCCluster::EMode mode = kSimple)
Double_tGetChi2() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
THaVDCHit*GetHit(Int_t i) const
virtual const char*TObject::GetIconName() const
Double_tGetIntercept() const
Double_tGetLocalSlope() const
virtual const char*TObject::GetName() const
Double_tGetNDoF() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
THaVDCHit*GetPivot() const
Int_tGetPivotWireNum() const
THaVDCPlane*GetPlane() const
VDC::VDCpp_t*GetPointPair() const
Double_tGetSigmaIntercept() const
Double_tGetSigmaSlope() const
Double_tGetSigmaT0() const
Int_tGetSize() const
Double_tGetSlope() const
Double_tGetT0() const
Double_tGetTimeCorrection() const
virtual const char*TObject::GetTitle() const
THaTrack*GetTrack() const
Int_tGetTrackIndex() const
Int_tGetTrkNum() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
Bool_tIsFitOK() const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tIsSortable() const
Bool_tIsUsed() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
THaVDCCluster&operator=(const THaVDCCluster&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* opt = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetIntercept(Double_t intercept)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPivot(THaVDCHit* piv)
voidSetPlane(THaVDCPlane* plane)
voidSetPointPair(VDC::VDCpp_t* pp)
voidSetSlope(Double_t slope)
voidSetTimeCorrection(Double_t dt)
voidSetTrack(THaTrack* track)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
VDC::chi2_tCalcChisquare(Double_t slope, Double_t icpt, Double_t d0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidFitSimpleTrack(Bool_t weighted = false)
voidLinear3DFit(Double_t& slope, Double_t& icpt, Double_t& d0) const

Data Members

enum EMode { kSimple
enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
Double_tfChi2chi2 for the cluster (using fSlope)
Int_tfClsBegStarting wire number
Int_tfClsEndEnding wire number
vector<VDC::FitCoord_t,allocator<VDC::FitCoord_t> >fCoordcoordinates to be fit
Bool_tfFitOKFlag indicating that fit results valid
vector<THaVDCHit*>fHitsHits associated w/this cluster
Double_tfLocalSlopeFitted slope, from FitTrack()
Double_tfNDoFNDoF in local chi2 calculation
THaVDCHit*fPivotPivot - hit with smallest drift time
THaVDCPlane*fPlanePlane the cluster belongs to
THaVDCPointPair*fPointPairLower/upper combo we're assigned to
Double_tfSigmaIntIntercept and error estimate
Double_tfSigmaSlopeError estimate of fLocalSlope from fit
Double_tfSigmaT0Fitted common timing offset and error
Double_tfSlopeCurrent best estimate of actual slope
Double_tfTimeCorrectioncorrection to be applied when fitting
THaTrack*fTrackTrack the cluster belongs to
Int_tfTrkNumNumber of the track using this cluster

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

THaVDCCluster(THaVDCPlane* owner = 0)
void AddHit(THaVDCHit* hit)
 Add a hit to the cluster
void Clear(Option_t* opt = "")
 Clear the contents of the cluster and reset status
void ClearFit()
 Clear fit results only
Int_t Compare(const TObject* obj) const
 Compare this cluster to another via the wire number of the pivot.
 Returns -1 if comparison cannot be made (unlike class, no pivot).
void EstTrackParameters()
 Estimate Track Parameters
 Calculates pivot wire and uses its position as position of cluster
 Estimates the slope based on the distance between the first and last
 wires to be hit in the U (or V) and detector Z directions
void ConvertTimeToDist()
 Convert TDC Times in wires to drift distances
chi2_t CalcDist()
 Calculate and store the distance of the global track to the wires.
 We can then inspect the quality of the fits.

 This is actually a bit tedious: we need to project the track
 (given by its detector coordinates) onto this cluster's plane (u or v),
 then find the track's z coordinate for each active wire's position.
 It takes two pages of vector algebra.

 Return value: sum of squares of distances and number of hits used
void CalcLocalDist()
FIXME: clean this up - duplicate of chi2 calculation
 Calculate and store the distance of the local fitted track to the wires.
 We can then inspect the quality of the local fits
Int_t GetTrackIndex() const
 Return index of assigned track (-1 = none, 0 = first/best, etc.)
void FitTrack(THaVDCCluster::EMode mode = kSimple)
 Fit track to drift distances. Supports three modes:

 kSimple:    Linear fit, ignore t0 and multihits
 kWeighted:  Linear fit with weights, ignore t0
 kT0:        Fit t0, but ignore mulithits
void FitSimpleTrack(Bool_t weighted = false)
 Perform linear fit on drift times. Calculates slope, intercept, and errors.
 Does not assume the uncertainty is the same for all hits.

 Assume t0 = 0.
Int_t LinearClusterFitWithT0()
 Perform linear fit on drift times. Calculates slope, intercept, time
 offset t0, and errors.
 Accounts for different uncertainties of each drift distance.

 Fits the parameters m, b, and d0 in

 s_i ( d_i + d0 ) = m x_i + b

  s_i   = sign of ith drift distance (+/- 1)
  d_i   = ith measured drift distance
  x_i   = ith wire position

 The sign vector, s_i, is automatically optimized to yield the smallest
 chi^2. Normally, s_i = -1 for i < i_pivot, and s_i = 1 for i >= i_pivot,
 but this may occasionally not be the best choice in the presence of
 a significant negative offset d0.

 The results, m, b, and d0, are converted to the "slope" and "intercept"
 of the cluster geometery, where slope = 1/m and intercept = -b/m.
 d0 is simply converted to time units to give t0, using the asymptotic
 drift velocity.
void Linear3DFit(Double_t& slope, Double_t& icpt, Double_t& d0) const
 3-parameter fit
     Double_t F, sigmaF2;  // intermediate slope and St. Dev.**2
     Double_t G, sigmaG2;  // intermediate intercept and St. Dev.**2
     Double_t sigmaFG;     // correlated uncertainty
Int_t GetPivotWireNum() const
 Get wire number of cluster pivot (hit with smallest drift distance)
void SetTrack(THaTrack* track)
 Mark this cluster as used by the given track whose number (index+1) is num
chi2_t CalcChisquare(Double_t slope, Double_t icpt, Double_t d0) const
void CalcChisquare(Double_t& chi2, Int_t& nhits) const
 given the parameters of the track (slope and intercept), calculate
 chi2 for the cluster
void Print(Option_t* opt = "") const
 Print contents of cluster
THaVDCCluster(THaVDCPlane* owner = 0)
virtual ~THaVDCCluster()
Bool_t IsSortable() const
{ return kTRUE; }
THaVDCHit* GetHit(Int_t i) const
Get and Set Functions
{ return fHits[i]; }
THaVDCPlane* GetPlane() const
{ return fPlane; }
Int_t GetSize() const
{ return fHits.size(); }
Double_t GetSlope() const
{ return fSlope; }
Double_t GetLocalSlope() const
{ return fLocalSlope; }
Double_t GetSigmaSlope() const
{ return fSigmaSlope; }
Double_t GetIntercept() const
{ return fInt; }
Double_t GetSigmaIntercept() const
{ return fSigmaInt; }
THaVDCHit* GetPivot() const
{ return fPivot; }
Double_t GetTimeCorrection() const
{ return fTimeCorrection; }
Double_t GetT0() const
{ return fT0; }
VDC::VDCpp_t* GetPointPair() const
{ return fPointPair; }
THaTrack* GetTrack() const
{ return fTrack; }
Int_t GetTrkNum() const
{ return fTrkNum; }
Double_t GetSigmaT0() const
{ return fSigmaT0; }
Double_t GetChi2() const
{ return fChi2; }
Double_t GetNDoF() const
{ return fNDoF; }
Bool_t IsFitOK() const
{ return fFitOK; }
Bool_t IsUsed() const
{ return (fTrack != 0); }
void SetPlane(THaVDCPlane* plane)
{ fPlane = plane; }
void SetIntercept(Double_t intercept)
{ fInt = intercept; }
void SetSlope(Double_t slope)
{ fSlope = slope;}
void SetPivot(THaVDCHit* piv)
{ fPivot = piv; }
void SetTimeCorrection(Double_t dt)
{ fTimeCorrection = dt; }
void SetPointPair(VDC::VDCpp_t* pp)
{ fPointPair = pp; }
void FitNLTrack()