Fork me on GitHub

Ignore:
Timestamp:
Nov 29, 2021, 3:18:22 PM (3 years ago)
Author:
Franco BEDESCHI <bed@…>
Branches:
master
Children:
bd376e3
Parents:
9a7ea36
Message:

Major update to handle highly displaced tracks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/TrackCovariance/TrkUtil.h

    r9a7ea36 rebf40fd  
    2828        TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q);
    2929        TVector3 ParToP(TVectorD Par);
     30        TMatrixDSym RegInv(TMatrixDSym& Min);
     31        //
     32        // Track trajectory derivatives
     33        TMatrixD derXdPar(TVectorD par, Double_t s);    // derivatives of position wrt parameters
     34        TVectorD derXds(TVectorD par, Double_t s);              // derivatives of position wrt phase
     35        TVectorD dsdPar_R(TVectorD par, Double_t R);    // derivatives of phase at constant R
     36        TVectorD dsdPar_z(TVectorD par, Double_t z);    // derivatives of phase at constant z
    3037        //
    3138        // Conversion to ACTS parametrization
     
    5461                Double_t c = 2.99792458e8;      // speed of light m/sec
    5562                //return TMath::C()*1.0e-9;     // Incompatible with root5
    56                 return c*1.0e-9;                // Reduced speed of light       
     63                return c*1.0e-9;                        // Reduced speed of light       
    5764        }
    5865        //
     
    6370        static TVector3 ParToP(TVectorD Par, Double_t Bz);      // Get Momentum from track parameters
    6471        static Double_t ParToQ(TVectorD Par);                           // Get track charge
     72        static void LineDistance(TVector3 x0, TVector3 y0, TVector3 dirx, TVector3 diry, Double_t &sx, Double_t &sy, Double_t &distance);
     73        //
     74        // Track trajectory
     75        //
     76        static TVector3 Xtrack(TVectorD par, Double_t s);               // Parametric track trajectory
     77        TVectorD derRphi_R(TVectorD par, Double_t R);   // Derivatives of R-phi at constant R
     78        TVectorD derZ_R(TVectorD par, Double_t R);              // Derivatives of z at constant R
     79        TVectorD derRphi_Z(TVectorD par, Double_t z);   // Derivatives of R-phi at constant z
     80        TVectorD derR_Z(TVectorD par, Double_t z);              // Derivatives of R at constant z
     81        //
     82        // Smear with given covariance matrix
     83        //
     84        static TVectorD CovSmear(TVectorD x, TMatrixDSym C);
    6585        //
    6686        // Conversion from meters to mm
     
    6888        static TVectorD ParToMm(TVectorD Par);                  // Parameter conversion
    6989        static TMatrixDSym CovToMm(TMatrixDSym Cov);    // Covariance conversion
     90        //
     91        // Inside cylindrical volume
     92        //
     93        static Bool_t IsInside(TVector3 x, Double_t Rout, Double_t Zmin, Double_t Zmax)
     94        {
     95                Bool_t Is = kFALSE;
     96                if (x.Pt() <= Rout && x.z() >= Zmin && x.z() <= Zmax)Is = kTRUE;
     97                return Is;
     98        }
    7099        //
    71100        // Cluster counting in gas
Note: See TracChangeset for help on using the changeset viewer.