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

A class to relate TMDCWireHit and TTrack objects. More...

#include <TSegment0.h>

Inheritance diagram for TSegment0:

Public Member Functions

 TSegment0 ()
 Constructor.
 TSegment0 (const AList< TMLink > &)
virtual ~TSegment0 ()
 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.
unsigned superLayerId () const
 returns super layer id.
const HepPoint3Dposition (void) const
 returns position.
const HepVector3Ddirection (void) const
 returns direction.
double distance (const TSegment0 &) const
 calculates distance between two clusters. Smaller value indicates closer.
double distance (const HepPoint3D &, const HepVector3D &) const
Range rangeX (double min, double max) const
 returns Range of x-coordinate of TMLinks.
unsigned innerWidth (void) const
 returns inner width.
unsigned outerWidth (void) const
 returns outer width.
unsigned innerMostLayer (void) const
 returns inner most layer.
unsigned outerMostLayer (void) const
 returns outer most layer.
unsigned clusterType (void) const
AList< TSegment0split (void) const
int solveDualHits (void)
double duality (void) const
AList< TTrack > & tracks (void)
AList< TSegment0 > & innerLinks (void)
 TSegment0 ()
 Constructor.
 TSegment0 (const AList< TMLink > &)
virtual ~TSegment0 ()
 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.
unsigned superLayerId () const
 returns super layer id.
const HepPoint3Dposition (void) const
 returns position.
const HepVector3Ddirection (void) const
 returns direction.
double distance (const TSegment0 &) const
 calculates distance between two clusters. Smaller value indicates closer.
double distance (const HepPoint3D &, const HepVector3D &) const
Range rangeX (double min, double max) const
 returns Range of x-coordinate of TMLinks.
unsigned innerWidth (void) const
 returns inner width.
unsigned outerWidth (void) const
 returns outer width.
unsigned innerMostLayer (void) const
 returns inner most layer.
unsigned outerMostLayer (void) const
 returns outer most layer.
unsigned clusterType (void) const
AList< TSegment0split (void) const
int solveDualHits (void)
double duality (void) const
AList< TTrack > & tracks (void)
AList< TSegment0 > & innerLinks (void)
 TSegment0 ()
 Constructor.
 TSegment0 (const AList< TMLink > &)
virtual ~TSegment0 ()
 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.
unsigned superLayerId () const
 returns super layer id.
const HepPoint3Dposition (void) const
 returns position.
const HepVector3Ddirection (void) const
 returns direction.
double distance (const TSegment0 &) const
 calculates distance between two clusters. Smaller value indicates closer.
double distance (const HepPoint3D &, const HepVector3D &) const
Range rangeX (double min, double max) const
 returns Range of x-coordinate of TMLinks.
unsigned innerWidth (void) const
 returns inner width.
unsigned outerWidth (void) const
 returns outer width.
unsigned innerMostLayer (void) const
 returns inner most layer.
unsigned outerMostLayer (void) const
 returns outer most layer.
unsigned clusterType (void) const
AList< TSegment0split (void) const
int solveDualHits (void)
double duality (void) const
AList< TTrack > & tracks (void)
AList< TSegment0 > & innerLinks (void)
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 relate TMDCWireHit and TTrack objects.

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

Constructor & Destructor Documentation

◆ TSegment0() [1/6]

TSegment0::TSegment0 ( )

Constructor.

Definition at line 22 of file TSegment0.cxx.

23 : TTrackBase()
24 , _innerWidth( 0 )
25 , _outerWidth( 0 )
26 , _nLayer( 0 )
27 , _clusterType( 0 )
28 , _duality( 0. )
29 , _nDual( 0 )
30 , _angle( 0. ) {
31 _fitted = false;
32}
TTrackBase()
Constructor.

Referenced by distance().

◆ TSegment0() [2/6]

TSegment0::TSegment0 ( const AList< TMLink > & a)

Definition at line 34 of file TSegment0.cxx.

35 : TTrackBase( a )
36 , _innerWidth( 0 )
37 , _outerWidth( 0 )
38 , _nLayer( 0 )
39 , _clusterType( 0 )
40 , _duality( 0. )
41 , _nDual( 0 )
42 , _angle( 0. ) {
43 _links.sort( SortByWireId );
44 _fitted = false;
45}

◆ ~TSegment0() [1/3]

TSegment0::~TSegment0 ( )
virtual

Destructor.

Definition at line 47 of file TSegment0.cxx.

47{}

◆ TSegment0() [3/6]

