BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/NeutTraj.h
Go to the documentation of this file.
1//
2// Trajectory subclass that implements a neutral simple
3// Author : Justin Albert and Valery Miftahov, from HelixTraj
4//
5#ifndef NEUTTRAJ_H
6#define NEUTTRAJ_H
7#include "TrkBase/TrkSimpTraj.h"
8#include "TrkBase/NeutParams.h"
9#include "CLHEP/Geometry/Point3D.h"
10#ifndef ENABLE_BACKWARDS_COMPATIBILITY
12#endif
13
14#include "CLHEP/Matrix/Vector.h"
15#include "CLHEP/Matrix/Matrix.h"
16#include "CLHEP/Matrix/SymMatrix.h"
17
18using CLHEP::Hep3Vector;
19using CLHEP::HepMatrix;
20using CLHEP::HepSymMatrix;
21
22class TrkVisitor;
23class NeutParams;
24
25class NeutTraj : public TrkSimpTraj
26{
27public:
28 NeutTraj( const NeutParams&, double lowlim=-99999.,double hilim=99999.,
29 const HepPoint3D& refpoint = _theOrigin);
30 NeutTraj( const NeutTraj& ); // copy ctor
31 NeutTraj* clone() const;
32
33// destructor
34 virtual ~NeutTraj();
35
36// operators
38// needed implementations for intersection with a Surface
39 virtual HepPoint3D position( double fltLen) const;
40 virtual Hep3Vector direction( double fltLen) const;
41 virtual Hep3Vector delDirect( double ) const;
42 void getInfo( double fltLen, HepPoint3D& pos, Hep3Vector& dir ) const;
43 void getInfo( double fltLen, HepPoint3D& , Hep3Vector& dir,
44 Hep3Vector& delDir ) const;
45 void getDFInfo( double fltLen, DifPoint& , DifVector& dir,
46 DifVector& delDir ) const;
47
48 // How far can you go using given approximation before error > tolerance,
49 // in direction pathDir?
50 virtual double distTo1stError(double s, double tol, int pathDir) const;
51 virtual double distTo2ndError(double s, double tol, int pathDir) const;
52
53 // Expose the parameters for user manipulation
54 NeutParams& params() {return *_np();}
55 const NeutParams& params() const {return *_np();}
56 //yzhang
57 int nPar () const {return params().nPar();}
58 //zhangy
59//
60// Real versions of the base class derivative functions
61//
62 double curvature( double fltLen) const {return 0.;}
63 HepMatrix derivDeflect(double fltlen,deflectDirection) const;
64 HepMatrix derivDisplace(double fltlen,deflectDirection idir) const;
65 HepMatrix derivPFract(double fltlen) const;
66// PointTraj functions
67 TranslateParams paramFunction() const { return NeutTraj::paramFunc; }
68 // Invert the parameter. Returns true in flags if the inversion
69 //requires a change of sign in the covariance matrix.
70 void invertParams(TrkParams* newparams, std::vector<bool>& flags) const;
71
73
74 //--------------------------------------------------
75 // Visitor access
76 //--------------------------------------------------
77
78 virtual void visitAccept(TrkVisitor* vis) const;
79
80
81private:
82
83
84//
85// Private functions (data members are part of the base class)
86//
87 double x( const double& ) const;
88 double y( const double& ) const;
89 double z( const double& ) const;
90 inline NeutParams* _np() const {return (NeutParams*) &_dtparams; }
91 inline double d0() const {return _np()->d0(); }
92 double phi0() const;
93 inline double p() const {return _np()->p(); }
94 inline double z0() const {return _np()->z0(); }
95 inline double s0() const {return _np()->s0(); }
96 inline double tanDip() const { return _np()->tanDip(); }
97 inline double dip() const {return atan(tanDip());}
98 inline double cosDip() const {return 1./sqrt(1.+tanDip()*tanDip()); }
99 inline double sinDip() const {return tanDip()*cosDip(); }
100 inline double translen(const double& f) const {return cosDip()*f;}
101// the real point translation function
102 static void paramFunc(const HepPoint3D& oldpoint,const HepPoint3D& newpoint,
103 const HepVector& oldpar,const HepSymMatrix& oldcov,
104 HepVector& newpar,HepSymMatrix& newcov,
105 double fltlen);
106};
107#endif
XmlRpcServer s
Definition: HelloServer.cpp:11
void(* TranslateParams)(const HepPoint3D &oldpoint, const HepPoint3D &newpoint, const HepVector &oldpar, const HepSymMatrix &oldcov, HepVector &newpar, HepSymMatrix &newcov, double fltlen)
NeutTraj(const NeutTraj &)
virtual ~NeutTraj()
virtual Hep3Vector direction(double fltLen) const
virtual double distTo2ndError(double s, double tol, int pathDir) const
HepMatrix derivDeflect(double fltlen, deflectDirection) const
virtual Hep3Vector delDirect(double) const
virtual HepPoint3D position(double fltLen) const
HepMatrix derivDisplace(double fltlen, deflectDirection idir) const
void getDFInfo(double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
HepMatrix derivPFract(double fltlen) const
NeutTraj & operator=(const NeutTraj &)
void getInfo(double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
NeutTraj * clone() const
virtual void visitAccept(TrkVisitor *vis) const
void invertParams(TrkParams *newparams, std::vector< bool > &flags) const
virtual double distTo1stError(double s, double tol, int pathDir) const
NeutTraj(const NeutParams &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
void getInfo(double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
TrkSimpTraj & invert()
double y[1000]
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")