CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
KalFitTrack Class Reference

Description of a track class (<- Helix.cc) More...

#include <KalFitTrack.h>

+ Inheritance diagram for KalFitTrack:

Public Member Functions

 KalFitTrack (const HepPoint3D &pivot, const CLHEP::HepVector &a, const CLHEP::HepSymMatrix &Ea, unsigned int m, double chiSq, unsigned int nhits)
 constructor
 
 ~KalFitTrack (void)
 destructor
 
double intersect_cylinder (double r) const
 Intersection with different geometry.
 
double intersect_yz_plane (const HepTransform3D &plane, double x) const
 
double intersect_zx_plane (const HepTransform3D &plane, double y) const
 
double intersect_xy_plane (double z) const
 
void msgasmdc (double path, int index)
 Calculate multiple scattering angle.
 
void ms (double path, const KalFitMaterial &m, int index)
 
void eloss (double path, const KalFitMaterial &m, int index)
 Calculate total energy lost in material.
 
double smoother_Mdc (KalFitHelixSeg &seg, CLHEP::Hep3Vector &meas, int &flg, int csmflag)
 Kalman smoother for Mdc.
 
double smoother_Mdc_csmalign (KalFitHelixSeg &seg, CLHEP::Hep3Vector &meas, int &flg, int csmflag)
 
double smoother_Mdc (KalFitHitMdc &HitMdc, CLHEP::Hep3Vector &meas, KalFitHelixSeg &seg, double &dchi2, int csmflag)
 
double update_hits (KalFitHitMdc &HitMdc, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, double &dtrack, double &dtracknew, double &dtdc, int csmflag)
 Include the Mdc wire hits.
 
double update_hits (KalFitHelixSeg &HelixSeg, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, int csmflag)
 
double update_hits_csmalign (KalFitHelixSeg &HelixSeg, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, int csmflag)
 
double update_hits (RecCgemCluster *Cluster, double recR, int way, int csmflag)
 
double chi2_next (Helix &H, KalFitHitMdc &HitMdc, int csmflag)
 
double chi2_next (Helix &H, KalFitHitMdc &HitMdc)
 
void update_last (void)
 Record the current parameters as ..._last information :
 
void update_forMdc (void)
 
void point_last (const HepPoint3D &point)
 set and give out the last point of the track
 
const HepPoint3Dpoint_last (void)
 
const HepPoint3Dpivot_last (void) const
 returns helix parameters
 
const CLHEP::HepVector & a_last (void) const
 
const CLHEP::HepSymMatrix & Ea_last (void) const
 
const HepPoint3Dpivot_forMdc (void) const
 
const CLHEP::HepVector & a_forMdc (void) const
 
const CLHEP::HepSymMatrix & Ea_forMdc (void) const
 
void path_add (double path)
 Update the path length estimation.
 
void addPathSM (double path)
 
double getPathSM (void)
 
void addTofSM (double time)
 
double getTofSM (void)
 
void fiTerm (double fi)
 
double getFiTerm (void)
 
void tof (double path)
 Update the tof estimation.
 
double filter (double v_m, const CLHEP::HepVector &m_H, double v_d, double m_V)
 
double cor_tanldep (double *p, double er)
 Correct the error according the current tanl value :
 
void update_bit (int i)
 
int insist (void) const
 Extractor :
 
int type (void) const
 
int trasan_id (void) const
 
double r0 (void) const
 
double mass (void) const
 
double chiSq (void) const
 
double chiSq_back (void) const
 
int ndf_back (void) const
 
double pathip (void) const
 
double path_rd (void) const
 
double path_ab (void) const
 
double * pathl (void)
 
CLHEP::Hep3Vector * mom (void)
 
double tof (void) const
 
double tof_kaon (void) const
 
double tof_proton (void) const
 
double p_kaon (void) const
 
double p_proton (void) const
 
double dchi2_max (void) const
 
double r_max (void) const
 
unsigned int nchits (void) const
 
unsigned int nster (void) const
 
unsigned int ncath (void) const
 
int pat1 (void) const
 
int pat2 (void) const
 
int nhit_r (void) const
 
int nhit_z (void) const
 
void type (int t)
 Reinitialize (modificator)
 
void trasan_id (int t)
 
void insist (int t)
 
void pathip (double pl)
 
void p_kaon (double pl)
 
void p_proton (double pl)
 
void chiSq (double c)
 
void chiSq_back (double c)
 
void ndf_back (int n)
 
void nchits (int n)
 
void nster (int n)
 
void add_nhit_r (void)
 
void add_nhit_z (void)
 
double PathL (int layer)
 Function to calculate the path length in the layer.
 
void appendHitsMdc (KalFitHitMdc h)
 Functions for Mdc hits list.
 
void HitsMdc (vector< KalFitHitMdc > &lh)
 
vector< KalFitHitMdc > & HitsMdc (void)
 
KalFitHitMdcHitMdc (int i)
 
void appendHelixSegs (KalFitHelixSeg s)
 
void HelixSegs (vector< KalFitHelixSeg > &vs)
 
vector< KalFitHelixSeg > & HelixSegs (void)
 
KalFitHelixSegHelixSeg (int i)
 
void setClusterRefVec (ClusterRefVec clusterRefVec)
 
ClusterRefVec getClusterRefVec ()
 
void order_wirhit (int index)
 
void order_hits (void)
 
void number_wirhit (void)
 
const HepPoint3Dpivot_numf (const HepPoint3D &newPivot)
 Sets pivot position in a given mag field.
 
const HepPoint3Dpivot_numf (const HepPoint3D &newPivot, double &pathl)
 
double radius_numf (void) const
 Estimation of the radius in a given mag field.
 
double getSigma (int layerId, double driftDist) const
 
double getSigma (KalFitHitMdc &hitmdc, double tanlam, int lr, double dist) const
 
double getDriftDist (KalFitHitMdc &hitmdc, double drifttime, int lr) const
 
double getDriftTime (KalFitHitMdc &hitmdc, double toftime) const
 
double getT0 (void) const
 
HepSymMatrix getInitMatrix (void) const
 
double getDigi () const
 
void chgmass (int i)
 
int nLayerUsed ()
 
void resetLayerUsed ()
 
void useLayer (int iLay)
 
 KalFitTrack (const HepPoint3D &pivot, const CLHEP::HepVector &a, const CLHEP::HepSymMatrix &Ea, unsigned int m, double chiSq, unsigned int nhits)
 constructor
 
 ~KalFitTrack (void)
 destructor
 
double intersect_cylinder (double r) const
 Intersection with different geometry.
 
double intersect_yz_plane (const HepTransform3D &plane, double x) const
 
double intersect_zx_plane (const HepTransform3D &plane, double y) const
 
double intersect_xy_plane (double z) const
 
void msgasmdc (double path, int index)
 Calculate multiple scattering angle.
 
void ms (double path, const KalFitMaterial &m, int index)
 
void eloss (double path, const KalFitMaterial &m, int index)
 Calculate total energy lost in material.
 
double smoother_Mdc (KalFitHelixSeg &seg, CLHEP::Hep3Vector &meas, int &flg, int csmflag)
 Kalman smoother for Mdc.
 
double smoother_Mdc_csmalign (KalFitHelixSeg &seg, CLHEP::Hep3Vector &meas, int &flg, int csmflag)
 
double smoother_Mdc (KalFitHitMdc &HitMdc, CLHEP::Hep3Vector &meas, KalFitHelixSeg &seg, double &dchi2, int csmflag)
 
double update_hits (KalFitHitMdc &HitMdc, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, double &dtrack, double &dtracknew, double &dtdc, int csmflag)
 Include the Mdc wire hits.
 
double update_hits (KalFitHelixSeg &HelixSeg, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, int csmflag)
 
double update_hits_csmalign (KalFitHelixSeg &HelixSeg, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, int csmflag)
 
double update_hits (RecCgemCluster *Cluster, double recR, int way, int csmflag)
 
double chi2_next (Helix &H, KalFitHitMdc &HitMdc, int csmflag)
 
double chi2_next (Helix &H, KalFitHitMdc &HitMdc)
 
void update_last (void)
 Record the current parameters as ..._last information :
 
void update_forMdc (void)
 
void point_last (const HepPoint3D &point)
 set and give out the last point of the track
 
const HepPoint3Dpoint_last (void)
 
const HepPoint3Dpivot_last (void) const
 returns helix parameters
 
const CLHEP::HepVector & a_last (void) const
 
const CLHEP::HepSymMatrix & Ea_last (void) const
 
const HepPoint3Dpivot_forMdc (void) const
 
const CLHEP::HepVector & a_forMdc (void) const
 
const CLHEP::HepSymMatrix & Ea_forMdc (void) const
 
void path_add (double path)
 Update the path length estimation.
 
void addPathSM (double path)
 
double getPathSM (void)
 
void addTofSM (double time)
 
double getTofSM (void)
 
void fiTerm (double fi)
 
double getFiTerm (void)
 
void tof (double path)
 Update the tof estimation.
 
double filter (double v_m, const CLHEP::HepVector &m_H, double v_d, double m_V)
 
double cor_tanldep (double *p, double er)
 Correct the error according the current tanl value :
 
void update_bit (int i)
 
int insist (void) const
 Extractor :
 
int type (void) const
 
int trasan_id (void) const
 
double r0 (void) const
 
double mass (void) const
 
double chiSq (void) const
 
double chiSq_back (void) const
 
int ndf_back (void) const
 
double pathip (void) const
 
double path_rd (void) const
 
double path_ab (void) const
 
double * pathl (void)
 
CLHEP::Hep3Vector * mom (void)
 
double tof (void) const
 
double tof_kaon (void) const
 
double tof_proton (void) const
 
double p_kaon (void) const
 
double p_proton (void) const
 
double dchi2_max (void) const
 
double r_max (void) const
 
unsigned int nchits (void) const
 
unsigned int nster (void) const
 
unsigned int ncath (void) const
 
int pat1 (void) const
 
int pat2 (void) const
 
int nhit_r (void) const
 
int nhit_z (void) const
 
void type (int t)
 Reinitialize (modificator)
 
void trasan_id (int t)
 
void insist (int t)
 
void pathip (double pl)
 
void p_kaon (double pl)
 
void p_proton (double pl)
 
void chiSq (double c)
 
void chiSq_back (double c)
 
void ndf_back (int n)
 
void nchits (int n)
 
void nster (int n)
 
void add_nhit_r (void)
 
void add_nhit_z (void)
 
double PathL (int layer)
 Function to calculate the path length in the layer.
 
void appendHitsMdc (KalFitHitMdc h)
 Functions for Mdc hits list.
 
void HitsMdc (vector< KalFitHitMdc > &lh)
 
vector< KalFitHitMdc > & HitsMdc (void)
 
KalFitHitMdcHitMdc (int i)
 
void appendHelixSegs (KalFitHelixSeg s)
 
void HelixSegs (vector< KalFitHelixSeg > &vs)
 
vector< KalFitHelixSeg > & HelixSegs (void)
 
KalFitHelixSegHelixSeg (int i)
 
void setClusterRefVec (ClusterRefVec clusterRefVec)
 
ClusterRefVec getClusterRefVec ()
 
void order_wirhit (int index)
 
void order_hits (void)
 
void number_wirhit (void)
 
const HepPoint3Dpivot_numf (const HepPoint3D &newPivot)
 Sets pivot position in a given mag field.
 
const HepPoint3Dpivot_numf (const HepPoint3D &newPivot, double &pathl)
 
double radius_numf (void) const
 Estimation of the radius in a given mag field.
 
double getSigma (int layerId, double driftDist) const
 
double getSigma (KalFitHitMdc &hitmdc, double tanlam, int lr, double dist) const
 
double getDriftDist (KalFitHitMdc &hitmdc, double drifttime, int lr) const
 
double getDriftTime (KalFitHitMdc &hitmdc, double toftime) const
 
double getT0 (void) const
 
HepSymMatrix getInitMatrix (void) const
 
double getDigi () const
 
void chgmass (int i)
 
int nLayerUsed ()
 
void resetLayerUsed ()
 
void useLayer (int iLay)
 
- Public Member Functions inherited from KalmanFit::Helix
 Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its error matrix.
 
 Helix (const HepPoint3D &pivot, const HepVector &a)
 Constructor without error matrix.
 
 Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 
virtual ~Helix ()
 Destructor.
 
const HepPoint3Dcenter (void) const
 returns position of helix center(z = 0.);
 
const HepPoint3Dpivot (void) const
 returns pivot position.
 
double radius (void) const
 returns radious of helix.
 
HepPoint3D x (double dPhi=0.) const
 returns position after rotating angle dPhi in phi direction.
 
double * x (double dPhi, double p[3]) const
 
HepPoint3D x (double dPhi, HepSymMatrix &Ex) const
 returns position and convariance matrix(Ex) after rotation.
 
Hep3Vector direction (double dPhi=0.) const
 returns direction vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi=0.) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi, HepSymMatrix &Em) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepSymMatrix &Em) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
double dr (void) const
 returns an element of parameters.
 
double phi0 (void) const
 
double kappa (void) const
 
double dz (void) const
 
double tanl (void) const
 
double curv (void) const
 
double sinPhi0 (void) const
 
double cosPhi0 (void) const
 
const HepVector & a (void) const
 returns helix parameters.
 
const HepSymMatrix & Ea (void) const
 returns error matrix.
 
double approach (KalFitHitMdc &hit, bool doSagCorrection) const
 
double approach (HepPoint3D pfwd, HepPoint3D pbwd, bool doSagCorrection) const
 
const HepVector & a (const HepVector &newA)
 sets helix parameters.
 
const HepSymMatrix & Ea (const HepSymMatrix &newdA)
 sets helix paramters and error matrix.
 
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 sets pivot position.
 
void set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 sets helix pivot position, parameters, and error matrix.
 
void ignoreErrorMatrix (void)
 unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
 
double bFieldZ (double)
 sets/returns z componet of the magnetic field.
 
double bFieldZ (void) const
 
double alpha (void) const
 
Helixoperator= (const Helix &)
 Copy operator.
 
HepMatrix delApDelA (const HepVector &ap) const
 
HepMatrix delXDelA (double phi) const
 
HepMatrix delMDelA (double phi) const
 
HepMatrix del4MDelA (double phi, double mass) const
 
HepMatrix del4MXDelA (double phi, double mass) const
 
 Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its error matrix.
 
 Helix (const HepPoint3D &pivot, const HepVector &a)
 Constructor without error matrix.
 
 Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 
virtual ~Helix ()
 Destructor.
 
const HepPoint3Dcenter (void) const
 returns position of helix center(z = 0.);
 
const HepPoint3Dpivot (void) const
 returns pivot position.
 
double radius (void) const
 returns radious of helix.
 
HepPoint3D x (double dPhi=0.) const
 returns position after rotating angle dPhi in phi direction.
 
double * x (double dPhi, double p[3]) const
 
HepPoint3D x (double dPhi, HepSymMatrix &Ex) const
 returns position and convariance matrix(Ex) after rotation.
 
Hep3Vector direction (double dPhi=0.) const
 returns direction vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi=0.) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi, HepSymMatrix &Em) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepSymMatrix &Em) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
double dr (void) const
 returns an element of parameters.
 
double phi0 (void) const
 
double kappa (void) const
 
double dz (void) const
 
double tanl (void) const
 
double curv (void) const
 
double sinPhi0 (void) const
 
double cosPhi0 (void) const
 
const HepVector & a (void) const
 returns helix parameters.
 
const HepSymMatrix & Ea (void) const
 returns error matrix.
 
double approach (KalFitHitMdc &hit, bool doSagCorrection) const
 
double approach (HepPoint3D pfwd, HepPoint3D pbwd, bool doSagCorrection) const
 
const HepVector & a (const HepVector &newA)
 sets helix parameters.
 
const HepSymMatrix & Ea (const HepSymMatrix &newdA)
 sets helix paramters and error matrix.
 
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 sets pivot position.
 
void set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 sets helix pivot position, parameters, and error matrix.
 
void ignoreErrorMatrix (void)
 unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
 
double bFieldZ (double)
 sets/returns z componet of the magnetic field.
 
