BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TTrackBase Class Reference

A virtual class for a track class in tracking. More...

#include <TTrackBase.h>

Inheritance diagram for TTrackBase:

Public Member Functions

 TTrackBase ()
 Constructor.
 TTrackBase (const AList< TMLink > &links)
 Constructor.
virtual ~TTrackBase ()
 Destructor.
virtual unsigned objectType (void) const
 returns object type.
virtual unsigned type (void) const
 returns type. Definition is depending on an object class.
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
const AList< TMLink > & links (unsigned mask=0) const
unsigned nLinks (unsigned mask=0) const
 returns # of masked TMLinks assigned to this track object.
const AList< TMLink > & cores (unsigned mask=0) const
 returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
unsigned nCores (unsigned mask=0) const
 returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
void update (void) const
 update cache.
void append (TMLink &)
 appends a TMLink.
void append (const AList< TMLink > &)
 appends TMLinks.
void appendByApproach (AList< TMLink > &list, double maxSigma)
void appendByDistance (AList< TMLink > &list, double maxDistance)
void remove (TMLink &a)
 removes a TMLink.
void remove (const AList< TMLink > &)
 removes TMLinks.
virtual void refine (AList< TMLink > &list, double maxSigma)
virtual void refine (double maxSigma)
 removes bad points by pull. The bad points are masked not to be used in fit.
virtual int DropWorst ()
virtual void removeLinks (void)
virtual double distance (const TMLink &) const
 returns distance to a position of TMLink in TMLink space.
virtual int approach (TMLink &) const
unsigned testByApproach (const TMLink &list, double sigma) const
 returns # of good hits to be appended.
unsigned testByApproach (const AList< TMLink > &list, double sigma) const
virtual int fit (void)
 fits itself by a default fitter. Error was happened if return value is not zero.
const TMFitter *const fitter (void) const
 returns a pointer to a default fitter.
const TMFitter *const fitter (const TMFitter *)
 sets a default fitter.
void falseFit ()
 false Fit
TMLinkoperator[] (unsigned i) const
const TTrackHEP *const hep (void) const
 returns TTrackHEP.
unsigned nHeps (void) const
 returns # of contributed TTrackHEP tracks.
const TTrackMC *const mc (void) const
 returns a pointer to TTrackMC.
bool fitted (void) const
 returns true if fitted.
bool fittedWithCathode (void) const
 returns true if fitted with cathode hits(TEMPORARY).
 TTrackBase ()
 Constructor.
 TTrackBase (const AList< TMLink > &links)
 Constructor.
virtual ~TTrackBase ()
 Destructor.
virtual unsigned objectType (void) const
 returns object type.
virtual unsigned type (void) const
 returns type. Definition is depending on an object class.
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
const AList< TMLink > & links (unsigned mask=0) const
unsigned nLinks (unsigned mask=0) const
 returns # of masked TMLinks assigned to this track object.
const AList< TMLink > & cores (unsigned mask=0) const
 returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
unsigned nCores (unsigned mask=0) const
 returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
void update (void) const
 update cache.
void append (TMLink &)
 appends a TMLink.
void append (const AList< TMLink > &)
 appends TMLinks.
void appendByApproach (AList< TMLink > &list, double maxSigma)
void appendByDistance (AList< TMLink > &list, double maxDistance)
void remove (TMLink &a)
 removes a TMLink.
void remove (const AList< TMLink > &)
 removes TMLinks.
virtual void refine (AList< TMLink > &list, double maxSigma)
virtual void refine (double maxSigma)
 removes bad points by pull. The bad points are masked not to be used in fit.
virtual int DropWorst ()
virtual void removeLinks (void)
virtual double distance (const TMLink &) const
 returns distance to a position of TMLink in TMLink space.
virtual int approach (TMLink &) const
unsigned testByApproach (const TMLink &list, double sigma) const
 returns # of good hits to be appended.
unsigned testByApproach (const AList< TMLink > &list, double sigma) const
virtual int fit (void)
 fits itself by a default fitter. Error was happened if return value is not zero.
const TMFitter *const fitter (void) const
 returns a pointer to a default fitter.
const TMFitter *const fitter (const TMFitter *)
 sets a default fitter.
void falseFit ()
 false Fit
TMLinkoperator[] (unsigned i) const
const TTrackHEP *const hep (void) const
 returns TTrackHEP.
unsigned nHeps (void) const
 returns # of contributed TTrackHEP tracks.
const TTrackMC *const mc (void) const
 returns a pointer to TTrackMC.
bool fitted (void) const
 returns true if fitted.
bool fittedWithCathode (void) const
 returns true if fitted with cathode hits(TEMPORARY).
 TTrackBase ()
 Constructor.
 TTrackBase (const AList< TMLink > &links)
 Constructor.
virtual ~TTrackBase ()
 Destructor.
virtual unsigned objectType (void) const
 returns object type.
virtual unsigned type (void) const
 returns type. Definition is depending on an object class.
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
const AList< TMLink > & links (unsigned mask=0) const
unsigned nLinks (unsigned mask=0) const
 returns # of masked TMLinks assigned to this track object.
