Fork me on GitHub

Ignore:
Timestamp:
Nov 29, 2021, 4:04:38 PM (3 years ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
0c0c9af
Parents:
9a7ea36 (diff), bd376e3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Michele Selvaggi <michele.selvaggi@…> (11/29/21 16:04:38)
git-committer:
GitHub <noreply@…> (11/29/21 16:04:38)
Message:

Merge pull request #102 from fbedesch/master

Major update to handle highly displaced tracks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/TrackCovariance/TrkUtil.h

    r9a7ea36 r0b8551f  
    77#include <TMatrixDSym.h>
    88#include <TRandom.h>
     9#include <TMath.h>
    910//
    1011//
     
    2829        TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q);
    2930        TVector3 ParToP(TVectorD Par);
     31        TMatrixDSym RegInv(TMatrixDSym& Min);
     32        //
     33        // Track trajectory derivatives
     34        TMatrixD derXdPar(TVectorD par, Double_t s);    // derivatives of position wrt parameters
     35        TVectorD derXds(TVectorD par, Double_t s);              // derivatives of position wrt phase
     36        TVectorD dsdPar_R(TVectorD par, Double_t R);    // derivatives of phase at constant R
     37        TVectorD dsdPar_z(TVectorD par, Double_t z);    // derivatives of phase at constant z
    3038        //
    3139        // Conversion to ACTS parametrization
     
    5462                Double_t c = 2.99792458e8;      // speed of light m/sec
    5563                //return TMath::C()*1.0e-9;     // Incompatible with root5
    56                 return c*1.0e-9;                // Reduced speed of light       
     64                return c*1.0e-9;                        // Reduced speed of light       
    5765        }
    5866        //
     
    6371        static TVector3 ParToP(TVectorD Par, Double_t Bz);      // Get Momentum from track parameters
    6472        static Double_t ParToQ(TVectorD Par);                           // Get track charge
     73        static void LineDistance(TVector3 x0, TVector3 y0, TVector3 dirx, TVector3 diry, Double_t &sx, Double_t &sy, Double_t &distance);
     74        //
     75        // Track trajectory
     76        //
     77        static TVector3 Xtrack(TVectorD par, Double_t s);               // Parametric track trajectory
     78        TVectorD derRphi_R(TVectorD par, Double_t R);   // Derivatives of R-phi at constant R
     79        TVectorD derZ_R(TVectorD par, Double_t R);              // Derivatives of z at constant R
     80        TVectorD derRphi_Z(TVectorD par, Double_t z);   // Derivatives of R-phi at constant z
     81        TVectorD derR_Z(TVectorD par, Double_t z);              // Derivatives of R at constant z
     82        //
     83        // Smear with given covariance matrix
     84        //
     85        static TVectorD CovSmear(TVectorD x, TMatrixDSym C);
    6586        //
    6687        // Conversion from meters to mm
     
    6889        static TVectorD ParToMm(TVectorD Par);                  // Parameter conversion
    6990        static TMatrixDSym CovToMm(TMatrixDSym Cov);    // Covariance conversion
     91        //
     92        // Inside cylindrical volume
     93        //
     94        static Bool_t IsInside(TVector3 x, Double_t Rout, Double_t Zmin, Double_t Zmax)
     95        {
     96                Bool_t Is = kFALSE;
     97                if (x.Pt() <= Rout && x.z() >= Zmin && x.z() <= Zmax)Is = kTRUE;
     98                return Is;
     99        }
    70100        //
    71101        // Cluster counting in gas
Note: See TracChangeset for help on using the changeset viewer.