Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TTrackBase Class Reference

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

#include <TTrackBase.h>

Inheritance diagram for TTrackBase:

T3DLine T3DLine TCircle TCircle TLine0 TLine0 TMLine TMLine TRunge TRunge TSegment TSegment TSegment0 TSegment0 TTrack TTrack List of all members.

Public Member Functions

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

Protected Attributes

bool _fitted
bool _fittedWithCathode
AList< TMLink_links
AList< TMLink_links
TTrackMC_mc
TTrackMC_mc

Private Member Functions

AList< TMLinkrefineMain (double maxSigma)
 refine core part.
AList< TMLinkrefineMain (double maxSigma)
 refine core part.

Private Attributes

AList< TMLink_cores
AList< TMLink_cores
const TMFitter_fitter
const TMFitter_fitter
const TTrackHEP_hep
const TTrackHEP_hep
unsigned _nHeps
float _time
bool _updated

Friends

class TCosmicFitter
class THelixFitter
class TMFitter

Detailed Description

A virtual class for a track class in tracking.


Constructor & Destructor Documentation

TTrackBase::TTrackBase  ) 
 

Constructor.

00041 : _mc(0),
00042 //    _superLayer(0),
00043 //    _nSuperLayers(0),
00044   _fitter(0),
00045   _updated(true),
00046   _fitted(false),
00047   _time(0.) {
00048 //      _layer[0] = 0;
00049 //      _layer[1] = 0;
00050 //      _nLayers[0] = 0;
00051 //      _nLayers[1] = 0;
00052 }

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

Constructor.

00025 : _links(a),
00026   _mc(0),
00027 //    _superLayer(0),
00028 //    _nSuperLayers(0),
00029   _fitter(0),
00030   _updated(false),
00031   _fitted(false),
00032   _time(0.) {
00033 //      _layer[0] = 0;
00034 //      _layer[1] = 0;
00035 //      _nLayers[0] = 0;
00036 //      _nLayers[1] = 0;
00037 //    update();
00038 }

TTrackBase::~TTrackBase  )  [virtual]
 

Destructor.

00054                         {
00055 }

TTrackBase::TTrackBase  ) 
 

Constructor.

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

Constructor.

virtual TTrackBase::~TTrackBase  )  [virtual]
 

Destructor.


Member Function Documentation

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

appends TMLinks.

void TTrackBase::append TMLink  ) 
 

appends a TMLink.

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

appends TMLinks.

00357                                           {
00358     AList<TMLink> tmp;
00359     for (unsigned i = 0; i < a.length(); i++) {
00360         if ((_links.hasMember(a[i])) || (a[i]->hit()->state() & WireHitUsed)) {
00361 #ifdef TRKRECO_DEBUG_DETAIL
00362             std::cout << "    TTrackBase::append(list) !!! ";
00363             std::cout << a[i]->wire()->name();
00364             std::cout << " Hey!, this is already used! Don't mess with me.";
00365             std::cout << std::endl;
00366 #endif
00367             continue;
00368         }
00369         else {
00370             tmp.append(a[i]);
00371         }
00372     }
00373     _links.append(tmp);
00374     _updated = false;
00375     _fitted = false;
00376     _fittedWithCathode = false; // added by matsu ( 1999/05/24 )
00377 }

void TTrackBase::append TMLink  ) 
 

appends a TMLink.

00335                              {
00336     if ((a.hit()->state() & WireHitUsed)) {
00337 #ifdef TRKRECO_DEBUG_DETAIL
00338         std::cout << "TTrackBase::append !!! " << a.wire()->name()
00339                   << " this is already used by another track!" << std::endl;
00340 #endif
00341         return;
00342     }
00343     if (_links.hasMember(a)) {
00344 #ifdef TRKRECO_DEBUG_DETAIL
00345         std::cout << "TTrackBase::append !!! " << a.wire()->name()
00346                   << " this is already included in this track!" << std::endl;
00347 #endif
00348         return;
00349     }
00350     _links.append(a);
00351     _updated = false;
00352     _fitted = false;
00353     _fittedWithCathode = false; // added by matsu ( 1999/05/24 )
00354 }

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.

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.

