Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFParticlePVReconstructor Class Reference

Class for reconstruction of primary vertices. More...

#include <KFParticle/blob/master/KFParticle/KFParticlePVReconstructor.h>

+ Collaboration diagram for KFParticlePVReconstructor:

Classes

class  KFParticleCluster
 A helper structure for reconstruction of a primary vertex. More...
 

Public Member Functions

 KFParticlePVReconstructor ()
 
 ~KFParticlePVReconstructor ()
 
void Init (KFPTrackVector *tracks, int nParticles)
 
void ReconstructPrimVertex ()
 
int NPrimaryVertices () const
 Returns number of the found candidates for the primary vertex.
 
KFParticleGetPrimVertex (int iPV=0)
 Returns primary vertex candidate in KFParticle with index "iPV".
 
KFVertexGetPrimKFVertex (int iPV=0)
 Returns primary vertex candidate in KFVertex with index "iPV".
 
std::vector< int > & GetPVTrackIndexArray (int iPV=0)
 Returns vector with track indices from a cluster with index "iPV".
 
KFParticleGetParticle (int i)
 Returns input particle with index "i".
 
void SetBeamLine (KFParticle &p)
 Sets the beam line position and direction, sets corresponding flag to "true".
 
bool IsBeamLine () const
 Check if the beam line is set.
 
void AddPV (const KFVertex &pv, const std::vector< int > &tracks)
 
void AddPV (const KFVertex &pv)
 
void CleanPV ()
 Clean vectors with primary vertex candidates and corresponding clusters.
 
void SetChi2PrimaryCut (float chi2)
 Sets cut fChi2Cut on chi2-deviation of primary tracks from the vertex candidate to "chi2" and a soft preparation cut fChi2CutPreparation to "10*chi2".
 

Private Member Functions

KFParticlePVReconstructoroperator= (KFParticlePVReconstructor &)
 Is not defined. Deny copying of the objects of this class.
 
 KFParticlePVReconstructor (KFParticlePVReconstructor &)
 Is not defined. Deny copying of the objects of this class.
 
void FindPrimaryClusters (int cutNDF=1)
 

Private Attributes

std::vector< KFParticlefParticles
 Array of the input particles constructed from tracks.
 
int fNParticles
 Number of the input particles.
 
std::vector< float > fWeight
 Vector with weights of each track, the weight is defined in KFParticlePVReconstructor::Init().
 
KFParticle fBeamLine
 Position and direction of the beam line.
 
bool fIsBeamLine
 Flag showing if the beam line is set.
 
std::vector< KFParticleClusterfClusters
 Vector with clusters to be used for fit of a primary vertex.
 
std::vector< KFVertexfPrimVertices
 Vector with reconstructed candidates for a primary vertex.
 
float fChi2CutPreparation
 A soft cut on the chi2-deviation which is used to form a cluster.
 
float fChi2Cut
 Cut on the chi2-deviation of the tracks to the primary vertex.
 

Detailed Description

Class for reconstruction of primary vertices.

Author
I.Kisel, M.Zyzak
Date
05.02.2019
Version
1.0

The class is based on KFVertex. For reconstruction of primary vertices the Kalman filter mathematics is used. Allows reconstruction of multiple primary vertices.

Definition at line 45 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 45 of file KFParticlePVReconstructor.h

Constructor & Destructor Documentation

KFParticlePVReconstructor::KFParticlePVReconstructor ( )
inline

Definition at line 47 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 47 of file KFParticlePVReconstructor.h

KFParticlePVReconstructor::~KFParticlePVReconstructor ( )
inline

Definition at line 48 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 48 of file KFParticlePVReconstructor.h

KFParticlePVReconstructor::KFParticlePVReconstructor ( KFParticlePVReconstructor )
private

Is not defined. Deny copying of the objects of this class.

Member Function Documentation

