Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Helix.h
1/*
2 * HalHelix.h
3 *
4 * Created on: 30-04-2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 * Based on AlixHelix paremetrizatioin with const Bz
9 * (https://github.com/alisw/AliRoot/blob/master/STEER/STEER/AliHelix.h)
10 * and MpdHelix
11 * (https://git.jinr.ru/hal/mpdroot//mpdbase/MpdHelix.h)
12 */
13#ifndef HALHELIX_H_
14#define HALHELIX_H_
15
16#include "HelixBase.h"
17
22namespace Hal {
23 class HelixZ : public HelixBase {
24 public:
25 HelixZ();
33 HelixZ(const TVector3& x, const TVector3& mom, Double_t charge, Double_t conversion = 0.);
40 inline void PathLength(Double_t r, Double_t& s1, Double_t& s2) const { BasePathLength(r, s1, s2); }
49 inline void PathLength(Double_t r, Double_t x, Double_t y, Double_t& s1, Double_t& s2) const {
50 BasePathLength(r, x, y, s1, s2);
51 }
59 inline void SetParams(const TVector3& x, const TVector3& mom, Double_t charge, Double_t conversion = 0.) {
60 BaseSetParams(x, mom, charge, conversion);
61 }
68 inline void EvaluateFull(Double_t s, TVector3& mom, TVector3& pos) const { BaseFullEval(s, mom, pos); }
73 inline Double_t GetXcenter() const { return BaseGetXcenter(); };
78 inline Double_t GetYcenter() const { return BaseGetYcenter(); };
83 inline Double_t GetZcenter() const { return 0; };
88 inline Double_t GetStartX() const { return BaseGetStartX(); };
93 inline Double_t GetStartY() const { return BaseGetStartY(); };
98 inline Double_t GetStartZ() const { return BaseGetStartZ(); };
105 inline Double_t PathLength(const TVector3& point, Bool_t scanPeriods = kTRUE) const {
106 return BasePathLength(point, scanPeriods);
107 }
115 Double_t PathLength(Double_t x, Double_t y) const { return BasePathLength(x, y); }
121 TVector3 EvalPos(Double_t s) const { return BasePosition(s); }
127 TVector3 EvalMom(Double_t s) const { return BaseMomentum(s); };
132 TVector3 GetStartPoint() const { return BaseGetStartPoint(); };
140 inline Int_t Intersection(Double_t R, TVector3& x1, TVector3& x2) const { return BaseIntersection(R, x1, x2); }
146 HelixZ& operator=(const HelixZ& helix);
153 void Shift(Double_t x, Double_t y, Double_t z);
154 void Print(Option_t* /*opt*/ = "") const { BasePrint(); };
155 virtual ~HelixZ() {};
156 ClassDef(HelixZ, 1)
157 };
158
162 class HelixX : public HelixBase {
163 public:
164 HelixX();
172 HelixX(const TVector3& x, const TVector3& mom, Double_t charge, Double_t conversion = 0.);
173 inline void PathLength(Double_t r, Double_t& s1, Double_t& s2) const { BasePathLength(r, s1, s2); }
182 inline void PathLength(Double_t r, Double_t y, Double_t z, Double_t& s1, Double_t& s2) const {
183 BasePathLength(r, y, z, s1, s2);
184 }
192 inline void SetParams(const TVector3& x, const TVector3& mom, Double_t charge, Double_t conversion = 0.) {
193 BaseSetParams(x.Y(), x.Z(), x.X(), mom.Y(), mom.Z(), mom.X(), charge, conversion);
194 }
201 inline void EvaluateFull(Double_t s, TVector3& mom, TVector3& pos) const {
202 BaseFullEval(s, mom, pos);
203 mom.SetXYZ(mom.Z(), mom.X(), mom.Y());
204 pos.SetXYZ(pos.Z(), pos.X(), pos.Y());
205 }
210 inline Double_t GetXcenter() const { return 0; };
215 inline Double_t GetYcenter() const { return BaseGetXcenter(); };
220 inline Double_t GetZcenter() const { return BaseGetYcenter(); };
225 inline Double_t GetStartX() const { return BaseGetStartZ(); };
230 inline Double_t GetStartY() const { return BaseGetStartX(); };
235 inline Double_t GetStartZ() const { return BaseGetStartY(); };
242 inline Double_t PathLength(TVector3 point, Bool_t scanPeriods = kTRUE) const {
243 point.SetXYZ(point.Y(), point.Z(), point.X());
244 return BasePathLength(point, scanPeriods);
245 }
253 Double_t PathLength(Double_t y, Double_t z) const { return BasePathLength(y, z); }
259 TVector3 EvalPos(Double_t s) const {
260 TVector3 res = BasePosition(s);
261 res.SetXYZ(res.Z(), res.X(), res.Y());
262 return res;
263 }
269 TVector3 EvalMom(Double_t s) const {
270 TVector3 res = BaseMomentum(s);
271 res.SetXYZ(res.Z(), res.X(), res.Y());
272 return res;
273 };
278 TVector3 GetStartPoint() const {
279 TVector3 res = BaseGetStartPoint();
280 res.SetXYZ(res.Z(), res.X(), res.Y());
281 return res;
282 };
290 inline Int_t Intersection(Double_t R, TVector3& x1, TVector3& x2) const {
291 Int_t res = BaseIntersection(R, x1, x2);
292 x1.SetXYZ(x1.Z(), x1.X(), x1.Y());
293 x2.SetXYZ(x2.Z(), x2.X(), x2.Y());
294 return res;
295 }
301 HelixX& operator=(const HelixX& helix);
302 void Print(Option_t* /*opt*/ = "") const {};
309 void Shift(Double_t x, Double_t y, Double_t z);
310 virtual ~HelixX() {};
311 ClassDef(HelixX, 1)
312 };
313
317 class HelixY : public HelixBase {
318 public:
319 HelixY();
327 HelixY(const TVector3& x, const TVector3& mom, Double_t charge, Double_t conversion = 0.);
328 inline void PathLength(Double_t r, Double_t& s1, Double_t& s2) const { BasePathLength(r, s1, s2); }
337 inline void PathLength(Double_t r, Double_t z, Double_t x, Double_t& s1, Double_t& s2) const {
338 BasePathLength(r, z, x, s1, s2);
339 }
347 inline void SetParams(const TVector3& x, const TVector3& mom, Double_t charge, Double_t conversion = 0.) {
348 BaseSetParams(x.Z(), x.X(), x.Y(), mom.Z(), mom.X(), mom.Y(), charge, conversion);
349 }
356 inline void EvaluateFull(Double_t s, TVector3& mom, TVector3& pos) const {
357 BaseFullEval(s, mom, pos);
358 mom.SetXYZ(mom.Y(), mom.Z(), mom.X());
359 pos.SetXYZ(pos.Y(), pos.Z(), pos.X());
360 }
361
366 inline Double_t GetXcenter() const { return BaseGetYcenter(); };
371 inline Double_t GetYcenter() const { return 0; };
376 inline Double_t GetZcenter() const { return BaseGetXcenter(); };
381 inline Double_t GetStartX() const { return BaseGetStartY(); };
386 inline Double_t GetStartY() const { return BaseGetStartZ(); };
391 inline Double_t GetStartZ() const { return BaseGetStartX(); };
398 inline Double_t PathLength(const TVector3& point, Bool_t scanPeriods = kTRUE) const {
399 TVector3 p(point.Z(), point.X(), point.Y());
400 return BasePathLength(p, scanPeriods);
401 }
409 Double_t PathLength(Double_t z, Double_t x) const { return BasePathLength(z, x); }
415 TVector3 EvalPos(Double_t s) const {
416 TVector3 res = BasePosition(s);
417 res.SetXYZ(res.Y(), res.Z(), res.X());
418 return res;
419 }
425 TVector3 EvalMom(Double_t s) const {
426 TVector3 res = BaseMomentum(s);
427 res.SetXYZ(res.Y(), res.Z(), res.X());
428 return res;
429 };
434 TVector3 GetStartPoint() const {
435 TVector3 res = BaseGetStartPoint();
436 res.SetXYZ(res.Y(), res.Z(), res.X());
437 return res;
438 };
446 inline Int_t Intersection(Double_t R, TVector3& x1, TVector3& x2) const {
447 Int_t res = BaseIntersection(R, x1, x2);
448 x1.SetXYZ(x1.Y(), x1.Z(), x1.X());
449 x2.SetXYZ(x2.Y(), x2.Z(), x2.X());
450 return res;
451 }
457 HelixY& operator=(const HelixY& helix);
458 void Print(Option_t* /*opt*/ = "") const { BasePrint(); };
465 void Shift(Double_t x, Double_t y, Double_t z);
466 virtual ~HelixY() {};
467 ClassDef(HelixY, 1)
468 };
469
470#ifdef HALHELIX_X
471 typedef HelixX Helix;
472#else
473#ifdef HALHELIX_Y
474 typedef HelixY Helix;
475#else
476 typedef HelixZ Helix;
477#endif
478#endif
479} // namespace Hal
480#endif /* HALHELIX_H_ */
Double_t BaseGetStartZ() const
Definition HelixBase.h:112
Double_t BaseGetYcenter() const
Definition HelixBase.h:97
Int_t BaseIntersection(Double_t R, TVector3 &x1, TVector3 &x2) const
Definition HelixBase.cxx:81
TVector3 BasePosition(Double_t s) const
Double_t BaseGetStartY() const
Definition HelixBase.h:107
TVector3 BaseMomentum(Double_t s) const
void BaseSetParams(const TVector3 &x, const TVector3 &mom, Double_t charge, Double_t conversion=0.)
Double_t BaseGetXcenter() const
Definition HelixBase.h:92
Double_t BaseGetStartX() const
Definition HelixBase.h:102
void BasePathLength(Double_t r, Double_t x, Double_t y, Double_t &s1, Double_t &s2) const
TVector3 BaseGetStartPoint() const
void BaseFullEval(Double_t s, TVector3 &mom, TVector3 &pos) const
Double_t GetYcenter() const
Definition Helix.h:215
Double_t GetStartX() const
Definition Helix.h:225
Double_t PathLength(Double_t y, Double_t z) const
Definition Helix.h:253
Int_t Intersection(Double_t R, TVector3 &x1, TVector3 &x2) const
Definition Helix.h:290
Double_t GetStartZ() const
Definition Helix.h:235
void PathLength(Double_t r, Double_t y, Double_t z, Double_t &s1, Double_t &s2) const
Definition Helix.h:182
HelixX & operator=(const HelixX &helix)
Definition Helix.cxx:33
TVector3 EvalPos(Double_t s) const
Definition Helix.h:259
Double_t GetXcenter() const
Definition Helix.h:210
Double_t GetZcenter() const
Definition Helix.h:220
void EvaluateFull(Double_t s, TVector3 &mom, TVector3 &pos) const
Definition Helix.h:201
TVector3 EvalMom(Double_t s) const
Definition Helix.h:269
void Shift(Double_t x, Double_t y, Double_t z)
Definition Helix.cxx:31
Double_t GetStartY() const
Definition Helix.h:230
TVector3 GetStartPoint() const
Definition Helix.h:278
void SetParams(const TVector3 &x, const TVector3 &mom, Double_t charge, Double_t conversion=0.)
Definition Helix.h:192
Double_t PathLength(TVector3 point, Bool_t scanPeriods=kTRUE) const
Definition Helix.h:242
Double_t GetStartY() const
Definition Helix.h:386
TVector3 EvalPos(Double_t s) const
Definition Helix.h:415
TVector3 EvalMom(Double_t s) const
Definition Helix.h:425
void EvaluateFull(Double_t s, TVector3 &mom, TVector3 &pos) const
Definition Helix.h:356
Double_t PathLength(Double_t z, Double_t x) const
Definition Helix.h:409
Int_t Intersection(Double_t R, TVector3 &x1, TVector3 &x2) const
Definition Helix.h:446
Double_t GetStartX() const
Definition Helix.h:381
void SetParams(const TVector3 &x, const TVector3 &mom, Double_t charge, Double_t conversion=0.)
Definition Helix.h:347
Double_t PathLength(const TVector3 &point, Bool_t scanPeriods=kTRUE) const
Definition Helix.h:398
HelixY & operator=(const HelixY &helix)
Definition Helix.cxx:43
void Shift(Double_t x, Double_t y, Double_t z)
Definition Helix.cxx:48
Double_t GetZcenter() const
Definition Helix.h:376
TVector3 GetStartPoint() const
Definition Helix.h:434
void PathLength(Double_t r, Double_t z, Double_t x, Double_t &s1, Double_t &s2) const
Definition Helix.h:337
Double_t GetXcenter() const
Definition Helix.h:366
Double_t GetYcenter() const
Definition Helix.h:371
Double_t GetStartZ() const
Definition Helix.h:391
Double_t GetYcenter() const
Definition Helix.h:78
void PathLength(Double_t r, Double_t x, Double_t y, Double_t &s1, Double_t &s2) const
Definition Helix.h:49
TVector3 EvalMom(Double_t s) const
Definition Helix.h:127
Double_t GetStartX() const
Definition Helix.h:88
Double_t PathLength(Double_t x, Double_t y) const
Definition Helix.h:115
Double_t GetStartZ() const
Definition Helix.h:98
Double_t GetStartY() const
Definition Helix.h:93
void PathLength(Double_t r, Double_t &s1, Double_t &s2) const
Definition Helix.h:40
HelixZ & operator=(const HelixZ &helix)
Definition Helix.cxx:21
TVector3 EvalPos(Double_t s) const
Definition Helix.h:121
void SetParams(const TVector3 &x, const TVector3 &mom, Double_t charge, Double_t conversion=0.)
Definition Helix.h:59
Int_t Intersection(Double_t R, TVector3 &x1, TVector3 &x2) const
Definition Helix.h:140
Double_t PathLength(const TVector3 &point, Bool_t scanPeriods=kTRUE) const
Definition Helix.h:105
Double_t GetXcenter() const
Definition Helix.h:73
void Shift(Double_t x, Double_t y, Double_t z)
Definition Helix.cxx:19
void EvaluateFull(Double_t s, TVector3 &mom, TVector3 &pos) const
Definition Helix.h:68
Double_t GetZcenter() const
Definition Helix.h:83
TVector3 GetStartPoint() const
Definition Helix.h:132