00101                                                                   {
00102 #ifdef TRKRECO_DEBUG_DETAIL
00103     std::cout << "    TTrackBase::appendByApproach ... sigma=" << maxSigma << std::endl;
00104 #endif
00105 
00106     AList<TMLink> unused;
00107     unsigned n = list.length();
00108     for (unsigned i = 0; i < n; i++) {
00109         TMLink & l = * list[i];
00110 
00111         if ((_links.hasMember(l)) || (l.hit()->state() & WireHitUsed))
00112             continue;
00113 
00114         //...Calculate closest approach...
00115         int err = approach(l);
00116         if (err < 0) {
00117             unused.append(l);
00118             continue;
00119         }
00120 
00121         //...Calculate sigma...
00122         float distance = (l.positionOnWire() - l.positionOnTrack()).mag();
00123         float diff = fabs(distance - l.drift());
00124         float sigma = diff / l.dDrift();
00125 
00126         //...For debug...
00127 #ifdef TRKRECO_DEBUG_DETAIL
00128         std::cout << "    sigma=" << sigma;
00129         std::cout << ",dist=" << distance;
00130         std::cout << ",diff=" << diff;
00131         std::cout << ",err=" << l.hit()->dDrift() << ",";
00132         if (sigma < maxSigma) std::cout << "ok,";
00133         else                  std::cout << "X,";
00134         l.dump("mc");
00135 #endif
00136                 
00137         //...Make sigma cut...
00138         if (sigma > maxSigma) {
00139             unused.append(l);
00140             continue;
00141         }
00142 
00143         //...OK...
00144         _links.append(l);
00145         _updated = false;
00146         _fitted = false;
00147     }
00148     list.remove(unused);
00149 }

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.

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.

00152                                                                {
00153     std::cout << "TTrackBase::appendByDistance !!! not implemented" << std::endl;
00154     list.removeAll();
00155 }

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, and TTrack.

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, and TTrack.

00095                                    {
00096     std::cout << "TTrackBase::approach !!! not implemented" << std::endl;
00097     return -1;
00098 }

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.

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.

00290                                      {
00291     if (mask)
00292         std::cout << "TTrackBase::cores !!! mask is not supported" << std::endl;
00293     if (! _updated) update();
00294     return _cores;
00295 }

virtual double TTrackBase::distance const TMLink  )  const [virtual]
 

returns distance to a position of TMLink in TMLink space.

Reimplemented in TLine0, TMLine, TLine0, and TMLine.

double TTrackBase::distance const TMLink  )  const [virtual]
 

returns distance to a position of TMLink in TMLink space.

Reimplemented in TLine0, TMLine, TLine0, and TMLine.

00089                                          {
00090     std::cout << "TTrackBase::distance !!! not implemented" << std::endl;
00091     return 0.;
00092 }

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

dumps debug information.

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

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

dumps debug information.

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

00058                                                                    {
00059     bool mc = (msg.find("mc") != std::string::npos);
00060     bool pull = (msg.find("pull") != std::string::npos);
00061     bool flag = (msg.find("flag") != std::string::npos);
00062     bool detail = (msg.find("detail") != std::string::npos);
00063     if (detail)
00064         mc = pull = flag = true;
00065 
00066     if (detail || (msg.find("layer") != std::string::npos)) {
00067         if (! _updated) update();
00068     }
00069     if (detail || (msg.find("hits") != std::string::npos)) {
00070         Dump(_links, msg, pre);
00071     }
00072 }

void TTrackBase::falseFit  ) 
 

false Fit

void TTrackBase::falseFit  )  [inline]
 

false Fit

00227                     {
00228     _fitted = false;
00229     _fittedWithCathode = false;
00230 }

virtual int TTrackBase::fit void   )  [virtual]
 

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

