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

#include <MdcSagTraj.h>

Inheritance diagram for MdcSagTraj:

Public Member Functions

 MdcSagTraj (const double sag, const HepPoint3D &point1, const HepPoint3D &point2)
 MdcSagTraj (const MdcSagTraj &traj)
MdcSagTrajclone () const
virtual ~MdcSagTraj ()
MdcSagTrajoperator= (const MdcSagTraj &)
double sag (void) const
HepPoint3D position (double) const
Hep3Vector direction (double) const
double curvature (double f=0.) const
Hep3Vector delDirect (double) const
const Hep3Vector & rawDirection (void) const
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction) const
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction, Hep3Vector &delDirect) const
virtual double distTo1stError (double s, double tol, int pathDir) const
virtual double distTo2ndError (double s, double tol, int pathDir) const
double deltaY (double fltLen) const
void accept (TrkGeomTrajVisitor &visitor) const
 MdcSagTraj (const double sag, const HepPoint3D &point1, const HepPoint3D &point2)
 MdcSagTraj (const MdcSagTraj &traj)
MdcSagTrajclone () const
virtual ~MdcSagTraj ()
MdcSagTrajoperator= (const MdcSagTraj &)
double sag (void) const
HepPoint3D position (double) const
Hep3Vector direction (double) const
double curvature (double f=0.) const
Hep3Vector delDirect (double) const
const Hep3Vector & rawDirection (void) const
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction) const
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction, Hep3Vector &delDirect) const
virtual double distTo1stError (double s, double tol, int pathDir) const
virtual double distTo2ndError (double s, double tol, int pathDir) const
double deltaY (double fltLen) const
void accept (TrkGeomTrajVisitor &visitor) const
 MdcSagTraj (const double sag, const HepPoint3D &point1, const HepPoint3D &point2)
 MdcSagTraj (const MdcSagTraj &traj)
MdcSagTrajclone () const
virtual ~MdcSagTraj ()
MdcSagTrajoperator= (const MdcSagTraj &)
double sag (void) const
HepPoint3D position (double) const
Hep3Vector direction (double) const
double curvature (double f=0.) const
Hep3Vector delDirect (double) const
const Hep3Vector & rawDirection (void) const
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction) const
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction, Hep3Vector &delDirect) const
virtual double distTo1stError (double s, double tol, int pathDir) const
virtual double distTo2ndError (double s, double tol, int pathDir) const
double deltaY (double fltLen) const
void accept (TrkGeomTrajVisitor &visitor) const
Public Member Functions inherited from TrkGeomTraj
 TrkGeomTraj (double lowlim, double hilim)
virtual ~TrkGeomTraj ()
 TrkGeomTraj (double lowlim, double hilim)
virtual ~TrkGeomTraj ()
 TrkGeomTraj (double lowlim, double hilim)
virtual ~TrkGeomTraj ()
Public Member Functions inherited from Trajectory
 Trajectory (double lowlim, double hilim)
virtual ~Trajectory ()
double distTo0thError (double s, double tol, int pathDir) const
bool validFlightDistance (double f, double tolerance=0.0) const
virtual void setFlightRange (double newrange[2])
double lowRange () const
double hiRange () const
double range () const
virtual void print (std::ostream &os) const
virtual void printAll (std::ostream &os) const
 Trajectory (double lowlim, double hilim)
virtual ~Trajectory ()
double distTo0thError (double s, double tol, int pathDir) const
bool validFlightDistance (double f, double tolerance=0.0) const
virtual void setFlightRange (double newrange[2])
double lowRange () const
double hiRange () const
double range () const
virtual void print (std::ostream &os) const
virtual void printAll (std::ostream &os) const
 Trajectory (double lowlim, double hilim)
virtual ~Trajectory ()
double distTo0thError (double s, double tol, int pathDir) const
bool validFlightDistance (double f, double tolerance=0.0) const
virtual void setFlightRange (double newrange[2])
double lowRange () const
double hiRange () const
double range () const
virtual void print (std::ostream &os) const
virtual void printAll (std::ostream &os) const

Additional Inherited Members

Protected Member Functions inherited from Trajectory
Trajectoryoperator= (const Trajectory &)
Trajectoryoperator= (const Trajectory &)
Trajectoryoperator= (const Trajectory &)
Protected Attributes inherited from Trajectory
double flightrange [2]

Detailed Description

Constructor & Destructor Documentation

