PandaRoot
PndFTSCATrackLinearisationVector.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // ************************************************************************
14 // This file is property of and copyright by the ALICE HLT Project *
15 // ALICE Experiment at CERN, All rights reserved. *
16 // See cxx source for full Copyright notice *
17 // *
18 //*************************************************************************
19 
20 #ifndef PNDFTSCATRACKLINEARISATIONVECTOR_H
21 #define PNDFTSCATRACKLINEARISATIONVECTOR_H
22 
24 #include "PndFTSVector.h"
25 
41  public:
42  PndFTSCATrackLinearisationVector() : fSinPhi(Vc::Zero), fCosPhi(1), fDzDs(Vc::Zero), fQPt(Vc::Zero) {}
43 
44  PndFTSCATrackLinearisationVector(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1) : fSinPhi(SinPhi1), fCosPhi(CosPhi1), fDzDs(DzDs1), fQPt(QPt1) {}
45 
47 
48  void Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1);
49 
50  float_v SinPhi() const { return fSinPhi; }
51  float_v CosPhi() const { return fCosPhi; }
52  float_v DzDs() const { return fDzDs; }
53  float_v QPt() const { return fQPt; }
54 
55  float_v GetSinPhi() const { return fSinPhi; }
56  float_v GetCosPhi() const { return fCosPhi; }
57  float_v GetDzDs() const { return fDzDs; }
58  float_v GetQPt() const { return fQPt; }
59 
60  void SetSinPhi(float_v v) { fSinPhi = v; }
61  void SetCosPhi(float_v v) { fCosPhi = v; }
62  void SetDzDs(float_v v) { fDzDs = v; }
63  void SetQPt(float_v v) { fQPt = v; }
64 
65  private:
66  float_v fSinPhi; // SinPhi
67  float_v fCosPhi; // CosPhi
68  float_v fDzDs; // DzDs
69  float_v fQPt; // QPt
70 };
71 
73  : fSinPhi(t.SinPhi()), fCosPhi(Vc::Zero), fDzDs(t.DzDs()), fQPt(t.QPt())
74 {
75  fSinPhi = CAMath::Max(CAMath::Min(fSinPhi, float_v(.999f)), float_v(-.999f));
76  fCosPhi = t.SignCosPhi() * CAMath::Sqrt(float_v(Vc::One) - fSinPhi * fSinPhi);
77 }
78 
79 inline void PndFTSCATrackLinearisationVector::Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
80 {
81  SetSinPhi(SinPhi1);
82  SetCosPhi(CosPhi1);
83  SetDzDs(DzDs1);
84  SetQPt(QPt1);
85 }
86 
87 #endif
static T Sqrt(const T &x)
Definition: PndCAMath.h:57
__m128 v
Definition: P4_F32vec4.h:15
static T Min(const T &x, const T &y)
Definition: PndCAMath.h:47
static T Max(const T &x, const T &y)
Definition: PndCAMath.h:52
PndFTSCATrackLinearisationVector(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
float f
Definition: P4_F32vec4.h:32
void Set(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)