const AList< TMLink > & cores (unsigned mask=0) const
 returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
unsigned nCores (unsigned mask=0) const
 returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
void update (void) const
 update cache.
void append (TMLink &)
 appends a TMLink.
void append (const AList< TMLink > &)
 appends TMLinks.
void appendByApproach (AList< TMLink > &list, double maxSigma)
void appendByDistance (AList< TMLink > &list, double maxDistance)
void remove (TMLink &a)
 removes a TMLink.
void remove (const AList< TMLink > &)
 removes TMLinks.
virtual void refine (AList< TMLink > &list, double maxSigma)
virtual void refine (double maxSigma)
 removes bad points by pull. The bad points are masked not to be used in fit.
virtual int DropWorst ()
virtual void removeLinks (void)
virtual double distance (const TMLink &) const
 returns distance to a position of TMLink in TMLink space.
virtual int approach (TMLink &) const
unsigned testByApproach (const TMLink &list, double sigma) const
 returns # of good hits to be appended.
unsigned testByApproach (const AList< TMLink > &list, double sigma) const
virtual int fit (void)
 fits itself by a default fitter. Error was happened if return value is not zero.
const TMFitter *const fitter (void) const
 returns a pointer to a default fitter.
const TMFitter *const fitter (const TMFitter *)
 sets a default fitter.
void falseFit ()
 false Fit
TMLinkoperator[] (unsigned i) const
const TTrackHEP *const hep (void) const
 returns TTrackHEP.
unsigned nHeps (void) const
 returns # of contributed TTrackHEP tracks.
const TTrackMC *const mc (void) const
 returns a pointer to TTrackMC.
bool fitted (void) const
 returns true if fitted.
bool fittedWithCathode (void) const
 returns true if fitted with cathode hits(TEMPORARY).

Protected Attributes

AList< TMLink_links
bool _fitted
bool _fittedWithCathode
TTrackMC_mc

Friends

class TMFitter
class THelixFitter
class TCosmicFitter

Detailed Description

A virtual class for a track class in tracking.

Definition at line 46 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

Constructor & Destructor Documentation

◆ TTrackBase() [1/6]

TTrackBase::TTrackBase ( )

Constructor.

Definition at line 41 of file TTrackBase.cxx.

42 : _mc( 0 )
43 ,
44 // _superLayer(0),
45 // _nSuperLayers(0),
46 _fitter( 0 )
47 , _updated( true )
48 , _fitted( false )
49 , _time( 0. ) {
50 // _layer[0] = 0;
51 // _layer[1] = 0;
52 // _nLayers[0] = 0;
53 // _nLayers[1] = 0;
54}

Referenced by T3DLine::T3DLine(), T3DLine::T3DLine(), T3DLine::T3DLine(), TCircle::TCircle(), TLine0::TLine0(), TLine0::TLine0(), TMLine::TMLine(), TMLine::TMLine(), TRunge::TRunge(), TRunge::TRunge(), TRunge::TRunge(), TRunge::TRunge(), TRunge::TRunge(), TSegment::TSegment(), TSegment::TSegment(), TSegment0::TSegment0(), TSegment0::TSegment0(), TTrack::TTrack(), TTrack::TTrack(), TTrack::TTrack(), TTrack::TTrack(), and TTrack::TTrack().

◆ TTrackBase() [2/6]

TTrackBase::TTrackBase ( const AList< TMLink > & links)

Constructor.

Definition at line 24 of file TTrackBase.cxx.

25 : _links( a )
26 , _mc( 0 )
27 ,
28 // _superLayer(0),
29 // _nSuperLayers(0),
30 _fitter( 0 )
31 , _updated( false )
32 , _fitted( false )
33 , _time( 0. ) {
34 // _layer[0] = 0;
35 // _layer[1] = 0;
36 // _nLayers[0] = 0;
37 // _nLayers[1] = 0;
38 // update();
39}

◆ ~TTrackBase() [1/3]

TTrackBase::~TTrackBase ( )
virtual

Destructor.

Definition at line 56 of file TTrackBase.cxx.

56{}

◆ TTrackBase() [3/6]

TTrackBase::TTrackBase ( )

Constructor.

◆ TTrackBase() [4/6]

TTrackBase::TTrackBase ( const AList< TMLink > & links)

Constructor.

◆ ~TTrackBase() [2/3]

virtual TTrackBase::~TTrackBase ( )
virtual

Destructor.

◆ TTrackBase() [5/6]

TTrackBase::TTrackBase ( )

Constructor.

◆ TTrackBase() [6/6]

TTrackBase::TTrackBase ( const AList< TMLink > & links)

Constructor.

◆ ~TTrackBase() [3/3]

virtual TTrackBase::~TTrackBase ( )
virtual

Destructor.

Member Function Documentation

◆ append() [1/6]

void TTrackBase::append ( const AList< TMLink > & a)

appends TMLinks.

Definition at line 369 of file TTrackBase.cxx.