double bFieldZ (void) const
 
double alpha (void) const
 
Helixoperator= (const Helix &)
 Copy operator.
 
HepMatrix delApDelA (const HepVector &ap) const
 
HepMatrix delXDelA (double phi) const
 
HepMatrix delMDelA (double phi) const
 
HepMatrix del4MDelA (double phi, double mass) const
 
HepMatrix del4MXDelA (double phi, double mass) const
 

Static Public Member Functions

static void setT0 (double t0)
 
static void setInitMatrix (HepSymMatrix m)
 
static void setMdcCalibFunSvc (const MdcCalibFunSvc *calibsvc)
 
static void setMagneticFieldSvc (IMagneticFieldSvc *)
 
static void setIMdcGeomSvc (IMdcGeomSvc *igeomsvc)
 
static void setMdcDigiCol (MdcDigiCol *digicol)
 
static int nmass (void)
 
static double mass (int i)
 
static void LR (int x)
 
static int lead (void)
 Magnetic field map.
 
static void lead (int i)
 
static int back (void)
 
static void back (int i)
 
static int resol (void)
 
static void resol (int i)
 
static int numf (void)
 
static void numf (int i)
 
static void setT0 (double t0)
 
static void setInitMatrix (HepSymMatrix m)
 
static void setMdcCalibFunSvc (const MdcCalibFunSvc *calibsvc)
 
static void setMagneticFieldSvc (IMagneticFieldSvc *)
 
static void setIMdcGeomSvc (IMdcGeomSvc *igeomsvc)
 
static void setMdcDigiCol (MdcDigiCol *digicol)
 
static int nmass (void)
 
static double mass (int i)
 
static void LR (int x)
 
static int lead (void)
 Magnetic field map.
 
static void lead (int i)
 
static int back (void)
 
static void back (int i)
 
static int resol (void)
 
static void resol (int i)
 
static int numf (void)
 
static void numf (int i)
 

Static Public Attributes

static double mdcGasRadlen_ = 0.
 
static int tprop_ = 1
 for signal propagation correction
 
static int debug_ = 0
 for debug

 
static double chi2_hitf_ = 1000
 Cut chi2 for each hit.
 
static double chi2_hits_ = 1000
 
static int numf_ = 0
 Flag for treatment of non-uniform mag field.
 
static int inner_steps_ = 3
 
static int outer_steps_ = 3
 
static double dchi2cutf_anal [43] = {0.}
 
static double dchi2cuts_anal [43] = {0.}
 
static double dchi2cutf_calib [43] = {0.}
 
static double dchi2cuts_calib [43] = {0.}
 
static int numfcor_ = 1
 NUMF treatment improved.
 
static double Bznom_ = 10
 
static int steplev_ = 0
 
static int Tof_correc_ = 1
 Flag for TOF correction.
 
static int strag_ = 1
 Flag to take account of energy loss straggling :
 
static double factor_strag_ = 0.4
 factor of energy loss straggling for electron
 
static int nmdc_hit2_ = 500
 Cut chi2 for each hit.
 
static double chi2mdc_hit2_
 
static int tofall_ = 1
 
static int resolflag_ = 0
 wire resoltion flag
 
static int LR_ = 1
 Use L/R decision from MdcRecHit information :
 
static int drifttime_choice_ = 0
 the drifttime choice
 
- Static Public Attributes inherited from KalmanFit::Helix
static const double ConstantAlpha = 333.564095
 Constant alpha for uniform field.
 

Detailed Description

Description of a track class (<- Helix.cc)

Definition at line 35 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Constructor & Destructor Documentation

◆ KalFitTrack() [1/2]

KalFitTrack::KalFitTrack ( const HepPoint3D pivot,
const CLHEP::HepVector &  a,
const CLHEP::HepSymMatrix &  Ea,
unsigned int  m,
double  chiSq,
unsigned int  nhits 
)

constructor

◆ ~KalFitTrack() [1/2]

KalFitTrack::~KalFitTrack ( void  )

destructor

Definition at line 108 of file KalFitTrack.cxx.

109{
110 // delete all objects
111
112}

◆ KalFitTrack() [2/2]

KalFitTrack::KalFitTrack ( const HepPoint3D pivot,
const CLHEP::HepVector &  a,
const CLHEP::HepSymMatrix &  Ea,
unsigned int  m,
double  chiSq,
unsigned int  nhits 
)

constructor

◆ ~KalFitTrack() [2/2]

KalFitTrack::~KalFitTrack ( void  )

destructor

Member Function Documentation

◆ a_forMdc() [1/2]

const CLHEP::HepVector & KalFitTrack::a_forMdc ( void  ) const
inline

Definition at line 156 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

156{ return a_forMdc_; }

◆ a_forMdc() [2/2]

const CLHEP::HepVector & KalFitTrack::a_forMdc ( void  ) const
inline

Definition at line 156 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

156{ return a_forMdc_; }

◆ a_last() [1/2]

const CLHEP::HepVector & KalFitTrack::a_last ( void  ) const
inline

Definition at line 152 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

152{ return a_last_; }

◆ a_last() [2/2]

const CLHEP::HepVector & KalFitTrack::a_last ( void  ) const
inline

Definition at line 152 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

152{ return a_last_; }

◆ add_nhit_r() [1/2]

void KalFitTrack::add_nhit_r ( void  )
inline

Definition at line 225 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

225{ nhit_r_++;}

◆ add_nhit_r() [2/2]

void KalFitTrack::add_nhit_r ( void  )
inline

Definition at line 225 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

225{ nhit_r_++;}

◆ add_nhit_z() [1/2]

void KalFitTrack::add_nhit_z ( void  )
inline

Definition at line 226 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

226{ nhit_z_++;}

◆ add_nhit_z() [2/2]

void KalFitTrack::add_nhit_z ( void  )
inline

Definition at line 226 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

226{ nhit_z_++;}

◆ addPathSM() [1/2]

void KalFitTrack::addPathSM ( double  path)

Definition at line 1301 of file KalFitTrack.cxx.

1301 {
1302 pathSM_ += path;
1303}

Referenced by KalFitAlg::smoother_anal().

◆ addPathSM() [2/2]

void KalFitTrack::addPathSM ( double  path)

◆ addTofSM() [1/2]

void KalFitTrack::addTofSM ( double  time)

Definition at line 1306 of file KalFitTrack.cxx.

1306 {
1307 tof2_ += time;
1308}
Double_t time

Referenced by KalFitAlg::smoother_anal().

◆ addTofSM() [2/2]

void KalFitTrack::addTofSM ( double  time)

◆ appendHelixSegs() [1/2]

void KalFitTrack::appendHelixSegs ( KalFitHelixSeg  s)

◆ appendHelixSegs() [2/2]

void KalFitTrack::appendHelixSegs ( KalFitHelixSeg  s)

◆ appendHitsMdc() [1/2]

void KalFitTrack::appendHitsMdc ( KalFitHitMdc  h)

Functions for Mdc hits list.

Definition at line 1842 of file KalFitTrack.cxx.

1842{ HitsMdc_.push_back(h);}

Referenced by KalFitAlg::kalman_fitting_anal(), KalFitAlg::kalman_fitting_calib(), KalFitAlg::kalman_fitting_csmalign(), and KalFitAlg::kalman_fitting_MdcxReco_Csmc_Sew().

◆ appendHitsMdc() [2/2]

void KalFitTrack::appendHitsMdc ( KalFitHitMdc  h)

Functions for Mdc hits list.

◆ back() [1/4]

void KalFitTrack::back ( int  i)
static

Definition at line 1834 of file KalFitTrack.cxx.

1834{ back_ = i;}

◆ back() [2/4]

static void KalFitTrack::back ( int  i)
static

◆ back() [3/4]

int KalFitTrack::back ( void  )
static

Definition at line 1835 of file KalFitTrack.cxx.

1835{ return back_;}

Referenced by KalFitAlg::initialize().

◆ back() [4/4]

static int KalFitTrack::back ( void  )
static

◆ chgmass() [1/2]

void KalFitTrack::chgmass ( int  i)

Definition at line 1827 of file KalFitTrack.cxx.

1827 {
1828 mass_=MASS[i];
1829 l_mass_=i;
1830}

Referenced by KalFitAlg::complete_track().

◆ chgmass() [2/2]

void KalFitTrack::chgmass ( int  i)

◆ chi2_next() [1/4]

double KalFitTrack::chi2_next ( Helix H,
KalFitHitMdc HitMdc 
)

Definition at line 2931 of file KalFitTrack.cxx.

2931 {
2932
2933 double lr = HitMdc.LR();
2934 const KalFitWire& Wire = HitMdc.wire();
2935 int wire_ID = Wire.geoID();
2936 int layerid = HitMdc.wire().layer().layerId();
2937 double entrangle = HitMdc.rechitptr()->getEntra();
2938
2939 HepPoint3D fwd(Wire.fwd());
2940 HepPoint3D bck(Wire.bck());
2941 Hep3Vector wire = (Hep3Vector)fwd -(Hep3Vector)bck;
2942 Helix work = H;
2943 work.ignoreErrorMatrix();
2944 work.pivot((fwd + bck) * .5);
2945 HepPoint3D x0kal = (work.x(0).z() - bck.z())/ wire.z() * wire + bck;
2946 H.pivot(x0kal);
2947
2948 Hep3Vector meas = H.momentum(0).cross(wire).unit();
2949
2950 if (wire_ID<0 || wire_ID>6796){ //bes
2951 std::cout << "KalFitTrack : wire_ID problem : " << wire_ID
2952 << std::endl;
2953 return DBL_MAX;
2954 }
2955
2956 double x[3] ={pivot().x(), pivot().y(), pivot().z()};
2957 double pmom[3] ={momentum().x(), momentum().y(), momentum().z()};
2958 double tofest(0);
2959 double phi = fmod(phi0() + M_PI4, M_PI2);
2960 double csf0 = cos(phi);
2961 double snf0 = (1. - csf0) * (1. + csf0);
2962 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.);
2963 if(phi > M_PI) snf0 = - snf0;
2964
2965 if (Tof_correc_) {
2966 Hep3Vector ip(0, 0, 0);
2967 Helix work = *(Helix*)this;
2968 work.ignoreErrorMatrix();
2969 work.pivot(ip);
2970 double phi_ip = work.phi0();
2971 if (fabs(phi - phi_ip) > M_PI) {
2972 if (phi > phi_ip) phi -= 2 * M_PI;
2973 else phi_ip -= 2 * M_PI;
2974 }
2975 double t = tanl();
2976 double l = fabs(radius() * (phi - phi_ip) * sqrt(1 + t * t));
2977 double pmag( sqrt( 1.0 + t*t ) / kappa());
2978 double mass_over_p( mass_ / pmag );
2979 double beta( 1.0 / sqrt( 1.0 + mass_over_p * mass_over_p ) );
2980 tofest = l / ( 29.9792458 * beta );
2981 // if(csmflag==1 && HitMdc.wire().y()>0.) tofest= -1. * tofest;
2982 }
2983
2984 const HepSymMatrix& ea = H.Ea();
2985 const HepVector& v_a = H.a();
2986 double dchi2R(DBL_MAX), dchi2L(DBL_MAX);
2987
2988 HepVector v_H(5, 0);
2989 v_H[0] = -csf0 * meas.x() - snf0 * meas.y();
2990 v_H[3] = -meas.z();
2991 HepMatrix v_HT = v_H.T();
2992
2993 double estim = (v_HT * v_a)[0];
2994 HepVector ea_v_H = ea * v_H;
2995 HepMatrix ea_v_HT = (ea_v_H).T();
2996 HepVector v_H_T_ea_v_H = v_HT * ea_v_H;
2997
2998 HepSymMatrix eaNewL(5), eaNewR(5);
2999 HepVector aNewL(5), aNewR(5);
3000
3001 //double time = HitMdc.tdc();
3002 //if (Tof_correc_)
3003 // time = time - tofest;
3004 double drifttime = getDriftTime(HitMdc , tofest);
3005 double ddl = getDriftDist(HitMdc, drifttime , 0 );
3006 double ddr = getDriftDist(HitMdc, drifttime , 1 );
3007 double erddl = getSigma( HitMdc, H.a()[4], 0, ddl);
3008 double erddr = getSigma( HitMdc, H.a()[4], 1, ddr);
3009
3010 double dmeas2[2] = { 0.1*ddl, 0.1*ddr };
3011 double er_dmeas2[2] = {0. , 0.};
3012 if(resolflag_ == 1) {
3013 er_dmeas2[0] = 0.1*erddl;
3014 er_dmeas2[1] = 0.1*erddr;
3015 }
3016 else if(resolflag_ == 0) {
3017 // int layid = HitMdc.wire().layer().layerId();
3018 // double sigma = getSigma(layid, dd);
3019 // er_dmeas2[0] = er_dmeas2[1] = sigma;
3020 }
3021
3022 if ((LR_==0 && lr != 1.0) ||
3023 (LR_==1 && lr == -1.0)) {
3024
3025 double er_dmeasL, dmeasL;
3026 if(Tof_correc_) {
3027 dmeasL = (-1.0)*fabs(dmeas2[0]);
3028 er_dmeasL = er_dmeas2[0];
3029 } else {
3030 dmeasL = (-1.0)*fabs(HitMdc.dist()[0]);
3031 er_dmeasL = HitMdc.erdist()[0];
3032 }
3033
3034 double AL = 1 / ((v_H_T_ea_v_H)[0] + er_dmeasL*er_dmeasL);
3035 eaNewL.assign(ea - ea_v_H * AL * ea_v_HT);
3036 double RkL = 1 - (v_H_T_ea_v_H)[0] * AL;
3037 if(0. == RkL) RkL = 1.e-4;
3038
3039 HepVector diffL = ea_v_H * AL * (dmeasL - estim);
3040 aNewL = v_a + diffL;
3041 double sigL = dmeasL -(v_HT * aNewL)[0];
3042 dchi2L = (sigL * sigL) / (RkL * er_dmeasL*er_dmeasL);
3043 }
3044
3045 if ((LR_==0 && lr != -1.0) ||
3046 (LR_==1 && lr == 1.0)) {
3047
3048 double er_dmeasR, dmeasR;
3049 if(Tof_correc_) {
3050 dmeasR = dmeas2[1];
3051 er_dmeasR = er_dmeas2[1];
3052 } else {
3053 dmeasR = fabs(HitMdc.dist()[1]);
3054 er_dmeasR = HitMdc.erdist()[1];
3055 }
3056
3057 double AR = 1 / ((v_H_T_ea_v_H)[0] + er_dmeasR*er_dmeasR);
3058 eaNewR.assign(ea - ea_v_H * AR * ea_v_HT);
3059 double RkR = 1 - (v_H_T_ea_v_H)[0] * AR;
3060 if(0. == RkR) RkR = 1.e-4;
3061
3062 HepVector diffR = ea_v_H * AR * (dmeasR - estim);
3063 aNewR = v_a + diffR;
3064 double sigR = dmeasR -(v_HT * aNewR)[0];
3065 dchi2R = (sigR*sigR) / (RkR * er_dmeasR*er_dmeasR);
3066 }
3067
3068 if (dchi2R < dchi2L){
3069 H.a(aNewR); H.Ea(eaNewR);
3070 } else {
3071 H.a(aNewL); H.Ea(eaNewL);
3072 }
3073 return ((dchi2R < dchi2L) ? dchi2R : dchi2L);
3074}
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
double cos(const BesAngle a)
#define M_PI
Definition: TConstant.h:4
const int layerId(void) const
returns layer ID
double getDriftTime(KalFitHitMdc &hitmdc, double toftime) const
double getSigma(int layerId, double driftDist) const
static int Tof_correc_
Flag for TOF correction.
double getDriftDist(KalFitHitMdc &hitmdc, double drifttime, int lr) const
static int LR_
Use L/R decision from MdcRecHit information :
HepPoint3D fwd(void) const
Geometry :
const KalFitLayer_Mdc & layer(void) const
void ignoreErrorMatrix(void)
unsets error matrix. Error calculations will be ignored after this function call until an error matri...
HepPoint3D x(double dPhi=0.) const
returns position after rotating angle dPhi in phi direction.
double radius(void) const
returns radious of helix.
const HepPoint3D & pivot(void) const
returns pivot position.
IMPLICIT REAL *A H
Definition: myXsection.h:1
int t()
Definition: t.c:1

