PandaRoot
PndCATrackLinearisationVector.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 PNDCATRACKLINEARISATIONVECTOR_H
9 #define PNDCATRACKLINEARISATIONVECTOR_H
10 
11 #include "PndCATrackParamVector.h"
12 #include "PndCAVector.h"
13 
29  public:
30  PndCATrackLinearisationVector() : fSinPhi(Vc::Zero), fCosPhi(1), fDzDs(Vc::Zero), fQPt(Vc::Zero) {}
31 
32  PndCATrackLinearisationVector(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 
60 inline PndCATrackLinearisationVector::PndCATrackLinearisationVector(const PndCATrackParamVector &t) : fSinPhi(t.SinPhi()), fCosPhi(Vc::Zero), fDzDs(t.DzDs()), fQPt(t.QPt())
61 {
62  fSinPhi = CAMath::Max(CAMath::Min(fSinPhi, float_v(.999f)), float_v(-.999f));
63  fCosPhi = t.SignCosPhi() * CAMath::Sqrt(float_v(Vc::One) - fSinPhi * fSinPhi);
64 }
65 
66 inline void PndCATrackLinearisationVector::Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
67 {
68  SetSinPhi(SinPhi1);
69  SetCosPhi(CosPhi1);
70  SetDzDs(DzDs1);
71  SetQPt(QPt1);
72 }
73 
74 #endif
static T Sqrt(const T &x)
Definition: PndCAMath.h:45
PndCATrackLinearisationVector(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
__m128 v
Definition: P4_F32vec4.h:3
static T Min(const T &x, const T &y)
Definition: PndCAMath.h:35
void Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
static T Max(const T &x, const T &y)
Definition: PndCAMath.h:40
float f
Definition: P4_F32vec4.h:20