◆ MdcSagTraj() [1/6]

MdcSagTraj::MdcSagTraj ( const double sag,
const HepPoint3D & point1,
const HepPoint3D & point2 )

Definition at line 56 of file MdcSagTraj.cxx.

57 : TrkGeomTraj( 0.0, start.distance( stop ) ), _sag( sag ), _start( start ), _stop( stop ) {
58 //_direction = stop - start;
59 _direction = ( (CLHEP::Hep3Vector)stop ) - ( (CLHEP::Hep3Vector)start );
60 _length = _direction.mag();
61 assert( _length != 0 );
62
63 _direction.setMag( 1.0 );
64 _a = _sag * 4. / ( _length * _length );
65 _b = -_a * _length;
66}
TrkGeomTraj(double lowlim, double hilim)

Referenced by clone(), MdcSagTraj(), and operator=().

◆ MdcSagTraj() [2/6]

MdcSagTraj::MdcSagTraj ( const MdcSagTraj & traj)

Definition at line 68 of file MdcSagTraj.cxx.

69 : TrkGeomTraj( 0.0, other._start.distance( other._stop ) )
70 , _sag( other._sag )
71 , _a( other._a )
72 , _b( other._b )
73 , _length( other._length )
74 , _start( other._start )
75 , _stop( other._stop )
76 , _direction( other._direction ) {}
Index other(Index i, Index j)

◆ ~MdcSagTraj() [1/3]

MdcSagTraj::~MdcSagTraj ( )
virtual

Definition at line 78 of file MdcSagTraj.cxx.

78{ ; }

◆ MdcSagTraj() [3/6]

MdcSagTraj::MdcSagTraj ( const double sag,
const HepPoint3D & point1,
const HepPoint3D & point2 )

◆ MdcSagTraj() [4/6]

MdcSagTraj::MdcSagTraj ( const MdcSagTraj & traj)

◆ ~MdcSagTraj() [2/3]

virtual MdcSagTraj::~MdcSagTraj ( )
virtual

◆ MdcSagTraj() [5/6]

MdcSagTraj::MdcSagTraj ( const double sag,
const HepPoint3D & point1,
const HepPoint3D & point2 )

◆ MdcSagTraj() [6/6]

MdcSagTraj::MdcSagTraj ( const MdcSagTraj & traj)

◆ ~MdcSagTraj() [3/3]

virtual MdcSagTraj::~MdcSagTraj ( )
virtual

Member Function Documentation

◆ accept() [1/3]

void MdcSagTraj::accept ( TrkGeomTrajVisitor & visitor) const
virtual

Reimplemented from TrkGeomTraj.

Definition at line 186 of file MdcSagTraj.cxx.

186 {
187 std::cout << "ErrMsg(error)"
188 << "accept visitor NOT implemented yet" << std::endl;
189}

◆ accept() [2/3]

void MdcSagTraj::accept ( TrkGeomTrajVisitor & visitor) const
virtual

Reimplemented from TrkGeomTraj.

◆ accept() [3/3]

void MdcSagTraj::accept ( TrkGeomTrajVisitor & visitor) const
virtual

Reimplemented from TrkGeomTraj.

◆ clone() [1/3]

MdcSagTraj * MdcSagTraj::clone ( ) const
virtual

Implements TrkGeomTraj.

Definition at line 82 of file MdcSagTraj.cxx.

82{ return new MdcSagTraj( *this ); }
MdcSagTraj(const double sag, const HepPoint3D &point1, const HepPoint3D &point2)

◆ clone() [2/3]

MdcSagTraj * MdcSagTraj::clone ( ) const
virtual

Implements TrkGeomTraj.

◆ clone() [3/3]

MdcSagTraj * MdcSagTraj::clone ( ) const
virtual

Implements TrkGeomTraj.

◆ curvature() [1/3]

double MdcSagTraj::curvature ( double f = 0.) const
virtual

Implements Trajectory.

Definition at line 172 of file MdcSagTraj.cxx.

172{ return _sag; }

Referenced by MdcSWire::print().

◆ curvature() [2/3]

double MdcSagTraj::curvature ( double f = 0.) const
virtual

Implements Trajectory.

◆ curvature() [3/3]

double MdcSagTraj::curvature ( double f = 0.) const
virtual

Implements Trajectory.

◆ delDirect() [1/3]

Hep3Vector MdcSagTraj::delDirect ( double ) const
virtual

Implements Trajectory.