◆ chi2_next() [2/4]

double KalFitTrack::chi2_next ( Helix H,
KalFitHitMdc HitMdc 
)

◆ chi2_next() [3/4]

double KalFitTrack::chi2_next ( Helix H,
KalFitHitMdc HitMdc,
int  csmflag 
)

Definition at line 3076 of file KalFitTrack.cxx.

3076 {
3077
3078 double lr = HitMdc.LR();
3079 const KalFitWire& Wire = HitMdc.wire();
3080 int wire_ID = Wire.geoID();
3081 int layerid = HitMdc.wire().layer().layerId();
3082 double entrangle = HitMdc.rechitptr()->getEntra();
3083
3084 HepPoint3D fwd(Wire.fwd());
3085 HepPoint3D bck(Wire.bck());
3086 Hep3Vector wire = (Hep3Vector)fwd -(Hep3Vector)bck;
3087 Helix work = H;
3088 work.ignoreErrorMatrix();
3089 work.pivot((fwd + bck) * .5);
3090 HepPoint3D x0kal = (work.x(0).z() - bck.z())/ wire.z() * wire + bck;
3091 H.pivot(x0kal);
3092
3093 Hep3Vector meas = H.momentum(0).cross(wire).unit();
3094
3095 if (wire_ID<0 || wire_ID>6796){ //bes
3096 std::cout << "KalFitTrack : wire_ID problem : " << wire_ID
3097 << std::endl;
3098 return DBL_MAX;
3099 }
3100
3101 double x[3] ={pivot().x(), pivot().y(), pivot().z()};
3102 double pmom[3] ={momentum().x(), momentum().y(), momentum().z()};
3103 double tofest(0);
3104 double phi = fmod(phi0() + M_PI4, M_PI2);
3105 double csf0 = cos(phi);
3106 double snf0 = (1. - csf0) * (1. + csf0);
3107 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.);
3108 if(phi > M_PI) snf0 = - snf0;
3109
3110 if (Tof_correc_) {
3111 Hep3Vector ip(0, 0, 0);
3112 Helix work = *(Helix*)this;
3113 work.ignoreErrorMatrix();
3114 work.pivot(ip);
3115 double phi_ip = work.phi0();
3116 if (fabs(phi - phi_ip) > M_PI) {
3117 if (phi > phi_ip) phi -= 2 * M_PI;
3118 else phi_ip -= 2 * M_PI;
3119 }
3120 double t = tanl();
3121 double l = fabs(radius() * (phi - phi_ip) * sqrt(1 + t * t));
3122 double pmag( sqrt( 1.0 + t*t ) / kappa());
3123 double mass_over_p( mass_ / pmag );
3124 double beta( 1.0 / sqrt( 1.0 + mass_over_p * mass_over_p ) );
3125 tofest = l / ( 29.9792458 * beta );
3126 if(csmflag==1 && HitMdc.wire().y()>0.) tofest= -1. * tofest;
3127 }
3128
3129 const HepSymMatrix& ea = H.Ea();
3130 const HepVector& v_a = H.a();
3131 double dchi2R(DBL_MAX), dchi2L(DBL_MAX);
3132
3133 HepVector v_H(5, 0);
3134 v_H[0] = -csf0 * meas.x() - snf0 * meas.y();
3135 v_H[3] = -meas.z();
3136 HepMatrix v_HT = v_H.T();
3137
3138 double estim = (v_HT * v_a)[0];
3139 HepVector ea_v_H = ea * v_H;
3140 HepMatrix ea_v_HT = (ea_v_H).T();
3141 HepVector v_H_T_ea_v_H = v_HT * ea_v_H;
3142
3143 HepSymMatrix eaNewL(5), eaNewR(5);
3144 HepVector aNewL(5), aNewR(5);
3145
3146 //double time = HitMdc.tdc();
3147 //if (Tof_correc_)
3148 // time = time - tofest;
3149 double drifttime = getDriftTime(HitMdc , tofest);
3150 double ddl = getDriftDist(HitMdc, drifttime , 0 );
3151 double ddr = getDriftDist(HitMdc, drifttime , 1 );
3152 double erddl = getSigma( HitMdc, H.a()[4], 0, ddl);
3153 double erddr = getSigma( HitMdc, H.a()[4], 1, ddr);
3154
3155 double dmeas2[2] = { 0.1*ddl, 0.1*ddr };
3156 double er_dmeas2[2] = {0. , 0.};
3157 if(resolflag_ == 1) {
3158 er_dmeas2[0] = 0.1*erddl;
3159 er_dmeas2[1] = 0.1*erddr;
3160 }
3161 else if(resolflag_ == 0) {
3162 // int layid = HitMdc.wire().layer().layerId();
3163 // double sigma = getSigma(layid, dd);
3164 // er_dmeas2[0] = er_dmeas2[1] = sigma;
3165 }
3166
3167 if ((LR_==0 && lr != 1.0) ||
3168 (LR_==1 && lr == -1.0)) {
3169
3170 double er_dmeasL, dmeasL;
3171 if(Tof_correc_) {
3172 dmeasL = (-1.0)*fabs(dmeas2[0]);
3173 er_dmeasL = er_dmeas2[0];
3174 } else {
3175 dmeasL = (-1.0)*fabs(HitMdc.dist()[0]);
3176 er_dmeasL = HitMdc.erdist()[0];
3177 }
3178
3179 double AL = 1 / ((v_H_T_ea_v_H)[0] + er_dmeasL*er_dmeasL);
3180 eaNewL.assign(ea - ea_v_H * AL * ea_v_HT);
3181 double RkL = 1 - (v_H_T_ea_v_H)[0] * AL;
3182 if(0. == RkL) RkL = 1.e-4;
3183
3184 HepVector diffL = ea_v_H * AL * (dmeasL - estim);
3185 aNewL = v_a + diffL;
3186 double sigL = dmeasL -(v_HT * aNewL)[0];
3187 dchi2L = (sigL * sigL) / (RkL * er_dmeasL*er_dmeasL);
3188 }
3189
3190 if ((LR_==0 && lr != -1.0) ||
3191 (LR_==1 && lr == 1.0)) {
3192
3193 double er_dmeasR, dmeasR;
3194 if(Tof_correc_) {
3195 dmeasR = dmeas2[1];
3196 er_dmeasR = er_dmeas2[1];
3197 } else {
3198 dmeasR = fabs(HitMdc.dist()[1]);
3199 er_dmeasR = HitMdc.erdist()[1];
3200 }
3201
3202 double AR = 1 / ((v_H_T_ea_v_H)[0] + er_dmeasR*er_dmeasR);
3203 eaNewR.assign(ea - ea_v_H * AR * ea_v_HT);
3204 double RkR = 1 - (v_H_T_ea_v_H)[0] * AR;
3205 if(0. == RkR) RkR = 1.e-4;
3206
3207 HepVector diffR = ea_v_H * AR * (dmeasR - estim);
3208 aNewR = v_a + diffR;
3209 double sigR = dmeasR -(v_HT * aNewR)[0];
3210 dchi2R = (sigR*sigR) / (RkR * er_dmeasR*er_dmeasR);
3211 }
3212
3213 if (dchi2R < dchi2L){
3214 H.a(aNewR); H.Ea(eaNewR);
3215 } else {
3216 H.a(aNewL); H.Ea(eaNewL);
3217 }
3218 return ((dchi2R < dchi2L) ? dchi2R : dchi2L);
3219}

◆ chi2_next() [4/4]

double KalFitTrack::chi2_next ( Helix H,
KalFitHitMdc HitMdc,
int  csmflag 
)

◆ chiSq() [1/4]

void KalFitTrack::chiSq ( double  c)
inline

Definition at line 219 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

219{ chiSq_ = c; }

◆ chiSq() [2/4]

void KalFitTrack::chiSq ( double  c)
inline

Definition at line 219 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

219{ chiSq_ = c; }

◆ chiSq() [3/4]

◆ chiSq() [4/4]

double KalFitTrack::chiSq ( void  ) const
inline

Definition at line 188 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

188{ return chiSq_; }

◆ chiSq_back() [1/4]

void KalFitTrack::chiSq_back ( double  c)
inline

Definition at line 220 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

220{ chiSq_back_ = c; }

◆ chiSq_back() [2/4]

void KalFitTrack::chiSq_back ( double  c)
inline

Definition at line 220 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

220{ chiSq_back_ = c; }

◆ chiSq_back() [3/4]

double KalFitTrack::chiSq_back ( void  ) const
inline

Definition at line 189 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

189{ return chiSq_back_; }

Referenced by KalFitAlg::fillTds_back(), KalFitAlg::start_seed(), and update_hits().

◆ chiSq_back() [4/4]

double KalFitTrack::chiSq_back ( void  ) const
inline

Definition at line 189 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

189{ return chiSq_back_; }

◆ cor_tanldep() [1/2]

double KalFitTrack::cor_tanldep ( double *  p,
double  er 
)

Correct the error according the current tanl value :

◆ cor_tanldep() [2/2]

double KalFitTrack::cor_tanldep ( double *  p,
double  er 
)

Correct the error according the current tanl value :

◆ dchi2_max() [1/2]

double KalFitTrack::dchi2_max ( void  ) const
inline

Definition at line 201 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

201{ return dchi2_max_; }

◆ dchi2_max() [2/2]

double KalFitTrack::dchi2_max ( void  ) const
inline

Definition at line 201 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

201{ return dchi2_max_; }

◆ Ea_forMdc() [1/2]

const CLHEP::HepSymMatrix & KalFitTrack::Ea_forMdc ( void  ) const
inline

Definition at line 157 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

157{ return Ea_forMdc_; }

◆ Ea_forMdc() [2/2]

const CLHEP::HepSymMatrix & KalFitTrack::Ea_forMdc ( void  ) const
inline

Definition at line 157 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

157{ return Ea_forMdc_; }

◆ Ea_last() [1/2]

const CLHEP::HepSymMatrix & KalFitTrack::Ea_last ( void  ) const
inline

Definition at line 153 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

153{ return Ea_last_; }

◆ Ea_last() [2/2]

const CLHEP::HepSymMatrix & KalFitTrack::Ea_last ( void  ) const
inline

Definition at line 153 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

153{ return Ea_last_; }

◆ eloss() [1/2]

void KalFitTrack::eloss ( double  path,
const KalFitMaterial m,
int  index 
)

Calculate total energy lost in material.

Definition at line 281 of file KalFitTrack.cxx.

283{
284#ifdef YDEBUG
285 cout<<"eloss():ea before: "<<Ea()<<endl;
286#endif
287 HepVector v_a = a();
288 double v_a_2_2 = v_a[2] * v_a[2];
289 double v_a_4_2 = v_a[4] * v_a[4];
290 double pmag = 1 / fabs(v_a[2]) * sqrt(1 + v_a_4_2);
291 double psq = pmag * pmag;
292 double E = sqrt(mass_ * mass_ + psq);
293 double dE = material.dE(mass_, path, pmag);
294 //std::cout<<" eloss(): dE: "<<dE<<std::endl;//wangll
295
296 if (index > 0)
297 psq += dE * (dE + 2 * sqrt(mass_ * mass_ + psq));
298 else {
299 double dE_max = E - mass_;
300 if( dE<dE_max ) psq += dE * (dE - 2 * sqrt(mass_ * mass_ + psq));
301 else psq=-1.0;
302 }
303
304 if (tofall_ && index < 0){
305 // Kaon case :
306 if (p_kaon_ > 0){
307 double psq_kaon = p_kaon_ * p_kaon_;
308 double dE_kaon = material.dE(MASS[3], path, p_kaon_);
309 psq_kaon += dE_kaon * (dE_kaon -
310 2 * sqrt(MASS[3] * MASS[3] + psq_kaon));
311 if (psq_kaon < 0) psq_kaon = 0;
312 p_kaon_ = sqrt(psq_kaon);
313 }
314 // Proton case :
315 if (p_proton_ > 0){
316 double psq_proton = p_proton_ * p_proton_;
317 double dE_proton = material.dE(MASS[4], path, p_proton_);
318 psq_proton += dE_proton * (dE_proton -
319 2 * sqrt(MASS[4] * MASS[4] + psq_proton));
320 if (psq_proton < 0) psq_proton = 0;
321 p_proton_ = sqrt(psq_proton);
322 }
323 }
324
325 double dpt;
326 //cout<<"eloss(): psq = "<<psq<<endl;//wangll
327 if(psq < 0) dpt = 9999;
328 else dpt = v_a[2] * pmag / sqrt(psq);
329 //cout<<"eloss():k: "<<v_a[2]<<" k' "<<dpt<<endl;//wangll
330#ifdef YDEBUG
331 cout<<"eloss():k: "<<v_a[2]<<" k' "<<dpt<<endl;
332#endif
333 // attempt to take account of energy loss for error matrix
334
335 HepSymMatrix ea = Ea();
336 double r_E_prim = (E + dE)/E;
337
338 // 1/ Straggling in the energy loss :
339 if (strag_){
340 double del_E(0);
341 if(l_mass_==0) {
342 del_E = dE*factor_strag_;
343 } else {
344 del_E = material.del_E(mass_, path, pmag);
345 }
346
347 ea[2][2] += (v_a[2] * v_a[2]) * E * E * del_E * del_E / (psq*psq);
348 }
349
350 // Effect of the change of curvature (just variables change):
351 double dpt2 = dpt*dpt;
352 double A = dpt*dpt2/(v_a_2_2*v_a[2])*r_E_prim;
353 double B = v_a[4]/(1+v_a_4_2)*
354 dpt*(1-dpt2/v_a_2_2*r_E_prim);
355
356 double ea_2_0 = A*ea[2][0] + B*ea[4][0];
357 double ea_2_1 = A*ea[2][1] + B*ea[4][1];
358 double ea_2_2 = A*A*ea[2][2] + 2*A*B*ea[2][4] + B*B*ea[4][4];
359 double ea_2_3 = A*ea[2][3] + B*ea[4][3];
360 double ea_2_4 = A*ea[2][4] + B*ea[4][4];
361
362 v_a[2] = dpt;
363 a(v_a);
364
365 ea[2][0] = ea_2_0;
366 //std::cout<<"ea[2][0] is "<<ea[2][0]<<" ea(3,1) is "<<ea(3,1)<<std::endl;
367 ea[2][1] = ea_2_1;
368 //std::cout<<"ea[2][2] is "<<ea[2][2]<<" ea(3,3) is "<<ea(3,3)<<std::endl;
369 ea[2][2] = ea_2_2;
370 ea[2][3] = ea_2_3;
371 ea[2][4] = ea_2_4;
372
373 Ea(ea);
374 //cout<<"eloss():dE: "<<dE<<endl;
375 //cout<<"eloss():A: "<<A<<" B: "<<B<<endl;
376 //cout<<"eloss():ea after: "<<Ea()<<endl;
377 r0_ = fabs(center().perp() - fabs(radius()));
378}
static double factor_strag_
factor of energy loss straggling for electron
static int strag_
Flag to take account of energy loss straggling :
const HepPoint3D & center(void) const
returns position of helix center(z = 0.);
const HepSymMatrix & Ea(void) const
returns error matrix.
const HepVector & a(void) const
returns helix parameters.

Referenced by KalFitAlg::Cgem_filter_anal(), KalFitAlg::filter_fwd_anal(), KalFitAlg::filter_fwd_calib(), KalFitAlg::fitGemHits(), KalFitAlg::fromFHitToInnerWall(), KalFitAlg::smoother_anal(), KalFitAlg::smoother_calib(), KalFitElement::updateTrack(), KalFitElement::updateTrack_alreadyfound(), and KalFitElement::updateTrack_rphi().

◆ eloss() [2/2]

void KalFitTrack::eloss ( double  path,
const KalFitMaterial m,
int  index 
)

Calculate total energy lost in material.

◆ filter() [1/2]

