EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairGeanePro.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairGeanePro.h
1 // Class for the interface to propagate track parameters with GEANE
2 //
3 // Authors: M. Al-Turany, A. Fontana, L. Lavezzi and A. Rotondi
4 //
5 #ifndef FAIRGEANEPRO_H
6 #define FAIRGEANEPRO_H 1
7 
8 #include "TNamed.h"
9 #include "TVector3.h"
10 #include "TGeant3.h"
11 
12 //class TGeant3;
13 class TDatabasePDG;
14 class TArrayD;
15 class FairTrackPar;
16 class FairTrackParP;
17 class FairTrackParH;
18 class FairField;
20 
21 class FairGeanePro : public TNamed
22 {
23 
24  public:
26  FairGeanePro();
27 
29  ~FairGeanePro();
30 
31  Bool_t Propagate(FairTrackParH* TStart, FairTrackParH* TEnd, Int_t PDG);
32  Bool_t Propagate(FairTrackParP* TStart, FairTrackParH* TEnd, Int_t PDG);
33  Bool_t Propagate(FairTrackParP* TStart, FairTrackParP* TEnd, Int_t PDG);
34  Bool_t Propagate(FairTrackParH* TStart, FairTrackParP* TEnd, Int_t PDG);
35  Bool_t Propagate(Float_t* x1, Float_t* p1, Float_t* x2, Float_t* p2,Int_t PDG);
36  Bool_t PropagateToPlane(TVector3& v0, TVector3& v1, TVector3& v2);
37  Bool_t PropagateFromPlane(TVector3& v1, TVector3& v2);
38  Bool_t PropagateToVolume(TString VolName, Int_t CopyNo ,Int_t option);
39  Bool_t PropagateToLength(Float_t length);
40  Bool_t PropagateOnlyParameters();
41 
42  void Init(FairTrackPar* TParam);
43  Bool_t Propagate(Int_t PDG);
44 
45  private:
46  void Track2ToLine(TVector3 x1, TVector3 x2, TVector3 w1, TVector3 w2, TVector3& Pfinal, TVector3& Pwire, Int_t& Iflag, Double_t& Dist, Double_t& Length);
47  void Track2ToPoint(TVector3 x1, TVector3 x2, TVector3 w1, TVector3& Pfinal, Double_t& Dist, Double_t& Length, Int_t& quitFlag);
48  void Track3ToLine(TVector3 x1, TVector3 x2, TVector3 x3, TVector3 w1, TVector3 w2, TVector3& Pfinal, TVector3& Wire, Int_t& Iflag, Double_t& Dist, Double_t& Length, Double_t& Radius);
49  void Track3ToPoint(TVector3 x1, TVector3 x2, TVector3 x3, TVector3 w1, TVector3& Pfinal, Int_t& Iflag, Double_t& Dist, Double_t& Length, Double_t& Radius);
50 
51  public:
52 
53  Bool_t SetWire(TVector3 extremity1, TVector3 extremity2);
54  Bool_t SetPoint(TVector3 pnt);
55  Bool_t PropagateToPCA(Int_t pca);
56  Bool_t PropagateToPCA(Int_t pca, Int_t dir);
57  int FindPCA(Int_t pca, Int_t PDGCode, TVector3 point, TVector3 wire1, TVector3 wire2, Double_t maxdistance, Double_t& Rad, TVector3& vpf, TVector3& vwi, Double_t& Di, Float_t& trklength);
58  TVector3 GetPCAOnWire() { return fvwi; }
59  TVector3 GetPCAOnTrack() { return fvpf; }
60  Float_t GetLengthAtPCA() { return ftrklength; }
61  Bool_t PropagateToVirtualPlaneAtPCA(Int_t pca);
62  Bool_t BackTrackToVertex();
63  Bool_t BackTrackToVirtualPlaneAtPCA(Int_t pca);
64  void setBackProp() {fPropOption="BPE";}
65 
66  // function to call the FindPCA alone to retrieve
67  // the PCA.
68  Bool_t ActualFindPCA(Int_t pca, FairTrackParP* par, Int_t dir);
69 
70  // transport matrix
71  void GetTransportMatrix(Double_t trm[5][5]);
72 
73 
74  private:
75 
76  TGeant3* gMC3;
77  TString fPropOption;
78  Float_t xlf[1]; // track length when PropagateToTrack is chosen
79  Float_t ein[15]; // Input error matrix
80  Int_t nepred; // Number of predictions
81  TDatabasePDG* fdbPDG;
82  Float_t pli[6];
83  Float_t x2[3];
84  Float_t p2[3];
85  /* TVector3 Pos; */
86  /* TVector3 PosErr; */
87  /* TVector3 Mom; */
88  /* TArrayD *fErrorMat; */
89  Ertrio_t* afErtrio;
90  Float_t x1[3];
91  Float_t p1[3];
92  Int_t GeantCode;
93  /* FairTrackParH *fTrkParH; */
94  /* FairTrackParP *fTrkParP; */
95  /* FairTrackPar *fTrkPar; */
96  Int_t ProMode;
97  /* FairField *fField; */
98  Float_t plo[12];
99  TString VName;
100  Int_t VCopyNo;
101  Bool_t VEnter;
102 
103  TVector3 fpoint, fwire1, fwire2;
104  Int_t fPCA;
105  Double_t fRad, fDi;
106  TVector3 fvpf, fvwi;
107  Float_t ftrklength;
108  Int_t flag;
110  Double_t trpmat[5][5];
111 
112  FairGeanePro(const FairGeanePro&);
114 
116 };
117 
118 #endif