PandaRoot
PndCAHitV Class Reference

#include <PndCAHitsV.h>

Public Member Functions

 PndCAHitV ()
 
 PndCAHitV (const PndCAHit *hits, const float_m &valid)
 
float_m IsValid () const
 
char IStation () const
 
int_v IStations () const
 
uint_v Id () const
 
float_v X1Corrected (const PndCATrackParamVector &p) const
 
float_v X0 () const
 
float_v X1 () const
 
float_v X2 () const
 
float_v Err2X1 () const
 
float_v ErrX12 () const
 
float_v Err2X2 () const
 
float_v U () const
 
float_v R () const
 
float_v DR () const
 
int_v ISec () const
 
float_v Err2R () const
 
float_v Err2A () const
 
float_m IsLeft () const
 
float_v Angle () const
 
void GetGlobalCoor (int iV, float &x, float &y, float &z) const
 

Detailed Description

Definition at line 19 of file PndCAHitsV.h.

Constructor & Destructor Documentation

◆ PndCAHitV() [1/2]

PndCAHitV::PndCAHitV ( )
inline

Definition at line 21 of file PndCAHitsV.h.

22  : fIStation(-1), fId(Vc::Zero), fX0(Vc::Zero), fX1(Vc::Zero), fX2(Vc::Zero), fErr2X1(Vc::Zero), fErrX12(Vc::Zero), fErr2X2(Vc::Zero), fR(Vc::Zero), fErr2R(Vc::Zero),
23  fErr2A(Vc::Zero), fU(Vc::Zero), fDR(Vc::Zero), fIsLeft(true), fISec(Vc::Zero), fAngle(Vc::Zero)
24  {
25  }

◆ PndCAHitV() [2/2]

PndCAHitV::PndCAHitV ( const PndCAHit hits,
const float_m &  valid 
)
inline

Definition at line 92 of file PndCAHitsV.h.

References PndCAHit::Angle(), PndCAHit::DR(), PndCAHit::Err2A(), PndCAHit::Err2R(), PndCAHit::Err2X1(), PndCAHit::Err2X2(), PndCAHit::ErrX12(), PndCAHit::Id(), PndCAHit::ISec(), PndCAHit::IsLeft(), PndCAHit::IStation(), PndCAHit::IsUsed(), PndCAHit::R(), PndCAHit::U(), PndCAHit::X0(), PndCAHit::X1(), and PndCAHit::X2().

93 {
94  int_v::Memory mIStation;
95  mIStation = int_v(-1);
96 
97  uint_v::Memory mId;
98  float_v::Memory mX1, mX2, mX0;
99  float_v::Memory mErr2X1, mErrX12, mErr2X2;
100  float_v::Memory mR, mU, mDR, mErr2R, mErr2A, mIsLeft;
101  float_v::Memory mAlpha;
102  float_v::Memory mIsUsed;
103  int_v::Memory mISec;
104 
105  foreach_bit(unsigned short iV, valid)
106  {
107  const PndCAHit &h = hits[iV];
108 
109  mId[iV] = h.Id();
110  mIStation[iV] = h.IStation();
111  mX1[iV] = h.X1();
112  mX2[iV] = h.X2();
113  mX0[iV] = h.X0();
114 
115  mErr2X1[iV] = h.Err2X1();
116  mErrX12[iV] = h.ErrX12();
117  mErr2X2[iV] = h.Err2X2();
118  mR[iV] = h.R();
119  mU[iV] = h.U();
120  mDR[iV] = h.DR();
121  mErr2R[iV] = h.Err2R();
122  mErr2A[iV] = h.Err2A();
123  mIsLeft[iV] = h.IsLeft() ? 1.f : 0.f;
124  mISec[iV] = h.ISec();
125  mAlpha[iV] = h.Angle();
126  mIsUsed[iV] = h.IsUsed() ? 1.f : 0.f;
127  }
128  fId = uint_v(mId);
129  fIStation = int_v(mIStation);
130  fX1 = float_v(mX1);
131  fX2 = float_v(mX2);
132  fX0 = float_v(mX0);
133  fErr2X1 = float_v(mErr2X1);
134  fErrX12 = float_v(mErrX12);
135  fErr2X2 = float_v(mErr2X2);
136  fR = float_v(mR);
137  fErr2R = float_v(mErr2R);
138  fErr2A = float_v(mErr2A);
139  fIsLeft = (float_v(mIsLeft) == 1.f);
140  fU = float_v(mU);
141  fDR = float_v(mDR);
142  fISec = int_v(mISec);
143  fAngle = float_v(mAlpha);
144 }
float R() const
Definition: PndCAHits.h:43
float Angle() const
Definition: PndCAHits.h:52
float DR() const
Definition: PndCAHits.h:44
float U() const
Definition: PndCAHits.h:45
bool IsLeft() const
Definition: PndCAHits.h:49
float Err2X1() const
Definition: PndCAHits.h:39
bool IsUsed() const
Definition: PndCAHits.h:54
float Err2A() const
Definition: PndCAHits.h:47
float Err2R() const
Definition: PndCAHits.h:46
int Id() const
Definition: PndCAHits.h:31
float Err2X2() const
Definition: PndCAHits.h:41
float X1() const
Definition: PndCAHits.h:36
int ISec() const
Definition: PndCAHits.h:50
float X2() const
Definition: PndCAHits.h:37
char IStation() const
Definition: PndCAHits.h:29
float ErrX12() const
Definition: PndCAHits.h:40
float X0() const
Definition: PndCAHits.h:35