double KalFitTrack::filter ( double  v_m,
const CLHEP::HepVector &  m_H,
double  v_d,
double  m_V 
)

◆ filter() [2/2]

double KalFitTrack::filter ( double  v_m,
const CLHEP::HepVector &  m_H,
double  v_d,
double  m_V 
)

◆ fiTerm() [1/2]

void KalFitTrack::fiTerm ( double  fi)

Definition at line 1311 of file KalFitTrack.cxx.

1311 {
1312 fiTerm_ = fi;
1313}

Referenced by KalFitAlg::smoother_anal().

◆ fiTerm() [2/2]

void KalFitTrack::fiTerm ( double  fi)

◆ getClusterRefVec() [1/2]

ClusterRefVec KalFitTrack::getClusterRefVec ( )
inline

Definition at line 243 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

243{ return ClusterRefVec_;} //added hy Huang Zhen

◆ getClusterRefVec() [2/2]

ClusterRefVec KalFitTrack::getClusterRefVec ( )
inline

Definition at line 243 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

243{ return ClusterRefVec_;} //added hy Huang Zhen

◆ getDigi() [1/2]

double KalFitTrack::getDigi ( ) const

◆ getDigi() [2/2]

double KalFitTrack::getDigi ( ) const

◆ getDriftDist() [1/2]

double KalFitTrack::getDriftDist ( KalFitHitMdc hitmdc,
double  drifttime,
int  lr 
) const

Definition at line 194 of file KalFitTrack2.cxx.

195{
196 int layerid = hitmdc.wire().layer().layerId();
197 int cellid = MdcID::wire(hitmdc.rechitptr()->getMdcId());
198 if(debug_ == 4 ){
199 std::cout<<"the cellid is .."<<cellid<<std::endl;
200 }
201 double entrangle = hitmdc.rechitptr()->getEntra();
202
203 //std::cout<<" entrangle: "<<entrangle<<std::endl;
204
205 return CalibFunSvc_->driftTimeToDist(drifttime, layerid, cellid, lr, entrangle);
206}
double driftTimeToDist(double drifttime, int layid, int cellid, int lr, double entrance=0.0) const
static int wire(const Identifier &id)

Referenced by chi2_next().

◆ getDriftDist() [2/2]

double KalFitTrack::getDriftDist ( KalFitHitMdc hitmdc,
double  drifttime,
int  lr 
) const

◆ getDriftTime() [1/2]

double KalFitTrack::getDriftTime ( KalFitHitMdc hitmdc,
double  toftime 
) const

Definition at line 74 of file KalFitTrack2.cxx.

75{
76 const double vinner = 220.0e8; // cm/s
77 const double vouter = 240.0e8; // cm/s
78
79 int layerid = hitmdc.wire().layer().layerId();
80 double zhit = (hitmdc.rechitptr())->getZhit();
81 const KalFitWire* wire = &(hitmdc.wire());
82 HepPoint3D fPoint = wire->fwd();
83 HepPoint3D bPoint = wire->bck();
84
85 // unit is centimeter
86 double wireLen = (fPoint-bPoint).x()*(fPoint-bPoint).x()+(fPoint-bPoint).y()*(fPoint-bPoint).y()+(fPoint-bPoint).z()*(fPoint-bPoint).z();
87 wireLen = sqrt(wireLen);
88 double wireZLen = fabs(fPoint.z() - bPoint.z());
89 double tp = 0.;
90 double vp = 0.;
91 // west readout
92 if(0==layerid%2){
93 // inner chamber
94 if(layerid<8){
95 vp = vinner;
96 }
97 else {
98 vp = vouter;
99 }
100 tp = wireLen*fabs(zhit - bPoint.z())/wireZLen/vp;
101 }
102
103 // east readout
104 if(1==layerid%2){
105 // inner chamber
106 if(layerid<8){
107 vp = vinner;
108 }
109 else {
110 vp = vouter;
111 }
112 tp = wireLen*fabs(zhit - fPoint.z())/wireZLen/vp;
113 }
114
115 // s to ns
116 tp = 1.0e9*tp;
117
118 if(0==tprop_) tp = 0.;
119
120 //std::cout<<"propogation time: "<<tp<<std::endl;
121
122 int wireid = hitmdc.wire().geoID();
123 double drifttime1(0.);
124 double drifttime2(0.);
125 double drifttime3(0.);
126
127 MdcDigiCol::iterator iter = mdcDigiCol_->begin();
128 for(; iter != mdcDigiCol_->end(); iter++ ) {
129 if((*iter)->identify() == (hitmdc.rechitptr())->getMdcId()) break;
130 }
131 //double t0 = get_T0();
132 // see the code of wulh in /Mdc/MdcCalibFunSvc/MdcCalibFunSvc/MdcCalibFunSvc.h,
133 // double getT0(int wireid) const { return m_t0[wireid]; }
134
135 //double getTimeWalk(int layid, double Q) const ;
136 double Q = RawDataUtil::MdcCharge((*iter)->getChargeChannel());
137 double timewalk = CalibFunSvc_->getTimeWalk(layerid, Q);
138
139 if(debug_ == 4) {
140 std::cout<<"CalibFunSvc_->getTimeWalk, timewalk ="<<timewalk<<std::endl;
141 }
142
143 double timeoffset = CalibFunSvc_->getT0(wireid);
144 if(debug_ == 4) {
145 std::cout<<"CalibFunSvc_->getT0, timeoffset ="<<timeoffset<<std::endl;
146 }
147
148 double eventt0 = getT0();
149
150 if(debug_ == 4) {
151 std::cout<<"the Event T0 we get in the function getDriftTime(...) is "<<eventt0<<std::endl;
152 }
153
154 // this tdc value come from MdcRecHit assigned by zhangyao
155 double tdctime1 = hitmdc.tdc();
156 double tdctime2(0.);
157 double tdctime3(0.);
158
159 if(debug_ == 4) {
160 std::cout<<"tdctime1 be here is .."<<tdctime1<<std::endl;
161 }
162
163 // this tdc value come from MdcDigiCol time channel
164 // attention, if we use the iter like this: for(MdcDigiCol::iterator iter = mdcDigiCol_->begin(); iter != mdcDigiCol_->end(); iter++) it cannot pass the gmake , throw an error !
165 if(debug_ == 4) {
166 // std::cout<<"the size of the mdcDigiCol_ is "<<mdcDigiCol_.size()<<std::endl;
167 }
168 // MdcDigiCol::iterator iter = mdcDigiCol_->begin();
169 // for(; iter != mdcDigiCol_->end(); iter++ ) {
170 // if((*iter)->identify() == (hitmdc.rechitptr())->getMdcId()) break;
171 // }
172 if(debug_ == 4) {
173 std::cout<<"the time channel be here is .."<<(*iter)->getTimeChannel()<<std::endl;
174 }
175 tdctime2 = RawDataUtil::MdcTime((*iter)->getTimeChannel());
176 tdctime3 = hitmdc.rechitptr()->getTdc();
177 drifttime1 = tdctime1 - eventt0 - toftime - timewalk -timeoffset - tp;
178 drifttime2 = tdctime2 - eventt0 - toftime - timewalk -timeoffset - tp;
179 drifttime3 = tdctime3 - eventt0 - toftime - timewalk -timeoffset - tp;
180 if(debug_ == 4 ) {
181 std::cout<<"we now compare the three kind of tdc , the tdc get from timeChannel() is "<<tdctime2<<" the tdc get from KalFitHitMdc is "<<tdctime1<<" the tdc from MdcRecHit is "<<tdctime3<<" the drifttime1 is ..."<<drifttime1<<" the drifttime 2 is ..."<<drifttime2<<" the drifttime3 is ..."<<drifttime3<<std::endl;
182 }
183 //return drifttime3;
184 //return drifttime1;
185 if(drifttime_choice_ == 0)
186 return drifttime2;
187 if(drifttime_choice_ == 1)
188 // use the driftT caluculated by track-finding
189 return hitmdc.rechitptr()->getDriftT();
190}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
double getT0(void) const
static int drifttime_choice_
the drifttime choice
static int tprop_
for signal propagation correction
double getT0(int layid, int cellid) const
double getTimeWalk(int layid, double Q) const
static double MdcCharge(int chargeChannel)

Referenced by chi2_next().

◆ getDriftTime() [2/2]

double KalFitTrack::getDriftTime ( KalFitHitMdc hitmdc,
double  toftime 
) const

◆ getFiTerm() [1/2]

double KalFitTrack::getFiTerm ( void  )
inline

Definition at line 169 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

169{ return fiTerm_;}

Referenced by KalFitAlg::fillTds_back().

◆ getFiTerm() [2/2]

double KalFitTrack::getFiTerm ( void  )
inline

Definition at line 169 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

169{ return fiTerm_;}

◆ getInitMatrix() [1/2]

HepSymMatrix KalFitTrack::getInitMatrix ( void  ) const

Definition at line 42 of file KalFitTrack2.cxx.

43{
44 return initMatrix_ ;
45}

Referenced by KalFitAlg::smoother_calib().

◆ getInitMatrix() [2/2]

HepSymMatrix KalFitTrack::getInitMatrix ( void  ) const

◆ getPathSM() [1/2]

double KalFitTrack::getPathSM ( void  )
inline

Definition at line 163 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

163{ return pathSM_;}

Referenced by KalFitAlg::fillTds_back().

◆ getPathSM() [2/2]

double KalFitTrack::getPathSM ( void  )
inline

Definition at line 163 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

163{ return pathSM_;}

◆ getSigma() [1/4]

double KalFitTrack::getSigma ( int  layerId,
double  driftDist 
) const

Definition at line 3222 of file KalFitTrack.cxx.

3222 {
3223 double sigma1,sigma2,f;
3224 driftDist *= 10;//mm
3225 if(layerId<8){
3226 if(driftDist<0.5){
3227 sigma1=0.112784; sigma2=0.229274; f=0.666;
3228 }else if(driftDist<1.){
3229 sigma1=0.103123; sigma2=0.269797; f=0.934;
3230 }else if(driftDist<1.5){
3231 sigma1=0.08276; sigma2=0.17493; f=0.89;
3232 }else if(driftDist<2.){
3233 sigma1=0.070109; sigma2=0.149859; f=0.89;
3234 }else if(driftDist<2.5){
3235 sigma1=0.064453; sigma2=0.130149; f=0.886;
3236 }else if(driftDist<3.){
3237 sigma1=0.062383; sigma2=0.138806; f=0.942;
3238 }else if(driftDist<3.5){
3239 sigma1=0.061873; sigma2=0.145696; f=0.946;
3240 }else if(driftDist<4.){
3241 sigma1=0.061236; sigma2=0.119584; f=0.891;
3242 }else if(driftDist<4.5){
3243 sigma1=0.066292; sigma2=0.148426; f=0.917;
3244 }else if(driftDist<5.){
3245 sigma1=0.078074; sigma2=0.188148; f=0.911;
3246 }else if(driftDist<5.5){
3247 sigma1=0.088657; sigma2=0.27548; f=0.838;
3248 }else{
3249 sigma1=0.093089; sigma2=0.115556; f=0.367;
3250 }
3251 }else{
3252 if(driftDist<0.5){
3253 sigma1=0.112433; sigma2=0.327548; f=0.645;
3254 }else if(driftDist<1.){
3255 sigma1=0.096703; sigma2=0.305206; f=0.897;
3256 }else if(driftDist<1.5){
3257 sigma1=0.082518; sigma2=0.248913; f= 0.934;
3258 }else if(driftDist<2.){
3259 sigma1=0.072501; sigma2=0.153868; f= 0.899;
3260 }else if(driftDist<2.5){
3261 sigma1= 0.065535; sigma2=0.14246; f=0.914;
3262 }else if(driftDist<3.){
3263 sigma1=0.060497; sigma2=0.126489; f=0.918;
3264 }else if(driftDist<3.5){
3265 sigma1=0.057643; sigma2= 0.112927; f=0.892;
3266 }else if(driftDist<4.){
3267 sigma1=0.055266; sigma2=0.094833; f=0.887;
3268 }else if(driftDist<4.5){
3269 sigma1=0.056263; sigma2=0.124419; f= 0.932;
3270 }else if(driftDist<5.){
3271 sigma1=0.056599; sigma2=0.124248; f=0.923;
3272 }else if(driftDist<5.5){
3273 sigma1= 0.061377; sigma2=0.146147; f=0.964;
3274 }else if(driftDist<6.){
3275 sigma1=0.063978; sigma2=0.150591; f=0.942;
3276 }else if(driftDist<6.5){
3277 sigma1=0.072951; sigma2=0.15685; f=0.913;
3278 }else if(driftDist<7.){
3279 sigma1=0.085438; sigma2=0.255109; f=0.931;
3280 }else if(driftDist<7.5){
3281 sigma1=0.101635; sigma2=0.315529; f=0.878;
3282 }else{
3283 sigma1=0.149529; sigma2=0.374697; f=0.89;
3284 }
3285 }
3286 double sigmax = sqrt(f*sigma1*sigma1+(1 - f)*sigma2*sigma2)*0.1;
3287 return sigmax;//cm
3288}

Referenced by chi2_next().

◆ getSigma() [2/4]

double KalFitTrack::getSigma ( int  layerId,
double  driftDist 
) const

◆ getSigma() [3/4]

double KalFitTrack::getSigma ( KalFitHitMdc hitmdc,
double  tanlam,
int  lr,
double  dist 
) const

Definition at line 209 of file KalFitTrack2.cxx.

