Fork me on GitHub

source: git/external/TrackCovariance/TrkUtil.h@ 4acf2fd

Last change on this file since 4acf2fd was a47edcc, checked in by Franco BEDESCHI <bed@…>, 4 years ago

Fixed issue with backward generated tracks

  • Property mode set to 100644
File size: 2.5 KB
Line 
1//
2#ifndef G__TRKUTIL_H
3#define G__TRKUTIL_H
4//
5#include <TVector3.h>
6#include <TVectorD.h>
7#include <TMatrixDSym.h>
8#include <TRandom.h>
9//
10//
11// Class test
12
13class TrkUtil {
14 //
15 //
16protected:
17 Double_t fBz; // Solenoid magnetic field
18 //
19 Int_t fGasSel; // Gas selection: 0: He-Iso, 1: He, 2:Ar-Eth, 3: Ar
20 Double_t fRmin; // Lower DCH radius
21 Double_t fRmax; // Higher DCH radius
22 Double_t fZmin; // Lower DCH z
23 Double_t fZmax; // Higher DCH z
24 //
25 // Service routines
26 //
27 void SetB(Double_t Bz) { fBz = Bz; }
28 TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q);
29 TVector3 ParToP(TVectorD Par);
30 //
31 // Conversion to ACTS parametrization
32 //
33 TVectorD ParToACTS(TVectorD Par); // Parameter conversion
34 TMatrixDSym CovToACTS(TVectorD Par, TMatrixDSym Cov); // Covariance conversion
35 //
36 // Conversion to ILC parametrization
37 //
38 TVectorD ParToILC(TVectorD Par); // Parameter conversion
39 TMatrixDSym CovToILC(TMatrixDSym Cov); // Covariance conversion
40 //
41
42public:
43 //
44 // Constructors
45 TrkUtil();
46 TrkUtil(Double_t Bz);
47 // Destructor
48 ~TrkUtil();
49 //
50 // Overload methods to allow call without instantiating class
51 //
52 static Double_t cSpeed()
53 {
54 Double_t c = 2.99792458e8; // speed of light m/sec
55 //return TMath::C()*1.0e-9; // Incompatible with root5
56 return c*1.0e-9; // Reduced speed of light
57 }
58 //
59 // Service routines
60 //
61 static TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q, Double_t Bz);
62 static TVector3 ParToX(TVectorD Par); // position of minimum distance from z axis
63 static TVector3 ParToP(TVectorD Par, Double_t Bz); // Get Momentum from track parameters
64 static Double_t ParToQ(TVectorD Par); // Get track charge
65 //
66 // Conversion from meters to mm
67 //
68 static TVectorD ParToMm(TVectorD Par); // Parameter conversion
69 static TMatrixDSym CovToMm(TMatrixDSym Cov); // Covariance conversion
70 //
71 // Cluster counting in gas
72 //
73 void SetBfield(Double_t Bz) { fBz = Bz; }
74 // Define gas volume (units = meters)
75 void SetDchBoundaries(Double_t Rmin, Double_t Rmax, Double_t Zmin, Double_t Zmax);
76 // Gas mixture selection
77 void SetGasMix(Int_t Opt);
78 // Get number of ionization clusters
79 Bool_t IonClusters(Double_t &Ncl, Double_t mass, TVectorD Par);
80 Double_t Nclusters(Double_t bgam); // mean clusters/meter vs beta*gamma
81 static Double_t Nclusters(Double_t bgam, Int_t Opt); // mean clusters/meter vs beta*gamma
82 Double_t funcNcl(Double_t *xp, Double_t *par);
83 Double_t TrkLen(TVectorD Par); // Track length inside chamber
84};
85
86#endif
Note: See TracBrowser for help on using the repository browser.