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

TCircle Class Reference

A class to represent a circle in tracking. More...

#include <TCircle.h>

Inheritance diagram for TCircle:

TTrackBase TTrackBase 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 HepPoint3Dcenter (void) const
 returns position of center.
const HepPoint3Dcenter (void) const
 returns position of center.
double charge (void) const
 returns charge.
double charge (void) const
 returns charge.
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.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
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.
int fitForCurl (int ipConst=0)
 fits itself only for curl finder. Error was happened if return value is not zero.
int fitForCurl (int ipConst=0)
 fits itself only for curl finder. 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.
double impact (void) const
 returns impact parameter to the origin.
double impact (void) const
 returns impact parameter to the origin.
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 type.
virtual unsigned objectType (void) const
 returns type.
TMLinkoperator[] (unsigned i) const
TMLinkoperator[] (unsigned i) const
void property (double charge, double radius, HepPoint3D center)
 sets circle properties.
void property (double charge, double radius, HepPoint3D center)
 sets circle properties.
double pt (void) const
 returns Pt.
double pt (void) const
 returns Pt.
double radius (void) const
 returns radius.
double radius (void) const
 returns radius.
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)
 TCircle (const AList< TMLink > &links)
 Constructor.
 TCircle (const AList< TMLink > &links)
 Constructor.
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.
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.
double weight (const TMLink &l) const
 returns weight of TMLink in order to fit and make a circle.
double weight (const TMLink &l) const
 returns weight of TMLink in order to fit and make a circle.
virtual ~TCircle ()
 Destructor.
virtual ~TCircle ()
 Destructor.

Protected Attributes

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

Private Attributes

HepPoint3D _center
double _charge
Lpav _circle
double _radius

Static Private Attributes

const TCircleFitter _fitter = TCircleFitter("TCircle Default Circle Fitter")

Detailed Description

A class to represent a circle in tracking.


Constructor & Destructor Documentation

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

Constructor.

00023 : TTrackBase(a), _radius(0.), _charge(0.) {
00024 
00025     //...Set a defualt fitter...
00026     fitter(& TCircle::_fitter);
00027 }

TCircle::~TCircle  )  [virtual]
 

Destructor.

00029                   {
00030 }

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

Constructor.

virtual TCircle::~TCircle  )  [virtual]
 

Destructor.


Member Function Documentation

void TTrackBase::append const AList< TMLink > &   )  [inherited]
 

appends TMLinks.

void TTrackBase::append TMLink  )  [inherited]
 

appends a TMLink.

void TTrackBase::append const AList< TMLink > &   )  [inherited]
 

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  )  [inherited]
 

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
[inherited]
 

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
[inherited]
 

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
[inherited]
 

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
[inherited]
 

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, inherited]
 

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, inherited]
 

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 HepPoint3D& TCircle::center void   )  const
 

returns position of center.

const HepPoint3D & TCircle::center void   )  const [inline]
 

returns position of center.

00108                           {
00109 #ifdef TRKRECO_DEBUG
00110     if (! _fitted) std::cout << "TCircle::center !!! fit not performed" << std::endl;
00111 #endif
00112     return _center;
00113 }

double TCircle::charge void   )  const
 

returns charge.

double TCircle::charge void   )  const [inline]
 

returns charge.

00147                           {
00148 #ifdef TRKRECO_DEBUG
00149     if (! _fitted) std::cout << "TCircle::charge !!! fit not performed" << std::endl;
00150 #endif
00151     return _charge;
00152 
00153 }

const AList<TMLink>& TTrackBase::cores unsigned  mask = 0  )  const [inherited]
 

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 [inherited]
 

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, inherited]
 

returns distance to a position of TMLink in TMLink space.

Reimplemented in TLine0, TMLine, TLine0, and TMLine.

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

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 }

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

dumps debug information.

Reimplemented from TTrackBase.

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

dumps debug information.

Reimplemented from TTrackBase.

00033                                                                 {
00034     bool def = false;
00035     if (msg == "") def = true;
00036 
00037     if (def || msg.find("circle") != std::string::npos || msg.find("detail") != std::string::npos) {
00038         std::cout << pre;
00039         std::cout << "#links=" << _links.length();
00040         if (_fitted) {
00041             std::cout << ",charge=" << _charge;
00042             std::cout << ",center=" << _center;
00043             std::cout << ",radius=" << _radius;
00044             std::cout << std::endl << pre;
00045             std::cout << "pt=" << pt();
00046             std::cout << ",impact=" << impact();
00047             std::cout << std::endl;
00048         }
00049         else {
00050             std::cout << ", not fitted yet" << std::endl;
00051         }
00052     }
00053     if (! def) TTrackBase::dump(msg, pre);
00054 }