void KFParticlePVReconstructor::AddPV ( const KFVertex pv,
const std::vector< int > &  tracks 
)

Adds externally found primary vertex to the list together with the cluster of tracks from this vertex.

Parameters
[in]pv- external primary vertex
[in]tracks- vector with indices of tracks associated with the provided primary vertex.

Definition at line 356 of file KFParticlePVReconstructor.cxx.

View newest version in sPHENIX GitHub at line 356 of file KFParticlePVReconstructor.cxx

References fClusters, fPrimVertices, KFParticlePVReconstructor::KFParticleCluster::fTracks, and tracks().

Referenced by KFParticleTopoReconstructor::AddPV(), and KFParticleTopoReconstructor::ReconstructPrimVertex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KFParticlePVReconstructor::AddPV ( const KFVertex pv)

Adds externally found primary vertex to the list.

Parameters
[in]pv- external primary vertex

Definition at line 364 of file KFParticlePVReconstructor.cxx.

View newest version in sPHENIX GitHub at line 364 of file KFParticlePVReconstructor.cxx

References fClusters, and fPrimVertices.

void KFParticlePVReconstructor::CleanPV ( )
inline

Clean vectors with primary vertex candidates and corresponding clusters.

Definition at line 73 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 73 of file KFParticlePVReconstructor.h

References fClusters, and fPrimVertices.

Referenced by KFParticleTopoReconstructor::CleanPV(), KFParticleTopoReconstructor::Clear(), and KFParticleTopoReconstructor::ReconstructPrimVertex().

+ Here is the caller graph for this function:

void KFParticlePVReconstructor::FindPrimaryClusters ( int  cutNDF = 1)
private

The functions searches for a set of clusters of particles - candidates for the primary vertex:
1) input particles are assumed to be transported to the beam line or target position;
2) at first, the best particle with the highest weight is selected;
3) then a cluster is formed around this particle;
4) if a beam line is set it is used for the reconstruction as an additional track, but will not be added to the resulting cluster of daughter particles;
5) the primary vertex candidate is fitted with KFVertex::ConstructPrimaryVertex() using KFParticlePVReconstructor::fChi2Cut;
6) cluster is cleaned from particles deviating more then the fChi2Cut from the fitted candidate;
7) the cluster and the vertex candidate are stored if they satisfy the provided cutNDF;
8) the procedure is repeated until not used tracks with well-defined weight are left.

Parameters
[in]cutNDF- cut on the number of degrees of freedom (effectively - number of particles used for the reconstruction), if resulting NDF is smaller then this cut - the PV-candidate is rejected

Definition at line 142 of file KFParticlePVReconstructor.cxx.

View newest version in sPHENIX GitHub at line 142 of file KFParticlePVReconstructor.cxx

References KFVertex::ConstructPrimaryVertex(), f, fBeamLine, KFParticlePVReconstructor::KFParticleCluster::fC, fChi2Cut, fClusters, fNParticles, KFParticlePVReconstructor::KFParticleCluster::fP, fParticles, fPrimVertices, KFParticlePVReconstructor::KFParticleCluster::fTracks, fWeight, GetDeviationFromVertex(), KFParticle::GetNDF(), IsBeamLine(), and KFParticleBase::SetConstructMethod().

Referenced by ReconstructPrimVertex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

KFParticle& KFParticlePVReconstructor::GetParticle ( int  i)
inline

Returns input particle with index "i".

Definition at line 58 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 58 of file KFParticlePVReconstructor.h

References assert, fNParticles, fParticles, and i.

KFVertex& KFParticlePVReconstructor::GetPrimKFVertex ( int  iPV = 0)
inline

Returns primary vertex candidate in KFVertex with index "iPV".

Definition at line 56 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 56 of file KFParticlePVReconstructor.h

References fPrimVertices.

Referenced by KFParticleTopoReconstructor::GetPrimKFVertex(), and KFParticleTopoReconstructor::ReconstructPrimVertex().

