PandaRoot
PndCANPlet Class Reference

#include <PndCANPlets.h>

Public Member Functions

 PndCANPlet ()
 
 PndCANPlet (const PndCATrackParam &param)
 
 PndCANPlet (const vector< PndCATESV > &ih, const int iV, const PndCATrackParam &param)
 
int N () const
 
const PndCATESIHit (int IH) const
 
int ISta (int IH) const
 
const PndCATrackParamParam () const
 
float QMomentum () const
 
float QMomentumErr () const
 
float QMomentumErr2 () const
 
char & Level ()
 
const char & Level () const
 
float & Chi2Level ()
 
const float & Chi2Level () const
 
const unsigned int & INeighbours (int i) const
 
const float & Chi2Neighbours (int i) const
 
unsigned int NNeighbours () const
 
vector< pair< float, unsigned int > > & Neighbours ()
 
bool IsRightNeighbour (float pick, const PndCANPlet &a, float &chi2)
 

Static Public Member Functions

static bool compare (const PndCANPlet &i, const PndCANPlet &j)
 

Public Attributes

vector< PndCATESfIHit
 

Detailed Description

Definition at line 31 of file PndCANPlets.h.

Constructor & Destructor Documentation

◆ PndCANPlet() [1/3]

PndCANPlet::PndCANPlet ( )
inline

Definition at line 33 of file PndCANPlets.h.

33 : fParam(), fLevel(-1), fChi2Level(0), fNeighbours() {}

◆ PndCANPlet() [2/3]

PndCANPlet::PndCANPlet ( const PndCATrackParam param)
inline

Definition at line 34 of file PndCANPlets.h.

34 : fParam(param), fLevel(0), fChi2Level(0), fNeighbours() {}

◆ PndCANPlet() [3/3]

PndCANPlet::PndCANPlet ( const vector< PndCATESV > &  ih,
const int  iV,
const PndCATrackParam param 
)
inline

Definition at line 35 of file PndCANPlets.h.

References fIHit, i, and N().

35  : fParam(param), fLevel(0), fChi2Level(0), fNeighbours()
36  {
37  fIHit.resize(ih.size());
38 
39  for (int i = 0; i < N(); i++)
40  fIHit[i] = ih[i][iV];
41  }
unsigned int i
Definition: P4_F32vec4.h:33
int N() const
Definition: PndCANPlets.h:43
vector< PndCATES > fIHit
Definition: PndCANPlets.h:82

Member Function Documentation

◆ Chi2Level() [1/2]

float& PndCANPlet::Chi2Level ( )
inline

Definition at line 58 of file PndCANPlets.h.

Referenced by compare().

58 { return fChi2Level; };

◆ Chi2Level() [2/2]

const float& PndCANPlet::Chi2Level ( ) const
inline

Definition at line 59 of file PndCANPlets.h.

59 { return fChi2Level; };

◆ Chi2Neighbours()

const float& PndCANPlet::Chi2Neighbours ( int  i) const
inline

Definition at line 62 of file PndCANPlets.h.

References i.

62 { return fNeighbours[i].first; };
unsigned int i
Definition: P4_F32vec4.h:33

◆ compare()

static bool PndCANPlet::compare ( const PndCANPlet i,
const PndCANPlet j 
)
inlinestatic

Definition at line 80 of file PndCANPlets.h.

References Chi2Level(), and Level().

80 { return (i.Level() > j.Level()) || (i.Level() == j.Level() && i.Chi2Level() < j.Chi2Level()); }
char & Level()
Definition: PndCANPlets.h:55
float & Chi2Level()
Definition: PndCANPlets.h:58

◆ IHit()

const PndCATES& PndCANPlet::IHit ( int  IH) const
inline

Definition at line 45 of file PndCANPlets.h.

References fIHit.

Referenced by IsRightNeighbour().

45 { return fIHit[IH]; }
vector< PndCATES > fIHit
Definition: PndCANPlets.h:82

◆ INeighbours()

const unsigned int& PndCANPlet::INeighbours ( int  i) const
inline

