BOSS 7.0.5
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
 
- Public Member Functions inherited from TrkGeomTraj
 TrkGeomTraj (double lowlim, double hilim)
 
virtual ~TrkGeomTraj ()
 
virtual void accept (TrkGeomTrajVisitor &) const
 
virtual TrkGeomTrajclone () const =0
 
 TrkGeomTraj (double lowlim, double hilim)
 
virtual ~TrkGeomTraj ()
 
virtual void accept (TrkGeomTrajVisitor &) const
 
virtual TrkGeomTrajclone () const =0
 
- Public Member Functions inherited from Trajectory
 Trajectory (double lowlim, double hilim)
 
virtual ~Trajectory ()
 
virtual HepPoint3D position (double) const =0
 
virtual Hep3Vector direction (double) const =0
 
virtual Hep3Vector delDirect (double) const =0
 
virtual double curvature (double) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction, Hep3Vector &delDirect) const =0
 
double distTo0thError (double s, double tol, int pathDir) const
 
virtual double distTo1stError (double s, double tol, int pathDir) const =0
 
virtual double distTo2ndError (double s, double tol, int pathDir) const =0
 
virtual Trajectoryclone () const =0
 
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 ()
 
virtual HepPoint3D position (double) const =0
 
virtual Hep3Vector direction (double) const =0
 
virtual Hep3Vector delDirect (double) const =0
 
virtual double curvature (double) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction, Hep3Vector &delDirect) const =0
 
double distTo0thError (double s, double tol, int pathDir) const
 
virtual double distTo1stError (double s, double tol, int pathDir) const =0
 
virtual double distTo2ndError (double s, double tol, int pathDir) const =0
 
virtual Trajectoryclone () const =0
 
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 &)
 
- Protected Attributes inherited from Trajectory
double flightrange [2]
 

Detailed Description

Constructor & Destructor Documentation

◆ MdcSagTraj() [1/4]

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

Definition at line 57 of file MdcSagTraj.cxx.

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

◆ MdcSagTraj() [2/4]

MdcSagTraj::MdcSagTraj ( const MdcSagTraj traj)

Definition at line 72 of file MdcSagTraj.cxx.

73 : TrkGeomTraj(0.0,other._start.distance(other._stop)),
74 _sag(other._sag), _a(other._a), _b(other._b), _length(other._length),
75 _start(other._start), _stop(other._stop),
76 _direction(other._direction)
77{}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~MdcSagTraj() [1/2]

MdcSagTraj::~MdcSagTraj ( )
virtual

Definition at line 79 of file MdcSagTraj.cxx.

79{;}

◆ MdcSagTraj() [3/4]

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

◆ MdcSagTraj() [4/4]

MdcSagTraj::MdcSagTraj ( const MdcSagTraj traj)

◆ ~MdcSagTraj() [2/2]

virtual MdcSagTraj::~MdcSagTraj ( )
virtual

Member Function Documentation

◆ accept() [1/2]

void MdcSagTraj::accept ( TrkGeomTrajVisitor visitor) const
virtual

Reimplemented from TrkGeomTraj.

Definition at line 212 of file MdcSagTraj.cxx.

213{
214 std::cout<<"ErrMsg(error)"<<"accept visitor NOT implemented yet"<<std::endl;
215}

◆ accept() [2/2]

void MdcSagTraj::accept ( TrkGeomTrajVisitor visitor) const
virtual

Reimplemented from TrkGeomTraj.

◆ clone() [1/2]

MdcSagTraj * MdcSagTraj::clone ( ) const
virtual

Implements TrkGeomTraj.

Definition at line 84 of file MdcSagTraj.cxx.

◆ clone() [2/2]

MdcSagTraj * MdcSagTraj::clone ( ) const
virtual

Implements TrkGeomTraj.

◆ curvature() [1/2]

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

Implements Trajectory.

Definition at line 190 of file MdcSagTraj.cxx.

191{
192 return _sag;
193}

Referenced by MdcSWire::print().

◆ curvature() [2/2]

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

Implements Trajectory.

◆ delDirect() [1/2]

Hep3Vector MdcSagTraj::delDirect ( double  ) const
virtual

Implements Trajectory.

Definition at line 146 of file MdcSagTraj.cxx.

147{
148 return Hep3Vector(0., 2.*_a, 0.);
149}

◆ delDirect() [2/2]

Hep3Vector MdcSagTraj::delDirect ( double  ) const
virtual

Implements Trajectory.

◆ deltaY() [1/2]

double MdcSagTraj::deltaY ( double  fltLen) const
inline

Definition at line 94 of file InstallArea/include/MdcGeom/MdcGeom/MdcSagTraj.h.

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

Referenced by getInfo().

◆ deltaY() [2/2]

double MdcSagTraj::deltaY ( double  fltLen) const
inline

Definition at line 94 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcSagTraj.h.

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

◆ direction() [1/2]

Hep3Vector MdcSagTraj::direction ( double  flightlen) const
virtual

Implements Trajectory.

Definition at line 132 of file MdcSagTraj.cxx.