+ Here is the caller graph for this function:

KFParticle& KFParticlePVReconstructor::GetPrimVertex ( int  iPV = 0)
inline

Returns primary vertex candidate in KFParticle with index "iPV".

Definition at line 55 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 55 of file KFParticlePVReconstructor.h

References fPrimVertices.

Referenced by KFParticleTopoReconstructor::GetPrimVertex().

+ Here is the caller graph for this function:

std::vector<int>& KFParticlePVReconstructor::GetPVTrackIndexArray ( int  iPV = 0)
inline

Returns vector with track indices from a cluster with index "iPV".

Definition at line 57 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 57 of file KFParticlePVReconstructor.h

References fClusters.

Referenced by KFParticleTopoReconstructor::GetPVTrackIndexArray(), KFParticleTopoReconstructor::ReconstructPrimVertex(), and KFParticleTopoReconstructor::SortTracks().

+ Here is the caller graph for this function:

void KFParticlePVReconstructor::Init ( KFPTrackVector tracks,
int  nParticles 
)

The function initialises an input for the search of primary vertices:
1) it receives as an input an array with tracks;
2) tracks are converted to KFParticle objects assuming pion mass;
3) the position of the primary vertex is estimated with simplified Kalman filter equations using all tracks;
4) tracks are checked to deviate from the obtained estimation within KFParticlePVReconstructor::fChi2CutPreparation;
5) from the selected tracks a more precise estimation is obtained using KFVertex::ConstructPrimaryVertex() with soft cut KFParticlePVReconstructor::fChi2CutPreparation;
6) input particles are transported to the DCA point with the obtained estimation;
7) the weight for each particle is calculated according to its errors, if errors are not defined after extrapolation or if particle 10 cm away from the {0,0,0} point the weight of -100 is assigned.

Parameters
[in]tracks- a pointer to the KFPTrackVector with input tracks
[in]nParticles- number of the input tracks

Definition at line 28 of file KFParticlePVReconstructor.cxx.

View newest version in sPHENIX GitHub at line 28 of file KFParticlePVReconstructor.cxx

References C, f, fClusters, fNParticles, fParticles, fPrimVertices, fWeight, KFPTrackVector::GetTrack(), KFPTrack::Id(), r2, TauVsDIS_MachineLearning_Differentiation::X, and TauVsDIS_MachineLearning_Differentiation::Y.

Referenced by KFParticleTopoReconstructor::Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool KFParticlePVReconstructor::IsBeamLine ( ) const
inline

Check if the beam line is set.

Definition at line 61 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 61 of file KFParticlePVReconstructor.h

References fIsBeamLine.

Referenced by FindPrimaryClusters().

+ Here is the caller graph for this function:

int KFParticlePVReconstructor::NPrimaryVertices ( ) const
inline

Returns number of the found candidates for the primary vertex.

Definition at line 54 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 54 of file KFParticlePVReconstructor.h

References fPrimVertices.

Referenced by KFParticleTopoReconstructor::NPrimaryVertices().

+ Here is the caller graph for this function:

KFParticlePVReconstructor& KFParticlePVReconstructor::operator= ( KFParticlePVReconstructor )
private

Is not defined. Deny copying of the objects of this class.

void KFParticlePVReconstructor::ReconstructPrimVertex ( )

Reconstructs primary vertices and corresponding clusters of tracks. For this it calls KFParticlePVReconstructor::FindPrimaryClusters(), if no vertex is found empty primary vertex is used.

Definition at line 330 of file KFParticlePVReconstructor.cxx.

View newest version in sPHENIX GitHub at line 330 of file KFParticlePVReconstructor.cxx

References fClusters, FindPrimaryClusters(), fPrimVertices, KFPVertex::SetChi2(), KFPVertex::SetCovarianceMatrix(), KFPVertex::SetNContributors(), KFPVertex::SetXYZ(), TauVsDIS_MachineLearning_Differentiation::X, TauVsDIS_MachineLearning_Differentiation::Y, and SVM_v1::Z.