210{
211 int layerid = hitmdc.wire().layer().layerId();
212 double entrangle = hitmdc.rechitptr()->getEntra();
213 // double tanlam = hitmdc.rechitptr()->getTanl();
214 double z = hitmdc.rechitptr()->getZhit();
215 double Q = hitmdc.rechitptr()->getAdc();
216 //std::cout<<" the driftdist before getsigma is "<<dist<<" the layer is"<<layerid<<std::endl;
217 //cout<<"layerid, lr, dist, entrangle, tanlam, z , Q = "<<layerid<<", "<<lr<<", "<<dist<<", "<<entrangle<<", "<<tanlam<<", "<<z<<", "<<Q<<endl;//wangll
218 double temp = CalibFunSvc_->getSigma(layerid, lr, dist, entrangle, tanlam, z , Q );
219 //std::cout<<" the sigma is "<<temp<<std::endl;
220 return temp;
221}
double getSigma(int layid, int lr, double dist, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const

◆ getSigma() [4/4]

double KalFitTrack::getSigma ( KalFitHitMdc hitmdc,
double  tanlam,
int  lr,
double  dist 
) const

◆ getT0() [1/2]

double KalFitTrack::getT0 ( void  ) const

Definition at line 57 of file KalFitTrack2.cxx.

58{
59 //------------------get event start time-----------
60
61 if(debug_ == 4) {
62 std::cout<<"in function KalFitTrack::getT0 ( ), EventT0_ = "<<EventT0_<<std::endl;
63 }
64 return EventT0_ ;
65}

Referenced by getDriftTime().

◆ getT0() [2/2]

double KalFitTrack::getT0 ( void  ) const

◆ getTofSM() [1/2]

double KalFitTrack::getTofSM ( void  )
inline

Definition at line 166 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

166{ return tof2_;}

Referenced by KalFitAlg::fillTds_back().

◆ getTofSM() [2/2]

double KalFitTrack::getTofSM ( void  )
inline

Definition at line 166 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

166{ return tof2_;}

◆ HelixSeg() [1/2]

KalFitHelixSeg & KalFitTrack::HelixSeg ( int  i)
inline

Definition at line 240 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

240{ return HelixSegs_[i];}

Referenced by KalFitAlg::smoother_calib().

◆ HelixSeg() [2/2]

KalFitHelixSeg & KalFitTrack::HelixSeg ( int  i)
inline

Definition at line 240 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

240{ return HelixSegs_[i];}

◆ HelixSegs() [1/4]

◆ HelixSegs() [2/4]

void KalFitTrack::HelixSegs ( vector< KalFitHelixSeg > &  vs)

◆ HelixSegs() [3/4]

vector< KalFitHelixSeg > & KalFitTrack::HelixSegs ( void  )
inline

Definition at line 239 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

239{ return HelixSegs_;}

◆ HelixSegs() [4/4]

vector< KalFitHelixSeg > & KalFitTrack::HelixSegs ( void  )
inline

Definition at line 239 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

239{ return HelixSegs_;}

◆ HitMdc() [1/2]

KalFitHitMdc & KalFitTrack::HitMdc ( int  i)
inline

◆ HitMdc() [2/2]

KalFitHitMdc & KalFitTrack::HitMdc ( int  i)
inline

Definition at line 235 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

235{ return HitsMdc_[i];}

◆ HitsMdc() [1/4]

◆ HitsMdc() [2/4]

void KalFitTrack::HitsMdc ( vector< KalFitHitMdc > &  lh)

◆ HitsMdc() [3/4]

vector< KalFitHitMdc > & KalFitTrack::HitsMdc ( void  )
inline

Definition at line 234 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

234{ return HitsMdc_;}

Referenced by order_hits().

◆ HitsMdc() [4/4]

vector< KalFitHitMdc > & KalFitTrack::HitsMdc ( void  )
inline

Definition at line 234 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

234{ return HitsMdc_;}

◆ insist() [1/4]

void KalFitTrack::insist ( int  t)
inline

Definition at line 214 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

214{ insist_ = t;}

◆ insist() [2/4]

void KalFitTrack::insist ( int  t)
inline

Definition at line 214 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

214{ insist_ = t;}

◆ insist() [3/4]

int KalFitTrack::insist ( void  ) const
inline

Extractor :

Definition at line 183 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

183{ return insist_; }

◆ insist() [4/4]

int KalFitTrack::insist ( void  ) const
inline

Extractor :

Definition at line 183 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

183{ return insist_; }

◆ intersect_cylinder() [1/2]

double KalFitTrack::intersect_cylinder ( double  r) const

Intersection with different geometry.

Definition at line 128 of file KalFitTrack.cxx.

129{
130 double m_rad = radius();
131 double l = center().perp();
132
133 double cosPhi = (m_rad * m_rad + l * l - r * r) / (2 * m_rad * l);
134
135 if(cosPhi < -1 || cosPhi > 1) return 0;
136
137 double dPhi = center().phi() - acos(cosPhi) - phi0();
138
139 if(dPhi < -M_PI) dPhi += 2 * M_PI;
140
141 return dPhi;
142}

Referenced by KalFitAlg::Cgem_filter_anal(), KalFitAlg::fitGemHits(), KalFitAlg::fromFHitToInnerWall(), KalFitAlg::innerwall(), KalFitCylinder::intersect(), intersect_yz_plane(), intersect_zx_plane(), and update_hits().

◆ intersect_cylinder() [2/2]

double KalFitTrack::intersect_cylinder ( double  r) const

Intersection with different geometry.

◆ intersect_xy_plane() [1/2]

double KalFitTrack::intersect_xy_plane ( double  z) const

Definition at line 180 of file KalFitTrack.cxx.

181{
182 if (tanl() != 0 && radius() != 0)
183 return (pivot().z() + dz() - z) / (radius() * tanl());
184 else return 0;
185}

Referenced by KalFitCylinder::intersect().

◆ intersect_xy_plane() [2/2]

double KalFitTrack::intersect_xy_plane ( double  z) const

◆ intersect_yz_plane() [1/2]

double KalFitTrack::intersect_yz_plane ( const HepTransform3D plane,
double  x 
) const

Definition at line 162 of file KalFitTrack.cxx.

164{
165 HepPoint3D xc = plane * center();
166 double r = radius();
167 double d = r * r - (x - xc.x()) * (x - xc.x());
168 if(d < 0) return 0;
169
170 double yy = xc.y();
171 if(yy > 0) yy -= sqrt(d);
172 else yy += sqrt(d);
173
174 double l = (plane.inverse() *
175 HepPoint3D(x, yy, 0)).perp();
176
177 return intersect_cylinder(l);
178}
HepGeom::Point3D< double > HepPoint3D
Definition: Gam4pikp.cxx:37
double intersect_cylinder(double r) const
Intersection with different geometry.

◆ intersect_yz_plane() [2/2]

double KalFitTrack::intersect_yz_plane ( const HepTransform3D plane,
double  x 
) const

◆ intersect_zx_plane() [1/2]

double KalFitTrack::intersect_zx_plane ( const HepTransform3D plane,
double  y 
) const

Definition at line 144 of file KalFitTrack.cxx.

146{
147 HepPoint3D xc = plane * center();
148 double r = radius();
149 double d = r * r - (y - xc.y()) * (y - xc.y());
150 if(d < 0) return 0;
151
152 double xx = xc.x();
153 if(xx > 0) xx -= sqrt(d);
154 else xx += sqrt(d);
155
156 double l = (plane.inverse() *
157 HepPoint3D(xx, y, 0)).perp();
158
159 return intersect_cylinder(l);
160}

◆ intersect_zx_plane() [2/2]

double KalFitTrack::intersect_zx_plane ( const HepTransform3D plane,
double  y 
) const

◆ lead() [1/4]

void KalFitTrack::lead ( int  i)
static

Definition at line 1832 of file KalFitTrack.cxx.

1832{ lead_ = i;}

◆ lead() [2/4]

static void KalFitTrack::lead ( int  i)
static

◆ lead() [3/4]

int KalFitTrack::lead ( void  )
static

Magnetic field map.

Definition at line 1833 of file KalFitTrack.cxx.

1833{ return lead_;}

Referenced by KalFitAlg::initialize().

◆ lead() [4/4]

static int KalFitTrack::lead ( void  )
static

Magnetic field map.

◆ LR() [1/2]

void KalFitTrack::LR ( int  x)
static

Definition at line 1840 of file KalFitTrack.cxx.

1840{ LR_ = x;}

Referenced by KalFitAlg::initialize().

◆ LR() [2/2]

static void KalFitTrack::LR ( int  x)
static

◆ mass() [1/4]

double KalFitTrack::mass ( int  i)
static

Definition at line 1826 of file KalFitTrack.cxx.

1826{ return MASS[i];}

◆ mass() [2/4]

static double KalFitTrack::mass ( int  i)
static

◆ mass() [3/4]

double KalFitTrack::mass ( void  ) const
inline

◆ mass() [4/4]

double KalFitTrack::mass ( void  ) const
inline

Definition at line 187 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

187{ return mass_; }

◆ mom() [1/2]

CLHEP::Hep3Vector * KalFitTrack::mom ( void  )
inline

Definition at line 195 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

195{ return mom_; }

◆ mom() [2/2]

CLHEP::Hep3Vector * KalFitTrack::mom ( void  )
inline

Definition at line 195 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

195{ return mom_; }

◆ ms() [1/2]

void KalFitTrack::ms ( double  path,
const KalFitMaterial m,
int  index 
)

Definition at line 187 of file KalFitTrack.cxx.

189{
190 HepSymMatrix ea = Ea();
191 //cout<<"ms():path "<<path<<endl;
192 //cout<<"ms():ea before: "<<ea<<endl;
193 double k = kappa();
194 double t = tanl();
195 double t2 = t * t;
196 double pt2 = 1 + t2;
197 double k2 = k * k;
198
199 double pmag = 1 / fabs(k) * sqrt(pt2);
200 double dth = material.mcs_angle(mass_, path, pmag);
201 double dth2 = dth * dth;
202 double pt2dth2 = pt2 * dth2;
203
204 ea[1][1] += pt2dth2;
205 ea[2][2] += k2 * t2 * dth2;
206 ea[2][4] += k * t * pt2dth2;
207 ea[4][4] += pt2 * pt2dth2;
208
209 ea[3][3] += dth2 * path * path /3 / (1 + t2);
210 ea[3][4] += dth2 * path/2 * sqrt(1 + t2);
211 ea[3][2] += dth2 * t / sqrt(1 + t2) * k * path/2;
212 ea[0][0] += dth2 * path * path/3;
213 ea[0][1] += dth2 * sqrt(1 + t2) * path/2;
214
215 Ea(ea);
216 //cout<<"ms():ms angle in this: "<<dth<<endl;
217 //cout<<"ms():ea after: "<<Ea()<<endl;
218 if (index < 0) {
219 double x0 = material.X0();
220 if (x0) path_rd_ += path/x0;
221 }
222}

Referenced by KalFitAlg::fitGemHits(), KalFitAlg::fromFHitToInnerWall(), KalFitElement::updateTrack(), KalFitElement::updateTrack_alreadyfound(), and KalFitElement::updateTrack_rphi().

◆ ms() [2/2]

void KalFitTrack::ms ( double  path,
const KalFitMaterial m,
int  index 
)

◆ msgasmdc() [1/2]

void KalFitTrack::msgasmdc ( double  path,
int  index 
)

Calculate multiple scattering angle.

Definition at line 224 of file KalFitTrack.cxx.

225{
226 double k = kappa();
227 double t = tanl();
228 double t2 = t * t;
229 double k2 = k * k;
230
231 double pmag = ( 1 / fabs(k) ) * sqrt(1 + t2);
232 double psq = pmag*pmag;
233 /*
234 double Zprims = 3/2*0.076 + 0.580/9.79*4.99*(4.99+1) +
235 0.041/183.85*74*(74+1) + 0.302/26.98 * 13 * (13+1);
236 double chicc = 0.00039612 * sqrt(Zprims * 0.001168);
237 double dth = 2.557 * chicc * sqrt(path * (mass_*mass_ + psq)) / psq;
238 */
239
240 //std::cout<<" mdcGasRadlen: "<<mdcGasRadlen_<<std::endl;
241 double pathx = path/mdcGasRadlen_;
242 double dth = 0.0136* sqrt(pathx * (mass_*mass_ + psq))/psq
243 *(1 + 0.038 * log(pathx));;
244 HepSymMatrix ea = Ea();
245#ifdef YDEBUG
246 cout<<"msgasmdc():path "<<path<<" pathx "<<pathx<<endl;
247 cout<<"msgasmdc():dth "<<dth<<endl;
248 cout<<"msgasmdc():ea before: "<<ea<<endl;
249#endif
250 double dth2 = dth * dth;
251
252 ea[1][1] += (1 + t2) * dth2;
253 ea[2][2] += k2 * t2 * dth2;
254 ea[2][4] += k * t * (1 + t2) * dth2;
255 ea[4][4] += (1 + t2) * (1 + t2) * dth2;
256
257 // additionnal terms (terms proportional to l and l^2)
258
259 ea[3][3] += dth2 * path * path /3 / (1 + t2);
260 ea[3][4] += dth2 * path/2 * sqrt(1 + t2);
261 ea[3][2] += dth2 * t / sqrt(1 + t2) * k * path/2;
262 ea[0][0] += dth2 * path * path/3;
263 ea[0][1] += dth2 * sqrt(1 + t2) * path/2;
264
265 Ea(ea);
266#ifdef YDEBUG
267 cout<<"msgasmdc():ea after: "<<Ea()<<endl;
268#endif
269 if (index < 0) {
270 pathip_ += path;
271 // RMK : put by hand, take care !!
272 double x0 = mdcGasRadlen_; // for the Mdc gas
273 path_rd_ += path/x0;
274 tof(path);
275#ifdef YDEBUG
276 cout<<"ms...pathip..."<<pathip_<<endl;
277#endif
278 }
279}

Referenced by KalFitAlg::Cgem_filter_anal(), KalFitAlg::filter_fwd_anal(), KalFitAlg::filter_fwd_calib(), KalFitAlg::smoother_anal(), and KalFitAlg::smoother_calib().

◆ msgasmdc() [2/2]

void KalFitTrack::msgasmdc ( double  path,
int  index 
)

Calculate multiple scattering angle.

◆ ncath() [1/2]

unsigned int KalFitTrack::ncath ( void  ) const
inline

Definition at line 205 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

205{ return ncath_; }

◆ ncath() [2/2]

unsigned int KalFitTrack::ncath ( void  ) const
inline

Definition at line 205 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

205{ return ncath_; }

◆ nchits() [1/4]

void KalFitTrack::nchits ( int  n)
inline

Definition at line 222 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

222{ nchits_ = n; }
const Int_t n

◆ nchits() [2/4]

void KalFitTrack::nchits ( int  n)
inline

Definition at line 222 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

222{ nchits_ = n; }

◆ nchits() [3/4]

unsigned int KalFitTrack::nchits ( void  ) const
inline

◆ nchits() [4/4]

unsigned int KalFitTrack::nchits ( void  ) const
inline

Definition at line 203 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

203{ return nchits_; }

◆ ndf_back() [1/4]

void KalFitTrack::ndf_back ( int  n)
inline

Definition at line 221 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

221{ ndf_back_ = n; }

◆ ndf_back() [2/4]

void KalFitTrack::ndf_back ( int  n)
inline

Definition at line 221 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

221{ ndf_back_ = n; }

◆ ndf_back() [3/4]

int KalFitTrack::ndf_back ( void  ) const
inline

Definition at line 190 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

190{ return ndf_back_; }

Referenced by KalFitAlg::fillTds_back(), and KalFitAlg::start_seed().

◆ ndf_back() [4/4]

int KalFitTrack::ndf_back ( void  ) const
inline

Definition at line 190 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

190{ return ndf_back_; }

◆ nhit_r() [1/2]

int KalFitTrack::nhit_r ( void  ) const
inline

Definition at line 208 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

208{ return nhit_r_; }

◆ nhit_r() [2/2]

int KalFitTrack::nhit_r ( void  ) const
inline

Definition at line 208 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

208{ return nhit_r_; }

◆ nhit_z() [1/2]

int KalFitTrack::nhit_z ( void  ) const
inline

Definition at line 209 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

209{ return nhit_z_; }

◆ nhit_z() [2/2]

int KalFitTrack::nhit_z ( void  ) const
inline

Definition at line 209 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

209{ return nhit_z_; }

◆ nLayerUsed() [1/2]

int KalFitTrack::nLayerUsed ( )
inline

Definition at line 343 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

344 {
345 int n=0;
346 for(int i=0; i<43; i++) n+=myLayerUsed[i];
347 return n;
348 }

◆ nLayerUsed() [2/2]

int KalFitTrack::nLayerUsed ( )
inline

Definition at line 343 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

344 {
345 int n=0;
346 for(int i=0; i<43; i++) n+=myLayerUsed[i];
347 return n;
348 }

◆ nmass() [1/2]

int KalFitTrack::nmass ( void  )
static

Definition at line 1825 of file KalFitTrack.cxx.

1825{ return NMASS;}

Referenced by KalFitAlg::complete_track().

◆ nmass() [2/2]

static int KalFitTrack::nmass ( void  )
static

◆ nster() [1/4]

void KalFitTrack::nster ( int  n)
inline

Definition at line 223 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

223{ nster_ = n; }

◆ nster() [2/4]

void KalFitTrack::nster ( int  n)
inline

Definition at line 223 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

223{ nster_ = n; }

◆ nster() [3/4]

unsigned int KalFitTrack::nster ( void  ) const
inline

◆ nster() [4/4]

unsigned int KalFitTrack::nster ( void  ) const
inline

Definition at line 204 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

204{ return nster_; }

◆ number_wirhit() [1/2]

void KalFitTrack::number_wirhit ( void  )

Definition at line 457 of file KalFitTrack.cxx.

458{
459 unsigned int nhit = HitsMdc_.size();
460 int Num[50] = {0};
461 for( unsigned i=0 ; i < nhit; i++ )
462 Num[HitsMdc_[i].wire().layer().layerId()]++;
463 for( unsigned i=0 ; i < nhit; i++ )
464 if (Num[HitsMdc_[i].wire().layer().layerId()]>2)
465 HitsMdc_[i].chi2(-2);
466}

◆ number_wirhit() [2/2]

void KalFitTrack::number_wirhit ( void  )

◆ numf() [1/4]

void KalFitTrack::numf ( int  i)
static

Definition at line 1838 of file KalFitTrack.cxx.

1838{ numf_ = i;}
static int numf_
Flag for treatment of non-uniform mag field.

◆ numf() [2/4]

static void KalFitTrack::numf ( int  i)
static

◆ numf() [3/4]

int KalFitTrack::numf ( void  )
static

Definition at line 1839 of file KalFitTrack.cxx.

1839{ return numf_;}

Referenced by KalFitAlg::initialize().

◆ numf() [4/4]

static int KalFitTrack::numf ( void  )
static

◆ order_hits() [1/2]

void KalFitTrack::order_hits ( void  )

Definition at line 442 of file KalFitTrack.cxx.

442 {
443 for(int it=0; it<HitsMdc().size()-1; it++){
444 if(HitsMdc_[it].wire().layer().layerId() == HitsMdc_[it+1].wire().layer().layerId())
445 {
446 if((kappa()<0)&&(HitsMdc_[it].wire().localId() > HitsMdc_[it+1].wire().localId())){
447 std::swap(HitsMdc_[it], HitsMdc_[it+1]);
448 }
449 if((kappa()>0)&&(HitsMdc_[it].wire().localId() < HitsMdc_[it+1].wire().localId())){
450 std::swap(HitsMdc_[it], HitsMdc_[it+1]);
451 }
452 }
453 }
454}

◆ order_hits() [2/2]

void KalFitTrack::order_hits ( void  )

◆ order_wirhit() [1/2]

void KalFitTrack::order_wirhit ( int  index)

Modifier Order the wire hits for mdc track

Definition at line 380 of file KalFitTrack.cxx.

381{
382 unsigned int nhit = HitsMdc_.size();
383 Helix tracktest = *(Helix*)this;
384 int ind = 0;
385 double* Rad = new double[nhit];
386 double* Ypos = new double[nhit];
387 for( unsigned i=0 ; i < nhit; i++ ){
388
389 HepPoint3D fwd(HitsMdc_[i].wire().fwd());
390 HepPoint3D bck(HitsMdc_[i].wire().bck());
391 Hep3Vector wire = (CLHEP::Hep3Vector)fwd -(CLHEP::Hep3Vector)bck;
392
393 // Modification for stereo wires :
394 Helix work = tracktest;
395 work.ignoreErrorMatrix();
396 work.pivot((fwd + bck) * .5);
397 HepPoint3D x0 = (work.x(0).z() - bck.z())
398 / wire.z() * wire + bck;
399
400 tracktest.pivot(x0);
401 Rad[ind] = tracktest.x(0).perp();
402 Ypos[ind] = x0.y();
403 ind++;
404 //cout<<"Ypos: "<<Ypos[ind-1]<<endl;
405 }
406
407 // Reorder...
408 if (index < 0)
409 for(int j, k = nhit - 1; k >= 0; k = j){
410 j = -1;
411 for(int i = 1; i <= k; i++)
412 if(Rad[i - 1] > Rad[i]){
413 j = i - 1;
414 std::swap(Rad[i], Rad[j]);
415 std::swap(HitsMdc_[i], HitsMdc_[j]);
416 }
417 }
418 if (index > 0)
419 for(int j, k = nhit - 1; k >= 0; k = j){
420 j = -1;
421 for(int i = 1; i <= k; i++)
422 if(Rad[i - 1] < Rad[i]){
423 j = i - 1;
424 std::swap(Rad[i], Rad[j]);
425 std::swap(HitsMdc_[i], HitsMdc_[j]);
426 }
427 }
428 if (index == 0)
429 for(int j, k = nhit - 1; k >= 0; k = j){
430 j = -1;
431 for(int i = 1; i <= k; i++)
432 if(Ypos[i - 1] > Ypos[i]){
433 j = i - 1;
434 std::swap(Ypos[i], Ypos[j]);
435 std::swap(HitsMdc_[i], HitsMdc_[j]);
436 }
437 }
438 delete [] Rad;
439 delete [] Ypos;
440}

Referenced by KalFitAlg::kalman_fitting_anal(), KalFitAlg::kalman_fitting_calib(), KalFitAlg::kalman_fitting_csmalign(), and KalFitAlg::kalman_fitting_MdcxReco_Csmc_Sew().

◆ order_wirhit() [2/2]

void KalFitTrack::order_wirhit ( int  index)

Modifier Order the wire hits for mdc track

◆ p_kaon() [1/4]

void KalFitTrack::p_kaon ( double  pl)
inline

Definition at line 217 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

217{ p_kaon_ = pl;}

◆ p_kaon() [2/4]

void KalFitTrack::p_kaon ( double  pl)
inline

Definition at line 217 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

217{ p_kaon_ = pl;}

◆ p_kaon() [3/4]

double KalFitTrack::p_kaon ( void  ) const
inline

Definition at line 199 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

199{ return p_kaon_; }

Referenced by KalFitAlg::complete_track().

◆ p_kaon() [4/4]

double KalFitTrack::p_kaon ( void  ) const
inline

Definition at line 199 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

199{ return p_kaon_; }

◆ p_proton() [1/4]

void KalFitTrack::p_proton ( double  pl)
inline

Definition at line 218 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

218{ p_proton_ = pl;}

◆ p_proton() [2/4]

void KalFitTrack::p_proton ( double  pl)
inline

Definition at line 218 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

218{ p_proton_ = pl;}

◆ p_proton() [3/4]

double KalFitTrack::p_proton ( void  ) const
inline

Definition at line 200 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

200{ return p_proton_; }

Referenced by KalFitAlg::complete_track().

◆ p_proton() [4/4]

double KalFitTrack::p_proton ( void  ) const
inline

Definition at line 200 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

200{ return p_proton_; }

◆ pat1() [1/2]

int KalFitTrack::pat1 ( void  ) const
inline

Definition at line 206 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

206{ return pat1_; }

◆ pat1() [2/2]

int KalFitTrack::pat1 ( void  ) const
inline

Definition at line 206 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

206{ return pat1_; }

◆ pat2() [1/2]

int KalFitTrack::pat2 ( void  ) const
inline

Definition at line 207 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

207{ return pat2_; }

◆ pat2() [2/2]

int KalFitTrack::pat2 ( void  ) const
inline

Definition at line 207 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

207{ return pat2_; }

◆ path_ab() [1/2]

double KalFitTrack::path_ab ( void  ) const
inline

Definition at line 193 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

193{ return path_ab_; }

◆ path_ab() [2/2]

double KalFitTrack::path_ab ( void  ) const
inline

Definition at line 193 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

193{ return path_ab_; }

◆ path_add() [1/2]

void KalFitTrack::path_add ( double  path)

Update the path length estimation.

Definition at line 1294 of file KalFitTrack.cxx.

1295{
1296 pathip_ += path;
1297 tof(path);
1298}

◆ path_add() [2/2]

void KalFitTrack::path_add ( double  path)

Update the path length estimation.

◆ path_rd() [1/2]

double KalFitTrack::path_rd ( void  ) const
inline

Definition at line 192 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

192{ return path_rd_; }

◆ path_rd() [2/2]

double KalFitTrack::path_rd ( void  ) const
inline

Definition at line 192 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

192{ return path_rd_; }

◆ pathip() [1/4]

void KalFitTrack::pathip ( double  pl)
inline

Definition at line 216 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

216{ pathip_ = pl;}

◆ pathip() [2/4]

void KalFitTrack::pathip ( double  pl)
inline

Definition at line 216 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

216{ pathip_ = pl;}

◆ pathip() [3/4]

double KalFitTrack::pathip ( void  ) const
inline

Definition at line 191 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

191{ return pathip_; }

Referenced by KalFitAlg::fillTds_back().

◆ pathip() [4/4]

double KalFitTrack::pathip ( void  ) const
inline

Definition at line 191 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

191{ return pathip_; }

◆ PathL() [1/2]

double KalFitTrack::PathL ( int  layer)

Function to calculate the path length in the layer.

◆ PathL() [2/2]

double KalFitTrack::PathL ( int  layer)

Function to calculate the path length in the layer.

◆ pathl() [1/2]

double * KalFitTrack::pathl ( void  )
inline

Definition at line 194 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

194{ return PathL_; }

Referenced by KalFitAlg::fillTds_back(), and pivot_numf().

◆ pathl() [2/2]

double * KalFitTrack::pathl ( void  )
inline

Definition at line 194 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

194{ return PathL_; }

◆ pivot_forMdc() [1/2]

const HepPoint3D & KalFitTrack::pivot_forMdc ( void  ) const
inline

Definition at line 155 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

155{ return pivot_forMdc_;}

◆ pivot_forMdc() [2/2]

const HepPoint3D & KalFitTrack::pivot_forMdc ( void  ) const
inline

Definition at line 155 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

155{ return pivot_forMdc_;}

◆ pivot_last() [1/2]

const HepPoint3D & KalFitTrack::pivot_last ( void  ) const
inline

returns helix parameters

Definition at line 151 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

151{ return pivot_last_; }

◆ pivot_last() [2/2]

const HepPoint3D & KalFitTrack::pivot_last ( void  ) const
inline

returns helix parameters

Definition at line 151 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

151{ return pivot_last_; }

◆ pivot_numf() [1/4]

const HepPoint3D & KalFitTrack::pivot_numf ( const HepPoint3D newPivot)

Sets pivot position in a given mag field.

Definition at line 1379 of file KalFitTrack.cxx.

1379 {
1380
1381 int nstep(1);
1382 HepPoint3D delta_x((newPivot-pivot()).x()/double(inner_steps_),
1383 (newPivot-pivot()).y()/double(inner_steps_),
1384 (newPivot-pivot()).z()/double(inner_steps_));
1385 int i = 1;
1386
1387 while (i <= inner_steps_) {
1388 HepPoint3D nextPivot(pivot()+delta_x);
1389 double xnp(nextPivot.x()), ynp(nextPivot.y()), znp(nextPivot.z());
1390 HepSymMatrix Ea_now = Ea();
1391 HepPoint3D piv(pivot());
1392 double xp(piv.x()), yp(piv.y()), zp(piv.z());
1393 double dr = a()[0];
1394 double phi0 = a()[1];
1395 double kappa = a()[2];
1396 double dz = a()[3];
1397 double tanl = a()[4];
1398 double m_rad(0);
1399 if (numfcor_ == 1)
1400 m_rad = radius_numf();
1401 else
1402 m_rad = radius();
1403 double rdr = dr + m_rad;
1404 double phi = fmod(phi0 + M_PI4, M_PI2);
1405 double csf0 = cos(phi);
1406 double snf0 = (1. - csf0) * (1. + csf0);
1407 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.);
1408 if(phi > M_PI) snf0 = - snf0;
1409
1410 double xc = xp + rdr * csf0;
1411 double yc = yp + rdr * snf0;
1412 double csf = (xc - xnp) / m_rad;
1413 double snf = (yc - ynp) / m_rad;
1414 double anrm = sqrt(csf * csf + snf * snf);
1415 csf /= anrm;
1416 snf /= anrm;
1417 phi = atan2(snf, csf);
1418 double phid = fmod(phi - phi0 + M_PI8, M_PI2);
1419 if(phid > M_PI) phid = phid - M_PI2;
1420 double drp = (xp + dr * csf0 + m_rad * (csf0 - csf) - xnp)
1421 * csf
1422 + (yp + dr * snf0 + m_rad * (snf0 - snf) - ynp) * snf;
1423 double dzp = zp + dz - m_rad * tanl * phid - znp;
1424
1425 HepVector ap(5);
1426 ap[0] = drp;
1427 ap[1] = fmod(phi + M_PI4, M_PI2);
1428 ap[2] = kappa;
1429 ap[3] = dzp;
1430 ap[4] = tanl;
1431
1432 // Modification due to non uniform magnetic field :
1433 if (numf_ > 10) {
1434
1435 Hep3Vector x1(xp + dr*csf0, yp + dr*snf0, zp + dz);
1436 double csf0p = cos(ap[1]);
1437 double snf0p = (1. - csf0p) * (1. + csf0p);
1438 snf0p = sqrt((snf0p > 0.) ? snf0p : 0.);
1439 if(ap[1] > M_PI) snf0p = - snf0p;
1440
1441 Hep3Vector x2(xnp + drp*csf0p,
1442 ynp + drp*snf0p,
1443 znp + dzp);
1444 Hep3Vector dist((x1 - x2).x()/100.0,
1445 (x1 - x2).y()/100.0,
1446 (x1 - x2).z()/100.0);
1447 HepPoint3D middlebis((x1.x() + x2.x())/2,
1448 (x1.y() + x2.y())/2,
1449 (x1.z() + x2.z())/2);
1450 HepVector3D field;
1451 MFSvc_->fieldVector(10.*middlebis,field);
1452 field = 1000.*field;
1453 Hep3Vector dB(field.x(),
1454 field.y(),
1455 (field.z()-0.1*Bznom_));
1456 if (field.z()) {
1457 double akappa(fabs(kappa));
1458 double sign = kappa/akappa;
1459 HepVector dp(3);
1460 dp = 0.299792458 * sign * dB.cross(dist);
1461 HepVector dhp(3);
1462 dhp[0] = -akappa*(dp[0]*csf0p+dp[1]*snf0p);
1463 dhp[1] = kappa*akappa*(dp[0]*snf0p-dp[1]*csf0p);
1464 dhp[2] = dp[2]*akappa+dhp[1]*tanl/kappa;
1465 if (numfcor_ == 0){
1466 ap[1] += dhp[0];
1467 }
1468 ap[2] += dhp[1];
1469 ap[4] += dhp[2];
1470 }
1471 }
1472 HepMatrix m_del = delApDelA(ap);
1473 Ea_now.assign(m_del * Ea_now * m_del.T());
1474 pivot(nextPivot);
1475 a(ap);
1476 Ea(Ea_now);
1477 i++;
1478 }
1479 return newPivot;
1480}
virtual StatusCode fieldVector(const HepGeom::Point3D< double > &xyz, HepGeom::Vector3D< double > &fvec) const =0
static int numfcor_
NUMF treatment improved.
double radius_numf(void) const
Estimation of the radius in a given mag field.
double dr(void) const
returns an element of parameters.

