1 | //
|
---|
2 | #ifndef G__OBSTRK_H
|
---|
3 | #define G__OBSTRK_H
|
---|
4 | #include <TVector3.h>
|
---|
5 | #include <TVectorD.h>
|
---|
6 | #include <TMatrixDSym.h>
|
---|
7 | #include <TDecompChol.h>
|
---|
8 | #include "SolGridCov.h"
|
---|
9 | //
|
---|
10 | // Class to handle smearing of generated charged particle tracks
|
---|
11 | //
|
---|
12 | // Author: F. Bedeschi
|
---|
13 | // INFN - Sezione di Pisa, Italy
|
---|
14 | //
|
---|
15 | class ObsTrk{
|
---|
16 | //
|
---|
17 | // Class to handle simulation of tracking resolution
|
---|
18 | // Prefix Obs marks variables after resolution smearing
|
---|
19 | // Prefix Gen marks variables before resolution smearing
|
---|
20 | //
|
---|
21 | private:
|
---|
22 | Double_t fB; // Solenoid magnetic field
|
---|
23 | SolGridCov *fGC; // Covariance matrix grid
|
---|
24 | Double_t fGenQ; // Generated track charge
|
---|
25 | Double_t fObsQ; // Observed track charge
|
---|
26 | TVector3 fGenX; // Generated track origin (x,y,z)
|
---|
27 | TVector3 fObsX; // Observed track origin (x,y,z) @ track min. approach
|
---|
28 | TVector3 fGenP; // Generated track momentum at track origin
|
---|
29 | TVector3 fObsP; // Observed track momentum @ track minimum approach
|
---|
30 | TVectorD fGenPar; // Generated helix track parameters (D, phi0, C, z0, cot(th))
|
---|
31 | TVectorD fGenParACTS; // Generated helix track parameters (D, z0, phi0, th, q/p, time)
|
---|
32 | TVectorD fObsPar; // Observed helix track parameters (D, phi0, C, z0, cot(th))
|
---|
33 | TVectorD fObsParACTS; // Observed helix track parameters (D, z0, phi0, th, q/p, time)
|
---|
34 | TMatrixDSym fCov; // INterpolated covariance of track parameters
|
---|
35 | TMatrixDSym fCovACTS; // Covariance of track parameters in ACTS format
|
---|
36 | // (D, z0, phi0, theta, q/p, time)
|
---|
37 | //
|
---|
38 | // Conversion to ACTS parametrization
|
---|
39 | //
|
---|
40 | TVectorD ParToACTS(TVectorD Par); // Parameter conversion
|
---|
41 | TMatrixDSym CovToACTS(TMatrixDSym Cov); // Covariance conversion
|
---|
42 | //
|
---|
43 | public:
|
---|
44 | //
|
---|
45 | // Constructors
|
---|
46 | // x(3) track origin, p(3) track momentum at origin, Q charge, B magnetic field in Tesla
|
---|
47 | ObsTrk(TVector3 x, TVector3 p, Double_t Q, Double_t B, SolGridCov *GC); // Initialize and generate smeared track
|
---|
48 | // Destructor
|
---|
49 | ~ObsTrk();
|
---|
50 | //
|
---|
51 | // Service routines
|
---|
52 | //
|
---|
53 | TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q);
|
---|
54 | TVectorD GenToObsPar(TVectorD gPar, SolGridCov *GC);
|
---|
55 | TVector3 ParToX(TVectorD Par);
|
---|
56 | TVector3 ParToP(TVectorD Par);
|
---|
57 | Double_t ParToQ(TVectorD Par);
|
---|
58 | //
|
---|
59 | // Accessors
|
---|
60 | //
|
---|
61 | // Generator level:
|
---|
62 | // X, P, Q
|
---|
63 | Double_t GetGenQ() { return fGenQ; }
|
---|
64 | TVector3 GetGenX() { return fGenX; }
|
---|
65 | TVector3 GetGenP() { return fGenP; }
|
---|
66 | // D, phi0, C, z0, cot(th)
|
---|
67 | TVectorD GetGenPar() { return fGenPar; }
|
---|
68 | // D, z0, phi0, theta, q/p, time
|
---|
69 | TVectorD GetGenParACTS() { return fGenParACTS; }
|
---|
70 | // Observed level X, P, Q
|
---|
71 | Double_t GetObsQ() { return fObsQ; }
|
---|
72 | TVector3 GetObsX() { return fObsX; }
|
---|
73 | TVector3 GetObsP() { return fObsP; }
|
---|
74 | // D, phi0, C, z0, cot(th)
|
---|
75 | TVectorD GetObsPar() { return fObsPar; }
|
---|
76 | // D, z0, phi0, theta, q/p, time
|
---|
77 | TVectorD GetObsParACTS() { return fObsParACTS; }
|
---|
78 | // Covariances
|
---|
79 | TMatrixDSym GetCov(){ return fCov; }
|
---|
80 | TMatrixDSym GetCovACTS(){ return fCovACTS; };
|
---|
81 | };
|
---|
82 |
|
---|
83 | #endif
|
---|