1#ifndef _DEFINE_KALFITTRACK_H_
2#define _DEFINE_KALFITTRACK_H_
6#ifndef ENABLE_BACKWARDS_COMPATIBILITY
13#include "CLHEP/Geometry/Transform3D.h"
14#include "CLHEP/Geometry/Point3D.h"
15#include "CLHEP/Matrix/Vector.h"
16#include "CLHEP/Matrix/Matrix.h"
42 unsigned int nchits_, nster_, ncath_, ndf_back_;
43 double chiSq_back_, pathip_, path_rd_,
44 path_ab_, tof_, dchi2_max_, r_max_;
45 double tof_kaon_, tof_proton_;
46 double p_kaon_, p_proton_;
53 CLHEP::Hep3Vector mom_[43];
60 CLHEP::HepVector a_last_;
61 CLHEP::HepSymMatrix Ea_last_;
67 CLHEP::HepVector a_forMdc_;
68 CLHEP::HepSymMatrix Ea_forMdc_;
69 vector<KalFitHitMdc> HitsMdc_;
71 vector<KalFitHelixSeg> HelixSegs_;
74 static const double MASS[NMASS];
77 static int lead_, back_;
82 static double EventT0_;
83 static HepSymMatrix initMatrix_;
88 const CLHEP::HepVector&
a,
89 const CLHEP::HepSymMatrix&
Ea,
106 void msgasmdc(
double path,
int index);
111 void eloss(
double path,
121 double update_hits(
KalFitHitMdc&
HitMdc,
int inext, CLHEP::Hep3Vector& meas,
int way,
double& dchi2,
double& dtrack,
double& dtracknew,
double& dtdc,
int csmflag);
147 const CLHEP::HepVector &
a_last(
void)
const{
return a_last_; }
148 const CLHEP::HepSymMatrix &
Ea_last(
void)
const{
return Ea_last_; }
151 const CLHEP::HepVector &
a_forMdc(
void)
const{
return a_forMdc_; }
152 const CLHEP::HepSymMatrix &
Ea_forMdc(
void)
const{
return Ea_forMdc_; }
167 void tof(
double path);
169 double filter(
double v_m,
const CLHEP::HepVector& m_H,
170 double v_d,
double m_V);
178 int insist(
void)
const {
return insist_; }
179 int type(
void)
const {
return type_; }
181 double r0(
void)
const {
return r0_; }
182 double mass(
void)
const {
return mass_; }
183 double chiSq(
void)
const {
return chiSq_; }
186 double pathip(
void)
const {
return pathip_; }
187 double path_rd(
void)
const {
return path_rd_; }
188 double path_ab(
void)
const {
return path_ab_; }
189 double*
pathl(
void) {
return PathL_; }
190 CLHEP::Hep3Vector*
mom(
void) {
return mom_; }
191 double tof(
void)
const {
return tof_; }
194 double p_kaon(
void)
const {
return p_kaon_; }
197 double r_max(
void)
const {
return r_max_; }
198 unsigned int nchits(
void)
const {
return nchits_; }
199 unsigned int nster(
void)
const {
return nster_; }
200 unsigned int ncath(
void)
const {
return ncath_; }
201 int pat1(
void)
const {
return pat1_; }
202 int pat2(
void)
const {
return pat2_; }
203 int nhit_r(
void)
const {
return nhit_r_; }
204 int nhit_z(
void)
const {
return nhit_z_; }
228 void HitsMdc(vector<KalFitHitMdc>& lh);
229 vector<KalFitHitMdc>&
HitsMdc(
void) {
return HitsMdc_;}
234 vector<KalFitHelixSeg>&
HelixSegs(
void) {
return HelixSegs_;}
251 double getSigma(
int layerId,
double driftDist )
const;
260 static void setT0(
double t0);
261 double getT0(
void)
const;
322 static int nmass(
void);
323 static double mass(
int i);
325 static void LR(
int x);
327 static int lead(
void);
328 static void lead(
int i);
329 static int back(
void);
330 static void back(
int i);
331 static int resol(
void);
332 static void resol(
int i);
333 static int numf(
void);
334 static void numf(
int i);
339 for(
int i=0; i<43; i++) n+=myLayerUsed[i];
344 for(
int i=0; i<43; i++) myLayerUsed[i]=0;
348 if(iLay>=0 && iLay<=43) myLayerUsed[iLay]=1;
HepGeom::Transform3D HepTransform3D
ObjectVector< MdcDigi > MdcDigiCol
Description of a Hit in Mdc.
Description of a track class (<- Helix.cc)
~KalFitTrack(void)
destructor
double chi2_next(Helix &H, KalFitHitMdc &HitMdc, int csmflag)
static void setMdcDigiCol(MdcDigiCol *digicol)
static int lead(void)
Magnetic field map.
void chiSq_back(double c)
CLHEP::Hep3Vector * mom(void)
double getDriftTime(KalFitHitMdc &hitmdc, double toftime) const
static double chi2_hitf_
Cut chi2 for each hit.
static double dchi2cuts_anal[43]
unsigned int nchits(void) const
static double dchi2cuts_calib[43]
double tof_proton(void) const
static int debug_
for debug
double filter(double v_m, const CLHEP::HepVector &m_H, double v_d, double m_V)
double tof_kaon(void) const
int insist(void) const
Extractor :
double update_hits(KalFitHelixSeg &HelixSeg, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, int csmflag)
double path_rd(void) const
void order_wirhit(int index)
HepSymMatrix getInitMatrix(void) const
static void setInitMatrix(HepSymMatrix m)
double path_ab(void) const
const HepPoint3D & point_last(void)
unsigned int ncath(void) const
static int nmdc_hit2_
Cut chi2 for each hit.
double getSigma(int layerId, double driftDist) const
double dchi2_max(void) const
KalFitHelixSeg & HelixSeg(int i)
void addTofSM(double time)
double PathL(int layer)
Function to calculate the path length in the layer.
static int resolflag_
wire resoltion flag
static double factor_strag_
factor of energy loss straggling for electron
int trasan_id(void) const
const HepPoint3D & pivot_numf(const HepPoint3D &newPivot)
Sets pivot position in a given mag field.
void ms(double path, const KalFitMaterial &m, int index)
static int Tof_correc_
Flag for TOF correction.
double intersect_cylinder(double r) const
Intersection with different geometry.
double chiSq_back(void) const
const CLHEP::HepSymMatrix & Ea_last(void) const
vector< KalFitHitMdc > & HitsMdc(void)
double pathip(void) const
void point_last(const HepPoint3D &point)
set and give out the last point of the track
static double chi2mdc_hit2_
void HelixSegs(vector< KalFitHelixSeg > &vs)
static int numf_
Flag for treatment of non-uniform mag field.
void path_add(double path)
Update the path length estimation.
unsigned int nster(void) const
void appendHelixSegs(KalFitHelixSeg s)
double smoother_Mdc(KalFitHitMdc &HitMdc, CLHEP::Hep3Vector &meas, KalFitHelixSeg &seg, double &dchi2, int csmflag)
static void setMdcCalibFunSvc(const MdcCalibFunSvc *calibsvc)
const CLHEP::HepVector & a_last(void) const
double p_proton(void) const
double update_hits_csmalign(KalFitHelixSeg &HelixSeg, int inext, CLHEP::Hep3Vector &meas, int way, double &dchi2, int csmflag)
const HepPoint3D & pivot_forMdc(void) const
static int drifttime_choice_
the drifttime choice
const CLHEP::HepSymMatrix & Ea_forMdc(void) const
double smoother_Mdc(KalFitHelixSeg &seg, CLHEP::Hep3Vector &meas, int &flg, int csmflag)
Kalman smoother for Mdc.
void msgasmdc(double path, int index)
Calculate multiple scattering angle.
static int tprop_
for signal propagation correction
void appendHitsMdc(KalFitHitMdc h)
Functions for Mdc hits list.
void addPathSM(double path)
static double mdcGasRadlen_
double cor_tanldep(double *p, double er)
Correct the error according the current tanl value :
static double dchi2cutf_calib[43]
const CLHEP::HepVector & a_forMdc(void) const
void eloss(double path, const KalFitMaterial &m, int index)
Calculate total energy lost in material.
void update_last(void)
Record the current parameters as ..._last information :
double getDriftDist(KalFitHitMdc &hitmdc, double drifttime, int lr) const
double intersect_yz_plane(const HepTransform3D &plane, double x) const
double intersect_zx_plane(const HepTransform3D &plane, double y) const
static void setT0(double t0)
static void setMagneticFieldSvc(IMagneticFieldSvc *)
static int numfcor_
NUMF treatment improved.
double intersect_xy_plane(double z) const
static void setIMdcGeomSvc(IMdcGeomSvc *igeomsvc)
double radius_numf(void) const
Estimation of the radius in a given mag field.
double smoother_Mdc_csmalign(KalFitHelixSeg &seg, CLHEP::Hep3Vector &meas, int &flg, int csmflag)
void type(int t)
Reinitialize (modificator)
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.
static double dchi2cutf_anal[43]
static int LR_
Use L/R decision from MdcRecHit information :
vector< KalFitHelixSeg > & HelixSegs(void)
double p_kaon(void) const
const HepPoint3D & pivot_last(void) const
returns helix parameters
KalFitHitMdc & HitMdc(int i)
static int strag_
Flag to take account of energy loss straggling :
const HepSymMatrix & Ea(void) const
returns error matrix.
HepPoint3D x(double dPhi=0.) const
returns position after rotating angle dPhi in phi direction.
const HepVector & a(void) const
returns helix parameters.
const HepPoint3D & pivot(void) const
returns pivot position.