TSegment0::TSegment0 ( )

Constructor.

◆ TSegment0() [4/6]

TSegment0::TSegment0 ( const AList< TMLink > & )

◆ ~TSegment0() [2/3]

virtual TSegment0::~TSegment0 ( )
virtual

Destructor.

◆ TSegment0() [5/6]

TSegment0::TSegment0 ( )

Constructor.

◆ TSegment0() [6/6]

TSegment0::TSegment0 ( const AList< TMLink > & )

◆ ~TSegment0() [3/3]

virtual TSegment0::~TSegment0 ( )
virtual

Destructor.

Member Function Documentation

◆ clusterType() [1/3]

unsigned TSegment0::clusterType ( void ) const
inline

returns cluster type. 0:empty, 1:short line, 2:long line, 3:V shage(from outside), 4:A shape, 5:X shape, 6:parallel, 7:complicated.

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

202 {
203 if ( !nLinks() ) return 0;
204 if ( _clusterType == 0 ) updateType();
205 return _clusterType;
206}
unsigned nLinks(unsigned mask=0) const
returns # of masked TMLinks assigned to this track object.

Referenced by dump(), TConformalFinder0::findClusters2(), and split().

◆ clusterType() [2/3]

unsigned TSegment0::clusterType ( void ) const

returns cluster type. 0:empty, 1:short line, 2:long line, 3:V shage(from outside), 4:A shape, 5:X shape, 6:parallel, 7:complicated.

◆ clusterType() [3/3]

unsigned TSegment0::clusterType ( void ) const

returns cluster type. 0:empty, 1:short line, 2:long line, 3:V shage(from outside), 4:A shape, 5:X shape, 6:parallel, 7:complicated.

◆ direction() [1/3]

const HepVector3D & TSegment0::direction ( void ) const
inline

returns direction.

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

177 {
178 if ( !_fitted ) update();
179 return _direction;
180}
void update(void) const
update cache.

◆ direction() [2/3]

const HepVector3D & TSegment0::direction ( void ) const

returns direction.

◆ direction() [3/3]

const HepVector3D & TSegment0::direction ( void ) const

returns direction.

◆ distance() [1/6]

double TSegment0::distance ( const HepPoint3D & p,
const HepVector3D & v ) const

Definition at line 143 of file TSegment0.cxx.

143 {
144 HepVector3D dir = _position - p;
145 if ( dir.x() > M_PI ) dir.setX( dir.x() - 2. * M_PI );
146 else if ( dir.x() < -M_PI ) dir.setX( 2. * M_PI + dir.x() );
147
148 float radial = fabs( v.unit().dot( dir ) );
149 float radial2 = radial * radial;
150
151 return ( dir.mag2() - radial2 ) > 0.0 ? sqrt( dir.mag2() - radial2 ) : 0.;
152}
**********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::Vector3D< double > HepVector3D
#define M_PI
Definition TConstant.h:4

◆ distance() [2/6]

double TSegment0::distance ( const HepPoint3D & ,
const HepVector3D &  ) const

◆ distance() [3/6]

double TSegment0::distance ( const HepPoint3D & ,
const HepVector3D &  ) const

◆ distance() [4/6]

double TSegment0::distance ( const TSegment0 & c) const

calculates distance between two clusters. Smaller value indicates closer.

Definition at line 132 of file TSegment0.cxx.

132 {
133 HepVector3D dir = c.position() - _position;
134 if ( dir.x() > M_PI ) dir.setX( dir.x() - 2. * M_PI );
135 else if ( dir.x() < -M_PI ) dir.setX( 2. * M_PI + dir.x() );
136
137 float radial = fabs( _direction.dot( dir ) );
138 float radial2 = radial * radial;
139
140 return ( dir.mag2() - radial2 ) > 0.0 ? sqrt( dir.mag2() - radial2 ) : 0.;
141}
const HepPoint3D & position(void) const
returns position.

Referenced by solveDualHits().

◆ distance() [5/6]

double TSegment0::distance ( const TSegment0 & ) const

calculates distance between two clusters. Smaller value indicates closer.

◆ distance() [6/6]

double TSegment0::distance ( const TSegment0 & ) const

calculates distance between two clusters. Smaller value indicates closer.

◆ duality() [1/3]

double TSegment0::duality ( void ) const
inline

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

208{ return _duality; }

◆ duality() [2/3]

double TSegment0::duality ( void ) const

◆ duality() [3/3]

double TSegment0::duality ( void ) const