Definition at line 133 of file MdcSagTraj.cxx.

133 {
134 return Hep3Vector( 0., 2. * _a, 0. );
135}

Referenced by getInfo().

◆ delDirect() [2/3]

Hep3Vector MdcSagTraj::delDirect ( double ) const
virtual

Implements Trajectory.

◆ delDirect() [3/3]

Hep3Vector MdcSagTraj::delDirect ( double ) const
virtual

Implements Trajectory.

◆ deltaY() [1/3]

double MdcSagTraj::deltaY ( double fltLen) const
inline

Definition at line 92 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcGeom/MdcSagTraj.h.

92{ return ( _a * fltLen + _b ) * fltLen; }

Referenced by getInfo().

◆ deltaY() [2/3]

double MdcSagTraj::deltaY ( double fltLen) const
inline

Definition at line 92 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcGeom/MdcSagTraj.h.

92{ return ( _a * fltLen + _b ) * fltLen; }

◆ deltaY() [3/3]

double MdcSagTraj::deltaY ( double fltLen) const
inline

Definition at line 92 of file Reconstruction/MdcPatRec/MdcGeom/include/MdcGeom/MdcSagTraj.h.

92{ return ( _a * fltLen + _b ) * fltLen; }

◆ direction() [1/3]

Hep3Vector MdcSagTraj::direction ( double flightlen) const
virtual

Implements Trajectory.

Definition at line 120 of file MdcSagTraj.cxx.

120 {
121 if ( flightlen <= 0. ) return _direction;
122 // Hep3Vector dir = _direction*flightlen + delDirect(flightlen);
123 static Hep3Vector tmpdir;
124 tmpdir = _direction * flightlen;
125 // register double newy = tmpdir.y() + 2.*_a*flightlen+_b;
126 // tmpdir.setY(newy);
127 tmpdir.setY( tmpdir.y() + 2. * _a * flightlen + _b );
128 // tmpdir += delDirect(flightlen);
129 tmpdir.setMag( 1.0 );
130 return tmpdir;
131}

Referenced by getInfo(), getInfo(), and MdcSWire::print().

◆ direction() [2/3]

Hep3Vector MdcSagTraj::direction ( double ) const
virtual

Implements Trajectory.

◆ direction() [3/3]

Hep3Vector MdcSagTraj::direction ( double ) const
virtual

Implements Trajectory.

◆ distTo1stError() [1/3]

double MdcSagTraj::distTo1stError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

Definition at line 174 of file MdcSagTraj.cxx.

174 {
175 double dtmp = pathDir * 2. * _a * flightlen + _b;
176
177 return dtmp == 0. ? 9999.e4 : fabs( tol / dtmp );
178}

◆ distTo1stError() [2/3]

virtual double MdcSagTraj::distTo1stError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo1stError() [3/3]

virtual double MdcSagTraj::distTo1stError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo2ndError() [1/3]

double MdcSagTraj::distTo2ndError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

Definition at line 180 of file MdcSagTraj.cxx.

180 {
181 return 999.e4;
182 // return _a==0. ? 999.e4 : tol/(2.*_a);
183}

◆ distTo2ndError() [2/3]

virtual double MdcSagTraj::distTo2ndError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo2ndError() [3/3]

virtual double MdcSagTraj::distTo2ndError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ getInfo() [1/6]

void MdcSagTraj::getInfo ( double fltLen,
HepPoint3D & pos,
Hep3Vector & direction ) const
virtual

Implements Trajectory.

Definition at line 137 of file MdcSagTraj.cxx.

137 {
138 // std::cout<<"Dyz*"<<"MdcSagTraj01 "<<std::endl;//yzhang DEBUG
139 // Written using +=, etc to avoid temporaries
140 pos = _start;
141 // CHANGE pos += _direction*flightlen;
142 pos += (HepPoint3D)_direction * flightlen;
143
144 dir = _direction;
145 if ( flightlen > 0. )
146 {
147 pos.setY( pos.y() + deltaY( flightlen ) );
148 dir.setY( dir.y() + 2. * _a * flightlen + _b );
149 dir.setMag( 1.0 );
150 }
151}

◆ getInfo() [2/6]

void MdcSagTraj::getInfo ( double fltLen,
HepPoint3D & ,
Hep3Vector & direction ) const
virtual

Implements Trajectory.

◆ getInfo() [3/6]

void MdcSagTraj::getInfo ( double fltLen,
HepPoint3D & ,
Hep3Vector & direction ) const
virtual