Referenced by KFParticleTopoReconstructor::ReconstructPrimVertex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KFParticlePVReconstructor::SetBeamLine ( KFParticle p)
inline

Sets the beam line position and direction, sets corresponding flag to "true".

Definition at line 60 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 60 of file KFParticlePVReconstructor.h

References fBeamLine, fIsBeamLine, and merge_hashes::p.

Referenced by KFParticleTopoReconstructor::SetBeamLine().

+ Here is the caller graph for this function:

void KFParticlePVReconstructor::SetChi2PrimaryCut ( float  chi2)
inline

Sets cut fChi2Cut on chi2-deviation of primary tracks from the vertex candidate to "chi2" and a soft preparation cut fChi2CutPreparation to "10*chi2".

Definition at line 77 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 77 of file KFParticlePVReconstructor.h

References fChi2Cut, and fChi2CutPreparation.

Referenced by KFParticleTopoReconstructor::SetChi2PrimaryCut().

+ Here is the caller graph for this function:

Member Data Documentation

KFParticle KFParticlePVReconstructor::fBeamLine
private

Position and direction of the beam line.

Definition at line 90 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 90 of file KFParticlePVReconstructor.h

Referenced by FindPrimaryClusters(), and SetBeamLine().

float KFParticlePVReconstructor::fChi2Cut
private

Cut on the chi2-deviation of the tracks to the primary vertex.

See Also
KFVertex::ConstructPrimaryVertex(), where it is used.

Definition at line 112 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 112 of file KFParticlePVReconstructor.h

Referenced by FindPrimaryClusters(), and SetChi2PrimaryCut().

float KFParticlePVReconstructor::fChi2CutPreparation
private

A soft cut on the chi2-deviation which is used to form a cluster.

Definition at line 111 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 111 of file KFParticlePVReconstructor.h

Referenced by SetChi2PrimaryCut().

std::vector< KFParticleCluster > KFParticlePVReconstructor::fClusters
private

Vector with clusters to be used for fit of a primary vertex.

Definition at line 108 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 108 of file KFParticlePVReconstructor.h

Referenced by AddPV(), CleanPV(), FindPrimaryClusters(), GetPVTrackIndexArray(), Init(), and ReconstructPrimVertex().

bool KFParticlePVReconstructor::fIsBeamLine
private

Flag showing if the beam line is set.

Definition at line 91 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 91 of file KFParticlePVReconstructor.h

Referenced by IsBeamLine(), and SetBeamLine().

int KFParticlePVReconstructor::fNParticles
private

Number of the input particles.

Definition at line 86 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 86 of file KFParticlePVReconstructor.h

Referenced by FindPrimaryClusters(), GetParticle(), and Init().

std::vector<KFParticle> KFParticlePVReconstructor::fParticles
private

Array of the input particles constructed from tracks.

Definition at line 85 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 85 of file KFParticlePVReconstructor.h

Referenced by FindPrimaryClusters(), GetParticle(), and Init().

std::vector<KFVertex> KFParticlePVReconstructor::fPrimVertices
private

Vector with reconstructed candidates for a primary vertex.

Definition at line 109 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 109 of file KFParticlePVReconstructor.h

Referenced by AddPV(), CleanPV(), FindPrimaryClusters(), GetPrimKFVertex(), GetPrimVertex(), Init(), NPrimaryVertices(), and ReconstructPrimVertex().

std::vector<float> KFParticlePVReconstructor::fWeight
private

Vector with weights of each track, the weight is defined in KFParticlePVReconstructor::Init().

Definition at line 88 of file KFParticlePVReconstructor.h.

View newest version in sPHENIX GitHub at line 88 of file KFParticlePVReconstructor.h

Referenced by FindPrimaryClusters(), and Init().


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