void TTrackBase::falseFit  )  [inherited]
 

false Fit

void TTrackBase::falseFit  )  [inline, inherited]
 

false Fit

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

virtual int TTrackBase::fit void   )  [virtual, inherited]
 

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

int TTrackBase::fit void   )  [virtual, inherited]
 

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

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

int TCircle::fitForCurl int  ipConst = 0  ) 
 

fits itself only for curl finder. Error was happened if return value is not zero.

int TCircle::fitForCurl int  ipConst = 0  ) 
 

fits itself only for curl finder. Error was happened if return value is not zero.

00136                                {
00137     unsigned n = _links.length();
00138     if (n < 3) return -1;
00139 
00140     //IP check
00141     unsigned flagIP = 1;
00142     unsigned layerID = _links[0]->hit()->wire()->layerId();
00143     for(unsigned i = 0; i < n; i++){
00144       if(layerID != _links[i]->hit()->wire()->layerId()){
00145         flagIP = 0;
00146         break;
00147       }
00148     }
00149     if(ipConst != 0)flagIP = 1;
00150     if(flagIP == 1){
00151       _circle.add_point(0., 0., 0.5);
00152       //++_nPointsForFit;
00153     }
00154     for (unsigned i = 0; i < n; i++) {
00155         TMLink * l = _links[i];
00156         if (l == 0) continue;
00157 
00158         const TMDCWireHit * h = l->hit();
00159         if (h == 0) continue;
00160 
00161         //...Check next hit...
00162         HepPoint3D point;
00163         point = h->xyPosition();
00164         
00165         double weight = 1.0;
00166         weight = this->weight(* l);
00167 
00168         _circle.add_point(point.x(), point.y(), weight);
00169         //++_nPointsForFit;
00170     }
00171 
00172     //if (_nPointsForFit < 3) return -1;
00173     if(_circle.fit()<0.0 || _circle.kappa()==0.0) return -1;
00174     HepVector v(_circle.center());
00175     _center.setX(v(1));
00176     _center.setY(v(2));
00177     _radius = _circle.radius();
00178 
00179     //...Determine charge...Better way???
00180     int qSum = 0;
00181     for (unsigned i = 0; i < n; i++) {
00182         TMLink * l = _links[i];
00183         if (l == 0) continue;
00184 
00185         const TMDCWireHit * h = l->hit();
00186         if (h == 0) continue;
00187 
00188         float q = (_center.cross(h->xyPosition())).z();
00189         if (q > 0.) qSum += 1;
00190         else        qSum -= 1;
00191     }
00192     if (qSum >= 0) _charge = +1.;
00193     else           _charge = -1.;
00194     _radius *= _charge;
00195 
00196     _fitted = true;
00197     return 0;
00198 }

bool TTrackBase::fitted void   )  const [inherited]
 

returns true if fitted.

bool TTrackBase::fitted void   )  const [inline, inherited]
 

returns true if fitted.

00220                              {
00221     return _fitted;
00222 }

bool TTrackBase::fittedWithCathode void   )  const [inherited]
 

returns true if fitted with cathode hits(TEMPORARY).

bool TTrackBase::fittedWithCathode void   )  const [inline, inherited]
 

returns true if fitted with cathode hits(TEMPORARY).

00241                                         {
00242     return _fittedWithCathode;
00243 }

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

sets a default fitter.

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

returns a pointer to a default fitter.

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

sets a default fitter.

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

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

returns a pointer to a default fitter.

00253                              {
00254     return _fitter;
00255 }

const TTrackHEP* const TTrackBase::hep void   )  const [inherited]
 

returns TTrackHEP.

const TTrackHEP *const TTrackBase::hep void   )  const [inherited]
 

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 }

double TCircle::impact void   )  const
 

returns impact parameter to the origin.

double TCircle::impact void   )  const [inline]
 

returns impact parameter to the origin.

00136                           {
00137 #ifdef TRKRECO_DEBUG
00138     if (! _fitted) std::cout << "TCircle::impact !!! fit not performed" << std::endl;
00139 #endif
00140     return fabs(sqrt(_center.x() * _center.x() +
00141                      _center.y() * _center.y())
00142                 - fabs(_radius));
00143 }

const AList<TMLink>& TTrackBase::links unsigned  mask = 0  )  const [inherited]
 

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 [inherited]
 

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 [inherited]
 

returns a pointer to TTrackMC.

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

returns a pointer to TTrackMC.

00247                          {
00248     return _mc;
00249 }

unsigned TTrackBase::nCores unsigned  mask = 0  )  const [inherited]
 

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

unsigned TTrackBase::nCores unsigned  mask = 0  )  const [inherited]
 

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 [inherited]
 