◆ dump() [1/3]

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

dumps debug information.

Reimplemented from TTrackBase.

Definition at line 49 of file TSegment0.cxx.

49 {
50 if ( !_fitted ) update();
51 bool def = false;
52 if ( msg == "" ) def = true;
53
54 if ( def || msg.find( "cluster" ) != std::string::npos ||
55 msg.find( "detail" ) != std::string::npos )
56 {
57 std::cout << pre;
58 std::cout << "#links=" << _links.length();
59 std::cout << "(" << _innerWidth << "," << _outerWidth << ":";
60 std::cout << clusterType() << ")," << _nDual << "," << _duality << ",";
61 std::cout << _angle << std::endl;
62 }
63 if ( def || msg.find( "vector" ) != std::string::npos ||
64 msg.find( "detail" ) != std::string::npos )
65 {
66 std::cout << pre;
67 std::cout << "pos" << _position << ","
68 << "dir" << _direction;
69 std::cout << std::endl;
70 }
71 if ( !def ) TTrackBase::dump( msg, pre );
72}
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.

Referenced by TConformalFinder0::findClusters(), TConformalFinder0::findClusters2(), THistogram::segments0(), solveDualHits(), and superLayerId().

◆ dump() [2/3]

void TSegment0::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 TSegment0::dump ( const std::string & message = std::string(""),
const std::string & prefix = std::string("") ) const
virtual

dumps debug information.

Reimplemented from TTrackBase.

◆ innerLinks() [1/3]

AList< TSegment0 > & TSegment0::innerLinks ( void )
inline

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

235{ return _innerLinks; }

◆ innerLinks() [2/3]

AList< TSegment0 > & TSegment0::innerLinks ( void )

◆ innerLinks() [3/3]

AList< TSegment0 > & TSegment0::innerLinks ( void )

◆ innerMostLayer() [1/3]

unsigned TSegment0::innerMostLayer ( void ) const
inline

returns inner most layer.

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

192 {
193 if ( !_fitted ) update();
194 return _innerMostLayer;
195}

◆ innerMostLayer() [2/3]

unsigned TSegment0::innerMostLayer ( void ) const

returns inner most layer.

◆ innerMostLayer() [3/3]

unsigned TSegment0::innerMostLayer ( void ) const

returns inner most layer.

◆ innerWidth() [1/3]

unsigned TSegment0::innerWidth ( void ) const
inline

returns inner width.

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

182 {
183 if ( !_fitted ) update();
184 return _innerWidth;
185}

◆ innerWidth() [2/3]

unsigned TSegment0::innerWidth ( void ) const

returns inner width.

◆ innerWidth() [3/3]

unsigned TSegment0::innerWidth ( void ) const

returns inner width.

◆ objectType() [1/3]

unsigned TSegment0::objectType ( void ) const
inlinevirtual

returns type.

Reimplemented from TTrackBase.

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

◆ objectType() [2/3]

virtual unsigned TSegment0::objectType ( void ) const
virtual

returns type.

Reimplemented from TTrackBase.

◆ objectType() [3/3]

virtual unsigned TSegment0::objectType ( void ) const
virtual

returns type.

Reimplemented from TTrackBase.

◆ outerMostLayer() [1/3]

unsigned TSegment0::outerMostLayer ( void ) const
inline

returns outer most layer.

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

197 {
198 if ( !_fitted ) update();
199 return _outerMostLayer;
200}

◆ outerMostLayer() [2/3]

unsigned TSegment0::outerMostLayer ( void ) const

returns outer most layer.

◆ outerMostLayer() [3/3]

unsigned TSegment0::outerMostLayer ( void ) const

returns outer most layer.

◆ outerWidth() [1/3]

unsigned TSegment0::outerWidth ( void ) const
inline

returns outer width.

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

187 {
188 if ( !_fitted ) update();
189 return _outerWidth;
190}

◆ outerWidth() [2/3]

unsigned TSegment0::outerWidth ( void ) const

returns outer width.

◆ outerWidth() [3/3]

unsigned TSegment0::outerWidth ( void ) const

returns outer width.

◆ position() [1/3]

const HepPoint3D & TSegment0::position ( void ) const
inline

returns position.

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

172 {
173 if ( !_fitted ) update();
174 return _position;
175}

Referenced by distance().

◆ position() [2/3]

const HepPoint3D & TSegment0::position ( void ) const

returns position.

◆ position() [3/3]

const HepPoint3D & TSegment0::position ( void ) const

