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

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

#include <TCircle.h>

Inheritance diagram for TCircle:

Public Member Functions

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

Additional Inherited Members

Protected Attributes inherited from TTrackBase
AList< TMLink_links
bool _fitted
bool _fittedWithCathode
TTrackMC_mc

Detailed Description

A class to represent a circle in tracking.

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

Constructor & Destructor Documentation

◆ TCircle() [1/3]

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

Constructor.

Definition at line 21 of file TCircle.cxx.

21 : TTrackBase( a ), _radius( 0. ), _charge( 0. ) {
22
23 //...Set a defualt fitter...
24 fitter( &TCircle::_fitter );
25}
const TMFitter *const fitter(void) const
returns a pointer to a default fitter.
TTrackBase()
Constructor.

◆ ~TCircle() [1/3]

TCircle::~TCircle ( )
virtual

Destructor.

Definition at line 27 of file TCircle.cxx.

27{}

◆ TCircle() [2/3]

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

Constructor.

◆ ~TCircle() [2/3]

virtual TCircle::~TCircle ( )
virtual

Destructor.

◆ TCircle() [3/3]

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

Constructor.

◆ ~TCircle() [3/3]

virtual TCircle::~TCircle ( )
virtual

Destructor.

Member Function Documentation

◆ center() [1/3]

const HepPoint3D & TCircle::center ( void ) const
inline

returns position of center.

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

106 {
107# ifdef TRKRECO_DEBUG
108 if ( !_fitted ) std::cout << "TCircle::center !!! fit not performed" << std::endl;
109# endif
110 return _center;
111}

Referenced by property(), and TTrack::TTrack().

◆ center() [2/3]

const HepPoint3D & TCircle::center ( void ) const

returns position of center.

◆ center() [3/3]

const HepPoint3D & TCircle::center ( void ) const

returns position of center.

◆ charge() [1/3]

double TCircle::charge ( void ) const
inline

returns charge.

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

136 {
137# ifdef TRKRECO_DEBUG
138 if ( !_fitted ) std::cout << "TCircle::charge !!! fit not performed" << std::endl;
139# endif
140 return _charge;
141}

Referenced by property().

◆ charge() [2/3]

double TCircle::charge ( void ) const

returns charge.

◆ charge() [3/3]

double TCircle::charge ( void ) const

returns charge.

◆ dump() [1/3]

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

dumps debug information.

Reimplemented from TTrackBase.

Definition at line 29 of file TCircle.cxx.

29 {
30 bool def = false;
31 if ( msg == "" ) def = true;
32
33 if ( def || msg.find( "circle" ) != std::string::npos ||
34 msg.find( "detail" ) != std::string::npos )
35 {
36 std::cout << pre;
37 std::cout << "#links=" << _links.length();
38 if ( _fitted )
39 {
40 std::cout << ",charge=" << _charge;
41 std::cout << ",center=" << _center;
42 std::cout << ",radius=" << _radius;
43 std::cout << std::endl << pre;
44 std::cout << "pt=" << pt();
45 std::cout << ",impact=" << impact();
46 std::cout << std::endl;
47 }
48 else { std::cout << ", not fitted yet" << std::endl; }
49 }
50 if ( !def ) TTrackBase::dump( msg, pre );
51}
double impact(void) const
returns impact parameter to the origin.
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.

Referenced by TBuilder::buildRphi().

◆ dump() [2/3]

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

dumps debug information.

Reimplemented from TTrackBase.

◆ dump() [3/3]

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

dumps debug information.

Reimplemented from TTrackBase.

◆ fitForCurl() [1/3]

int TCircle::fitForCurl ( int ipConst = 0)

fits itself. Error was happened if return value is not zero.

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

Definition at line 131 of file TCircle.cxx.

131 {
132 unsigned n = _links.length();
133 if ( n < 3 ) return -1;
134
135 // IP check
136 unsigned flagIP = 1;
137 unsigned layerID = _links[0]->hit()->wire()->layerId();
138 for ( unsigned i = 0; i < n; i++ )
139 {
140 if ( layerID != _links[i]->hit()->wire()->layerId() )
141 {
142 flagIP = 0;
143 break;
144 }
145 }
146 if ( ipConst != 0 ) flagIP = 1;
147 if ( flagIP == 1 )
148 {
149 _circle.add_point( 0., 0., 0.5 );
150 //++_nPointsForFit;
151 }
152 for ( unsigned i = 0; i < n; i++ )
153 {
154 TMLink* l = _links[i];
155 if ( l == 0 ) continue;
156
157 const TMDCWireHit* h = l->hit();
158 if ( h == 0 ) continue;
159
160 //...Check next hit...
161 HepPoint3D point;
162 point = h->xyPosition();
163
164 double weight = 1.0;
165 weight = this->weight( *l );
166
167 _circle.add_point( point.x(), point.y(), weight );
168 //++_nPointsForFit;
169 }
170
171 // if (_nPointsForFit < 3) return -1;
172 if ( _circle.fit() < 0.0 || _circle.kappa() == 0.0 ) return -1;
173 HepVector v( _circle.center() );
174 _center.setX( v( 1 ) );
175 _center.setY( v( 2 ) );
176 _radius = _circle.radius();
177
178 //...Determine charge...Better way???
179 int qSum = 0;
180 for ( unsigned i = 0; i < n; i++ )
181 {
182 TMLink* l = _links[i];
183 if ( l == 0 ) continue;
184
185 const TMDCWireHit* h = l->hit();
186 if ( h == 0 ) continue;
187
188 float q = ( _center.cross( h->xyPosition() ) ).z();
189 if ( q > 0. ) qSum += 1;
190 else qSum -= 1;
191 }
192 if ( qSum >= 0 ) _charge = +1.;
193 else _charge = -1.;
194 _radius *= _charge;
195
196 _fitted = true;
197 return 0;
198}
const Int_t n
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition KKsem.h:33
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared dimensionless $ !dummy photon IR regulator $ !crude photon multiplicity enhancement factor *EVENT $ !MC crude volume of PhhSpace *Sfactors $ !YFS formfactor IR part only $ !YFS formfactor non IR finite part $ !mass weight
Definition KarFin.h:34
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
HepGeom::Point3D< double > HepPoint3D
double weight(const TMLink &l) const
returns weight of TMLink in order to fit and make a circle.
Definition TCircle.cxx:107
const HepPoint3D & xyPosition(void) const
returns drift time