Referenced by KalFitAlg::Cgem_filter_anal(), KalFitAlg::filter_fwd_anal(), KalFitAlg::filter_fwd_calib(), KalFitAlg::fitGemHits(), KalFitAlg::fromFHitToInnerWall(), KalFitAlg::innerwall(), KalFitAlg::smoother_anal(), KalFitAlg::smoother_calib(), update_hits(), KalFitElement::updateTrack(), KalFitElement::updateTrack_alreadyfound(), and KalFitElement::updateTrack_rphi().

◆ pivot_numf() [2/4]

const HepPoint3D & KalFitTrack::pivot_numf ( const HepPoint3D newPivot)

Sets pivot position in a given mag field.

◆ pivot_numf() [3/4]

const HepPoint3D & KalFitTrack::pivot_numf ( const HepPoint3D newPivot,
double &  pathl 
)

Definition at line 1483 of file KalFitTrack.cxx.

1483 {
1484
1485 Helix tracktest = *(Helix*)this;
1486 tracktest.ignoreErrorMatrix();
1487 double tl = a()[4];
1488 double th = 90.0 - 180.0*M_1_PI*atan( tl );
1489 /*
1490 int nstep(1);
1491 if (steplev_ == 1)
1492 nstep = 3;
1493 else if (steplev_ == 2 && (th > 140 || th <45))
1494 if ((pivot()-newPivot).mag()<3.)
1495 nstep = 3;
1496 else
1497 nstep = 6;
1498 */
1499 Hep3Vector delta_x((newPivot-pivot()).x()/double(outer_steps_),
1500 (newPivot-pivot()).y()/double(outer_steps_),
1501 (newPivot-pivot()).z()/double(outer_steps_));
1502 int i = 1;
1503
1504 while (i <= outer_steps_) {
1505 HepPoint3D nextPivot(pivot()+delta_x);
1506 double xnp(nextPivot.x()), ynp(nextPivot.y()), znp(nextPivot.z());
1507
1508 HepSymMatrix Ea_now = Ea();
1509 HepPoint3D piv(pivot());
1510 double xp(piv.x()), yp(piv.y()), zp(piv.z());
1511
1512 double dr = a()[0];
1513 double phi0 = a()[1];
1514 double kappa = a()[2];
1515 double dz = a()[3];
1516 double tanl = a()[4];
1517
1518 double m_rad(0);
1519 m_rad = radius();
1520
1521 double rdr = dr + m_rad;
1522 double phi = fmod(phi0 + M_PI4, M_PI2);
1523 double csf0 = cos(phi);
1524 double snf0 = (1. - csf0) * (1. + csf0);
1525 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.);
1526 if(phi > M_PI) snf0 = - snf0;
1527
1528 double xc = xp + rdr * csf0;
1529 double yc = yp + rdr * snf0;
1530 double csf = (xc - xnp) / m_rad;
1531 double snf = (yc - ynp) / m_rad;
1532 double anrm = sqrt(csf * csf + snf * snf);
1533 csf /= anrm;
1534 snf /= anrm;
1535 phi = atan2(snf, csf);
1536 double phid = fmod(phi - phi0 + M_PI8, M_PI2);
1537 if(phid > M_PI) phid = phid - M_PI2;
1538 double drp = (xp + dr * csf0 + m_rad * (csf0 - csf) - xnp)
1539 * csf
1540 + (yp + dr * snf0 + m_rad * (snf0 - snf) - ynp) * snf;
1541 double dzp = zp + dz - m_rad * tanl * phid - znp;
1542
1543 HepVector ap(5);
1544 ap[0] = drp;
1545 ap[1] = fmod(phi + M_PI4, M_PI2);
1546 ap[2] = kappa;
1547 ap[3] = dzp;
1548 ap[4] = tanl;
1549
1550 //std::cout<<" numf_: "<<numf_<<std::endl;
1551
1552 // Modification due to non uniform magnetic field :
1553 if (numf_ > 10) {
1554
1555 Hep3Vector x1(xp + dr*csf0, yp + dr*snf0, zp + dz);
1556
1557 double csf0p = cos(ap[1]);
1558 double snf0p = (1. - csf0p) * (1. + csf0p);
1559 snf0p = sqrt((snf0p > 0.) ? snf0p : 0.);
1560 if(ap[1] > M_PI) snf0p = - snf0p;
1561
1562 Hep3Vector x2(xnp + drp*csf0p,
1563 ynp + drp*snf0p,
1564 znp + dzp);
1565
1566 Hep3Vector dist((x1 - x2).x()/100.0,
1567 (x1 - x2).y()/100.0,
1568 (x1 - x2).z()/100.0);
1569
1570 HepPoint3D middlebis((x1.x() + x2.x())/2,
1571 (x1.y() + x2.y())/2,
1572 (x1.z() + x2.z())/2);
1573
1574 HepVector3D field;
1575 MFSvc_->fieldVector(10.*middlebis,field);
1576 field = 1000.*field;
1577
1578 //std::cout<<"B field: "<<field<<std::endl;
1579 Hep3Vector dB(field.x(),
1580 field.y(),
1581 (field.z()-0.1*Bznom_));
1582
1583
1584 //std::cout<<" dB: "<<dB<<std::endl;
1585
1586
1587 if (field.z()) {
1588 double akappa(fabs(kappa));
1589 double sign = kappa/akappa;
1590 HepVector dp(3);
1591 dp = 0.299792458 * sign * dB.cross(dist);
1592
1593 //std::cout<<"dp: "<<dp<<std::endl;
1594
1595 HepVector dhp(3);
1596 dhp[0] = -akappa*(dp[0]*csf0p+dp[1]*snf0p);
1597 dhp[1] = kappa*akappa*(dp[0]*snf0p-dp[1]*csf0p);
1598 dhp[2] = dp[2]*akappa+dhp[1]*tanl/kappa;
1599
1600
1601 //std::cout<<"dhp: "<<dhp<<std::endl;
1602
1603
1604 ap[1] += dhp[0];
1605 ap[2] += dhp[1];
1606 ap[4] += dhp[2];
1607 }
1608 }
1609 HepMatrix m_del = delApDelA(ap);
1610 Ea_now.assign(m_del * Ea_now * m_del.T());
1611 pivot(nextPivot);
1612 a(ap);
1613 Ea(Ea_now);
1614 i++;
1615
1616 //std::cout<<" a: "<<a()<<std::endl;
1617 }
1618
1619 // Estimation of the path length :
1620 double tanl_0(tracktest.a()[4]);
1621 double phi0_0(tracktest.a()[1]);
1622 double radius_0(tracktest.radius());
1623 tracktest.pivot(newPivot);
1624
1625 double phi0_1 = tracktest.a()[1];
1626 if (fabs(phi0_1 - phi0_0) > M_PI) {
1627 if (phi0_1 > phi0_0) phi0_1 -= 2 * M_PI;
1628 else phi0_0 -= 2 * M_PI;
1629 }
1630 if(phi0_1 == phi0_0) phi0_1 = phi0_0 + 1.e-10;
1631 pathl = fabs(radius_0 * (phi0_1 - phi0_0)
1632 * sqrt(1 + tanl_0 * tanl_0));
1633 return newPivot;
1634}