Definition at line 61 of file PndCANPlets.h.

References i.

61 { return fNeighbours[i].second; };
unsigned int i
Definition: P4_F32vec4.h:33

◆ IsRightNeighbour()

bool PndCANPlet::IsRightNeighbour ( float  pick,
const PndCANPlet a,
float &  chi2 
)
inline

Definition at line 67 of file PndCANPlets.h.

References fabs(), i, IHit(), N(), QMomentum(), QMomentumErr2(), and sqrt().

68  {
69  int start = (N() - a.N() < 0) ? 0 : N() - a.N();
70  for (int i = start; i < N() - 1; i++)
71  if (IHit(i + 1) != a.IHit(i))
72  return false;
73  chi2 = fabs(QMomentum() - a.QMomentum()) / sqrt(QMomentumErr2() + a.QMomentumErr2());
74  if (chi2 > pick)
75  return false; // neighbours must have same qp
76  chi2 *= chi2;
77  return true;
78  }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:40
float QMomentum() const
Definition: PndCANPlets.h:51
unsigned int i
Definition: P4_F32vec4.h:33
int N() const
Definition: PndCANPlets.h:43
float QMomentumErr2() const
Definition: PndCANPlets.h:53
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:58
const PndCATES & IHit(int IH) const
Definition: PndCANPlets.h:45

◆ ISta()

int PndCANPlet::ISta ( int  IH) const
inline

Definition at line 46 of file PndCANPlets.h.

References fIHit.

46 { return fIHit[IH].s; }
vector< PndCATES > fIHit
Definition: PndCANPlets.h:82

◆ Level() [1/2]

char& PndCANPlet::Level ( )
inline

Definition at line 55 of file PndCANPlets.h.

Referenced by compare().

55 { return fLevel; };

◆ Level() [2/2]

const char& PndCANPlet::Level ( ) const
inline

Definition at line 56 of file PndCANPlets.h.

56 { return fLevel; };

◆ N()

int PndCANPlet::N ( ) const
inline

Definition at line 43 of file PndCANPlets.h.

References fIHit.

Referenced by IsRightNeighbour(), and PndCANPlet().

43 { return fIHit.size(); }
vector< PndCATES > fIHit
Definition: PndCANPlets.h:82

◆ Neighbours()

vector<pair<float, unsigned int> >& PndCANPlet::Neighbours ( )
inline

Definition at line 64 of file PndCANPlets.h.

64 { return fNeighbours; }

◆ NNeighbours()

unsigned int PndCANPlet::NNeighbours ( ) const
inline

Definition at line 63 of file PndCANPlets.h.

63 { return fNeighbours.size(); };

◆ Param()

const PndCATrackParam& PndCANPlet::Param ( ) const
inline

Definition at line 48 of file PndCANPlets.h.

48 { return fParam; }

◆ QMomentum()

float PndCANPlet::QMomentum ( ) const
inline

Definition at line 51 of file PndCANPlets.h.

References PndCATrackParam::QMomentum().

Referenced by IsRightNeighbour().

51 { return fParam.QMomentum(); }
float QMomentum() const

◆ QMomentumErr()

float PndCANPlet::QMomentumErr ( ) const
inline

Definition at line 52 of file PndCANPlets.h.

References PndCATrackParam::Err2QMomentum(), and sqrt().

52 { return sqrt(fParam.Err2QMomentum()); } // qp err
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:40
float Err2QMomentum() const

◆ QMomentumErr2()

float PndCANPlet::QMomentumErr2 ( ) const
inline

Definition at line 53 of file PndCANPlets.h.

References PndCATrackParam::Err2QMomentum().

Referenced by IsRightNeighbour().

53 { return fParam.Err2QMomentum(); } // qp err^2
float Err2QMomentum() const

Member Data Documentation

◆ fIHit

vector<PndCATES> PndCANPlet::fIHit

Definition at line 82 of file PndCANPlets.h.

Referenced by IHit(), ISta(), N(), and PndCANPlet().


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