returns # of contributed TTrackHEP tracks.

unsigned TTrackBase::nHeps void   )  const [inherited]
 

returns # of contributed TTrackHEP tracks.

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

unsigned TTrackBase::nLinks unsigned  mask = 0  )  const [inherited]
 

returns # of masked TMLinks assigned to this track object.

unsigned TTrackBase::nLinks unsigned  mask = 0  )  const [inherited]
 

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 TCircle::objectType void   )  const [virtual]
 

returns type.

Reimplemented from TTrackBase.

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

returns type.

Reimplemented from TTrackBase.

00165                               {
00166     return Circle;
00167 }

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

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

00235                                        {
00236     return _links[i];
00237 }

void TCircle::property double  charge,
double  radius,
HepPoint3D  center
 

sets circle properties.

void TCircle::property double  charge,
double  radius,
HepPoint3D  center
[inline]
 

sets circle properties.

00157                                                   {
00158     _charge = c;
00159     _radius = r;
00160     _center = e;
00161 }

double TCircle::pt void   )  const
 

returns Pt.

double TCircle::pt void   )  const [inline]
 

returns Pt.

00126                       {
00127 #ifdef TRKRECO_DEBUG
00128     if (! _fitted) std::cout << "TCircle::pt !!! fit not performed" << std::endl;
00129 #endif
00130    // return fabs(_radius) / Helix::ConstantAlpha;
00131     return fabs(_radius) / 333.564095;
00132 }

double TCircle::radius void   )  const
 

returns radius.

double TCircle::radius void   )  const [inline]
 

returns radius.

00117                           {
00118 #ifdef TRKRECO_DEBUG
00119     if (! _fitted) std::cout << "TCircle::radius !!! fit not performed" << std::endl;
00120 #endif
00121     return _radius;
00122 }

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

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, inherited]
 

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

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

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, inherited]
 

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 }

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

removes TMLinks.

void TTrackBase::remove TMLink a  )  [inherited]
 

removes a TMLink.

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

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, inherited]
 

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, inherited]
 

void TTrackBase::removeLinks void   )  [virtual, inherited]
 

00189                            {
00190   _links.removeAll();
00191 }

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

unsigned TTrackBase::testByApproach const TMLink list,
double  sigma
const [inherited]
 

returns # of good hits to be appended.

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

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 [inherited]
 

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, inherited]
 

returns type. Definition is depending on an object class.

Reimplemented in TTrack, and TTrack.

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

returns type. Definition is depending on an object class.

Reimplemented in TTrack, and TTrack.

00272                            {
00273     return 0;
00274 }

void TTrackBase::update void   )  const [inherited]
 

update cache.

Reimplemented in TSegment, TSegment0, TSegment, and TSegment0.

void TTrackBase::update void   )  const [inherited]
 

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 }

double TCircle::weight const TMLink l  )  const
 

returns weight of TMLink in order to fit and make a circle.

double TCircle::weight const TMLink l  )  const
 

returns weight of TMLink in order to fit and make a circle.

00111                                       {
00112 
00113   //...Axial Wires
00114   int maxLink = 0;
00115   int localID[6];
00116   int layerID[6];
00117   int LayerID = l.hit()->wire()->layerId();
00118   for(int i=0;i<6;i++){
00119     if(l.neighbor(i)){
00120       maxLink = i;
00121       localID[i] = l.neighbor(i)->hit()->wire()->localId();
00122       layerID[i] = l.neighbor(i)->hit()->wire()->layerId();
00123     }else{
00124       break;
00125     }
00126   }
00127   if(maxLink != 1)return 1.0;
00128   if(layerID[0] == LayerID &&
00129      layerID[1] == LayerID)return 0.5;
00130   if(layerID[0]+layerID[1] != LayerID*2)return 1.0;
00131 //Liuqg  if(localID[0] != localID[1])return 1.5;//1.0 or 2.0 ??
00132   return 1.0;
00133 }


Member Data Documentation

HepPoint3D TCircle::_center [private]
 

double TCircle::_charge [private]
 

Lpav TCircle::_circle [private]
 

bool TTrackBase::_fitted [mutable, protected, inherited]
 

bool TTrackBase::_fittedWithCathode [mutable, protected, inherited]
 

const TCircleFitter TCircle::_fitter = TCircleFitter("TCircle Default Circle Fitter") [static, private]
 

Reimplemented from TTrackBase.

AList<TMLink> TTrackBase::_links [protected, inherited]
 

AList<TMLink> TTrackBase::_links [protected, inherited]
 

TTrackMC* TTrackBase::_mc [protected, inherited]
 

TTrackMC* TTrackBase::_mc [protected, inherited]
 

double TCircle::_radius [private]
 


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