369 {
370 AList<TMLink> tmp;
371 for ( unsigned i = 0; i < a.length(); i++ )
372 {
373 if ( ( _links.hasMember( a[i] ) ) || ( a[i]->hit()->state() & WireHitUsed ) )
374 {
375#ifdef TRKRECO_DEBUG_DETAIL
376 std::cout << " TTrackBase::append(list) !!! ";
377 std::cout << a[i]->wire()->name();
378 std::cout << " Hey!, this is already used! Don't mess with me.";
379 std::cout << std::endl;
380#endif
381 continue;
382 }
383 else { tmp.append( a[i] ); }
384 }
385 _links.append( tmp );
386 _updated = false;
387 _fitted = false;
388 _fittedWithCathode = false; // added by matsu ( 1999/05/24 )
389}

◆ append() [2/6]

void TTrackBase::append ( const AList< TMLink > & )

appends TMLinks.

◆ append() [3/6]

void TTrackBase::append ( const AList< TMLink > & )

appends TMLinks.

◆ append() [4/6]

void TTrackBase::append ( TMLink & a)

appends a TMLink.

Definition at line 346 of file TTrackBase.cxx.

346 {
347 if ( ( a.hit()->state() & WireHitUsed ) )
348 {
349#ifdef TRKRECO_DEBUG_DETAIL
350 std::cout << "TTrackBase::append !!! " << a.wire()->name()
351 << " this is already used by another track!" << std::endl;
352#endif
353 return;
354 }
355 if ( _links.hasMember( a ) )
356 {
357#ifdef TRKRECO_DEBUG_DETAIL
358 std::cout << "TTrackBase::append !!! " << a.wire()->name()
359 << " this is already included in this track!" << std::endl;
360#endif
361 return;
362 }
363 _links.append( a );
364 _updated = false;
365 _fitted = false;
366 _fittedWithCathode = false; // added by matsu ( 1999/05/24 )
367}
std::string name(void) const
returns name.

