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 31 of file PndCAHitsV.h.

Constructor & Destructor Documentation

◆ PndCAHitV() [1/2]

PndCAHitV::PndCAHitV ( )
inline

Definition at line 33 of file PndCAHitsV.h.

34  : 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),
35  fErr2A(Vc::Zero), fU(Vc::Zero), fDR(Vc::Zero), fIsLeft(true), fISec(Vc::Zero), fAngle(Vc::Zero)
36  {
37  }

◆ PndCAHitV() [2/2]

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

Definition at line 104 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().

105 {
106  int_v::Memory mIStation;
107  mIStation = int_v(-1);
108 
109  uint_v::Memory mId;
110  float_v::Memory mX1, mX2, mX0;
111  float_v::Memory mErr2X1, mErrX12, mErr2X2;
112  float_v::Memory mR, mU, mDR, mErr2R, mErr2A, mIsLeft;
113  float_v::Memory mAlpha;
114  float_v::Memory mIsUsed;
115  int_v::Memory mISec;
116 
117  foreach_bit(unsigned short iV, valid)
118  {
119  const PndCAHit &h = hits[iV];
120 
121  mId[iV] = h.Id();
122  mIStation[iV] = h.IStation();
123  mX1[iV] = h.X1();
124  mX2[iV] = h.X2();
125  mX0[iV] = h.X0();
126 
127  mErr2X1[iV] = h.Err2X1();
128  mErrX12[iV] = h.ErrX12();
129  mErr2X2[iV] = h.Err2X2();
130  mR[iV] = h.R();
131  mU[iV] = h.U();
132  mDR[iV] = h.DR();
133  mErr2R[iV] = h.Err2R();
134  mErr2A[iV] = h.Err2A();
135  mIsLeft[iV] = h.IsLeft() ? 1.f : 0.f;
136  mISec[iV] = h.ISec();
137  mAlpha[iV] = h.Angle();
138  mIsUsed[iV] = h.IsUsed() ? 1.f : 0.f;
139  }
140  fId = uint_v(mId);
141  fIStation = int_v(mIStation);
142  fX1 = float_v(mX1);
143  fX2 = float_v(mX2);
144  fX0 = float_v(mX0);
145  fErr2X1 = float_v(mErr2X1);
146  fErrX12 = float_v(mErrX12);
147  fErr2X2 = float_v(mErr2X2);
148  fR = float_v(mR);
149  fErr2R = float_v(mErr2R);
150  fErr2A = float_v(mErr2A);
151  fIsLeft = (float_v(mIsLeft) == 1.f);
152  fU = float_v(mU);
153  fDR = float_v(mDR);
154  fISec = int_v(mISec);
155  fAngle = float_v(mAlpha);
156 }
float R() const
Definition: PndCAHits.h:55
float Angle() const
Definition: PndCAHits.h:64
float DR() const
Definition: PndCAHits.h:56
float U() const
Definition: PndCAHits.h:57
bool IsLeft() const
Definition: PndCAHits.h:61
float Err2X1() const
Definition: PndCAHits.h:51
bool IsUsed() const
Definition: PndCAHits.h:66
float Err2A() const
Definition: PndCAHits.h:59
float Err2R() const
Definition: PndCAHits.h:58
int Id() const
Definition: PndCAHits.h:43
float Err2X2() const
Definition: PndCAHits.h:53
float X1() const
Definition: PndCAHits.h:48
int ISec() const
Definition: PndCAHits.h:62
float X2() const
Definition: PndCAHits.h:49
char IStation() const
Definition: PndCAHits.h:41
float ErrX12() const
Definition: PndCAHits.h:52
float X0() const
Definition: PndCAHits.h:47

Member Function Documentation

◆ Angle()

float_v PndCAHitV::Angle ( ) const
inline

Definition at line 71 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

71 { return fAngle; }

◆ DR()

float_v PndCAHitV::DR ( ) const
inline

Definition at line 65 of file PndCAHitsV.h.

65 { return fDR; }

◆ Err2A()

