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"
43 unsigned int nchits_, nster_, ncath_, ndf_back_;
44 double chiSq_back_, pathip_, path_rd_,
45 path_ab_, tof_, dchi2_max_, r_max_;
46 double tof_kaon_, tof_proton_;
47 double p_kaon_, p_proton_;
54 CLHEP::Hep3Vector mom_[43];
61 CLHEP::HepVector a_last_;
62 CLHEP::HepSymMatrix Ea_last_;
68 CLHEP::HepVector a_forMdc_;
69 CLHEP::HepSymMatrix Ea_forMdc_;
70 vector<KalFitHitMdc> HitsMdc_;
72 vector<KalFitHelixSeg> HelixSegs_;
77 static const double MASS[NMASS];
80 static int lead_, back_;
85 static double EventT0_;
86 static HepSymMatrix initMatrix_;
92 const CLHEP::HepVector&
a,
93 const CLHEP::HepSymMatrix&
Ea,
110 void msgasmdc(
double path,
int index);
115 void eloss(
double path,
125 double update_hits(
KalFitHitMdc&
HitMdc,
int inext, CLHEP::Hep3Vector& meas,
int way,
double& dchi2,
double& dtrack,
double& dtracknew,
double& dtdc,
int csmflag);
152 const CLHEP::HepVector &
a_last(
void)
const{
return a_last_; }
153 const CLHEP::HepSymMatrix &
Ea_last(
void)
const{
return Ea_last_; }
156 const CLHEP::HepVector &
a_forMdc(
void)
const{
return a_forMdc_; }
157 const CLHEP::HepSymMatrix &
Ea_forMdc(
void)
const{
return Ea_forMdc_; }
172 void tof(
double path);
174 double filter(
double v_m,
const CLHEP::HepVector& m_H,
175 double v_d,
double m_V);
183 int insist(
void)
const {
return insist_; }
184 int type(
void)
const {
return type_; }
186 double r0(
void)
const {
return r0_; }
187 double mass(
void)
const {
return mass_; }
188 double chiSq(
void)
const {
return chiSq_; }
191 double pathip(
void)
const {
return pathip_; }
192 double path_rd(
void)
const {
return path_rd_; }
193 double path_ab(
void)
const {
return path_ab_; }
194 double*
pathl(
void) {
return PathL_; }
195 CLHEP::Hep3Vector*
mom(
void) {
return mom_; }
196 double tof(
void)
const {
return tof_; }
199 double p_kaon(
void)
const {
return p_kaon_; }
202 double r_max(
void)
const {
return r_max_; }
203 unsigned int nchits(
void)
const {
return nchits_; }
204 unsigned int nster(
void)
const {
return nster_; }
205 unsigned int ncath(
void)
const {
return ncath_; }
206 int pat1(
void)
const {
return pat1_; }
207 int pat2(
void)
const {
return pat2_; }
208 int nhit_r(
void)
const {
return nhit_r_; }
209 int nhit_z(
void)
const {
return nhit_z_; }
233 void HitsMdc(vector<KalFitHitMdc>& lh);
234 vector<KalFitHitMdc>&
HitsMdc(
void) {
return HitsMdc_;}
239 vector<KalFitHelixSeg>&
HelixSegs(
void) {
return HelixSegs_;}
258 double getSigma(
int layerId,
double driftDist )
const;
267 static void setT0(
double t0);
268 double getT0(
void)
const;
329 static int nmass(
void);
330 static double mass(
int i);
332 static void LR(
int x);
334 static int lead(
void);
335 static void lead(
int i);
336 static int back(
void);
337 static void back(
int i);
338 static int resol(
void);
339 static void resol(
int i);
340 static int numf(
void);
341 static void numf(
int i);
346 for(
int i=0; i<43; i++)
n+=myLayerUsed[i];
351 for(
int i=0; i<43; i++) myLayerUsed[i]=0;
355 if(iLay>=0 && iLay<=43) myLayerUsed[iLay]=1;
HepGeom::Transform3D HepTransform3D
ObjectVector< MdcDigi > MdcDigiCol
SmartRefVector< RecCgemCluster > ClusterRefVec
Description of a Hit in Mdc.
Description of a track class (<- Helix.cc)
~KalFitTrack(void)
destructor
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]
ClusterRefVec getClusterRefVec()
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)
void setClusterRefVec(ClusterRefVec clusterRefVec)
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)
double chi2_next(KalmanFit::Helix &H, KalFitHitMdc &HitMdc, int csmflag)
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.