returns position.

◆ rangeX() [1/3]

Range TSegment0::rangeX ( double min,
double max ) const

returns Range of x-coordinate of TMLinks.

Definition at line 154 of file TSegment0.cxx.

154 {
155#ifdef TRKRECO_DEBUG_DETAIL
156 if ( min > max )
157 {
158 std::cout << "TSegment0::range !!! bad arguments:min,max=";
159 std::cout << min << "," << max << std::endl;
160 }
161#endif
162
163 unsigned n = _links.length();
164 if ( n == 0 ) return Range( 0., 0. );
165
166 //...Search for a center...
167 bool found = false;
168 double center;
169 for ( unsigned i = 0; i < n; i++ )
170 {
171 double x = _links[i]->position().x();
172 if ( x < min || x > max ) continue;
173 center = x;
174 found = true;
175 break;
176 }
177 if ( !found ) return Range( 0., 0. );
178
179#ifdef TRKRECO_DEBUG_DETAIL
180// std::cout << " center=" << center << std::endl;
181#endif
182
183 double distanceR = 0.;
184 double distanceL = 0.;
185 double distanceMax = max - min;
186 for ( unsigned i = 0; i < n; i++ )
187 {
188 double x = _links[i]->position().x();
189 if ( x < min || x > max ) continue;
190
191 double distance0, distance1;
192 if ( x > center )
193 {
194 distance0 = x - center;
195 distance1 = distanceMax - distance0;
196 }
197 else
198 {
199 distance1 = center - x;
200 distance0 = distanceMax - distance1;
201 }
202
203 if ( distance0 < distance1 )
204 {
205 if ( distance0 > distanceR ) distanceR = distance0;
206 }
207 else
208 {
209 if ( distance1 > distanceL ) distanceL = distance1;
210 }
211
212#ifdef TRKRECO_DEBUG_DETAIL
213// std::cout << " ";
214// std::cout << _links[i]->wire()->layerId() << "-";
215// std::cout << _links[i]->wire()->localId() << ",";
216// std::cout << _links[i]->position().x();
217// std::cout << ",0,1=" << distance0 << "," << distance1;
218// std::cout << ",l,r=" << distanceL << "," << distanceR;
219// std::cout << std::endl;
220#endif
221 }
222
223 double right = center + distanceR;
224 double left = center - distanceL;
225
226 return Range( left, right );
227}
const Int_t n
Double_t x[10]
#define min(a, b)
#define max(a, b)

◆ rangeX() [2/3]

Range TSegment0::rangeX ( double min,
double max ) const

returns Range of x-coordinate of TMLinks.

◆ rangeX() [3/3]

Range TSegment0::rangeX ( double min,
double max ) const

returns Range of x-coordinate of TMLinks.

◆ solveDualHits() [1/3]

int TSegment0::solveDualHits ( void )

Definition at line 659 of file TSegment0.cxx.

659 {
660 updateType();
661 if ( _clusterType == 0 ) return 0;
662 if ( _nDual == 0 ) return 0;
663
664 AList<TMLink> seeds;
665 AList<TMLink> duals;
666 for ( unsigned i = _innerMostLayer; i <= _outerMostLayer; i++ )
667 {
668 AList<TMLink> list = SameLayer( _links, i );
669
670 if ( list.length() == 1 ) { seeds.append( list[0] ); }
671 else if ( list.length() == 2 )
672 {
673 if ( Width( list ) > 1 )
674 {
675 const TMDCWireHit* h0 = list[0]->hit();
676 const TMDCWireHit* h1 = list[1]->hit();
677 double distance = ( h0->xyPosition() - h1->xyPosition() ).mag();
678 distance = fabs( distance - h0->drift() - h1->drift() );
679 if ( distance > 0.5 ) duals.append( list );
680#ifdef TRKRECO_DEBUG_DETAIL
681// h0->dump();
682// h1->dump();
683// std::cout << "duality distance = " << distance << std::endl;
684// std::cout << "i = " << i << std::endl;
685#endif
686 }
687 }
688 else if ( list.length() == 0 ) { continue; }
689#ifdef TRKRECO_DEBUG_DETAIL
690 else
691 {
692 std::cout << "TSegment0::solveDualHits !!! this is not expected 2";
693 std::cout << std::endl;
694 this->dump( "cluster hits mc", " " );
695 }
696#endif
697 }
698
699 //...Solve them...
700 if ( seeds.length() < 2 ) return -1;
701 AList<TMLink> outers = InOut( seeds );
702 const HepPoint3D& p = outers[0]->xyPosition();
703 HepVector3D v = ( outers[1]->xyPosition() - p ).unit();
704 unsigned n = duals.length() / 2;
705 for ( unsigned i = 0; i < n; i++ )
706 {
707 TMLink* t0 = duals[i * 2 + 0];
708 TMLink* t1 = duals[i * 2 + 1];
709 HepVector3D x0 = t0->xyPosition() - p;
710 HepVector3D x1 = t1->xyPosition() - p;
711 double d0 = ( x0 - ( x0.dot( v ) * v ) ).mag();
712 double d1 = ( x1 - ( x1.dot( v ) * v ) ).mag();
713 if ( d0 < d1 ) _links.remove( t1 );
714 else _links.remove( t0 );
715 }
716 return n;
717}
HepGeom::Point3D< double > HepPoint3D
float drift(unsigned) const
returns drift distance.
const HepPoint3D & xyPosition(void) const
returns drift time
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition TSegment0.cxx:49
double distance(const TSegment0 &) const
calculates distance between two clusters. Smaller value indicates closer.