◆ fitForCurl() [2/3]

int TCircle::fitForCurl ( int ipConst = 0)

fits itself. Error was happened if return value is not zero.

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

◆ fitForCurl() [3/3]

int TCircle::fitForCurl ( int ipConst = 0)

fits itself. Error was happened if return value is not zero.

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

◆ impact() [1/3]

double TCircle::impact ( void ) const
inline

returns impact parameter to the origin.

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

128 {
129# ifdef TRKRECO_DEBUG
130 if ( !_fitted ) std::cout << "TCircle::impact !!! fit not performed" << std::endl;
131# endif
132 return fabs( sqrt( _center.x() * _center.x() + _center.y() * _center.y() ) -
133 fabs( _radius ) );
134}

Referenced by dump(), and TMSelector::select().

◆ impact() [2/3]

double TCircle::impact ( void ) const

returns impact parameter to the origin.

◆ impact() [3/3]

double TCircle::impact ( void ) const

returns impact parameter to the origin.

◆ objectType() [1/3]

unsigned TCircle::objectType ( void ) const
inlinevirtual

returns type.

Reimplemented from TTrackBase.

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

◆ objectType() [2/3]

virtual unsigned TCircle::objectType ( void ) const
virtual

returns type.

Reimplemented from TTrackBase.

◆ objectType() [3/3]

virtual unsigned TCircle::objectType ( void ) const
virtual

returns type.

Reimplemented from TTrackBase.

◆ property() [1/3]

void TCircle::property ( double charge,
double radius,
HepPoint3D center )
inline

sets circle properties.

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

143 {
144 _charge = c;
145 _radius = r;
146 _center = e;
147}

◆ property() [2/3]

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

sets circle properties.

◆ property() [3/3]

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

sets circle properties.

◆ pt() [1/3]

double TCircle::pt ( void ) const
inline

returns Pt.

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

120 {
121# ifdef TRKRECO_DEBUG
122 if ( !_fitted ) std::cout << "TCircle::pt !!! fit not performed" << std::endl;
123# endif
124 // return fabs(_radius) / Helix::ConstantAlpha;
125 return fabs( _radius ) / 333.564095;
126}

Referenced by dump(), and TMSelector::select().

◆ pt() [2/3]

double TCircle::pt ( void ) const

returns Pt.

◆ pt() [3/3]

double TCircle::pt ( void ) const

returns Pt.

◆ radius() [1/3]

double TCircle::radius ( void ) const
inline

returns radius.

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

113 {
114# ifdef TRKRECO_DEBUG
115 if ( !_fitted ) std::cout << "TCircle::radius !!! fit not performed" << std::endl;
116# endif
117 return _radius;
118}

Referenced by property(), and TTrack::TTrack().

◆ radius() [2/3]

double TCircle::radius ( void ) const

returns radius.

◆ radius() [3/3]

double TCircle::radius ( void ) const

returns radius.

◆ weight() [1/3]

double TCircle::weight ( const TMLink & l) const

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

Definition at line 107 of file TCircle.cxx.

107 {
108
109 //...Axial Wires
110 int maxLink = 0;
111 int localID[6];
112 int layerID[6];
113 int LayerID = l.hit()->wire()->layerId();
114 for ( int i = 0; i < 6; i++ )
115 {
116 if ( l.neighbor( i ) )
117 {
118 maxLink = i;
119 localID[i] = l.neighbor( i )->hit()->wire()->localId();
120 layerID[i] = l.neighbor( i )->hit()->wire()->layerId();
121 }
122 else { break; }
123 }
124 if ( maxLink != 1 ) return 1.0;
125 if ( layerID[0] == LayerID && layerID[1] == LayerID ) return 0.5;
126 if ( layerID[0] + layerID[1] != LayerID * 2 ) return 1.0;
127 // Liuqg if(localID[0] != localID[1])return 1.5;//1.0 or 2.0 ??
128 return 1.0;
129}
const TMDCWire *const wire(void) const
returns a pointer to a TMDCWire.
unsigned localId(void) const
returns local id in a wire layer.
unsigned layerId(void) const
returns layer id.

Referenced by fitForCurl().

◆ weight() [2/3]

double TCircle::weight ( const TMLink & l) const

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

◆ weight() [3/3]

double TCircle::weight ( const TMLink & l) const

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


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