1#ifndef _DEFINE_KALFITTRACK_H_
2#define _DEFINE_KALFITTRACK_H_
6#ifndef ENABLE_BACKWARDS_COMPATIBILITY
11#include "KalFitAlg/helix/Helix.h"
12#include "KalFitAlg/coil/Bfield.h"
13#include "CLHEP/Geometry/Transform3D.h"
14#include "CLHEP/Geometry/Point3D.h"
15#include "CLHEP/Matrix/Vector.h"
16#include "CLHEP/Matrix/Matrix.h"
17#include "KalFitAlg/KalFitHitMdc.h"
18#include "KalFitAlg/KalFitHelixSeg.h"
19#include "MdcCalibFunSvc/MdcCalibFunSvc.h"
20#include "MagneticField/IMagneticFieldSvc.h"
21#include "MagneticField/MagneticFieldSvc.h"
22#include "MdcRawEvent/MdcDigi.h"
23#include "EventModel/Event.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,
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_; }
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_; }
229 vector<KalFitHitMdc>&
HitsMdc(
void) {
return HitsMdc_;}
234 vector<KalFitHelixSeg>&
HelixSegs(
void) {
return HelixSegs_;}
251 double getSigma(
int layerId,
double driftDist )
const;
325 static void LR(
int x);
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;
ObjectVector< MdcDigi > MdcDigiCol
HepGeom::Transform3D HepTransform3D
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)
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.
KalFitTrack(const HepPoint3D &pivot, const CLHEP::HepVector &a, const CLHEP::HepSymMatrix &Ea, unsigned int m, double chiSq, unsigned int nhits)
constructor
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
static void setMdcDigiCol(MdcDigiCol *digicol)
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
static double mass(int i)
void order_wirhit(int index)
double getSigma(KalFitHitMdc &hitmdc, double tanlam, int lr, double dist) const
HepSymMatrix getInitMatrix(void) const
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.
const HepPoint3D & pivot_numf(const HepPoint3D &newPivot, double &pathl)
double intersect_cylinder(double r) const
Intersection with different geometry.
double chiSq_back(void) const
const CLHEP::HepSymMatrix & Ea_last(void) const
void HitsMdc(vector< KalFitHitMdc > &lh)
vector< KalFitHitMdc > & HitsMdc(void)
double pathip(void) const
static void setInitMatrix(HepSymMatrix m)
void point_last(const HepPoint3D &point)
set and give out the last point of the track
void HelixSegs(vector< KalFitHelixSeg > &vs)
static int numf_
Flag for treatment of non-uniform mag field.
static void setMdcCalibFunSvc(const MdcCalibFunSvc *calibsvc)
void path_add(double path)
Update the path length estimation.
unsigned int nster(void) const
static double chi2mdc_hit2_
void appendHelixSegs(KalFitHelixSeg s)
double smoother_Mdc(KalFitHitMdc &HitMdc, CLHEP::Hep3Vector &meas, KalFitHelixSeg &seg, double &dchi2, int csmflag)
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
void tof(double path)
Update the tof estimation.
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]
static void setMagneticFieldSvc(IMagneticFieldSvc *)
static void setIMdcGeomSvc(IMdcGeomSvc *igeomsvc)
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 int numfcor_
NUMF treatment improved.
double chi2_next(Helix &H, KalFitHitMdc &HitMdc)
static int lead(void)
Magnetic field map.
double intersect_xy_plane(double z) const
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.
const HepVector & a(void) const
returns helix parameters.
const HepPoint3D & pivot(void) const
returns pivot position.