220 likes | 227 Views
Recent results from Kalman track fitting. WANG Dayong Oct.26,2005. outline. Progress and status of KalFit Some words for memory leakage problem Present performance of the package. Progress and status of KalFit. Software re-arrange and evolvement Improved event model for TDS and DST
E N D
Recent results from Kalman track fitting WANG Dayong Oct.26,2005
outline • Progress and status of KalFit • Some words for memory leakage problem • Present performance of the package
Progress and status of KalFit • Software re-arrange and evolvement • Improved event model for TDS and DST • Calculation of path length total&in each layer • Performance study and detailed debugging • Memory leakage • Running with MdcTrkRecon • Running together with TrkReco
int m_id; float m_mass; // mass assumption during the fit float m_length; //track path length from closest point to coord. origin to the last hit float m_tof; // time of flight correspond to length; int m_nhits; // number of total hits contained int m_stat; // status flag float m_chisq[2]; // chi square of fit 0:filter 1:smoother float m_ndf[2]; // degree of freedom for the fit 0:filter 1:smoother float m_pathl[43]; // path length in each layer HepVector m_zhelix; // 5 track parameters at zero point HepPoint3D m_zpivot; // position of pivot at zero point HepSymMatrix m_zerror; // error matrix at zero point HepVector m_fhelix; // 5 track parameters at 1st hit HepPoint3D m_fpivot; // position of pivot at 1st hit HepSymMatrix m_ferror; // error matrix at 1st hit HepVector m_lhelix; // 5 track parameters at last hit HepPoint3D m_lpivot; // position of pivot at last hit HepSymMatrix m_lerror; // error matrix at last hit Old reconstruction event model
int m_id; float m_mass[5]; // mass assumption during the fit float m_length[5]; //track path length from closest point to coord. origin to the last hit float m_tof[5]; // time of flight correspond to length; int m_nhits[5]; // number of total hits contained int m_stat[5]; // status flag float m_chisq[2][5]; // chi square of fit 0:filter 1:smoother float m_ndf[2][5]; // degree of freedom for the fit 0:filter 1:smoother HepVector m_zhelix; // 5 track parameters at zero point for pion HepSymMatrix m_zerror; // error matrix at zero point for pion HepVector m_zhelix_e; // 5 track parameters at zero point for electron HepSymMatrix m_zerror_e; // error matrix at zero point for electron HepVector m_zhelix_mu; // 5 track parameters at zero point for muon HepSymMatrix m_zerror_mu; // error matrix at zero point for muon HepVector m_zhelix_k; // 5 track parameters at zero point for kaon HepSymMatrix m_zerror_k; // error matrix at zero point for kaon HepVector m_zhelix_p; // 5 track parameters at zero point for proton HepSymMatrix m_zerror_p; // error matrix at zero point for proton HepVector m_lhelix; // 5 track parameters at last hit for pion HepSymMatrix m_lerror; // error matrix at last hit for pion HepVector m_lhelix_e; // 5 track parameters at last hit for pion HepSymMatrix m_lerror_e; // error matrix at last hit for pion HepVector m_lhelix_mu; // 5 track parameters at last hit for pion HepSymMatrix m_lerror_mu; // error matrix at last hit for pion HepVector m_lhelix_k; // 5 track parameters at last hit for pion HepSymMatrix m_lerror_k; // error matrix at last hit for pion HepVector m_lhelix_p; // 5 track parameters at last hit for pion HepSymMatrix m_lerror_p; // error matrix at last hit for pion New event model for reconstruction and DST
memory leakage problem • Problem description • Sources of memory leakage I encountered a. unmathed “new” or “alloc” b. condition skipped c. bad-writtern deconstructors d. problems in event model design • Problems unresolved
MdcRecEvent Model: a problem • If MdcRecHitCol not registered, Gaudi could not take care of everything • If we delete objects,conficts; if not obvious memory leak;
Possible solutions • Bi-directional relation preserved ,using vector(or SmartRef) of object itself • Only trk->vechits relation maintained, reverse relation with other means( e.g, id), MdcRecHitCol is independent • MdcRecHit modeled as a common class and no longer using MdcRecHitCol
Present performance • Run smoothly with both Pattern Recognition algorithms • Similar helix results can be obtained compared to 3-D Helix fitting • Material parameters compared to MC: difffences exist, but not substantial • Material effects correction can make the helix parameters better • No obvious efficiency loss
1.0GeV/c Muon, theta=90degreeTrkReco+KalFit Entries 998 Mean 1.00 Sigma 0.005759
1.0GeV/c Muon, theta=90degreeTrkReco Entries 998 Mean 0.9999 Sigma 0.005743
1.0GeV/c Muon, theta=90degreeMdcTrkRecon+KalFit Entries 1000 Mean 1.00 Sigma 0.005459
1.0GeV/c Muon, theta=90degreeMdcTrkRecon Entries 1000 Mean 0.9999 Sigma 0.005566
Some estimations • For He/C3H8(60/40), I=43.9eV, from Bethe-Bloch formula, for M.I.P, energy loss is about 1.1keV/cm, for Mdc, L~80cm, dE~90KeV(for small p,L is longer,dE is larger). For Al barrel in MC,d~1mm, 1.615MeV/g/cm2*2.7g/cm3~4.36MeV/cm,so in Al, dE~0.44MeV. For 400MeV/c proton, Beta*gamma~0.43,energy loss ~4 MIP, so totally MIP~0.8MeV. • From E-p relation, dP=dE/beta~2MeV • For helix fitting, its parameter is something of an average, so the differences of momentum should be half of dP,i.e,~1MeV • From the figures below, this argument roughly holds.
0.4GeV/c Proton, theta=90degreeTrkReco+KalFit Entries 993 Mean 0.03915 Sigma 0.002117
0.4GeV/c Proton, theta=90degreeTrkReco Entries 993 Mean 0.03903 Sigma 0.002144
0.4GeV/c Proton, theta=90degreeMdcTrkRecon+KalFit Entries 988 Mean 0.3910 Sigma 0.002092
0.4GeV/c Proton, theta=90degreeMdcTrkRecon Entries 988 Mean 0.3901 Sigma 0.002079
0.4GeV/c Proton, theta=90degree Mean 0.006134 Sigma 0.05802 Mean 0.02898 Sigma 0.05809
0.4GeV/c Proton, theta=90degree Mean 2.555 Sigma 0.01729 Mean 2.563 Sigma 0. 01754 Mean 0.05201 Sigma 0.2271 Mean 0.0520 Sigma 0. 2270
0.4GeV/c Proton, theta=90degree Mean -0.002364 Sigma 0.01272 Mean -0.002364 Sigma 0.01272
Further check • More events with broader range of momentum and particle type • Using physics event to check • Using kinematic fitting to check error matrix thus given • Algorithm checking : stereo wires • Users are welcome to try it to help improvements