float_v PndCAHitV::Err2A ( ) const
inline

Definition at line 68 of file PndCAHitsV.h.

68 { return fErr2A; }

◆ Err2R()

float_v PndCAHitV::Err2R ( ) const
inline

Definition at line 67 of file PndCAHitsV.h.

67 { return fErr2R; }

◆ Err2X1()

float_v PndCAHitV::Err2X1 ( ) const
inline

Definition at line 59 of file PndCAHitsV.h.

59 { return fErr2X1; }

◆ Err2X2()

float_v PndCAHitV::Err2X2 ( ) const
inline

Definition at line 61 of file PndCAHitsV.h.

61 { return fErr2X2; }

◆ ErrX12()

float_v PndCAHitV::ErrX12 ( ) const
inline

Definition at line 60 of file PndCAHitsV.h.

60 { return fErrX12; }

◆ GetGlobalCoor()

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

Definition at line 73 of file PndCAHitsV.h.

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

74  {
75  PndCAParameters::CALocalToGlobal(float(X0()[iV]), float(X1()[iV]), float(X2()[iV]), float(Angle()[iV]), x, y, z);
76  }
float_v Angle() const
Definition: PndCAHitsV.h:71
float_v X0() const
Definition: PndCAHitsV.h:55
static void CALocalToGlobal(T x0, T x1, T angle, T &x, T &y)
float_v X1() const
Definition: PndCAHitsV.h:56
float_v X2() const
Definition: PndCAHitsV.h:57

◆ Id()

uint_v PndCAHitV::Id ( ) const
inline

Definition at line 51 of file PndCAHitsV.h.

References X1Corrected().

51 { return fId; };

◆ ISec()

int_v PndCAHitV::ISec ( ) const
inline

Definition at line 66 of file PndCAHitsV.h.

66 { return fISec; }

◆ IsLeft()

float_m PndCAHitV::IsLeft ( ) const
inline

Definition at line 69 of file PndCAHitsV.h.

69 { return fIsLeft; }

◆ IStation()

char PndCAHitV::IStation ( ) const
inline

Definition at line 43 of file PndCAHitsV.h.

References IsValid(), and v.

44  {
45  const float_m v = IsValid();
46  assert(!v.isEmpty());
47  return fIStation[v.firstOne()];
48  }
__m128 v
Definition: P4_F32vec4.h:15
float_m IsValid() const
Definition: PndCAHitsV.h:41

◆ IStations()

int_v PndCAHitV::IStations ( ) const
inline

Definition at line 49 of file PndCAHitsV.h.

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

◆ IsValid()

float_m PndCAHitV::IsValid ( ) const
inline

Definition at line 41 of file PndCAHitsV.h.

Referenced by IStation().

41 { return fIStation >= 0; }

◆ R()

float_v PndCAHitV::R ( ) const
inline

Definition at line 64 of file PndCAHitsV.h.

64 { return fR; }

◆ U()

float_v PndCAHitV::U ( ) const
inline

Definition at line 63 of file PndCAHitsV.h.

63 { return fU; }

◆ X0()

float_v PndCAHitV::X0 ( ) const
inline

Definition at line 55 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

55 { return fX0; }

◆ X1()

float_v PndCAHitV::X1 ( ) const
inline

Definition at line 56 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

56 { return fX1; }

◆ X1Corrected()

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

Definition at line 94 of file PndCAHitsV.h.

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

Referenced by Id().

95 {
96  float_v x1 = fX1;
97  const float_v xCorr = fR - fR * rsqrt(1 - p.SinPhi() * p.SinPhi());
98  // xCorr /= cos(3.f/180.f*3.141592); // currently neglect stereo angle
99  x1(fIsLeft) += xCorr;
100  x1(!fIsLeft) -= xCorr;
101  return x1;
102 }
friend F32vec4 rsqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:43

◆ X2()

float_v PndCAHitV::X2 ( ) const
inline

Definition at line 57 of file PndCAHitsV.h.

Referenced by GetGlobalCoor().

57 { return fX2; }

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