Member Function Documentation

◆ Angle()

float_v PndCAHitV::Angle ( ) const
inline

Definition at line 59 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

59 { return fAngle; }

◆ DR()

float_v PndCAHitV::DR ( ) const
inline

Definition at line 53 of file PndCAHitsV.h.

53 { return fDR; }

◆ Err2A()

float_v PndCAHitV::Err2A ( ) const
inline

Definition at line 56 of file PndCAHitsV.h.

56 { return fErr2A; }

◆ Err2R()

float_v PndCAHitV::Err2R ( ) const
inline

Definition at line 55 of file PndCAHitsV.h.

55 { return fErr2R; }

◆ Err2X1()

float_v PndCAHitV::Err2X1 ( ) const
inline

Definition at line 47 of file PndCAHitsV.h.

47 { return fErr2X1; }

◆ Err2X2()

float_v PndCAHitV::Err2X2 ( ) const
inline

Definition at line 49 of file PndCAHitsV.h.

49 { return fErr2X2; }

◆ ErrX12()

float_v PndCAHitV::ErrX12 ( ) const
inline

Definition at line 48 of file PndCAHitsV.h.

48 { return fErrX12; }

◆ GetGlobalCoor()

void PndCAHitV::GetGlobalCoor ( int  iV,
float &  x,
float &  y,
float &  z 
) const
inline

Definition at line 61 of file PndCAHitsV.h.

References Angle(), PndCAParameters::CALocalToGlobal(), X0(), X1(), and X2().

62  {
63  PndCAParameters::CALocalToGlobal(float(X0()[iV]), float(X1()[iV]), float(X2()[iV]), float(Angle()[iV]), x, y, z);
64  }
float_v Angle() const
Definition: PndCAHitsV.h:59
float_v X0() const
Definition: PndCAHitsV.h:43
static void CALocalToGlobal(T x0, T x1, T angle, T &x, T &y)
float_v X1() const
Definition: PndCAHitsV.h:44
float_v X2() const
Definition: PndCAHitsV.h:45

◆ Id()

uint_v PndCAHitV::Id ( ) const
inline

Definition at line 39 of file PndCAHitsV.h.

References X1Corrected().

39 { return fId; };

◆ ISec()

int_v PndCAHitV::ISec ( ) const
inline

Definition at line 54 of file PndCAHitsV.h.

54 { return fISec; }

◆ IsLeft()

float_m PndCAHitV::IsLeft ( ) const
inline

Definition at line 57 of file PndCAHitsV.h.

57 { return fIsLeft; }

◆ IStation()

char PndCAHitV::IStation ( ) const
inline

Definition at line 31 of file PndCAHitsV.h.

References IsValid(), and v.

32  {
33  const float_m v = IsValid();
34  assert(!v.isEmpty());
35  return fIStation[v.firstOne()];
36  }
__m128 v
Definition: P4_F32vec4.h:3
float_m IsValid() const
Definition: PndCAHitsV.h:29

◆ IStations()

int_v PndCAHitV::IStations ( ) const
inline

Definition at line 37 of file PndCAHitsV.h.

37 { return fIStation; } // is not needed by tracker

◆ IsValid()

float_m PndCAHitV::IsValid ( ) const
inline

Definition at line 29 of file PndCAHitsV.h.

Referenced by IStation().

29 { return fIStation >= 0; }

◆ R()

float_v PndCAHitV::R ( ) const
inline

Definition at line 52 of file PndCAHitsV.h.

52 { return fR; }

◆ U()

float_v PndCAHitV::U ( ) const
inline

Definition at line 51 of file PndCAHitsV.h.

51 { return fU; }

◆ X0()

float_v PndCAHitV::X0 ( ) const
inline

Definition at line 43 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

43 { return fX0; }

◆ X1()

float_v PndCAHitV::X1 ( ) const
inline

Definition at line 44 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

44 { return fX1; }

◆ X1Corrected()

float_v PndCAHitV::X1Corrected ( const PndCATrackParamVector p) const
inline

Definition at line 82 of file PndCAHitsV.h.

References rsqrt(), and PndCATrackParamVector::SinPhi().

Referenced by Id().

83 {
84  float_v x1 = fX1;
85  const float_v xCorr = fR - fR * rsqrt(1 - p.SinPhi() * p.SinPhi());
86  // xCorr /= cos(3.f/180.f*3.141592); // currently neglect stereo angle
87  x1(fIsLeft) += xCorr;
88  x1(!fIsLeft) -= xCorr;
89  return x1;
90 }
friend F32vec4 rsqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:31

◆ X2()

float_v PndCAHitV::X2 ( ) const
inline

Definition at line 45 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

45 { return fX2; }

The documentation for this class was generated from the following file: