PandaRoot
PndCATrackLinearisation.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 PNDCATRACKLINEARISATION_H
9 #define PNDCATRACKLINEARISATION_H
10 
11 #include "PndCATrackParam.h"
12 
28  public:
29  PndCATrackLinearisation() : fSinPhi(0), fCosPhi(1), fDzDs(0), fQPt(0) {}
30 
31  PndCATrackLinearisation(float SinPhi1, float CosPhi1, float DzDs1, float QPt1) : fSinPhi(SinPhi1), fCosPhi(CosPhi1), fDzDs(DzDs1), fQPt(QPt1) {}
32 
34 
35  void Set(float SinPhi1, float CosPhi1, float DzDs1, float QPt1);
36 
37  float SinPhi() const { return fSinPhi; }
38  float CosPhi() const { return fCosPhi; }
39  float DzDs() const { return fDzDs; }
40  float QPt() const { return fQPt; }
41 
42  float GetSinPhi() const { return fSinPhi; }
43  float GetCosPhi() const { return fCosPhi; }
44  float GetDzDs() const { return fDzDs; }
45  float GetQPt() const { return fQPt; }
46 
47  void SetSinPhi(float v) { fSinPhi = v; }
48  void SetCosPhi(float v) { fCosPhi = v; }
49  void SetDzDs(float v) { fDzDs = v; }
50  void SetQPt(float v) { fQPt = v; }
51 
52  private:
53  float fSinPhi; // SinPhi
54  float fCosPhi; // CosPhi
55  float fDzDs; // DzDs
56  float fQPt; // QPt
57 };
58 
60  : fSinPhi(CAMath::Min(.999f, CAMath::Max(-.999f, t.SinPhi()))), fCosPhi(t.SignCosPhi() * CAMath::Sqrt(1.f - fSinPhi * fSinPhi)), fDzDs(t.DzDs()), fQPt(t.QPt())
61 {
62 }
63 
64 inline void PndCATrackLinearisation::Set(float SinPhi1, float CosPhi1, float DzDs1, float QPt1)
65 {
66  SetSinPhi(SinPhi1);
67  SetCosPhi(CosPhi1);
68  SetDzDs(DzDs1);
69  SetQPt(QPt1);
70 }
71 
72 #endif
static T Sqrt(const T &x)
Definition: PndCAMath.h:45
__m128 v
Definition: P4_F32vec4.h:3
PndCATrackLinearisation(float SinPhi1, float CosPhi1, float DzDs1, float QPt1)
static T Min(const T &x, const T &y)
Definition: PndCAMath.h:35
void Set(float SinPhi1, float CosPhi1, float DzDs1, float QPt1)
static T Max(const T &x, const T &y)
Definition: PndCAMath.h:40
float f
Definition: P4_F32vec4.h:20