FairRoot/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 
9 #ifndef PNDCATRACKLINEARISATIONVECTOR_H
10 #define PNDCATRACKLINEARISATIONVECTOR_H
11 
12 #include "PndCATrackParamVector.h"
13 #include "PndCAVector.h"
14 
30 {
31  public:
32 
34  : fSinPhi( Vc::Zero ), fCosPhi( 1 ), fDzDs( Vc::Zero ), fQPt( Vc::Zero ) {}
35 
36  PndCATrackLinearisationVector( float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1 )
37  : fSinPhi( SinPhi1 ), fCosPhi( CosPhi1 ), fDzDs( DzDs1 ), fQPt( QPt1 ) {}
38 
40 
41  void Set( float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1 );
42 
43 
44  float_v SinPhi()const { return fSinPhi; }
45  float_v CosPhi()const { return fCosPhi; }
46  float_v DzDs() const { return fDzDs; }
47  float_v QPt() const { return fQPt; }
48 
49  float_v GetSinPhi()const { return fSinPhi; }
50  float_v GetCosPhi()const { return fCosPhi; }
51  float_v GetDzDs() const { return fDzDs; }
52  float_v GetQPt() const { return fQPt; }
53 
54  void SetSinPhi( float_v v ) { fSinPhi = v; }
55  void SetCosPhi( float_v v ) { fCosPhi = v; }
56  void SetDzDs( float_v v ) { fDzDs = v; }
57  void SetQPt( float_v v ) { fQPt = v; }
58 
59  private:
60 
61  float_v fSinPhi; // SinPhi
62  float_v fCosPhi; // CosPhi
63  float_v fDzDs; // DzDs
64  float_v fQPt; // QPt
65 };
66 
67 
69  : fSinPhi( t.SinPhi() ), fCosPhi( Vc::Zero ), fDzDs( t.DzDs() ), fQPt( t.QPt() )
70 {
71  fSinPhi = CAMath::Max( CAMath::Min( fSinPhi, float_v( .999f ) ), float_v( -.999f ) );
72  fCosPhi = t.SignCosPhi() * CAMath::Sqrt( float_v( Vc::One ) - fSinPhi * fSinPhi );
73 }
74 
75 
76 inline void PndCATrackLinearisationVector::Set( float_v SinPhi1, float_v CosPhi1,
77  float_v DzDs1, float_v QPt1 )
78 {
79  SetSinPhi( SinPhi1 );
80  SetCosPhi( CosPhi1 );
81  SetDzDs( DzDs1 );
82  SetQPt( QPt1 );
83 }
84 
85 #endif
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
PndCATrackLinearisationVector(float_v SinPhi1, float_v CosPhi1, float_v DzDs1, float_v QPt1)
static const fvec Zero
__m128 v
Definition: P4_F32vec4.h:4
static T Min(const T &x, const T &y)
Definition: PndCAMath.h:35
TFile * f
Definition: bump_analys.C:12
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:36
TTree * t
Definition: bump_analys.C:13
static const fvec One