PandaRoot
FTSCANPlet Class Reference

#include <FTSCANPlets.h>

Public Member Functions

 FTSCANPlet ()
 
 FTSCANPlet (const vector< TESV > &ih, const int iV, const PndFTSCATrackParam &param)
 
int N () const
 
const TESIHit (int IH) const
 
int ISta (int IH) const
 
const PndFTSCATrackParamParam () 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, const FTSCANPlet &a, float &chi2)
 

Static Public Member Functions

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

Detailed Description

Definition at line 31 of file FTSCANPlets.h.

Constructor & Destructor Documentation

◆ FTSCANPlet() [1/2]

FTSCANPlet::FTSCANPlet ( )
inline

Definition at line 36 of file FTSCANPlets.h.

Referenced by FTSCANPlets::FTSCANPlets().

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

◆ FTSCANPlet() [2/2]

FTSCANPlet::FTSCANPlet ( const vector< TESV > &  ih,
const int  iV,
const PndFTSCATrackParam param 
)
inline

Definition at line 37 of file FTSCANPlets.h.

References i, and N().

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

Member Function Documentation

◆ Chi2Level() [1/2]

float& FTSCANPlet::Chi2Level ( )
inline

Definition at line 60 of file FTSCANPlets.h.

Referenced by compare().

60 { return fChi2Level; };

◆ Chi2Level() [2/2]

const float& FTSCANPlet::Chi2Level ( ) const
inline

Definition at line 61 of file FTSCANPlets.h.

61 { return fChi2Level; };

◆ Chi2Neighbours()

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

Definition at line 64 of file FTSCANPlets.h.

References i.

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

◆ compare()

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

Definition at line 82 of file FTSCANPlets.h.

References Chi2Level(), and Level().

82 { return (i.Level() > j.Level()) || (i.Level() == j.Level() && i.Chi2Level() < j.Chi2Level()); }
float & Chi2Level()
Definition: FTSCANPlets.h:60
char & Level()
Definition: FTSCANPlets.h:57

◆ IHit()

const TES& FTSCANPlet::IHit ( int  IH) const
inline

Definition at line 47 of file FTSCANPlets.h.

Referenced by IsRightNeighbour().

47 { return fIHit[IH]; }

◆ INeighbours()

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

Definition at line 63 of file FTSCANPlets.h.

References i.

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

◆ IsRightNeighbour()

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

Definition at line 69 of file FTSCANPlets.h.

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

70  { //[R.K. 9/2018] unused
71  int start = (N() - a.N() < 0) ? 0 : N() - a.N();
72  for (int i = start; i < N() - 1; i++)
73  if (IHit(i + 1) != a.IHit(i))
74  return false;
75  chi2 = fabs(QMomentum() - a.QMomentum()) / sqrt(QMomentumErr2() + a.QMomentumErr2());
76  /*if ( chi2 > pick )
77  return false; // neighbours must have same qp*/
78  chi2 *= chi2;
79  return true;
80  }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:40
unsigned int i
Definition: P4_F32vec4.h:33
float QMomentum() const
Definition: FTSCANPlets.h:53
float QMomentumErr2() const
Definition: FTSCANPlets.h:55
int N() const
Definition: FTSCANPlets.h:45
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:58
const TES & IHit(int IH) const
Definition: FTSCANPlets.h:47

◆ ISta()

int FTSCANPlet::ISta ( int  IH) const
inline

Definition at line 48 of file FTSCANPlets.h.

48 { return fIHit[IH].s; }

◆ Level() [1/2]

char& FTSCANPlet::Level ( )
inline

Definition at line 57 of file FTSCANPlets.h.

Referenced by compare().

57 { return fLevel; };

◆ Level() [2/2]

const char& FTSCANPlet::Level ( ) const
inline

Definition at line 58 of file FTSCANPlets.h.

58 { return fLevel; };

◆ N()

int FTSCANPlet::N ( ) const
inline

Definition at line 45 of file FTSCANPlets.h.

Referenced by FTSCANPlet(), and IsRightNeighbour().

45 { return fIHit.size(); }

◆ Neighbours()

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

Definition at line 66 of file FTSCANPlets.h.

66 { return fNeighbours; }

◆ NNeighbours()

unsigned int FTSCANPlet::NNeighbours ( ) const
inline

Definition at line 65 of file FTSCANPlets.h.

65 { return fNeighbours.size(); };

◆ Param()

const PndFTSCATrackParam& FTSCANPlet::Param ( ) const
inline

Definition at line 50 of file FTSCANPlets.h.

50 { return fParam; }

◆ QMomentum()

float FTSCANPlet::QMomentum ( ) const
inline

Definition at line 53 of file FTSCANPlets.h.

References PndFTSCATrackParam::QMomentum().

Referenced by IsRightNeighbour().

53 { return fParam.QMomentum(); }

◆ QMomentumErr()

float FTSCANPlet::QMomentumErr ( ) const
inline

Definition at line 54 of file FTSCANPlets.h.

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

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

◆ QMomentumErr2()

float FTSCANPlet::QMomentumErr2 ( ) const
inline

Definition at line 55 of file FTSCANPlets.h.

References PndFTSCATrackParam::Err2QMomentum().

Referenced by IsRightNeighbour().

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

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