Referenced by TConformalFinder0::findClusters(), TConformalFinder0::findClusters2(), and THistogram::segments0().

◆ solveDualHits() [2/3]

int TSegment0::solveDualHits ( void )

◆ solveDualHits() [3/3]

int TSegment0::solveDualHits ( void )

◆ split() [1/3]

AList< TSegment0 > TSegment0::split ( void ) const

returns a list of sub TSegments in this cluster. If cluster type is 1, 2, or 7, no cluster is returned.

Definition at line 292 of file TSegment0.cxx.

292 {
293 AList<TSegment0> list;
294
295 //...Do not split if cluster type is 1, 2, or 7...
296 unsigned t = clusterType();
297#ifdef TRKRECO_DEBUG_DETAIL
298 std::cout << " ... splitting : type=" << t << std::endl;
299#endif
300 if ( t == 0 ) return list;
301 else if ( t == 2 )
302 {
303 // beta 5 if (_nDual > 2 && _duality > 0.7 && _angle > 0.7)
304 // return splitDual();
305 if ( _nDual > 2 && _duality > 0.7 ) return splitDual();
306 return list;
307 }
308 else if ( t == 1 ) return list;
309 else if ( t == 7 ) return list;
310
311 //...Parallel...
312 else if ( t == 6 ) return splitParallel();
313
314 //...Avoid splitting of X or parallel...(future implementation)...
315 else if ( t > 4 ) return splitComplicated();
316
317 //...A or V...
318 return splitAV();
319}
int t()
Definition t.c:1

Referenced by TConformalFinder0::findClusters(), and THistogram::segments0().

◆ split() [2/3]

AList< TSegment0 > TSegment0::split ( void ) const

returns a list of sub TSegments in this cluster. If cluster type is 1, 2, or 7, no cluster is returned.

◆ split() [3/3]

AList< TSegment0 > TSegment0::split ( void ) const

returns a list of sub TSegments in this cluster. If cluster type is 1, 2, or 7, no cluster is returned.

◆ superLayerId() [1/3]

unsigned TSegment0::superLayerId ( void ) const
inline

returns super layer id.

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

212 {
213 unsigned id = ( links() )[0]->wire()->superLayerId();
214# ifdef TRKRECO_DEBUG
215 {
216 const AList<TMLink>& list = links();
217 unsigned n = list.length();
218 for ( unsigned i = 1; i < n; i++ )
219 {
220 if ( list[i]->hit()->wire()->superLayerId() != id )
221 {
222 std::cout << "TSegment0::superLayerId !!! strange segment found";
223 std::cout << std::endl;
224 dump();
225 break;
226 }
227 }
228 }
229# endif
230 return id;
231}
unsigned superLayerId() const
returns super layer id.
const AList< TMLink > & links(unsigned mask=0) const

Referenced by superLayerId().

◆ superLayerId() [2/3]

unsigned TSegment0::superLayerId ( ) const

returns super layer id.

◆ superLayerId() [3/3]

unsigned TSegment0::superLayerId ( ) const

returns super layer id.

◆ tracks() [1/3]

AList< TTrack > & TSegment0::tracks ( void )
inline

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

233{ return _tracks; }

◆ tracks() [2/3]

AList< TTrack > & TSegment0::tracks ( void )

◆ tracks() [3/3]

AList< TTrack > & TSegment0::tracks ( void )

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