◆ pivot_numf() [4/4]

const HepPoint3D & KalFitTrack::pivot_numf ( const HepPoint3D newPivot,
double &  pathl 
)

◆ point_last() [1/4]

void KalFitTrack::point_last ( const HepPoint3D point)
inline

set and give out the last point of the track

Definition at line 146 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

146{ point_last_ = point;}

Referenced by KalFitAlg::fillTds_back(), and KalFitAlg::smoother_anal().

◆ point_last() [2/4]

void KalFitTrack::point_last ( const HepPoint3D point)
inline

set and give out the last point of the track

Definition at line 146 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

146{ point_last_ = point;}

◆ point_last() [3/4]

const HepPoint3D & KalFitTrack::point_last ( void  )
inline

Definition at line 147 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

147{ return point_last_;}

◆ point_last() [4/4]

const HepPoint3D & KalFitTrack::point_last ( void  )
inline

Definition at line 147 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

147{ return point_last_;}

◆ r0() [1/2]

double KalFitTrack::r0 ( void  ) const
inline

Definition at line 186 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

186{ return r0_; }

◆ r0() [2/2]

double KalFitTrack::r0 ( void  ) const
inline

Definition at line 186 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

186{ return r0_; }

◆ r_max() [1/2]

double KalFitTrack::r_max ( void  ) const
inline

Definition at line 202 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

202{ return r_max_; }

◆ r_max() [2/2]

double KalFitTrack::r_max ( void  ) const
inline

Definition at line 202 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

202{ return r_max_; }

◆ radius_numf() [1/2]

double KalFitTrack::radius_numf ( void  ) const

Estimation of the radius in a given mag field.

Definition at line 1341 of file KalFitTrack.cxx.

1341 {
1342
1343 double Bz(Bznom_);
1344 //std::cout<<"Bz: "<<Bz<<std::endl;
1345 if (numf_ > 10){
1346 double dr = a()[0];
1347 double phi0 = a()[1];
1348 double dz = a()[3];
1349 double phi = fmod(phi0 + M_PI4, M_PI2);
1350 double csf0 = cos(phi);
1351 double snf0 = (1. - csf0) * (1. + csf0);
1352 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.);
1353 if(phi > M_PI) snf0 = - snf0;
1354 //XYZPoint
1355 HepPoint3D x0((pivot().x() + dr*csf0),
1356 (pivot().y() + dr*snf0),
1357 (pivot().z() + dz));
1358
1359 //XYZVector b;
1360 HepVector3D b;
1361
1362 //std::cout<<"b: "<<b<<std::endl;
1363
1364 MFSvc_->fieldVector(10.*x0, b);
1365
1366 //std::cout<<"b: "<<b<<std::endl;
1367
1368
1369 b = 10000.*b;
1370 Bz = b.z();
1371 }
1372 if (Bz == 0)
1373 Bz = Bznom_;
1374 double ALPHA_loc = 10000./2.99792458/Bz;
1375 return ALPHA_loc / a()[2];
1376}

Referenced by KalFitAlg::fillTds_back(), and pivot_numf().

◆ radius_numf() [2/2]

double KalFitTrack::radius_numf ( void  ) const

Estimation of the radius in a given mag field.

◆ resetLayerUsed() [1/2]

void KalFitTrack::resetLayerUsed ( )
inline

Definition at line 350 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

350 {
351 for(int i=0; i<43; i++) myLayerUsed[i]=0;
352 }

◆ resetLayerUsed() [2/2]

void KalFitTrack::resetLayerUsed ( )
inline

Definition at line 350 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

350 {
351 for(int i=0; i<43; i++) myLayerUsed[i]=0;
352 }

◆ resol() [1/4]

void KalFitTrack::resol ( int  i)
static

Definition at line 1836 of file KalFitTrack.cxx.

1836{ resolflag_ = i;}

◆ resol() [2/4]

static void KalFitTrack::resol ( int  i)
static

◆ resol() [3/4]

int KalFitTrack::resol ( void  )
static

Definition at line 1837 of file KalFitTrack.cxx.

1837{ return resolflag_;}

Referenced by KalFitAlg::initialize().

◆ resol() [4/4]

static int KalFitTrack::resol ( void  )
static

◆ setClusterRefVec() [1/2]

void KalFitTrack::setClusterRefVec ( ClusterRefVec  clusterRefVec)
inline

Definition at line 242 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

242{ ClusterRefVec_ = clusterRefVec; } //added hy Huang Zhen

◆ setClusterRefVec() [2/2]

void KalFitTrack::setClusterRefVec ( ClusterRefVec  clusterRefVec)
inline

Definition at line 242 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

242{ ClusterRefVec_ = clusterRefVec; } //added hy Huang Zhen

◆ setIMdcGeomSvc() [1/2]

void KalFitTrack::setIMdcGeomSvc ( IMdcGeomSvc igeomsvc)
static

Definition at line 239 of file KalFitTrack2.cxx.

240{
241 iGeomSvc_ = igeomsvc;
242}

Referenced by KalFitAlg::setGeomSvc_init().

◆ setIMdcGeomSvc() [2/2]

static void KalFitTrack::setIMdcGeomSvc ( IMdcGeomSvc igeomsvc)
static

◆ setInitMatrix() [1/2]

void KalFitTrack::setInitMatrix ( HepSymMatrix  m)
static

◆ setInitMatrix() [2/2]

static void KalFitTrack::setInitMatrix ( HepSymMatrix  m)
static

◆ setMagneticFieldSvc() [1/2]

void KalFitTrack::setMagneticFieldSvc ( IMagneticFieldSvc mf)
static

Definition at line 228 of file KalFitTrack2.cxx.

229{
230 /*ISvcLocator* svcLocator = Gaudi::svcLocator();
231 StatusCode sc = svcLocator->service("MagneticFieldSvc",MFSvc_);
232 if (sc.isFailure()){
233 std::cout << "Could not load MagneticFieldSvc!" << std::endl;
234 }*/
235 MFSvc_ = mf;
236 if(MFSvc_==0) cout<<"KalFitTrack2:: Could not load MagneticFieldSvc!"<<endl;
237}

Referenced by KalFitAlg::initialize().

◆ setMagneticFieldSvc() [2/2]

static void KalFitTrack::setMagneticFieldSvc ( IMagneticFieldSvc )
static

◆ setMdcCalibFunSvc() [1/2]

void KalFitTrack::setMdcCalibFunSvc ( const MdcCalibFunSvc calibsvc)
static

Definition at line 223 of file KalFitTrack2.cxx.

224{
225 CalibFunSvc_ = calibsvc;
226}

Referenced by KalFitAlg::setCalibSvc_init().

◆ setMdcCalibFunSvc() [2/2]

static void KalFitTrack::setMdcCalibFunSvc ( const MdcCalibFunSvc calibsvc)
static

◆ setMdcDigiCol() [1/2]

void KalFitTrack::setMdcDigiCol ( MdcDigiCol digicol)
static

Definition at line 244 of file KalFitTrack2.cxx.

245{
246 mdcDigiCol_ = digicol;
247}

Referenced by KalFitAlg::execute().

◆ setMdcDigiCol() [2/2]

static void KalFitTrack::setMdcDigiCol ( MdcDigiCol digicol)
static

◆ setT0() [1/2]

void KalFitTrack::setT0 ( double  t0)
static

Definition at line 47 of file KalFitTrack2.cxx.

48{
49 //------------------set event start time-----------
50
51 EventT0_ = eventstart;
52 if(debug_ == 4) {
53 std::cout<<"in function KalFitTrack::setT0(...), EventT0_ = "<<EventT0_<<std::endl;
54 }
55}

Referenced by KalFitAlg::execute().

◆ setT0() [2/2]

static void KalFitTrack::setT0 ( double  t0)
static

◆ smoother_Mdc() [1/4]

double KalFitTrack::smoother_Mdc ( KalFitHelixSeg seg,
CLHEP::Hep3Vector &  meas,
int &  flg,
int  csmflag 
)

Kalman smoother for Mdc.

Referenced by KalFitAlg::smoother_anal(), and KalFitAlg::smoother_calib().

◆ smoother_Mdc() [2/4]

double KalFitTrack::smoother_Mdc ( KalFitHelixSeg seg,
CLHEP::Hep3Vector &  meas,
int &  flg,
int  csmflag 
)

Kalman smoother for Mdc.

◆ smoother_Mdc() [3/4]

double KalFitTrack::smoother_Mdc ( KalFitHitMdc HitMdc,
CLHEP::Hep3Vector &  meas,
KalFitHelixSeg seg,
double &  dchi2,
int  csmflag 
)

◆ smoother_Mdc() [4/4]

double KalFitTrack::smoother_Mdc ( KalFitHitMdc HitMdc,
CLHEP::Hep3Vector &  meas,
KalFitHelixSeg seg,
double &  dchi2,
int  csmflag 
)

◆ smoother_Mdc_csmalign() [1/2]

double KalFitTrack::smoother_Mdc_csmalign ( KalFitHelixSeg seg,
CLHEP::Hep3Vector &  meas,
int &  flg,
int  csmflag 
)

◆ smoother_Mdc_csmalign() [2/2]

double KalFitTrack::smoother_Mdc_csmalign ( KalFitHelixSeg seg,
CLHEP::Hep3Vector &  meas,
int &  flg,
int  csmflag 
)

◆ tof() [1/4]

void KalFitTrack::tof ( double  path)

Update the tof estimation.

Definition at line 1316 of file KalFitTrack.cxx.

1317{
1318 double light_speed( 29.9792458 ); // light speed in cm/nsec
1319 double t = tanl();
1320 double pmag( sqrt( 1.0 + t*t ) / kappa());
1321 if (pmag !=0) {
1322 double mass_over_p( mass_ / pmag );
1323 double beta( 1.0 / sqrt( 1.0 + mass_over_p * mass_over_p ) );
1324 tof_ += path / ( light_speed * beta );
1325 }
1326
1327 if (tofall_) {
1328 if (p_kaon_ > 0){
1329 double massk_over_p( MASS[3] / p_kaon_ );
1330 double beta_kaon( 1.0 / sqrt( 1.0 + massk_over_p * massk_over_p ) );
1331 tof_kaon_ += path / (light_speed * beta_kaon);
1332 }
1333 if (p_proton_ > 0){
1334 double massp_over_p( MASS[4] / p_proton_ );
1335 double beta_proton( 1.0 / sqrt( 1.0 + massp_over_p * massp_over_p ) );
1336 tof_proton_ += path / (light_speed * beta_proton);
1337 }
1338 }
1339}

Referenced by KalFitAlg::fillTds_back().

◆ tof() [2/4]

void KalFitTrack::tof ( double  path)

Update the tof estimation.

◆ tof() [3/4]

double KalFitTrack::tof ( void  ) const
inline

Definition at line 196 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

196{ return tof_; }

Referenced by msgasmdc(), and path_add().

◆ tof() [4/4]

double KalFitTrack::tof ( void  ) const
inline

Definition at line 196 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

196{ return tof_; }

◆ tof_kaon() [1/2]

double KalFitTrack::tof_kaon ( void  ) const
inline

Definition at line 197 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

197{ return tof_kaon_; }

Referenced by KalFitAlg::fillTds_back().

