PandaRoot
PndCATrackLinearisation.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 PNDCATRACKLINEARISATION_H
21 #define PNDCATRACKLINEARISATION_H
22 
23 #include "PndCATrackParam.h"
24 
40  public:
41  PndCATrackLinearisation() : fSinPhi(0), fCosPhi(1), fDzDs(0), fQPt(0) {}
42 
43  PndCATrackLinearisation(float SinPhi1, float CosPhi1, float DzDs1, float QPt1) : fSinPhi(SinPhi1), fCosPhi(CosPhi1), fDzDs(DzDs1), fQPt(QPt1) {}
44 
46 
47  void Set(float SinPhi1, float CosPhi1, float DzDs1, float QPt1);
48 
49  float SinPhi() const { return fSinPhi; }
50  float CosPhi() const { return fCosPhi; }
51  float DzDs() const { return fDzDs; }
52  float QPt() const { return fQPt; }
53 
54  float GetSinPhi() const { return fSinPhi; }
55  float GetCosPhi() const { return fCosPhi; }
56  float GetDzDs() const { return fDzDs; }
57  float GetQPt() const { return fQPt; }
58 
59  void SetSinPhi(float v) { fSinPhi = v; }
60  void SetCosPhi(float v) { fCosPhi = v; }
61  void SetDzDs(float v) { fDzDs = v; }
62  void SetQPt(float v) { fQPt = v; }
63 
64  private:
65  float fSinPhi; // SinPhi
66  float fCosPhi; // CosPhi
67  float fDzDs; // DzDs
68  float fQPt; // QPt
69 };
70 
72  : fSinPhi(CAMath::Min(.999f, CAMath::Max(-.999f, t.SinPhi()))), fCosPhi(t.SignCosPhi() * CAMath::Sqrt(1.f - fSinPhi * fSinPhi)), fDzDs(t.DzDs()), fQPt(t.QPt())
73 {
74 }
75 
76 inline void PndCATrackLinearisation::Set(float SinPhi1, float CosPhi1, float DzDs1, float QPt1)
77 {
78  SetSinPhi(SinPhi1);
79  SetCosPhi(CosPhi1);
80  SetDzDs(DzDs1);
81  SetQPt(QPt1);
82 }
83 
84 #endif
static T Sqrt(const T &x)
Definition: PndCAMath.h:57
__m128 v
Definition: P4_F32vec4.h:15
PndCATrackLinearisation(float SinPhi1, float CosPhi1, float DzDs1, float QPt1)
static T Min(const T &x, const T &y)
Definition: PndCAMath.h:47
void Set(float SinPhi1, float CosPhi1, float DzDs1, float QPt1)
static T Max(const T &x, const T &y)
Definition: PndCAMath.h:52
float f
Definition: P4_F32vec4.h:32