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"
24#include "MdcRecEvent/RecMdcTrack.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,
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_; }
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_; }
234 vector<KalFitHitMdc>&
HitsMdc(
void) {
return HitsMdc_;}
239 vector<KalFitHelixSeg>&
HelixSegs(
void) {
return HelixSegs_;}
258 double getSigma(
int layerId,
double driftDist )
const;
332 static void LR(
int x);
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;
ObjectVector< MdcDigi > MdcDigiCol
SmartRefVector< RecCgemCluster > ClusterRefVec
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]
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
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)
void setClusterRefVec(ClusterRefVec clusterRefVec)
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.
double update_hits(RecCgemCluster *Cluster, double recR, int way, int csmflag)
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.