Implements Trajectory.

◆ getInfo() [4/6]

void MdcSagTraj::getInfo ( double fltLen,
HepPoint3D & pos,
Hep3Vector & direction,
Hep3Vector & delDirect ) const
virtual

Implements Trajectory.

Definition at line 153 of file MdcSagTraj.cxx.

154 {
155 // std::cout<<"Dyz*"<<"MdcSagTraj011 "<<std::endl;//yzhang DEBUG
156
157 pos = _start;
158 // CHANGE pos += _direction*flightlen ;
159 pos += (HepPoint3D)_direction * flightlen;
160
161 pos.setY( pos.y() + ( _a * flightlen + _b ) * flightlen );
162
163 dir = _direction;
164 dir.setY( dir.y() + 2 * _a * flightlen + _b );
165 // Note: `dir' is on purpose not normalized (WDH, Jan 2003)
166
167 delDir.setX( 0. );
168 delDir.setY( 2. * _a );
169 delDir.setZ( 0. );
170}

◆ getInfo() [5/6]

void MdcSagTraj::getInfo ( double fltLen,
HepPoint3D & ,
Hep3Vector & direction,
Hep3Vector & delDirect ) const
virtual

Implements Trajectory.

◆ getInfo() [6/6]

void MdcSagTraj::getInfo ( double fltLen,
HepPoint3D & ,
Hep3Vector & direction,
Hep3Vector & delDirect ) const
virtual

Implements Trajectory.

◆ operator=() [1/3]

MdcSagTraj & MdcSagTraj::operator= ( const MdcSagTraj & other)

Definition at line 88 of file MdcSagTraj.cxx.

88 {
89 if ( &other != this )
90 {
91 for ( int iend = 0; iend < 2; iend++ ) flightrange[iend] = other.flightrange[iend];
92 _start = other._start;
93 _stop = other._stop;
94 _sag = other._sag;
95 _a = other._a;
96 _b = other._b;
97 _length = other._length;
98 _direction = other._direction;
99 }
100 return *this;
101}

◆ operator=() [2/3]

MdcSagTraj & MdcSagTraj::operator= ( const MdcSagTraj & )

◆ operator=() [3/3]

MdcSagTraj & MdcSagTraj::operator= ( const MdcSagTraj & )

◆ position() [1/3]

HepPoint3D MdcSagTraj::position ( double flightlen) const
virtual

Implements Trajectory.

Definition at line 111 of file MdcSagTraj.cxx.

111 {
112 static HepPoint3D tmppos;
113 tmppos = _start;
114 // CHANGE tmppos += _direction*flightlen;
115 tmppos += (HepPoint3D)_direction * flightlen; // yzhang TEMP
116 tmppos.setY( tmppos.y() + ( _a * flightlen + _b ) * flightlen );
117 return tmppos;
118}

Referenced by main(), and MdcSWire::print().

◆ position() [2/3]

HepPoint3D MdcSagTraj::position ( double ) const
virtual

Implements Trajectory.

◆ position() [3/3]

HepPoint3D MdcSagTraj::position ( double ) const
virtual

Implements Trajectory.

◆ rawDirection() [1/3]

const Hep3Vector & MdcSagTraj::rawDirection ( void ) const
inline

Definition at line 85 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcGeom/MdcSagTraj.h.

85{ return _direction; }

Referenced by main(), and MdcSWire::print().

◆ rawDirection() [2/3]

const Hep3Vector & MdcSagTraj::rawDirection ( void ) const
inline

Definition at line 85 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcGeom/MdcSagTraj.h.

85{ return _direction; }

◆ rawDirection() [3/3]

const Hep3Vector & MdcSagTraj::rawDirection ( void ) const
inline

Definition at line 85 of file Reconstruction/MdcPatRec/MdcGeom/include/MdcGeom/MdcSagTraj.h.

85{ return _direction; }

◆ sag() [1/3]

double MdcSagTraj::sag ( void ) const
inline

◆ sag() [2/3]

double MdcSagTraj::sag ( void ) const
inline

Definition at line 78 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcGeom/MdcSagTraj.h.

78{ return _sag; }

◆ sag() [3/3]

double MdcSagTraj::sag ( void ) const
inline

Definition at line 78 of file Reconstruction/MdcPatRec/MdcGeom/include/MdcGeom/MdcSagTraj.h.

78{ return _sag; }

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