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 19 of file PndCANPlets.h.

Constructor & Destructor Documentation

◆ PndCANPlet() [1/3]

PndCANPlet::PndCANPlet ( )
inline

Definition at line 21 of file PndCANPlets.h.

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

◆ PndCANPlet() [2/3]

PndCANPlet::PndCANPlet ( const PndCATrackParam param)
inline

Definition at line 22 of file PndCANPlets.h.

22 : 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 23 of file PndCANPlets.h.

References fIHit, i, and N().

23  : fParam(param), fLevel(0), fChi2Level(0), fNeighbours()
24  {
25  fIHit.resize(ih.size());
26 
27  for (int i = 0; i < N(); i++)
28  fIHit[i] = ih[i][iV];
29  }
unsigned int i
Definition: P4_F32vec4.h:21
int N() const
Definition: PndCANPlets.h:31
vector< PndCATES > fIHit
Definition: PndCANPlets.h:70

Member Function Documentation

◆ Chi2Level() [1/2]

float& PndCANPlet::Chi2Level ( )
inline

Definition at line 46 of file PndCANPlets.h.

Referenced by compare().

46 { return fChi2Level; };

◆ Chi2Level() [2/2]

const float& PndCANPlet::Chi2Level ( ) const
inline

Definition at line 47 of file PndCANPlets.h.

47 { return fChi2Level; };

◆ Chi2Neighbours()

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

Definition at line 50 of file PndCANPlets.h.

References i.

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

◆ compare()

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

Definition at line 68 of file PndCANPlets.h.

References Chi2Level(), and Level().

68 { return (i.Level() > j.Level()) || (i.Level() == j.Level() && i.Chi2Level() < j.Chi2Level()); }
char & Level()
Definition: PndCANPlets.h:43
float & Chi2Level()
Definition: PndCANPlets.h:46

◆ IHit()

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

Definition at line 33 of file PndCANPlets.h.

References fIHit.

Referenced by IsRightNeighbour().

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

◆ INeighbours()

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

Definition at line 49 of file PndCANPlets.h.

References i.

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

◆ IsRightNeighbour()

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

Definition at line 55 of file PndCANPlets.h.

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

56  {
57  int start = (N() - a.N() < 0) ? 0 : N() - a.N();
58  for (int i = start; i < N() - 1; i++)
59  if (IHit(i + 1) != a.IHit(i))
60  return false;
61  chi2 = fabs(QMomentum() - a.QMomentum()) / sqrt(QMomentumErr2() + a.QMomentumErr2());
62  if (chi2 > pick)
63  return false; // neighbours must have same qp
64  chi2 *= chi2;
65  return true;
66  }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:28
float QMomentum() const
Definition: PndCANPlets.h:39
unsigned int i
Definition: P4_F32vec4.h:21
int N() const
Definition: PndCANPlets.h:31
float QMomentumErr2() const
Definition: PndCANPlets.h:41
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:46
const PndCATES & IHit(int IH) const
Definition: PndCANPlets.h:33

◆ ISta()

int PndCANPlet::ISta ( int  IH) const
inline

Definition at line 34 of file PndCANPlets.h.

References fIHit.

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

◆ Level() [1/2]

char& PndCANPlet::Level ( )
inline

Definition at line 43 of file PndCANPlets.h.

Referenced by compare().

43 { return fLevel; };

◆ Level() [2/2]

const char& PndCANPlet::Level ( ) const
inline

Definition at line 44 of file PndCANPlets.h.

44 { return fLevel; };

◆ N()

int PndCANPlet::N ( ) const
inline

Definition at line 31 of file PndCANPlets.h.

References fIHit.

Referenced by IsRightNeighbour(), and PndCANPlet().

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

◆ Neighbours()

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

Definition at line 52 of file PndCANPlets.h.

52 { return fNeighbours; }

◆ NNeighbours()

unsigned int PndCANPlet::NNeighbours ( ) const
inline

Definition at line 51 of file PndCANPlets.h.

51 { return fNeighbours.size(); };

◆ Param()

const PndCATrackParam& PndCANPlet::Param ( ) const
inline

Definition at line 36 of file PndCANPlets.h.

36 { return fParam; }

◆ QMomentum()

float PndCANPlet::QMomentum ( ) const
inline

Definition at line 39 of file PndCANPlets.h.

References PndCATrackParam::QMomentum().

Referenced by IsRightNeighbour().

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

◆ QMomentumErr()

float PndCANPlet::QMomentumErr ( ) const
inline

Definition at line 40 of file PndCANPlets.h.

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

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

◆ QMomentumErr2()

float PndCANPlet::QMomentumErr2 ( ) const
inline

Definition at line 41 of file PndCANPlets.h.

References PndCATrackParam::Err2QMomentum().

Referenced by IsRightNeighbour().

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

Member Data Documentation

◆ fIHit

vector<PndCATES> PndCANPlet::fIHit

Definition at line 70 of file PndCANPlets.h.

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


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