FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairPropagator.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
15 #ifndef FAIRPROPAGATOR_H
16 #define FAIRPROPAGATOR_H
17 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
18 #include <RtypesCore.h> // for kTRUE
19 #include <TNamed.h> // for TNamed
20 #include <TString.h> // for TString
21 #include <TVector3.h> // for TVector3
22 #include <iosfwd> // for string
23 #include <string> // for basic_string
24 class FairTrackPar; // lines 22-22
25 class FairTrackParH; // lines 23-23
26 class FairTrackParP; // lines 24-24
27 class TBuffer;
28 class TClass;
29 class TMemberInspector;
30 
32 {
33  // OUTPUT STRUCT ----------------------------------------
34  // .. PCAStatusFlag 0 by success, else otherwise
35  // .. Radius : radius if the found circle
36  // .. OnTrackPCA : point of closest approach on track
37  // .. OnWirePCA : point of closest approach on wire
38  // .. Distance : distance between track and wire in the PCA
39  // .. TrackLength : track length to add to the GEANE one
41  : PCAStatusFlag(1)
42  , Radius(0.)
43  , OnTrackPCA(TVector3(0., 0., 0.))
44  , OnWirePCA(TVector3(0., 0., 0.))
45  , Distance(0.)
46  , TrackLength(0.)
47  {}
49  double Radius;
50  TVector3 OnTrackPCA;
51  TVector3 OnWirePCA;
52  double Distance;
53  float TrackLength;
54 };
55 
56 class FairPropagator : public TNamed
57 {
58  public:
60 
61  FairPropagator(const TString& name, const TString& title);
62 
63  virtual ~FairPropagator();
64 
65  virtual void Init(FairTrackPar* /* TParam */){};
66 
70  virtual bool SetDestinationPlane([[gnu::unused]] const TVector3& v0,
71  [[gnu::unused]] const TVector3& v1,
72  [[gnu::unused]] const TVector3& v2)
73  {
74  return false;
75  }
76 
80  virtual bool SetOriginPlane([[gnu::unused]] const TVector3& v0, [[gnu::unused]] const TVector3& v1)
81  {
82  return false;
83  }
84 
90  virtual bool SetDestinationVolume([[gnu::unused]] std::string volName,
91  [[gnu::unused]] int copyNo,
92  [[gnu::unused]] int option)
93  {
94  return false;
95  }
96 
100  virtual bool SetDestinationLength([[gnu::unused]] float length) { return false; }
101 
104  virtual bool SetPropagateOnlyParameters() { return false; }
105 
106  virtual bool Propagate([[gnu::unused]] FairTrackParH* TStart,
107  [[gnu::unused]] FairTrackParH* TEnd,
108  [[gnu::unused]] int PDG)
109  {
110  return false;
111  }
112  virtual bool Propagate([[gnu::unused]] FairTrackParP* TStart,
113  [[gnu::unused]] FairTrackParH* TEnd,
114  [[gnu::unused]] int PDG)
115  {
116  return false;
117  }
118  virtual bool Propagate([[gnu::unused]] FairTrackParP* TStart,
119  [[gnu::unused]] FairTrackParP* TEnd,
120  [[gnu::unused]] int PDG)
121  {
122  return false;
123  }
124  virtual bool Propagate([[gnu::unused]] FairTrackParH* TStart,
125  [[gnu::unused]] FairTrackParP* TEnd,
126  [[gnu::unused]] int PDG)
127  {
128  return false;
129  }
130  virtual bool Propagate([[gnu::unused]] float* x1,
131  [[gnu::unused]] float* p1,
132  [[gnu::unused]] float* x2,
133  [[gnu::unused]] float* p2,
134  [[gnu::unused]] int PDG)
135  {
136  return false;
137  }
138 
139  /* ===========================================================================================================================================
140  */
141 
142  // Set PCA propagation:
143  // .. pca = ic = 1 closest approach to point
144  // = 2 closest approach to wire
145  // = 0 no closest approach
146  // .. dir = +1 move forward
147  // = -1 move backward
148  // .. par = initial track parameters
149  virtual bool SetPCAPropagation([[gnu::unused]] int pca,
150  [[gnu::unused]] int dir = 1,
151  [[gnu::unused]] FairTrackParP* par = nullptr)
152  {
153  return kTRUE;
154  }
155 
156  // INPUT ----------------------------------------
157  // .. pca = ic = 1 closest approach to point
158  // = 2 closest approach to wire
159  // = 0 no closest approach
160  // .. PDGCode = pdg code of the particle
161  // .. point point with respect to which calculate the closest approach
162  // .. wire, wire2 line with respect to which calculate the closest approach
163  // .. maxdistance = geometrical distance[start - point/wire extr] * 2
164  virtual PCAOutputStruct FindPCA([[gnu::unused]] int PCA,
165  [[gnu::unused]] int PDGCode,
166  [[gnu::unused]] TVector3 Point,
167  [[gnu::unused]] TVector3 Wire1,
168  [[gnu::unused]] TVector3 Wire2,
169  [[gnu::unused]] double MaxDistance)
170  {
171  return PCAOutputStruct();
172  }
173 
175 };
176 
177 #endif
virtual bool SetPropagateOnlyParameters()
virtual bool Propagate([[gnu::unused]] FairTrackParP *TStart, [[gnu::unused]] FairTrackParH *TEnd, [[gnu::unused]] int PDG)
virtual bool Propagate([[gnu::unused]] FairTrackParP *TStart, [[gnu::unused]] FairTrackParP *TEnd, [[gnu::unused]] int PDG)
virtual void Init(FairTrackPar *)
virtual bool Propagate([[gnu::unused]] FairTrackParH *TStart, [[gnu::unused]] FairTrackParP *TEnd, [[gnu::unused]] int PDG)
virtual bool SetDestinationPlane([[gnu::unused]] const TVector3 &v0, [[gnu::unused]] const TVector3 &v1, [[gnu::unused]] const TVector3 &v2)
virtual bool Propagate([[gnu::unused]] FairTrackParH *TStart, [[gnu::unused]] FairTrackParH *TEnd, [[gnu::unused]] int PDG)
virtual bool Propagate([[gnu::unused]] float *x1, [[gnu::unused]] float *p1, [[gnu::unused]] float *x2, [[gnu::unused]] float *p2, [[gnu::unused]] int PDG)
virtual PCAOutputStruct FindPCA([[gnu::unused]] int PCA, [[gnu::unused]] int PDGCode, [[gnu::unused]] TVector3 Point, [[gnu::unused]] TVector3 Wire1, [[gnu::unused]] TVector3 Wire2, [[gnu::unused]] double MaxDistance)
virtual bool SetDestinationVolume([[gnu::unused]] std::string volName, [[gnu::unused]] int copyNo, [[gnu::unused]] int option)
TVector3 OnTrackPCA
TVector3 OnWirePCA
FairMQExParamsParOne * par
virtual bool SetOriginPlane([[gnu::unused]] const TVector3 &v0, [[gnu::unused]] const TVector3 &v1)
virtual bool SetDestinationLength([[gnu::unused]] float length)
virtual ~FairPropagator()
ClassDef(FairPropagator, 1)
virtual bool SetPCAPropagation([[gnu::unused]] int pca, [[gnu::unused]] int dir=1, [[gnu::unused]] FairTrackParP *par=nullptr)