◆ tof_kaon() [2/2]

double KalFitTrack::tof_kaon ( void  ) const
inline

Definition at line 197 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

197{ return tof_kaon_; }

◆ tof_proton() [1/2]

double KalFitTrack::tof_proton ( void  ) const
inline

Definition at line 198 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

198{ return tof_proton_; }

Referenced by KalFitAlg::fillTds_back().

◆ tof_proton() [2/2]

double KalFitTrack::tof_proton ( void  ) const
inline

Definition at line 198 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

198{ return tof_proton_; }

◆ trasan_id() [1/4]

void KalFitTrack::trasan_id ( int  t)
inline

Definition at line 213 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

213{ trasan_id_ = t;}

◆ trasan_id() [2/4]

void KalFitTrack::trasan_id ( int  t)
inline

Definition at line 213 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

213{ trasan_id_ = t;}

◆ trasan_id() [3/4]

int KalFitTrack::trasan_id ( void  ) const
inline

◆ trasan_id() [4/4]

int KalFitTrack::trasan_id ( void  ) const
inline

Definition at line 185 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

185{ return trasan_id_; }

◆ type() [1/4]

void KalFitTrack::type ( int  t)
inline

Reinitialize (modificator)

Definition at line 212 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

212{ type_ = t;}

◆ type() [2/4]

void KalFitTrack::type ( int  t)
inline

Reinitialize (modificator)

Definition at line 212 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

212{ type_ = t;}

◆ type() [3/4]

◆ type() [4/4]

int KalFitTrack::type ( void  ) const
inline

Definition at line 184 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

184{ return type_; }

◆ update_bit() [1/2]

void KalFitTrack::update_bit ( int  i)

Definition at line 1812 of file KalFitTrack.cxx.

1812 {
1813 int j(0);
1814 if (i < 31){
1815 j = (int) pow(2.,i);
1816 if (!(pat1_ & j))
1817 pat1_ = pat1_ | j;
1818 } else if (i < 50) {
1819 j = (int) pow(2.,(i-31));
1820 if (!(pat2_ & j))
1821 pat2_ = pat2_ | j;
1822 }
1823}

◆ update_bit() [2/2]

void KalFitTrack::update_bit ( int  i)

◆ update_forMdc() [1/2]

void KalFitTrack::update_forMdc ( void  )

Definition at line 121 of file KalFitTrack.cxx.

122{
123 pivot_forMdc_ = pivot();
124 a_forMdc_ = a();
125 Ea_forMdc_ = Ea();
126}

Referenced by KalFitAlg::kalman_fitting_anal(), KalFitAlg::kalman_fitting_calib(), KalFitAlg::kalman_fitting_csmalign(), and KalFitAlg::kalman_fitting_MdcxReco_Csmc_Sew().

◆ update_forMdc() [2/2]

void KalFitTrack::update_forMdc ( void  )

◆ update_hits() [1/6]

double KalFitTrack::update_hits ( KalFitHelixSeg HelixSeg,
int  inext,
CLHEP::Hep3Vector &  meas,
int  way,
double &  dchi2,
int  csmflag 
)

◆ update_hits() [2/6]

double KalFitTrack::update_hits ( KalFitHelixSeg HelixSeg,
int  inext,
CLHEP::Hep3Vector &  meas,
int  way,
double &  dchi2,
int  csmflag 
)

◆ update_hits() [3/6]

double KalFitTrack::update_hits ( KalFitHitMdc HitMdc,
int  inext,
CLHEP::Hep3Vector &  meas,
int  way,
double &  dchi2,
double &  dtrack,
double &  dtracknew,
double &  dtdc,
int  csmflag 
)

◆ update_hits() [4/6]

double KalFitTrack::update_hits ( KalFitHitMdc HitMdc,
int  inext,
CLHEP::Hep3Vector &  meas,
int  way,
double &  dchi2,
double &  dtrack,
double &  dtracknew,
double &  dtdc,
int  csmflag 
)

Include the Mdc wire hits.

◆ update_hits() [5/6]

double KalFitTrack::update_hits ( RecCgemCluster Cluster,
double  recR,
int  way,
int  csmflag 
)

Definition at line 2813 of file KalFitTrack.cxx.

2814{
2815 //const double a_stero[3] = {(45.94*3.1415926/180),(31.10*3.1415926/180),(32.99*3.1415926/180)};
2816 //const double r_layer[3] = {87.5026,132.7686,175.2686};
2817 //const double x_reso[3]={0.1372,0.1476,0.1412};
2818 //const double v_reso[3]={0.1273,0.1326,0.1378};
2819
2820 // --- measurement
2821 double recZ = Cluster->getRecZ()/10;
2822 double recPhi = Cluster->getrecphi();
2823 while(recPhi > M_PI) recPhi-=2*M_PI;
2824 while(recPhi <-M_PI) recPhi+=2*M_PI;
2825 HepVector v_measu(2,0);
2826 v_measu(1) = recPhi;
2827 v_measu(2) = recZ;
2828
2829 // --- estimation
2830 //double Phi = intersect_cylinder(recR);
2831 HepPoint3D x0kal = x(intersect_cylinder(recR));
2832 pivot_numf(x0kal);
2833 HepVector v_estim(2,0);
2834 v_estim(1) = x0kal.phi();
2835 v_estim(2) = x0kal.z();
2836
2837 const HepSymMatrix& ea = Ea();
2838 HepVector v_a = a();
2839
2840 // --- derivative matrix
2841 double dPhi=intersect_cylinder(recR);
2842 double dr = v_a(1);
2843 double phi0 = v_a(2);
2844 double kappa = v_a(3);
2845 double tanl = v_a(5);
2846 double x0 = x0kal.x();
2847 double y0 = x0kal.y();
2848 double Alpha = alpha();
2849 HepMatrix H(2, 5, 0);
2850 H(1,1) = -y0*cos(phi0)/(y0*y0+x0*x0)+x0*sin(phi0)/(x0*x0+y0*y0);
2851 H(1,2) = -y0/(y0*y0+x0*x0)*((-1)*dr*sin(phi0)+Alpha/kappa*(sin(phi0+dPhi)-sin(phi0)))+x0/(x0*x0+y0*y0)*(dr*cos(phi0)+Alpha/kappa*(cos(phi0)-cos(phi0+dPhi)));
2852 H(1,3) = -y0/(y0*y0+x0*x0)*(-1)*Alpha/(kappa*kappa)*(cos(phi0)-cos(phi0+dPhi))+x0/(x0*x0+y0*y0)*(-1)*Alpha/(kappa*kappa)*(sin(phi0)-sin(phi0+dPhi));
2853 H(2,3) = Alpha/(kappa*kappa)*tanl*dPhi;
2854 H(2,4) = 1.0;
2855 H(2,5) = -1*(Alpha/kappa)*dPhi;
2856
2857 // --- error matrix of Cgem
2858 int layer = Cluster->getlayerid();
2859 ISvcLocator* svcLocator = Gaudi::svcLocator();
2860 ICgemGeomSvc* ISvc;
2861 StatusCode Cgem_sc=svcLocator->service("CgemGeomSvc", ISvc);
2862 CgemGeomSvc* CgemGeomSvc_=dynamic_cast<CgemGeomSvc *>(ISvc);
2863 CgemGeoLayer* CgemLayer = CgemGeomSvc_->getCgemLayer(layer);
2864 double R_x = (CgemLayer->getInnerROfAnodeCu2() + CgemLayer->getOuterROfAnodeCu2())/2;
2865 //R_v = (CgemLayer->getInnerROfAnodeCu1() + CgemLayer->getOuterROfAnodeCu1())/2;
2866 double a_stero = (CgemLayer->getAngleOfStereo())*M_PI/180;
2867
2868 ICgemCalibFunSvc* CgemCalibSvc;
2869 StatusCode sc = svcLocator->service ("CgemCalibFunSvc", CgemCalibSvc);
2870 int iView(0), mode(2);
2871 double Q(100), T(100);
2872 double Phi_momentum = momentum(dPhi).phi();
2873 double Phi_position = x0kal.phi();
2874 double delta_phi=Phi_momentum - Phi_position;
2875 while(delta_phi>M_PI) delta_phi-=CLHEP::twopi;
2876 while(delta_phi<-M_PI) delta_phi+=CLHEP::twopi;
2877 double sigma_X = CgemCalibSvc->getSigma(layer,iView,mode,delta_phi,Q,T);// in mm
2878 double sigma_V = CgemCalibSvc->getSigma(layer,iView,mode,delta_phi,Q,T);// in mm
2879
2880 HepSymMatrix V(2,0);
2881 //V(1,1) = pow(x_reso[layer]/r_layer[layer],2);
2882 //V(2,2) = pow(sqrt(0.01*v_reso[layer]*v_reso[layer]/(sin(a_stero[layer])*sin(a_stero[layer]))+0.01*x_reso[layer]*x_reso[layer]/(tan(a_stero[layer])*tan(a_stero[layer]))),2);
2883 V(1,1) = pow(sigma_X/R_x,2);
2884 V(2,2) = pow(sqrt(0.01*sigma_V*sigma_V/(sin(a_stero)*sin(a_stero))+0.01*sigma_X*sigma_X/(tan(a_stero)*tan(a_stero))),2);
2885 // --- gain matrix
2886 int ierr=-1;
2887 HepMatrix K = ea*H.T()*(V+H*ea*H.T()).inverse(ierr);
2888 if(ierr != 0)cout<<"errer in inverse operation of matrix!"<<endl;
2889
2890 // --- new error matrix
2891 HepSymMatrix EaNew(5,0);
2892 EaNew.assign(ea-K*H*ea);
2893 Ea(EaNew);
2894
2895 // --- diff
2896 HepVector v_diff = v_measu - v_estim;
2897 while(v_diff(1) > M_PI) v_diff(1)-=2*M_PI;
2898 while(v_diff(1) <- M_PI) v_diff(1)+=2*M_PI;
2899
2900 // --- new parameters
2901 //HepVector aNew = v_a + K*v_diff;
2902 a(v_a + K*v_diff);
2903
2904 // --- new v_estim
2905 HepPoint3D x0kal_new = x(intersect_cylinder(recR));
2906 HepVector v_estim_new(2,0);
2907 v_estim_new(1) = x0kal_new.phi();
2908 v_estim_new(2) = x0kal_new.z();
2909
2910 // --- difference between measurement and updated estimation
2911 v_diff = v_measu - v_estim_new;
2912 while(v_diff(1) > M_PI) v_diff(1)-=2*M_PI;
2913 while(v_diff(1) <- M_PI) v_diff(1)+=2*M_PI;
2914
2915 // --- new derivative matrix
2916 //track_new.pivot_numf(x0kal_new,pathl);
2917 //HepVector a_new = track_new.a();
2918 //HepVector Ea_new = track_new.ea();
2919
2920 // --- R matrix and Chisuqre
2921 HepSymMatrix R(2,0);
2922 R.assign(V-H*EaNew*H.T());
2923 HepVector dChi2 = v_diff.T()*R.inverse(ierr)*v_diff;
2924 if(ierr != 0)cout<<"errer in inverse operation of matrix!"<<endl;
2925
2926 // --- update Chisqure of track
2927 if(way>0) chiSq(chiSq()+dChi2(1));
2928 if(way<0) chiSq_back(chiSq_back()+dChi2(1));
2929 return dChi2(1);
2930}
const double a_stero[3]
double tan(const BesAngle a)
double sin(const BesAngle a)
virtual double getSigma(int layer, int xvFlag, int readoutMode, double angle, double Q, double T) const =0
const HepPoint3D & pivot_numf(const HepPoint3D &newPivot)
Sets pivot position in a given mag field.
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

◆ update_hits() [6/6]

double KalFitTrack::update_hits ( RecCgemCluster Cluster,
double  recR,
int  way,
int  csmflag 
)

◆ update_hits_csmalign() [1/2]

double KalFitTrack::update_hits_csmalign ( KalFitHelixSeg HelixSeg,
int  inext,
CLHEP::Hep3Vector &  meas,
int  way,
double &  dchi2,
int  csmflag 
)

◆ update_hits_csmalign() [2/2]

double KalFitTrack::update_hits_csmalign ( KalFitHelixSeg HelixSeg,
int  inext,
CLHEP::Hep3Vector &  meas,
int  way,
double &  dchi2,
int  csmflag 
)

◆ update_last() [1/2]

void KalFitTrack::update_last ( void  )

Record the current parameters as ..._last information :

Definition at line 114 of file KalFitTrack.cxx.

115{
116 pivot_last_ = pivot();
117 a_last_ = a();
118 Ea_last_ = Ea();
119}

◆ update_last() [2/2]

void KalFitTrack::update_last ( void  )

Record the current parameters as ..._last information :

◆ useLayer() [1/2]

void KalFitTrack::useLayer ( int  iLay)
inline

Definition at line 354 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

354 {
355 if(iLay>=0 && iLay<=43) myLayerUsed[iLay]=1;
356 }

◆ useLayer() [2/2]

void KalFitTrack::useLayer ( int  iLay)
inline

Definition at line 354 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitTrack.h.

354 {
355 if(iLay>=0 && iLay<=43) myLayerUsed[iLay]=1;
356 }

Member Data Documentation

◆ Bznom_

◆ chi2_hitf_

double KalFitTrack::chi2_hitf_ = 1000
static

Cut chi2 for each hit.

Definition at line 289 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by KalFitAlg::initialize().

◆ chi2_hits_

double KalFitTrack::chi2_hits_ = 1000
static

◆ chi2mdc_hit2_

static double KalFitTrack::chi2mdc_hit2_
static

◆ dchi2cutf_anal

double KalFitTrack::dchi2cutf_anal = {0.}
static

◆ dchi2cutf_calib

double KalFitTrack::dchi2cutf_calib = {0.}
static

◆ dchi2cuts_anal

double KalFitTrack::dchi2cuts_anal = {0.}
static

◆ dchi2cuts_calib

double KalFitTrack::dchi2cuts_calib = {0.}
static

◆ debug_

int KalFitTrack::debug_ = 0
static

◆ drifttime_choice_

int KalFitTrack::drifttime_choice_ = 0
static

the drifttime choice

Definition at line 328 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by getDriftTime(), and KalFitAlg::initialize().

◆ factor_strag_

double KalFitTrack::factor_strag_ = 0.4
static

factor of energy loss straggling for electron

Definition at line 317 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by eloss(), and KalFitAlg::initialize().

◆ inner_steps_

int KalFitTrack::inner_steps_ = 3
static

◆ LR_

◆ mdcGasRadlen_

double KalFitTrack::mdcGasRadlen_ = 0.
static

◆ nmdc_hit2_

int KalFitTrack::nmdc_hit2_ = 500
static

Cut chi2 for each hit.

Definition at line 319 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by KalFitAlg::initialize().

◆ numf_

int KalFitTrack::numf_ = 0
static

Flag for treatment of non-uniform mag field.

Definition at line 291 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by KalFitAlg::initialize(), numf(), pivot_numf(), and radius_numf().

◆ numfcor_

int KalFitTrack::numfcor_ = 1
static

◆ outer_steps_

int KalFitTrack::outer_steps_ = 3
static

◆ resolflag_

int KalFitTrack::resolflag_ = 0
static

wire resoltion flag

Definition at line 323 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by chi2_next(), and resol().

◆ steplev_

int KalFitTrack::steplev_ = 0
static

Level of precision (= 1 : 5steps for all tracks; = 2: 5 steps for very non uniform part)

Definition at line 309 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by KalFitAlg::initialize().

◆ strag_

int KalFitTrack::strag_ = 1
static

Flag to take account of energy loss straggling :

Definition at line 315 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by eloss(), and KalFitAlg::initialize().

◆ Tof_correc_

int KalFitTrack::Tof_correc_ = 1
static

Flag for TOF correction.

Definition at line 312 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by chi2_next(), and KalFitAlg::initialize().

◆ tofall_

◆ tprop_

int KalFitTrack::tprop_ = 1
static

for signal propagation correction

Definition at line 284 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitTrack.h.

Referenced by getDriftTime(), and KalFitAlg::initialize().


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