EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairGeaneUtil.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairGeaneUtil.h
1 #ifndef FAIRGEANEUTIL_H
2 #define FAIRGEANEUTIL_H
3 
4 #include "FairTrackPar.h"
5 #include "TVector3.h"
6 
7 
8 class FairGeaneUtil : public TObject
9 {
10 
11  public:
12  FairGeaneUtil();
14 
15  // frame changing
16  void FromPtToSC(Double_t PC[3], Double_t RC[15],
17  Double_t* PD, Double_t* RD, Int_t& IERR);
18 
19  void FromPtToSD(Double_t PD[3], Double_t RD[15], Double_t H[3],Int_t CH,
20  Double_t SPU, Double_t DJ[2], Double_t DK[2],
21  Int_t& IERR, Double_t* PC, Double_t* RC);
22 
23  void FromSCToPt(Double_t PC[3], Double_t RC[15],
24  Double_t* PD, Double_t* RD, Int_t& IERR);
25 
26  void FromSCToSD(Double_t PC[3], Double_t RC[15], Double_t H[3], Int_t CH,
27  Double_t DJ[3], Double_t DK[3],
28  Int_t& IERR, Double_t& SPU,
29  Double_t* PD, Double_t* RD);
30 
31  void FromSD1ToSD2(Double_t PD1[2], Double_t RD1[15],Double_t H[2],
32  Int_t CH, Double_t SP1,
33  Double_t DJ1[2], Double_t DK1[2],
34  Double_t DJ2[2], Double_t DK2[2],
35  Int_t& IERR, Double_t& SP2,
36  Double_t* PD2, Double_t* RD2);
37 
38  void FromSDToPt(Double_t PD[3], Double_t RD[15], Double_t H[3],
39  Int_t CH, Double_t SPU, Double_t DJ[3], Double_t DK[3],
40  Int_t& IERR, Double_t* PC, Double_t* RC);
41 
42  void FromSDToSC(Double_t PD[3], Double_t RD[15], Double_t H[3], Int_t CH,
43  Double_t SPU, Double_t DJ[3], Double_t DK[3],
44  Int_t& IERR, Double_t* PC, Double_t* RC);
45 
46  typedef Double_t sixMat[6][6];
47  void FromSCToMars(Double_t PC[3], Double_t RC[15], Double_t H[3], Int_t CH,
48  Double_t* PD, sixMat& RD);
49 
50  void FromMarsToSC(Double_t PD[3], Double_t RD[6][6], Double_t H[3],
51  Int_t CH,
52  Double_t* PC, Double_t* RC);
53 
54  void FromSDToMars(Double_t PC[3], Double_t RC[15],
55  Double_t H[3], Int_t CH,
56  Double_t SP1, Double_t DJ1[3], Double_t DK1[3],
57  Double_t* PD, sixMat& RD);
58 
59  void FromMarsToSD(Double_t PD[3], Double_t RD[6][6],
60  Double_t H[3], Int_t CH,
61  Double_t DJ1[3], Double_t DK1[3],
62  Int_t& IERR, Double_t& SP1,
63  Double_t* PC, Double_t* RC);
64 
65  //---------------------------------------
66 
67  void FromMat25ToVec15(Double_t A[5][5], Double_t* V);
68  void FromMatToVec(Double_t A[5][5], Double_t* V);
69 
70  typedef Double_t fiveMat[5][5];
71  void FromVec15ToMat25(Double_t V[15], fiveMat& A);
72 
73  void FromVecToMat(fiveMat& A, Double_t V[25]);
74  void SymmProd(Double_t A[25], Double_t S[15], Double_t* R);
75  TVector3 FromMARSToSDCoord(TVector3 xyz, TVector3 o, TVector3 di, TVector3 dj, TVector3 dk);
76  TVector3 FromSDToMARSCoord(TVector3 uvw, TVector3 o, TVector3 di, TVector3 dj, TVector3 dk);
77 
79 };
80 
81 
82 #endif