int TTrackBase::fit void   )  [virtual]
 

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

00330                     {
00331     return _fitter->fit(* this);
00332 }

bool TTrackBase::fitted void   )  const
 

returns true if fitted.

bool TTrackBase::fitted void   )  const [inline]
 

returns true if fitted.

00220                              {
00221     return _fitted;
00222 }

bool TTrackBase::fittedWithCathode void   )  const
 

returns true if fitted with cathode hits(TEMPORARY).

bool TTrackBase::fittedWithCathode void   )  const [inline]
 

returns true if fitted with cathode hits(TEMPORARY).

00241                                         {
00242     return _fittedWithCathode;
00243 }

const TMFitter* const TTrackBase::fitter const TMFitter  ) 
 

sets a default fitter.

const TMFitter* const TTrackBase::fitter void   )  const
 

returns a pointer to a default fitter.

const TMFitter *const TTrackBase::fitter const TMFitter  )  [inline]
 

sets a default fitter.

00259                                      {
00260     _fitted = false;
00261     return _fitter = a;
00262 }

const TMFitter *const TTrackBase::fitter void   )  const [inline]
 

returns a pointer to a default fitter.

00253                              {
00254     return _fitter;
00255 }

const TTrackHEP* const TTrackBase::hep void   )  const
 

returns TTrackHEP.

const TTrackHEP *const TTrackBase::hep void   )  const
 

returns TTrackHEP.

00380                           {
00381     unsigned n = _links.length();
00382     CAList<TTrackHEP> hepList;
00383     CList<unsigned> hepCounter;
00384     for (unsigned i = 0; i < n; i++) {
00385         const TTrackHEP * hep = _links[i]->hit()->mc()->hep();
00386         unsigned nH = hepList.length();
00387         bool found = false;
00388         for (unsigned j = 0; j < nH; j++) {
00389             if (hepList[j] == hep) {
00390                 found = true;
00391                 ++(* hepCounter[j]);
00392             }
00393         }
00394 
00395         if (! found) {
00396             hepList.append(hep);
00397             unsigned c = 0;
00398             hepCounter.append(c);
00399         }
00400     }
00401 
00402     _nHeps = hepList.length();
00403     _hep = 0;
00404     unsigned max = 0;
00405     for (unsigned i = 0; i < _nHeps; i++) {
00406         if ((* hepCounter[i]) > max) {
00407             max = (* hepCounter[i]);
00408             _hep = hepList[i];
00409         }
00410     }
00411 
00412     return _hep;
00413 }

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.

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.

00270                                      {
00271     if (mask == 0) return _links;
00272 
00273     std::cout << "TTrackBase::links !!! mask is not supportted yet" << std::endl;
00274     return _links;
00275 }

const TTrackMC* const TTrackBase::mc void   )  const
 

returns a pointer to TTrackMC.

const TTrackMC *const TTrackBase::mc void   )  const [inline]
 

returns a pointer to TTrackMC.

00247                          {
00248     return _mc;
00249 }

unsigned TTrackBase::nCores unsigned  mask = 0  )  const
 

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

unsigned TTrackBase::nCores unsigned  mask = 0  )  const
 

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

00298                                       {
00299     if (mask)
00300         std::cout << "TTrackBase::nCores !!! mask is not supported" << std::endl;
00301     if (! _updated) update();
00302     return _cores.length();
00303 }

unsigned TTrackBase::nHeps void   )  const
 

returns # of contributed TTrackHEP tracks.

unsigned TTrackBase::nHeps void   )  const
 

returns # of contributed TTrackHEP tracks.

00416                             {
00417     hep();
00418     return _nHeps;
00419 }

unsigned TTrackBase::nLinks unsigned  mask = 0  )  const
 

returns # of masked TMLinks assigned to this track object.

unsigned TTrackBase::nLinks unsigned  mask = 0  )  const
 

returns # of masked TMLinks assigned to this track object.