132 {
133 if ( flightlen <= 0. ) return _direction;
134// Hep3Vector dir = _direction*flightlen + delDirect(flightlen);
135 static Hep3Vector tmpdir;
136 tmpdir = _direction*flightlen;
137// register double newy = tmpdir.y() + 2.*_a*flightlen+_b;
138// tmpdir.setY(newy);
139 tmpdir.setY(tmpdir.y() + 2.*_a*flightlen+_b);
140// tmpdir += delDirect(flightlen);
141 tmpdir.setMag(1.0);
142 return tmpdir;
143}

Referenced by MdcSWire::print().

◆ direction() [2/2]

Hep3Vector MdcSagTraj::direction ( double  ) const
virtual

Implements Trajectory.

◆ distTo1stError() [1/2]

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

Implements Trajectory.

Definition at line 196 of file MdcSagTraj.cxx.

197{
198 double dtmp = pathDir*2.*_a*flightlen+_b;
199
200 return dtmp==0. ? 9999.e4 : fabs(tol/dtmp);
201}

◆ distTo1stError() [2/2]

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

Implements Trajectory.

◆ distTo2ndError() [1/2]

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

Implements Trajectory.

Definition at line 204 of file MdcSagTraj.cxx.

205{
206 return 999.e4 ;
207 //return _a==0. ? 999.e4 : tol/(2.*_a);
208}

◆ distTo2ndError() [2/2]

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

Implements Trajectory.

◆ getInfo() [1/4]

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

Implements Trajectory.

Definition at line 152 of file MdcSagTraj.cxx.

153{
154// std::cout<<"Dyz*"<<"MdcSagTraj01 "<<std::endl;//yzhang DEBUG
155 // Written using +=, etc to avoid temporaries
156 pos = _start;
157//CHANGE pos += _direction*flightlen;
158 pos += (HepPoint3D) _direction*flightlen;
159
160 dir = _direction;
161 if ( flightlen > 0. ) {
162 pos.setY(pos.y() + deltaY(flightlen));
163 dir.setY(dir.y() + 2.*_a*flightlen+_b);
164 dir.setMag(1.0);
165 }
166}
double deltaY(double fltLen) const

◆ getInfo() [2/4]

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

Implements Trajectory.

◆ getInfo() [3/4]

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

Implements Trajectory.

Definition at line 169 of file MdcSagTraj.cxx.

171{
172// std::cout<<"Dyz*"<<"MdcSagTraj011 "<<std::endl;//yzhang DEBUG
173
174 pos = _start;
175//CHANGE pos += _direction*flightlen ;
176 pos += (HepPoint3D) _direction*flightlen ;
177
178 pos.setY( pos.y() + (_a*flightlen+_b)*flightlen) ;
179
180 dir = _direction;
181 dir.setY( dir.y() + 2*_a*flightlen+_b) ;
182 // Note: `dir' is on purpose not normalized (WDH, Jan 2003)
183
184 delDir.setX(0.);
185 delDir.setY(2.*_a);
186 delDir.setZ(0.);
187}

◆ getInfo() [4/4]

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

Implements Trajectory.

◆ operator=() [1/2]

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

Definition at line 94 of file MdcSagTraj.cxx.

95{
96 if(&other != this){
97 for(int iend=0;iend<2;iend++)
98 flightrange[iend] = other.flightrange[iend];
99 _start = other._start;
100 _stop = other._stop;
101 _sag = other._sag;
102 _a = other._a;
103 _b = other._b;
104 _length = other._length;
105 _direction = other._direction;
106 }
107 return *this;
108}

◆ operator=() [2/2]

MdcSagTraj & MdcSagTraj::operator= ( const MdcSagTraj )

◆ position() [1/2]

HepPoint3D MdcSagTraj::position ( double  flightlen) const
virtual

Implements Trajectory.

Definition at line 121 of file MdcSagTraj.cxx.

122{
123 static HepPoint3D tmppos;
124 tmppos = _start;
125//CHANGE tmppos += _direction*flightlen;
126 tmppos += (HepPoint3D) _direction*flightlen;//yzhang TEMP
127 tmppos.setY(tmppos.y()+(_a*flightlen+_b)*flightlen);
128 return tmppos;
129}

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

◆ position() [2/2]

HepPoint3D MdcSagTraj::position ( double  ) const
virtual

Implements Trajectory.

◆ rawDirection() [1/2]

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

Definition at line 87 of file InstallArea/include/MdcGeom/MdcGeom/MdcSagTraj.h.

87{ return _direction; }

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

◆ rawDirection() [2/2]

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

Definition at line 87 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcSagTraj.h.

87{ return _direction; }

◆ sag() [1/2]

double MdcSagTraj::sag ( void  ) const
inline

Definition at line 80 of file InstallArea/include/MdcGeom/MdcGeom/MdcSagTraj.h.

80{ return _sag; }

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

◆ sag() [2/2]

double MdcSagTraj::sag ( void  ) const
inline

Definition at line 80 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcSagTraj.h.

80{ return _sag; }

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