/Home/aooliver/hepsoft/lcdroot/LCDRootApps/PhUtil/inc/LCDVToplTRK.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // $Id: LCDVToplTRK.h,v 1.4 2001/10/08 17:52:21 toshi Exp $
00003 // ----------------------------------------------------------------------------
00004 //
00005 // LCDVToplTRKS.h
00006 //
00007 // August 15,2000 Masako & Toshi, original version copied from D.Jackson's
00008 //                ZVTOP3
00009 // 
00010 #ifndef LCDVTOPLTRK_H
00011 #define LCDVTOPLTRK_H
00012 
00013 #include "TObjArray.h"
00014 #include "TVector3.h"
00015 #include "TMatrixD.h"
00016 #include "LCDTrack.h"
00017 
00018 class LCDVToplVRT;
00019 
00020 class LCDVToplTRK: public TObject {
00021  
00022 public:
00023   //constructor & deconstructor
00024   LCDVToplTRK();
00025   LCDVToplTRK(Int_t tkid, Double_t* tkpar, Double_t* e_tkpar, 
00026               Double_t chrg,
00027               Double_t mfld, Int_t mc_ind, const TVector3& ipv);
00028   LCDVToplTRK(TObjArray* trk_list,Int_t trk_id, const TVector3& ipv);
00029   ~LCDVToplTRK() {}
00030   
00031   //
00032   // ----------------------< Getters >--------------------------------
00033   //
00034   Int_t      GetTrackID()               { return m_track_id     ; }
00035   Double_t   GetTrackParameter(Int_t i) { return m_trackPar[i]  ; }
00036   Double_t*  GetTrackParameters()       { return m_trackPar     ; }
00037   Double_t   GetCharge()                { return m_charge       ; }
00038   Double_t   GetMagneticField()         { return m_magneticfield; }
00039   Int_t      GetParticle()              { return m_index        ; }
00040   Int_t      GetTrkVal()                { return m_trkval       ; }
00041   
00042   Double_t   GetPositionX(Double_t l=0.0);
00043   Double_t   GetPositionY(Double_t l=0.0);
00044   Double_t   GetPositionZ(Double_t l=0.0);
00045   TVector3   GetPositionVector(Double_t l=0.0);
00046   Double_t   GetMomentumPx(Double_t l=0.0);
00047   Double_t   GetMomentumPy(Double_t l=0.0);
00048   Double_t   GetMomentumPz(Double_t l=0.0);
00049   TVector3   GetMomentumVector(Double_t l=0.0);
00050   Double_t   GetTsi(Double_t l, const TVector3& ipv);
00051   Double_t   GetEta(Double_t l, const TVector3& ipv);
00052   Double_t   GetTrackChiSqContrib(const TVector3& xvrt, const TVector3& ipv,
00053                                   Int_t f_debug=0);
00054   Double_t   GetTrackProbabirity(const TVector3& xvrt, const TVector3& ipv);
00055   Double_t   GetDistance(Double_t l, const TVector3& xvrt);
00056   Double_t   GetDistance(Double_t l,
00057                          Double_t x_from, Double_t y_from, Double_t z_from);
00058   Double_t   GetDistance2D(Double_t l,
00059                            Double_t x_from, Double_t y_from);
00060   Double_t   GetSignedDistance(const TVector3& x_from, const TVector3& pjet);
00061   Double_t   GetSignedDistance(Double_t l,
00062                                const TVector3& x_from, const TVector3& pjet);
00063   Double_t   GetSignedDistance2D(Double_t l,const TVector3& xfrom,
00064                                  const TVector3& pjet);
00065   Double_t   GetDistanceNormByError(const TVector3& x_from);
00066   Double_t   GetDistanceNormByError(Double_t l, const TVector3& x_from);
00067   Double_t   GetDistanceNormByError(const TVector3& x_from, TMatrixD& ex_from);
00068   Double_t   GetDistanceNormByError(Double_t l, const TVector3& x_from, 
00069                                     TMatrixD& ex_from);
00070   Double_t   GetSignedDistanceNormByError(const TVector3& x_from, 
00071                                           const TVector3& pjet);
00072   Double_t   GetSignedDistanceNormByError(Double_t l, const TVector3& x_from, 
00073                                           const TVector3& pjet);
00074   Double_t   GetSignedDistanceNormByError(const TVector3& x_from, 
00075                                           const TVector3& pjet, 
00076                                           TMatrixD& ex_from);
00077   Double_t   GetSignedDistanceNormByError(Double_t l,
00078                                           const TVector3& x_from, 
00079                                           const TVector3& pjet, 
00080                                           TMatrixD& ex_from);
00081   Double_t   GetSignedDistance2DNormByError(Double_t l,
00082                                             const TVector3& xfrom, 
00083                                             const TVector3& pjet, 
00084                                             const TMatrixD& ex_from);
00085   
00086   Double_t   GetTrdi(Double_t l, const TVector3& ipv, const TVector3& xvrt);
00087   Double_t   GetTrdi(const TVector3& ipv, const TVector3& xvrt);
00088   Double_t   GetLodi(Double_t l, const TVector3& ipv, const TVector3& xvrt);
00089   Double_t   GetLodi(const TVector3& ipv, const TVector3& xvrt);
00090   void       GetTrdiLodi(Double_t l, const TVector3& ipv, const TVector3& xvt,
00091                          Double_t* trdi, Double_t* lodi);
00092   void       GetTrdiLodiAnta(Double_t l,
00093                              const TVector3& ipv, const TVector3& xvt,
00094                              Double_t* trdi, Double_t* lodi, Double_t* anta);
00095   
00096   Double_t   GetErrorMatrixElement(Int_t i, Int_t j);
00097   Double_t*  GetErrorTrackParameters() { return m_trackErrorMatrix; }
00098   void       GetErrorMatrix(TMatrixD& em);
00099   void       GetErrorMatrixPosition(Double_t l, TMatrixD& em);
00100   void       GetErrorMatrixMomentum(Double_t l, TMatrixD& em);
00101   Double_t   GetErrorTsi(Double_t l, const TVector3& ipv);
00102   Double_t   GetErrorTsiApprox(Double_t l);
00103   Double_t   GetErrorEta(Double_t l, const TVector3& ipv);
00104   Double_t   GetErrorEtaApprox(Double_t l);
00105   Double_t   GetErrorDistance(Double_t l, const TVector3& xvrt);
00106   Double_t   GetErrorDistance(Double_t l,
00107                               Double_t x_from, 
00108                               Double_t y_from, 
00109                               Double_t z_from);
00110   Double_t   GetErrorDistance(Double_t l, 
00111                               const TVector3& x_from, TMatrixD& ex_from);
00112   Double_t   GetErrorDistance(Double_t l,
00113                               Double_t x_from, 
00114                               Double_t y_from, 
00115                               Double_t z_from,
00116                               TMatrixD& ex_from);
00117   Double_t   GetErrorDistance2D(Double_t l,Double_t x_from, Double_t y_from);
00118   Double_t   GetErrorDistance2D(Double_t l,Double_t x_from, Double_t y_from,
00119                                 const TMatrixD& ex_from);
00120   Double_t   GetErrorDistanceZ(Double_t l,Double_t z_from);
00121   Double_t   GetErrorDistanceZ(Double_t l,Double_t z_from, 
00122                                const TMatrixD& ex_from);
00123   void       GetdxdaT(Double_t l, TMatrixD& dxda);
00124   void       GetdpdaT(Double_t l, TMatrixD& dpda);
00125   void       GetdddaT(Double_t l, 
00126                       Double_t x_from, Double_t y_from, Double_t z_from,
00127                       TMatrixD& ddda);
00128   void       GetdddaT2D(Double_t l, 
00129                         Double_t x_from, Double_t y_from,
00130                         TMatrixD& ddda);
00131   void       Getd2xd2l(Double_t l, TMatrixD& d2xd2l);
00132   void       Getdxdl(Double_t l, TMatrixD& dxdl);
00133   TVector3   GetdxdlVector(Double_t l);
00134   Double_t   GetLminTrdiApprox(const TVector3& xfrom,const TVector3& xto);
00135   Double_t   GetLminTrdiApprox(Double_t l0,
00136                                const TVector3& xfrom,const TVector3& xto);
00137   Double_t   GetLminTrdi(const TVector3& xfrom,const TVector3& xto);
00138   Double_t   GetLminTrdi(Double_t l0, 
00139                          const TVector3& xfrom,const TVector3& xto);
00140   Double_t   GetdTrdi2dl(Double_t l,
00141                          const TVector3& xfrom, const TVector3& xto);
00142   Double_t   Getd2Trdi2d2l(Double_t l, 
00143                            const TVector3& xfrom, const TVector3& xto);
00144   
00145   
00146   Int_t          GetVertexEntries()   { return m_nvrt        ; }
00147   LCDVToplVRT*   GetVertexAt(Int_t i) { return m_vertex_list[i]; }
00148   
00149   Int_t      GetV0flag() { return m_v0flag; }
00150   
00151   Double_t   GetLPOCA2(const TVector3& xpt);
00152   
00153   Int_t GetMcFlav() { return m_mcflav; }
00154 
00155   //
00156   // ----------------------< Setters >--------------------------------
00157   //
00158   void SetTrackParameterAt(Double_t a, Int_t i) { m_trackPar[i]=a ; }
00159   void SetTrkVal(Int_t a) { m_trkval=a; }
00160   void SetV0flag(Int_t a) { m_v0flag=a; }
00161   void SetUp(Int_t tkid, Double_t* tkpar, Double_t* e_tkpar, 
00162              Double_t chrg,
00163              Double_t mfld, Int_t mc_ind, const TVector3& ipv);
00164   void SetMcFlav(Int_t a) { m_mcflav=a; }
00165   void SetVertexEntries(Int_t a)   { m_nvrt=a; }
00166   void SetVertexAt(LCDVToplVRT* a, Int_t i) { m_vertex_list[i]=a; }
00167 
00168   //
00169   // ----------------------< Adders >--------------------------------
00170   //
00171   void       AddVertex(LCDVToplVRT*);
00172   void       AddVertexAt(LCDVToplVRT*,Int_t);
00173 
00174   //
00175   // ----------------------< Removers >--------------------------------
00176   //
00177   void       RemoveVertex(LCDVToplVRT*);
00178   void       RemoveVertexAt(Int_t);
00179 
00180   //
00181   // ----------------------< Miscellaneous >--------------------------------
00182   //
00183   LCDVToplVRT** Vertices() { return m_vertex_list; };  
00184   void       CompressVerticesList();
00185 
00186   Double_t   CalcPOCA3(Double_t l,const TVector3& xpt);
00187   Double_t   CalcPOCA3(const TVector3& xpt);
00188   
00189   Double_t   dlen2(Double_t, const TVector3&);
00190   Double_t   ddlen2dl(Double_t,const TVector3&);
00191   Double_t   d2dlen2d2l(Double_t, const TVector3&);
00192 
00193 private:
00194   Int_t    m_track_id;     //id of track of LCDTrack
00195   
00196   Double_t m_trackPar[5];  // helix parameters
00197   // 0   d0
00198   // 1   phi0
00199   // 2   omega=(-Q/rho) <0  charge +   
00200   //                    >0  charge -
00201   // 3   z0
00202   // 4   s(=tan_L)
00203 
00204   Double_t m_trackErrorMatrix[15];   // error matrix of helix parameters
00205   // m_trackErrorMatrix[ 0] = sigma(0)*sigma(0)
00206   // m_trackErrorMatrix[ 1] = sigma(1)*sigma(0)
00207   // m_trackErrorMatrix[ 2] = sigma(1)*sigma(1)
00208   // m_trackErrorMatrix[ 3] = sigma(2)*sigma(0)
00209   // m_trackErrorMatrix[ 4] = sigma(2)*sigma(1)
00210   // m_trackErrorMatrix[ 5] = sigma(2)*sigma(2)
00211   // m_trackErrorMatrix[ 6] = sigma(3)*sigma(0)
00212   // m_trackErrorMatrix[ 7] = sigma(3)*sigma(1)
00213   // m_trackErrorMatrix[ 8] = sigma(3)*sigma(2)
00214   // m_trackErrorMatrix[ 9] = sigma(3)*sigma(3)
00215   // m_trackErrorMatrix[10] = sigma(4)*sigma(0)
00216   // m_trackErrorMatrix[11] = sigma(4)*sigma(1)
00217   // m_trackErrorMatrix[12] = sigma(4)*sigma(2)
00218   // m_trackErrorMatrix[13] = sigma(4)*sigma(3)
00219   // m_trackErrorMatrix[14] = sigma(4)*sigma(4)
00220 
00221   Float_t  m_charge;        // Charge of the particle
00222   Float_t  m_magneticfield; // Magnetic Filed
00223   Int_t    m_index;         // Index to the McPart object responsible for the track
00224   
00225   Int_t        m_nvrt;             // Number of vertices which is accociated with this track
00226   LCDVToplVRT *m_vertex_list[100]; //! vertex list
00227 
00228   Int_t    m_trkval; //if seed=1, attached=2, else =0
00229 
00230   Double_t m_rmax;
00231   Double_t m_err_tsi[3]; //error**2 of tsi at CA.
00232   Double_t m_err_eta[3]; //error**2 of eta at CA.
00233 
00234   Int_t    m_v0flag; //if =1:gamma conversion =2:k0s =3:lambda
00235 
00236   Int_t    m_mcflav;
00237 
00238   void Init(); //Initialize.
00239 
00240   void Init(Int_t tkid, Double_t* tkpar, Double_t* e_tkpar, 
00241             Double_t chrg, Double_t mfld, Int_t mc_ind,
00242             const TVector3& ipv); //Initialize.
00243 
00244 public:
00245   ClassDef(LCDVToplTRK,3) // a track class for topological vertexing.
00246 
00247 };
00248 
00249 #endif

Generated on Tue Jul 18 18:33:57 2006 for LCDROOT by  doxygen 1.4.6