00278                                       {
00279     unsigned n = _links.length();
00280     if (mask == 0) return n;
00281     unsigned nn = 0;
00282     for (unsigned i = 0; i < n; i++) {
00283         const TMDCWireHit & h = * _links[i]->hit();
00284         if (h.state() & mask) ++nn;
00285     }
00286     return nn;
00287 }

virtual unsigned TTrackBase::objectType void   )  const [virtual]
 

returns object type.

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

unsigned TTrackBase::objectType void   )  const [inline, virtual]
 

returns object type.

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

00266                                  {
00267     return TrackBase;
00268 }

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

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

00235                                        {
00236     return _links[i];
00237 }

virtual void TTrackBase::refine double  maxSigma  )  [virtual]
 

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

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'.

void TTrackBase::refine double  maxSigma  )  [virtual]
 

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

00194                                {
00195     AList<TMLink> bad = refineMain(sigma);
00196 //      for (unsigned i = 0; i < bad.length(); i++) {
00197 //      const TMDCWireHit * hit = bad[i]->hit();
00198 //      hit->state(hit->state() | WireHitInvalidForFit);
00199 //      }
00200 
00201 #ifdef TRKRECO_DEBUG_DETAIL
00202     std::cout << "    refine ... sigma=" << sigma << std::endl;
00203     Dump(bad, "detail sort", "        ");
00204 #endif
00205 
00206     if (bad.length()) {
00207         _fitted = false;
00208         _updated = false;
00209     }
00210 }

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'.

00170                                                      {
00171     AList<TMLink> bad = refineMain(sigma);
00172 #ifdef TRKRECO_DEBUG
00173     std::cout << "    refine ... sigma=" << sigma << ", # of rejected hits=";
00174     std::cout << bad.length() << std::endl;
00175 #endif
00176 #ifdef TRKRECO_DEBUG
00177     Dump(bad, "sort pull mc", "        ");
00178 #endif
00179 
00180     if (bad.length()) {
00181         _links.remove(bad);
00182         list.append(bad);
00183         _fitted = false;
00184         _updated = false;
00185     }
00186 }

AList<TMLink> TTrackBase::refineMain double  maxSigma  )  [private]
 

refine core part.

AList< TMLink > TTrackBase::refineMain double  maxSigma  )  [private]
 

refine core part.

00158                                    {
00159     AList<TMLink> bad;
00160     unsigned n = _links.length();
00161     for (unsigned i = 0; i < n; i++){
00162 //      std::cout<<" pull of link = "<<_links[i]->pull()<<std::endl;
00163         if (_links[i]->pull() > sigma)
00164             bad.append(_links[i]);
00165     }
00166     return bad;
00167 }

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

removes TMLinks.

void TTrackBase::remove TMLink a  ) 
 

removes a TMLink.

void TTrackBase::remove const AList< TMLink > &   )  [inline]
 

removes TMLinks.

00211                                           {
00212     _links.remove(a);
00213     _updated = false;
00214     _fitted = false;
00215     _fittedWithCathode = false; // mod. by matsu ( 1999/05/24 )
00216 }

void TTrackBase::remove TMLink a  )  [inline]
 

removes a TMLink.

00202                              {
00203     _links.remove(a);
00204     _updated = false;
00205     _fitted = false;
00206     _fittedWithCathode = false; // mod. by matsu ( 1999/05/24 )
00207 }

virtual void TTrackBase::removeLinks void   )  [virtual]
 

void TTrackBase::removeLinks void   )  [virtual]
 

00189                            {
00190   _links.removeAll();
00191 }

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

unsigned TTrackBase::testByApproach const TMLink list,
double  sigma
const
 

returns # of good hits to be appended.

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

00213                                                                             {
00214 #ifdef TRKRECO_DEBUG_DETAIL
00215     std::cout << "    TTrackBase::testByApproach ... sigma=" << maxSigma << std::endl;
00216 #endif
00217 
00218     unsigned nOK = 0;
00219     unsigned n = list.length();
00220     for (unsigned i = 0; i < n; i++) {
00221         TMLink & l = * list[i];
00222         nOK += testByApproach(l, maxSigma);
00223     }
00224     return nOK;
00225 }

