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

Constructor & Destructor Documentation

◆ FTSCANPlet() [1/2]

FTSCANPlet::FTSCANPlet ( )
inline

Definition at line 24 of file FTSCANPlets.h.

Referenced by FTSCANPlets::FTSCANPlets().

24 : 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 25 of file FTSCANPlets.h.

References i, and N().

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

Member Function Documentation

◆ Chi2Level() [1/2]

float& FTSCANPlet::Chi2Level ( )
inline

Definition at line 48 of file FTSCANPlets.h.

Referenced by compare().

48 { return fChi2Level; };

◆ Chi2Level() [2/2]

const float& FTSCANPlet::Chi2Level ( ) const
inline

Definition at line 49 of file FTSCANPlets.h.

49 { return fChi2Level; };

◆ Chi2Neighbours()

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

Definition at line 52 of file FTSCANPlets.h.

References i.

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

◆ compare()

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

Definition at line 70 of file FTSCANPlets.h.

References Chi2Level(), and Level().

70 { return (i.Level() > j.Level()) || (i.Level() == j.Level() && i.Chi2Level() < j.Chi2Level()); }
float & Chi2Level()
Definition: FTSCANPlets.h:48
char & Level()
Definition: FTSCANPlets.h:45

◆ IHit()

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

Definition at line 35 of file FTSCANPlets.h.

Referenced by IsRightNeighbour().

35 { return fIHit[IH]; }

◆ INeighbours()

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

Definition at line 51 of file FTSCANPlets.h.

References i.

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

◆ IsRightNeighbour()

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

Definition at line 57 of file FTSCANPlets.h.

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

58  { //[R.K. 9/2018] unused
59  int start = (N() - a.N() < 0) ? 0 : N() - a.N();
60  for (int i = start; i < N() - 1; i++)
61  if (IHit(i + 1) != a.IHit(i))
62  return false;
63  chi2 = fabs(QMomentum() - a.QMomentum()) / sqrt(QMomentumErr2() + a.QMomentumErr2());
64  /*if ( chi2 > pick )
65  return false; // neighbours must have same qp*/
66  chi2 *= chi2;
67  return true;
68  }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:28
unsigned int i
Definition: P4_F32vec4.h:21
float QMomentum() const
Definition: FTSCANPlets.h:41
float QMomentumErr2() const
Definition: FTSCANPlets.h:43
int N() const
Definition: FTSCANPlets.h:33
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:46
const TES & IHit(int IH) const
Definition: FTSCANPlets.h:35

◆ ISta()

int FTSCANPlet::ISta ( int  IH) const
inline

Definition at line 36 of file FTSCANPlets.h.

36 { return fIHit[IH].s; }

◆ Level() [1/2]

char& FTSCANPlet::Level ( )
inline

Definition at line 45 of file FTSCANPlets.h.

Referenced by compare().

45 { return fLevel; };

◆ Level() [2/2]

const char& FTSCANPlet::Level ( ) const
inline

Definition at line 46 of file FTSCANPlets.h.

46 { return fLevel; };

◆ N()

int FTSCANPlet::N ( ) const
inline

Definition at line 33 of file FTSCANPlets.h.

Referenced by FTSCANPlet(), and IsRightNeighbour().

33 { return fIHit.size(); }

◆ Neighbours()

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

Definition at line 54 of file FTSCANPlets.h.

54 { return fNeighbours; }

◆ NNeighbours()

unsigned int FTSCANPlet::NNeighbours ( ) const
inline

Definition at line 53 of file FTSCANPlets.h.

53 { return fNeighbours.size(); };

◆ Param()

const PndFTSCATrackParam& FTSCANPlet::Param ( ) const
inline

Definition at line 38 of file FTSCANPlets.h.

38 { return fParam; }

◆ QMomentum()

float FTSCANPlet::QMomentum ( ) const
inline

Definition at line 41 of file FTSCANPlets.h.

References PndFTSCATrackParam::QMomentum().

Referenced by IsRightNeighbour().

41 { return fParam.QMomentum(); }

◆ QMomentumErr()

float FTSCANPlet::QMomentumErr ( ) const
inline

Definition at line 42 of file FTSCANPlets.h.

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

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

◆ QMomentumErr2()

float FTSCANPlet::QMomentumErr2 ( ) const
inline

Definition at line 43 of file FTSCANPlets.h.

References PndFTSCATrackParam::Err2QMomentum().

Referenced by IsRightNeighbour().

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

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