PandaRoot
PndFTSCATrackLinearisationVector.h
Go to the documentation of this file.
1 // ************************************************************************
2 // This file is property of and copyright by the ALICE HLT Project *
3 // ALICE Experiment at CERN, All rights reserved. *
4 // See cxx source for full Copyright notice *
5 // *
6 //*************************************************************************
7 
8 #ifndef PNDFTSCATRACKLINEARISATIONVECTOR_H
9 #define PNDFTSCATRACKLINEARISATIONVECTOR_H
10 
12 #include "PndFTSVector.h"
13 
29  public:
30  PndFTSCATrackLinearisationVector() : fSinPhi(Vc::Zero), fCosPhi(1), fDzDs(Vc::Zero), fQPt(Vc::Zero) {}
31 
32  PndFTSCATrackLinearisationVector(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1) : fSinPhi(SinPhi1), fCosPhi(CosPhi1), fDzDs(DzDs1), fQPt(QPt1) {}
33 
35 
36  void Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1);
37 
38  float_v SinPhi() const { return fSinPhi; }
39  float_v CosPhi() const { return fCosPhi; }
40  float_v DzDs() const { return fDzDs; }
41  float_v QPt() const { return fQPt; }
42 
43  float_v GetSinPhi() const { return fSinPhi; }
44  float_v GetCosPhi() const { return fCosPhi; }
45  float_v GetDzDs() const { return fDzDs; }
46  float_v GetQPt() const { return fQPt; }
47 
48  void SetSinPhi(float_v v) { fSinPhi = v; }
49  void SetCosPhi(float_v v) { fCosPhi = v; }
50  void SetDzDs(float_v v) { fDzDs = v; }
51  void SetQPt(float_v v) { fQPt = v; }
52 
53  private:
54  float_v fSinPhi; // SinPhi
55  float_v fCosPhi; // CosPhi
56  float_v fDzDs; // DzDs
57  float_v fQPt; // QPt
58 };
59 
61  : fSinPhi(t.SinPhi()), fCosPhi(Vc::Zero), fDzDs(t.DzDs()), fQPt(t.QPt())
62 {
63  fSinPhi = CAMath::Max(CAMath::Min(fSinPhi, float_v(.999f)), float_v(-.999f));
64  fCosPhi = t.SignCosPhi() * CAMath::Sqrt(float_v(Vc::One) - fSinPhi * fSinPhi);
65 }
66 
67 inline void PndFTSCATrackLinearisationVector::Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
68 {
69  SetSinPhi(SinPhi1);
70  SetCosPhi(CosPhi1);
71  SetDzDs(DzDs1);
72  SetQPt(QPt1);
73 }
74 
75 #endif
static T Sqrt(const T &x)
Definition: PndCAMath.h:45
__m128 v
Definition: P4_F32vec4.h:3
static T Min(const T &x, const T &y)
Definition: PndCAMath.h:35
static T Max(const T &x, const T &y)
Definition: PndCAMath.h:40
PndFTSCATrackLinearisationVector(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
float f
Definition: P4_F32vec4.h:20
void Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)