4#include "CLHEP/Geometry/Point3D.h"
5#include "CLHEP/Matrix/SymMatrix.h"
6#include "CLHEP/Vector/ThreeVector.h"
7#include "MdcGeom/BesAngle.h"
8#include "MdcGeom/Constants.h"
9#include "MdcRecoUtil/DifNumber.h"
10#include "MdcRecoUtil/DifPoint.h"
11#include "MdcRecoUtil/DifVector.h"
12#include "TrkBase/NeutTraj.h"
13#include "TrkBase/TrkVisitor.h"
17 :
TrkSimpTraj( np.parameter(), np.covariance(), lowlim, hilim ) {}
29 for (
int iend = 0; iend < 2; iend++ )
flightrange[iend] =
n.flightrange[iend];
39double NeutTraj::x(
const double&
f )
const {
41 return cosDip() *
f *
cos( phi0() ) - d0() *
sin( phi0() );
45double NeutTraj::y(
const double&
f )
const {
47 return cosDip() *
f *
sin( phi0() ) + d0() *
cos( phi0() );
51double NeutTraj::z(
const double&
f )
const {
53 return ( z0() +
f * sinDip() );
59 double cdip = cosDip();
60 double sphi0 =
sin( phi0() );
61 double cphi0 =
cos( phi0() );
63 return HepPoint3D( cdip *
f * cphi0 - d0() * sphi0, cdip *
f * sphi0 + d0() * cphi0,
64 z0() +
f * tanDip() * cdip );
70 return Hep3Vector(
cos( phi0() ) * cosDip(),
sin( phi0() ) * cosDip(), sinDip() );
75 return Hep3Vector( 0.0, 0.0, 0.0 );
91 Hep3Vector& delDir )
const {
135 DifNumber x = cDip * s0Df * cosPhi0 - d0Df * sinPhi0;
136 DifNumber y = cDip * s0Df * sinPhi0 + d0Df * cosPhi0;
139 dir =
DifVector( cosPhi0 * cDip, sinPhi0 * cDip, sDip );
156 double tand = tanDip();
157 double cosd = cosDip();
169 ddflct[
NeutParams::_z0][0] = translen( fltlen ) * ( -1. - ( tand * tand ) );
196 double cosd = cosDip();
243double NeutTraj::phi0()
const {
return BesAngle( _np()->phi0() ).
rad(); }
246 const HepVector& oldvec,
const HepSymMatrix& oldcov,
247 HepVector& newvec, HepSymMatrix& newcov,
double fltlen ) {
250 HepVector parvec( oldvec );
254 double delx = newpoint.x() - oldpoint.x();
255 double dely = newpoint.y() - oldpoint.y();
256 double delz = newpoint.z() - oldpoint.z();
260 double perp = delx * sin0 - dely * cos0;
261 double para = delx * cos0 + dely * sin0;
293 newcov = oldcov.similarity( covrot );
HepGeom::Point3D< double > HepPoint3D
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double sin(const BesAngle a)
double cos(const BesAngle a)
HepGeom::Point3D< double > HepPoint3D
void setIndepPar(const DifIndepPar *par)
void cosAndSin(DifNumber &c, DifNumber &s) const
HepMatrix derivDeflect(double fltlen, deflectDirection) const
virtual Hep3Vector delDirect(double) const
virtual double distTo1stError(double s, double tol, int pathDir) const
HepMatrix derivDisplace(double fltlen, deflectDirection idir) const
virtual void visitAccept(TrkVisitor *vis) const
void getDFInfo(double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
HepMatrix derivPFract(double fltlen) const
NeutTraj & operator=(const NeutTraj &)
virtual double distTo2ndError(double s, double tol, int pathDir) const
virtual HepPoint3D position(double fltLen) const
void invertParams(TrkParams *newparams, std::vector< bool > &flags) const
virtual Hep3Vector direction(double fltLen) const
NeutTraj(const NeutParams &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
void getInfo(double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
TrkSimpTraj(const HepVector ¶ms, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
virtual void trkVisitNeutTraj(const NeutTraj *)=0