Referenced by TBuilder0::buildStereo(), TBuilder::buildStereo(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo0(), TBuilderCurl::buildStereoMC(), THistogram::clusters(), THistogram::clusters0(), TrkReco::execute(), and TTrackManager::salvageAssociateHits().

◆ append() [5/6]

void TTrackBase::append ( TMLink & )

appends a TMLink.

◆ append() [6/6]

void TTrackBase::append ( TMLink & )

appends a TMLink.

◆ appendByApproach() [1/3]

void TTrackBase::appendByApproach ( AList< TMLink > & list,
double maxSigma )

appends TMLinks by approach. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.

Definition at line 96 of file TTrackBase.cxx.

96 {
97#ifdef TRKRECO_DEBUG_DETAIL
98 std::cout << " TTrackBase::appendByApproach ... sigma=" << maxSigma << std::endl;
99#endif
100
101 AList<TMLink> unused;
102 unsigned n = list.length();
103 for ( unsigned i = 0; i < n; i++ )
104 {
105 TMLink& l = *list[i];
106
107 if ( ( _links.hasMember( l ) ) || ( l.hit()->state() & WireHitUsed ) ) continue;
108
109 //...Calculate closest approach...
110 int err = approach( l );
111 if ( err < 0 )
112 {
113 unused.append( l );
114 continue;
115 }
116
117 //...Calculate sigma...
118 float distance = ( l.positionOnWire() - l.positionOnTrack() ).mag();
119 float diff = fabs( distance - l.drift() );
120 float sigma = diff / l.dDrift();
121
122 //...For debug...
123#ifdef TRKRECO_DEBUG_DETAIL
124 std::cout << " sigma=" << sigma;
125 std::cout << ",dist=" << distance;
126 std::cout << ",diff=" << diff;
127 std::cout << ",err=" << l.hit()->dDrift() << ",";
128 if ( sigma < maxSigma ) std::cout << "ok,";
129 else std::cout << "X,";
130 l.dump( "mc" );
131#endif
132
133 //...Make sigma cut...
134 if ( sigma > maxSigma )
135 {
136 unused.append( l );
137 continue;
138 }
139
140 //...OK...
141 _links.append( l );
142 _updated = false;
143 _fitted = false;
144 }
145 list.remove( unused );
146}
const Int_t n
float dDrift(unsigned) const
returns drift distance error.
virtual int approach(TMLink &) const
virtual double distance(const TMLink &) const
returns distance to a position of TMLink in TMLink space.

Referenced by TBuilder0::appendClusters(), and TTrackManager::salvage().

◆ appendByApproach() [2/3]

void TTrackBase::appendByApproach ( AList< TMLink > & list,
double maxSigma )

appends TMLinks by approach. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.

◆ appendByApproach() [3/3]

void TTrackBase::appendByApproach ( AList< TMLink > & list,
double maxSigma )

appends TMLinks by approach. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.

◆ appendByDistance() [1/3]

void TTrackBase::appendByDistance ( AList< TMLink > & list,
double maxDistance )

appends TMLinks by distance. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.

Definition at line 148 of file TTrackBase.cxx.

148 {
149 std::cout << "TTrackBase::appendByDistance !!! not implemented" << std::endl;
150 list.removeAll();
151}

◆ appendByDistance() [2/3]

void TTrackBase::appendByDistance ( AList< TMLink > & list,
double maxDistance )

appends TMLinks by distance. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.

◆ appendByDistance() [3/3]

void TTrackBase::appendByDistance ( AList< TMLink > & list,
double maxDistance )

appends TMLinks by distance. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.

◆ approach() [1/3]

int TTrackBase::approach ( TMLink & ) const
virtual

calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened.

Reimplemented in TTrack, TTrack, and TTrack.

Definition at line 91 of file TTrackBase.cxx.

91 {
92 std::cout << "TTrackBase::approach !!! not implemented" << std::endl;
93 return -1;
94}

Referenced by appendByApproach(), and testByApproach().

◆ approach() [2/3]

virtual int TTrackBase::approach ( TMLink & ) const
virtual

calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened.

Reimplemented in TTrack, TTrack, and TTrack.

◆ approach() [3/3]

virtual int TTrackBase::approach ( TMLink & ) const
virtual

calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened.

Reimplemented in TTrack, TTrack, and TTrack.

◆ cores() [1/3]

const AList< TMLink > & TTrackBase::cores ( unsigned mask = 0) const

returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.

Definition at line 308 of file TTrackBase.cxx.

308 {
309 if ( mask ) std::cout << "TTrackBase::cores !!! mask is not supported" << std::endl;
310 if ( !_updated ) update();
311 return _cores;
312}
void update(void) const
update cache.

Referenced by TBuilder::buildStereoNew(), TTrack::movePivot(), TTrackManager::setCurlerFlags(), TRunge::SetFlightLength(), and TTrack::szPosition().

◆ cores() [2/3]

const AList< TMLink > & TTrackBase::cores ( unsigned mask = 0) const

returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.

◆ cores() [3/3]

const AList< TMLink > & TTrackBase::cores ( unsigned mask = 0) const

returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.

◆ distance() [1/3]

double TTrackBase::distance ( const TMLink & ) const
virtual

returns distance to a position of TMLink in TMLink space.

Reimplemented in TLine0, TLine0, TLine0, TMLine, TMLine, and TMLine.

Definition at line 86 of file TTrackBase.cxx.

86 {
87 std::cout << "TTrackBase::distance !!! not implemented" << std::endl;
88 return 0.;
89}

Referenced by appendByApproach(), TTrack::fit2D(), and testByApproach().

◆ distance() [2/3]

virtual double TTrackBase::distance ( const TMLink & ) const
virtual

returns distance to a position of TMLink in TMLink space.

Reimplemented in TLine0, TLine0, TLine0, TMLine, TMLine, and TMLine.

◆ distance() [3/3]

virtual double TTrackBase::distance ( const TMLink & ) const
virtual

returns distance to a position of TMLink in TMLink space.

Reimplemented in TLine0, TLine0, TLine0, TMLine, TMLine, and TMLine.

◆ DropWorst() [1/3]

int TTrackBase::DropWorst ( )
virtual

Definition at line 203 of file TTrackBase.cxx.

203 {
204 AList<TMLink> bad;
205 int jbad = -1;
206 double sigma = 0;
207 unsigned n = _links.length();
208 double chi2 = 0;
209 for ( unsigned i = 0; i < n; i++ )
210 {
211 // if(g_sigmalyr1)g_sigmalyr1->fill(sqrt(_links[i]->pull()),_links[i]->wire()->layerId());
212 chi2 += _links[i]->pull();
213 if ( _links[i]->pull() > sigma )
214 {
215 jbad = i;
216 sigma = _links[i]->pull();
217 }
218 }
219
220 chi2 = chi2 / n;
221 // if(sigma>9){bad.append(_links[jbad]);if(g_sigmalyr)g_sigmalyr->fill(sqrt(sigma),_links[jbad]->wire()->layerId());}
222 // if(sigma>20.25&&chi2>2.08){bad.append(_links[jbad]);}
223 if ( sigma > 9 ) { bad.append( _links[jbad] ); }
224 if ( bad.length() )
225 {
226 _links.remove( bad );
227 _fitted = false;
228 _updated = false;
229 }
230 return bad.length();
231}

Referenced by TrkReco::execute().

◆ DropWorst() [2/3]

virtual int TTrackBase::DropWorst ( )
virtual

◆ DropWorst() [3/3]

virtual int TTrackBase::DropWorst ( )
virtual

◆ dump() [1/3]

void TTrackBase::dump ( const std::string & message = std::string( "" ),
const std::string & prefix = std::string( "" ) ) const
virtual

dumps debug information.

Reimplemented in TCircle, TCircle, TCircle, TLine0, TLine0, TLine0, TMLine, TMLine, TMLine, TSegment0, TSegment0, TSegment0, TSegment, TSegment, TSegment, TTrack, TTrack, and TTrack.

Definition at line 58 of file TTrackBase.cxx.

58 {
59 bool mc = ( msg.find( "mc" ) != std::string::npos );
60 bool pull = ( msg.find( "pull" ) != std::string::npos );
61 bool flag = ( msg.find( "flag" ) != std::string::npos );
62 bool detail = ( msg.find( "detail" ) != std::string::npos );
63 if ( detail ) mc = pull = flag = true;
64
65 if ( detail || ( msg.find( "layer" ) != std::string::npos ) )
66 {
67 if ( !_updated ) update();
68 }
69 if ( detail || ( msg.find( "hits" ) != std::string::npos ) ) { Dump( _links, msg, pre ); }
70}
const TTrackMC *const mc(void) const
returns a pointer to TTrackMC.

Referenced by TCircle::dump(), TLine0::dump(), TMLine::dump(), TSegment0::dump(), TSegment::dump(), and TTrack::dump().

◆ dump() [2/3]

virtual void TTrackBase::dump ( const std::string & message = std::string(""),
const std::string & prefix = std::string("") ) const
virtual

◆ dump() [3/3]

virtual void TTrackBase::dump ( const std::string & message = std::string(""),
const std::string & prefix = std::string("") ) const
virtual

◆ falseFit() [1/3]

void TTrackBase::falseFit ( )
inline

false Fit

Definition at line 224 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

224 {
225 _fitted = false;
226 _fittedWithCathode = false;
227}

◆ falseFit() [2/3]

void TTrackBase::falseFit ( )

false Fit

◆ falseFit() [3/3]

void TTrackBase::falseFit ( )

false Fit

◆ fit() [1/3]

int TTrackBase::fit ( void )
virtual

◆ fit() [2/3]

virtual int TTrackBase::fit ( void )
virtual

fits itself by a default fitter. Error was happened if return value is not zero.

◆ fit() [3/3]

virtual int TTrackBase::fit ( void )
virtual

fits itself by a default fitter. Error was happened if return value is not zero.

◆ fitted() [1/3]

bool TTrackBase::fitted ( void ) const
inline

returns true if fitted.

Definition at line 221 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

221{ return _fitted; }

Referenced by TCosmicFitter::fit(), TBuilder::searchLine(), and TMSelector::select().

◆ fitted() [2/3]

bool TTrackBase::fitted ( void ) const

returns true if fitted.

◆ fitted() [3/3]

bool TTrackBase::fitted ( void ) const

returns true if fitted.

◆ fittedWithCathode() [1/3]

bool TTrackBase::fittedWithCathode ( void ) const
inline

returns true if fitted with cathode hits(TEMPORARY).

Definition at line 232 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

232{ return _fittedWithCathode; }

◆ fittedWithCathode() [2/3]

bool TTrackBase::fittedWithCathode ( void ) const

returns true if fitted with cathode hits(TEMPORARY).

◆ fittedWithCathode() [3/3]

bool TTrackBase::fittedWithCathode ( void ) const

returns true if fitted with cathode hits(TEMPORARY).

◆ fitter() [1/6]

const TMFitter *const TTrackBase::fitter ( const TMFitter * a)
inline

sets a default fitter.

Definition at line 238 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

238 {
239 _fitted = false;
240 return _fitter = a;
241}

◆ fitter() [2/6]

const TMFitter *const TTrackBase::fitter ( const TMFitter * )

sets a default fitter.

◆ fitter() [3/6]

const TMFitter *const TTrackBase::fitter ( const TMFitter * )

sets a default fitter.

◆ fitter() [4/6]

◆ fitter() [5/6]

const TMFitter *const TTrackBase::fitter ( void ) const

returns a pointer to a default fitter.

◆ fitter() [6/6]

const TMFitter *const TTrackBase::fitter ( void ) const

returns a pointer to a default fitter.

◆ hep() [1/3]

const TTrackHEP *const TTrackBase::hep ( void ) const

returns TTrackHEP.

Definition at line 391 of file TTrackBase.cxx.

391 {
392 unsigned n = _links.length();
393 CAList<TTrackHEP> hepList;
394 CList<unsigned> hepCounter;
395 for ( unsigned i = 0; i < n; i++ )
396 {
397 const TTrackHEP* hep = _links[i]->hit()->mc()->hep();
398 unsigned nH = hepList.length();
399 bool found = false;
400 for ( unsigned j = 0; j < nH; j++ )
401 {
402 if ( hepList[j] == hep )
403 {
404 found = true;
405 ++( *hepCounter[j] );
406 }
407 }
408
409 if ( !found )
410 {
411 hepList.append( hep );
412 unsigned c = 0;
413 hepCounter.append( c );
414 }
415 }
416
417 _nHeps = hepList.length();
418 _hep = 0;
419 unsigned max = 0;
420 for ( unsigned i = 0; i < _nHeps; i++ )
421 {
422 if ( ( *hepCounter[i] ) > max )
423 {
424 max = ( *hepCounter[i] );
425 _hep = hepList[i];
426 }
427 }
428
429 return _hep;
430}
#define max(a, b)
const TTrackHEP *const hep(void) const
returns TTrackHEP.

Referenced by hep(), and nHeps().

◆ hep() [2/3]

const TTrackHEP *const TTrackBase::hep ( void ) const

returns TTrackHEP.

◆ hep() [3/3]

const TTrackHEP *const TTrackBase::hep ( void ) const

returns TTrackHEP.

◆ links() [1/3]

const AList< TMLink > & TTrackBase::links ( unsigned mask = 0) const

◆ links() [2/3]

const AList< TMLink > & TTrackBase::links ( unsigned mask = 0) const

returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0.

◆ links() [3/3]

const AList< TMLink > & TTrackBase::links ( unsigned mask = 0) const

returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0.

◆ mc() [1/3]

const TTrackMC *const TTrackBase::mc ( void ) const
inline

returns a pointer to TTrackMC.

Definition at line 234 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

234{ return _mc; }

Referenced by dump().

◆ mc() [2/3]

const TTrackMC *const TTrackBase::mc ( void ) const

returns a pointer to TTrackMC.

◆ mc() [3/3]

const TTrackMC *const TTrackBase::mc ( void ) const

returns a pointer to TTrackMC.

◆ nCores() [1/3]

unsigned TTrackBase::nCores ( unsigned mask = 0) const

returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.

Definition at line 314 of file TTrackBase.cxx.

314 {
315 if ( mask ) std::cout << "TTrackBase::nCores !!! mask is not supported" << std::endl;
316 if ( !_updated ) update();
317 return _cores.length();
318}

Referenced by TTrack::dump().

◆ nCores() [2/3]

unsigned TTrackBase::nCores ( unsigned mask = 0) const

returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.

◆ nCores() [3/3]

unsigned TTrackBase::nCores ( unsigned mask = 0) const

returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.

◆ nHeps() [1/3]

unsigned TTrackBase::nHeps ( void ) const

returns # of contributed TTrackHEP tracks.

Definition at line 432 of file TTrackBase.cxx.

432 {
433 hep();
434 return _nHeps;
435}

◆ nHeps() [2/3]

unsigned TTrackBase::nHeps ( void ) const

returns # of contributed TTrackHEP tracks.

◆ nHeps() [3/3]

unsigned TTrackBase::nHeps ( void ) const

returns # of contributed TTrackHEP tracks.

◆ nLinks() [1/3]

unsigned TTrackBase::nLinks ( unsigned mask = 0) const

returns # of masked TMLinks assigned to this track object.

Definition at line 296 of file TTrackBase.cxx.

296 {
297 unsigned n = _links.length();
298 if ( mask == 0 ) return n;
299 unsigned nn = 0;
300 for ( unsigned i = 0; i < n; i++ )
301 {
302 const TMDCWireHit& h = *_links[i]->hit();
303 if ( h.state() & mask ) ++nn;
304 }
305 return nn;
306}

Referenced by TBuilderCurl::buildStereo(), TBuilderCurl::buildStereoMC(), TSegment0::clusterType(), TSegment::clusterType(), and TMSelector::preSelect().

◆ nLinks() [2/3]

unsigned TTrackBase::nLinks ( unsigned mask = 0) const

returns # of masked TMLinks assigned to this track object.

◆ nLinks() [3/3]

unsigned TTrackBase::nLinks ( unsigned mask = 0) const

returns # of masked TMLinks assigned to this track object.

◆ objectType() [1/3]

◆ objectType() [2/3]

virtual unsigned TTrackBase::objectType ( void ) const
virtual

◆ objectType() [3/3]

virtual unsigned TTrackBase::objectType ( void ) const
virtual

◆ operator[]() [1/3]

TMLink * TTrackBase::operator[] ( unsigned i) const
inline

Definition at line 230 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

230{ return _links[i]; }

◆ operator[]() [2/3]

TMLink * TTrackBase::operator[] ( unsigned i) const

◆ operator[]() [3/3]

TMLink * TTrackBase::operator[] ( unsigned i) const

◆ refine() [1/6]

void TTrackBase::refine ( AList< TMLink > & list,
double maxSigma )
virtual

removes bad points by pull. The bad points are removed from the track, and are returned in 'list'.

Definition at line 164 of file TTrackBase.cxx.

164 {
165 AList<TMLink> bad = refineMain( sigma );
166#ifdef TRKRECO_DEBUG
167 std::cout << " refine ... sigma=" << sigma << ", # of rejected hits=";
168 std::cout << bad.length() << std::endl;
169#endif
170#ifdef TRKRECO_DEBUG
171 Dump( bad, "sort pull mc", " " );
172#endif
173
174 if ( bad.length() )
175 {
176 _links.remove( bad );
177 list.append( bad );
178 _fitted = false;
179 _updated = false;
180 }
181}

Referenced by TBuilder0::appendClusters(), TBuilder0::buildStereo(), TBuilder::buildStereo(), TBuilderCosmic::buildStereo(), TBuilderCurl::buildStereo(), TBuilder0::buildStereo0(), and TBuilderCurl::buildStereoMC().

◆ refine() [2/6]

virtual void TTrackBase::refine ( AList< TMLink > & list,
double maxSigma )
virtual

removes bad points by pull. The bad points are removed from the track, and are returned in 'list'.

◆ refine() [3/6]

virtual void TTrackBase::refine ( AList< TMLink > & list,
double maxSigma )
virtual

removes bad points by pull. The bad points are removed from the track, and are returned in 'list'.

◆ refine() [4/6]

void TTrackBase::refine ( double maxSigma)
virtual

removes bad points by pull. The bad points are masked not to be used in fit.

Definition at line 185 of file TTrackBase.cxx.

185 {
186 AList<TMLink> bad = refineMain( sigma );
187 // for (unsigned i = 0; i < bad.length(); i++) {
188 // const TMDCWireHit * hit = bad[i]->hit();
189 // hit->state(hit->state() | WireHitInvalidForFit);
190 // }
191
192#ifdef TRKRECO_DEBUG_DETAIL
193 std::cout << " refine ... sigma=" << sigma << std::endl;
194 Dump( bad, "detail sort", " " );
195#endif
196
197 if ( bad.length() )
198 {
199 _fitted = false;
200 _updated = false;
201 }
202}

◆ refine() [5/6]

virtual void TTrackBase::refine ( double maxSigma)
virtual

removes bad points by pull. The bad points are masked not to be used in fit.

◆ refine() [6/6]

virtual void TTrackBase::refine ( double maxSigma)
virtual

removes bad points by pull. The bad points are masked not to be used in fit.

◆ remove() [1/6]

void TTrackBase::remove ( const AList< TMLink > & a)
inline

removes TMLinks.

Definition at line 214 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

214 {
215 _links.remove( a );
216 _updated = false;
217 _fitted = false;
218 _fittedWithCathode = false; // mod. by matsu ( 1999/05/24 )
219}

◆ remove() [2/6]

void TTrackBase::remove ( const AList< TMLink > & )

removes TMLinks.

◆ remove() [3/6]

void TTrackBase::remove ( const AList< TMLink > & )

removes TMLinks.

◆ remove() [4/6]

void TTrackBase::remove ( TMLink & a)
inline

removes a TMLink.

Definition at line 207 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

207 {
208 _links.remove( a );
209 _updated = false;
210 _fitted = false;
211 _fittedWithCathode = false; // mod. by matsu ( 1999/05/24 )
212}

Referenced by TBuilder::buildStereoNew(), TTrackManager::maskCurl(), TTrackManager::maskNormal(), and TBuilder::searchLine().

◆ remove() [5/6]

void TTrackBase::remove ( TMLink & a)

removes a TMLink.

◆ remove() [6/6]

void TTrackBase::remove ( TMLink & a)

removes a TMLink.

◆ removeLinks() [1/3]

void TTrackBase::removeLinks ( void )
virtual

Definition at line 183 of file TTrackBase.cxx.

183{ _links.removeAll(); }

Referenced by TBuilderCosmic::buildStereo(), and TrkReco::execute().

◆ removeLinks() [2/3]

virtual void TTrackBase::removeLinks ( void )
virtual

◆ removeLinks() [3/3]

virtual void TTrackBase::removeLinks ( void )
virtual

◆ testByApproach() [1/6]

unsigned TTrackBase::testByApproach ( const AList< TMLink > & list,
double sigma ) const

Definition at line 233 of file TTrackBase.cxx.

233 {
234#ifdef TRKRECO_DEBUG_DETAIL
235 std::cout << " TTrackBase::testByApproach ... sigma=" << maxSigma << std::endl;
236#endif
237
238 unsigned nOK = 0;
239 unsigned n = list.length();
240 for ( unsigned i = 0; i < n; i++ )
241 {
242 TMLink& l = *list[i];
243 nOK += testByApproach( l, maxSigma );
244 }
245 return nOK;
246}
unsigned testByApproach(const TMLink &list, double sigma) const
returns # of good hits to be appended.

◆ testByApproach() [2/6]

unsigned TTrackBase::testByApproach ( const AList< TMLink > & list,
double sigma ) const

◆ testByApproach() [3/6]

unsigned TTrackBase::testByApproach ( const AList< TMLink > & list,
double sigma ) const

◆ testByApproach() [4/6]

unsigned TTrackBase::testByApproach ( const TMLink & list,
double sigma ) const

returns # of good hits to be appended.

Definition at line 248 of file TTrackBase.cxx.

248 {
249#ifdef TRKRECO_DEBUG_DETAIL
250 std::cout << " TTrackBase::testByApproach ... sigma=" << maxSigma << std::endl;
251#endif
252 TMLink l = link;
253
254 //...Calculate closest approach...
255 int err = approach( l );
256 if ( err < 0 ) return 0;
257 //...Calculate sigma...
258 float distance = l.distance();
259 float diff = fabs( distance - l.hit()->drift() );
260 float sigma = diff / l.hit()->dDrift();
261 l.pull( sigma * sigma );
262
263 //...For debug...
264#ifdef TRKRECO_DEBUG_DETAIL
265 std::cout << " sigma=" << sigma;
266 std::cout << ",dist=" << distance;
267 std::cout << ",diff=" << diff << ",";
268 if ( sigma < maxSigma ) std::cout << "ok,";
269 else std::cout << "X,";
270 l.dump( "mc" );
271#endif
272
273 //...Make sigma cut...
274 if ( sigma < maxSigma ) return 1;
275
276 return 0;
277}
float drift(unsigned) const
returns drift distance.

Referenced by TTrackManager::setCurlerFlags(), and testByApproach().

◆ testByApproach() [5/6]

unsigned TTrackBase::testByApproach ( const TMLink & list,
double sigma ) const

returns # of good hits to be appended.

◆ testByApproach() [6/6]

unsigned TTrackBase::testByApproach ( const TMLink & list,
double sigma ) const

returns # of good hits to be appended.

◆ type() [1/3]

unsigned TTrackBase::type ( void ) const
inlinevirtual

returns type. Definition is depending on an object class.

Reimplemented in TTrack, TTrack, and TTrack.

Definition at line 245 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

245{ return 0; }

◆ type() [2/3]

virtual unsigned TTrackBase::type ( void ) const
virtual

returns type. Definition is depending on an object class.

Reimplemented in TTrack, TTrack, and TTrack.

◆ type() [3/3]

virtual unsigned TTrackBase::type ( void ) const
virtual

returns type. Definition is depending on an object class.

Reimplemented in TTrack, TTrack, and TTrack.

◆ update() [1/3]

void TTrackBase::update ( void ) const

update cache.

Definition at line 72 of file TTrackBase.cxx.

72 {
73 _cores.removeAll();
74 unsigned n = _links.length();
75 for ( unsigned i = 0; i < n; i++ )
76 {
77 TMLink* l = _links[i];
78 const TMDCWireHit& h = *l->hit();
79 if ( h.state() & WireHitInvalidForFit ) continue;
80 if ( !( h.state() & WireHitFittingValid ) ) continue;
81 _cores.append( l );
82 }
83 _updated = true;
84}

Referenced by cores(), TSegment0::direction(), TSegment::direction(), TSegment0::dump(), TSegment::dump(), dump(), TSegment0::innerMostLayer(), TSegment::innerMostLayer(), TSegment::inners(), TSegment0::innerWidth(), TSegment::innerWidth(), nCores(), TSegment0::outerMostLayer(), TSegment::outerMostLayer(), TSegment::outers(), TSegment0::outerWidth(), TSegment::outerWidth(), TSegment0::position(), TSegment::position(), and TSegment::solveDualHits().

◆ update() [2/3]

void TTrackBase::update ( void ) const

update cache.

◆ update() [3/3]

void TTrackBase::update ( void ) const

update cache.

◆ TCosmicFitter

◆ THelixFitter

◆ TMFitter

Member Data Documentation

◆ _fitted

bool TTrackBase::_fitted
mutableprotected

Definition at line 167 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TTrackBase.h.

Referenced by TLine0::a(), TMLine::a(), append(), append(), appendByApproach(), TLine0::appendByszdistance(), TMLine::appendByszdistance(), TLine0::appendSLY(), TMLine::appendSLY(), TLine0::b(), TMLine::b(), TCircle::center(), TCircle::charge(), TLine0::chi2(), TMLine::chi2(), TTrack::chi2(), TSegment0::direction(), TSegment::direction(), TLine0::distance(), TMLine::distance(), TMLine::distance(), DropWorst(), TCircle::dump(), TSegment0::dump(), TSegment::dump(), falseFit(), TCosmicFitter::fit(), THelixFitter::fit(), THelixFitter::fit(), TLine0::fit2(), TMLine::fit2(), TLine0::fit2p(), TMLine::fit2p(), TLine0::fit2s(), TMLine::fit2s(), TLine0::fit2sp(), TMLine::fit2sp(), TCircle::fitForCurl(), fitted(), fittedWithCathode(), fitter(), TCircle::impact(), TSegment0::innerMostLayer(), TSegment::innerMostLayer(), TSegment::inners(), TSegment0::innerWidth(), TSegment::innerWidth(), TTrack::ndf(), TSegment0::outerMostLayer(), TSegment::outerMostLayer(), TSegment::outers(), TSegment0::outerWidth(), TSegment::outerWidth(), TSegment0::position(), TSegment::position(), TCircle::pt(), TCircle::radius(), TLine0::reducedChi2(), TMLine::reducedChi2(), TLine0::refine(), TMLine::refine(), refine(), refine(), TTrack::refine2D(), remove(), remove(), TLine0::removeChits(), TMLine::removeChits(), TLine0::removeSLY(), TMLine::removeSLY(), T3DLine::T3DLine(), T3DLine::T3DLine(), T3DLine::T3DLine(), TRunge::TRunge(), TRunge::TRunge(), TRunge::TRunge(), TRunge::TRunge(), TRunge::TRunge(), TSegment::TSegment(), TSegment::TSegment(), TSegment0::TSegment0(), TSegment0::TSegment0(), TTrack::TTrack(), TTrack::TTrack(), TTrackBase(), and TTrackBase().

◆ _fittedWithCathode

◆ _links

◆ _mc

TTrackMC * TTrackBase::_mc
protected

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