unsigned TTrackBase::testByApproach const TMLink list,
double  sigma
const
 

returns # of good hits to be appended.

00228                                                                      {
00229 #ifdef TRKRECO_DEBUG_DETAIL
00230     std::cout << "    TTrackBase::testByApproach ... sigma=" << maxSigma << std::endl;
00231 #endif
00232     TMLink l = link;
00233 
00234     //...Calculate closest approach...
00235     int err = approach(l);
00236     if (err < 0) return 0;
00237     //...Calculate sigma...
00238     float distance = l.distance();
00239     float diff = fabs(distance - l.hit()->drift());
00240     float sigma = diff / l.hit()->dDrift();
00241     l.pull(sigma * sigma);
00242 
00243     //...For debug...
00244 #ifdef TRKRECO_DEBUG_DETAIL
00245     std::cout << "    sigma=" << sigma;
00246     std::cout << ",dist=" << distance;
00247     std::cout << ",diff=" << diff << ",";
00248     if (sigma < maxSigma) std::cout << "ok,";
00249     else                  std::cout << "X,";
00250     l.dump("mc");
00251 #endif
00252                 
00253     //...Make sigma cut...
00254     if (sigma < maxSigma) return 1;
00255 
00256     return 0;
00257 }

virtual unsigned TTrackBase::type void   )  const [virtual]
 

returns type. Definition is depending on an object class.

Reimplemented in TTrack, and TTrack.

unsigned TTrackBase::type void   )  const [inline, virtual]
 

returns type. Definition is depending on an object class.

Reimplemented in TTrack, and TTrack.

00272                            {
00273     return 0;
00274 }

void TTrackBase::update void   )  const
 

update cache.

Reimplemented in TSegment, TSegment0, TSegment, and TSegment0.

void TTrackBase::update void   )  const
 

update cache.

Reimplemented in TSegment, TSegment0, TSegment, and TSegment0.

00075                              {
00076     _cores.removeAll();
00077     unsigned n = _links.length();
00078     for (unsigned i = 0; i < n; i++) {
00079         TMLink * l = _links[i];
00080         const TMDCWireHit & h = * l->hit();
00081         if (h.state() & WireHitInvalidForFit) continue;
00082         if (! (h.state() & WireHitFittingValid)) continue;
00083         _cores.append(l);
00084     }
00085     _updated = true;
00086 }


Friends And Related Function Documentation

TCosmicFitter [friend]
 

Reimplemented in TTrack.

THelixFitter [friend]
 

Reimplemented in TTrack.

TMFitter [friend]
 


Member Data Documentation

AList<TMLink> TTrackBase::_cores [mutable, private]
 

AList<TMLink> TTrackBase::_cores [mutable, private]
 

bool TTrackBase::_fitted [mutable, protected]
 

bool TTrackBase::_fittedWithCathode [mutable, protected]
 

const TMFitter* TTrackBase::_fitter [private]
 

Reimplemented in T3DLine, TCircle, TLine0, TMLine, TRunge, and TTrack.

const TMFitter* TTrackBase::_fitter [private]
 

Reimplemented in T3DLine, TCircle, TLine0, TMLine, TRunge, and TTrack.

const TTrackHEP* TTrackBase::_hep [mutable, private]
 

const TTrackHEP* TTrackBase::_hep [mutable, private]
 

AList<TMLink> TTrackBase::_links [protected]
 

AList<TMLink> TTrackBase::_links [protected]
 

TTrackMC* TTrackBase::_mc [protected]
 

TTrackMC* TTrackBase::_mc [protected]
 

unsigned TTrackBase::_nHeps [mutable, private]
 

float TTrackBase::_time [private]
 

bool TTrackBase::_updated [mutable, private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:11:58 2011 for BOSS6.5.5 by  doxygen 1.3.9.1