Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFParticleTopoReconstructor.h File Reference
#include "KFParticlePVReconstructor.h"
#include "KFParticleFinder.h"
#include <vector>
#include <string>
#include "KFPTrackVector.h"
#include "KFParticleSIMD.h"
+ Include dependency graph for KFParticleTopoReconstructor.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  KFParticleTopoReconstructor
 Class for reconstruction of the full event topology including primary vertices and short-lived particles. More...
 

Functions

class KFParticleTopoReconstructor __attribute__ ((aligned(sizeof(float_v))))
 
 KFParticleTopoReconstructor ()
 
 ~KFParticleTopoReconstructor ()
 
void Init (std::vector< KFParticle > &particles, std::vector< int > *pdg=0, std::vector< int > *nPixelHits=0)
 
void Init (const KFPTrackVector *particles, const std::vector< KFParticle > &pv)
 
void Init (KFPTrackVector &tracks, KFPTrackVector &tracksAtLastPoint)
 
void SetEmcClusters (KFPEmcCluster *clusters)
 Sets input clusters of the electromagnetic calorimeter to KFParticleFinder.
 
void SetMixedEventAnalysis ()
 KFParticleFinder is forced to be run in the mixed event analysis mode.
 
void DeInit ()
 Sets a pointer to the input tracks KFParticleTopoReconstructor::fTracks to NULL.
 
void Clear ()
 Cleans all candidates for primary vertices and short-lived particles.
 
void ReconstructPrimVertex (bool isHeavySystem=1)
 
void SortTracks ()
 
void ReconstructParticles ()
 
void SelectParticleCandidates ()
 
int NPrimaryVertices () const
 Returns number of the found primary vertex candidates.
 
KFParticleGetPrimVertex (int iPV=0) const
 Return primary vertex candidate with index "iPV".
 
KFVertexGetPrimKFVertex (int iPV=0) const
 Return primary vertex candidate with index "iPV".
 
std::vector< int > & GetPVTrackIndexArray (int iPV=0) const
 
std::vector< KFParticle > const & GetParticles () const
 Returns constant reference to the vector with short-lived particle candidates.
 
void RemoveParticle (const int iParticle)
 Logically kills the candidate for short-lived particle with index "iParticle" by setting its PDG hypothesis to "-1".
 
const KFPTrackVectorGetTracks () const
 Returns a pointer to the arrays with tracks KFParticleTopoReconstructor::fTracks.
 
const kfvector_floatGetChiPrim () const
 Returns a pointer to the arrays with chi2-deviations KFParticleTopoReconstructor::fChiToPrimVtx.
 
KFParticleFinderGetKFParticleFinder ()
 Returns a pointer to the KFParticleFinder object.
 
void CleanPV ()
 
void AddPV (const KFVertex &pv, const std::vector< int > &tracks)
 
void AddPV (const KFVertex &pv)
 
void FillPVIndices ()
 
void AddParticle (const KFParticle &particle)
 Adds an external particle candidate to the vector.
 
void AddCandidate (const KFParticle &candidate, int iPV=-1)
 Adds an external particle candidate to the vector with primary or secondary candidates of KFParticleFinde.
 
void SetBeamLine (KFParticle &p)
 Sets the beam line for precise reconstruction of the primary vertex.
 
void SaveInputParticles (const std::string prefix="KFPData", bool onlySecondary=0)
 
void SetNThreads (short int n)
 Sets the number of threads to be run in KFParticleFinder. Currently is not used.
 
void SetChi2PrimaryCut (float chi)
 
void GetListOfDaughterTracks (const KFParticle &particle, std::vector< int > &daughters)
 
bool ParticleHasRepeatingDaughters (const KFParticle &particle)
 
const KFParticleTopoReconstructoroperator= (const KFParticleTopoReconstructor &a)
 
 KFParticleTopoReconstructor (const KFParticleTopoReconstructor &a)
 A copy constructor. All pointers are set to zero, other members are copied.
 
void CopyCuts (const KFParticleTopoReconstructor *topo)
 
void GetChiToPrimVertex (KFParticleSIMD *pv, const int nPV)
 
void TransportPVTracksToPrimVertex ()
 

Variables

KFParticlePVReconstructorfKFParticlePVReconstructor
 Pointer to the KFParticlePVReconstructor. Allocated in the constructor.
 
KFParticleFinderfKFParticleFinder
 Pointer to the KFParticleFinder object. Allocated in the constructor.
 
KFPTrackVectorfTracks
 
kfvector_float fChiToPrimVtx [2]
 Chi2-deviation of the secondary tracks.
 
std::vector< KFParticlefParticles
 Vector of the reconstructed candidates of short-lived particles.
 
std::vector< KFParticleSIMD,
KFPSimdAllocator
< KFParticleSIMD > > 
fPV
 Vector of the reconstructed primary vertices.
 
short int fNThreads
 Number of threads to be run in KFParticleFinder. Currently is not used.
 

Function Documentation

class KFParticleTopoReconstructor __attribute__ ( (aligned(sizeof(float_v)))  )
void __attribute__::AddCandidate ( const KFParticle candidate,
int  iPV = -1 
)

Adds an external particle candidate to the vector with primary or secondary candidates of KFParticleFinde.

Definition at line 406 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 406 of file KFParticleTopoReconstructor.h

void __attribute__::AddParticle ( const KFParticle particle)

Adds an external particle candidate to the vector.

Definition at line 404 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 404 of file KFParticleTopoReconstructor.h

void __attribute__::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 374 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 374 of file KFParticleTopoReconstructor.h

void __attribute__::AddPV ( const KFVertex pv)

Adds externally found primary vertex to the list.

Parameters
[in]pv- external primary vertex

Definition at line 385 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 385 of file KFParticleTopoReconstructor.h

void __attribute__::CleanPV ( )

Cleans vectors with primary vertex candidates and corresponding clusters by calling KFParticlePVReconstructor::CleanPV().

Definition at line 370 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 370 of file KFParticleTopoReconstructor.h

void __attribute__::Clear ( )

Cleans all candidates for primary vertices and short-lived particles.

Definition at line 346 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 346 of file KFParticleTopoReconstructor.h

Referenced by ac(), ClassImp(), MCPhoton::Clear(), EMCalTrk::Clear(), PhotonPair::Clear(), drawCorr(), hcal::GetNextEvent(), Jetscape::HadronizationManager::~HadronizationManager(), and Jetscape::JetEnergyLossManager::~JetEnergyLossManager().

+ Here is the caller graph for this function:

void __attribute__::CopyCuts ( const KFParticleTopoReconstructor topo)

Copy cuts from KF Particle Finder of another topology reconstructor object topo.

Definition at line 460 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 460 of file KFParticleTopoReconstructor.h

void __attribute__::DeInit ( )

Sets a pointer to the input tracks KFParticleTopoReconstructor::fTracks to NULL.

Definition at line 344 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 344 of file KFParticleTopoReconstructor.h

void __attribute__::FillPVIndices ( )

Assigns index of the corresponding primary vertex to each input track according to the clusters reconstructed by KFParticlePVReconstructor.

Definition at line 394 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 394 of file KFParticleTopoReconstructor.h

const kfvector_float* __attribute__::GetChiPrim ( ) const

Returns a pointer to the arrays with chi2-deviations KFParticleTopoReconstructor::fChiToPrimVtx.

Definition at line 365 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 365 of file KFParticleTopoReconstructor.h

void __attribute__::GetChiToPrimVertex ( KFParticleSIMD pv,
const int  nPV 
)
private
const KFParticleFinder * GetKFParticleFinder ( )

Returns a pointer to the KFParticleFinder object.

Returns a constant pointer to the KFParticleFinder object.

Definition at line 367 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 367 of file KFParticleTopoReconstructor.h

void __attribute__::GetListOfDaughterTracks ( const KFParticle particle,
std::vector< int > &  daughters 
)
std::vector<KFParticle> const& __attribute__::GetParticles ( ) const

Returns constant reference to the vector with short-lived particle candidates.

Definition at line 361 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 361 of file KFParticleTopoReconstructor.h

Referenced by PHG4InEvent::identify().

+ Here is the caller graph for this function:

KFVertex& __attribute__::GetPrimKFVertex ( int  iPV = 0) const

Return primary vertex candidate with index "iPV".

Definition at line 357 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 357 of file KFParticleTopoReconstructor.h

KFParticle& __attribute__::GetPrimVertex ( int  iPV = 0) const

Return primary vertex candidate with index "iPV".

Definition at line 356 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 356 of file KFParticleTopoReconstructor.h

std::vector<int>& __attribute__::GetPVTrackIndexArray ( int  iPV = 0) const

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

Definition at line 359 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 359 of file KFParticleTopoReconstructor.h

const KFPTrackVector* __attribute__::GetTracks ( ) const

Returns a pointer to the arrays with tracks KFParticleTopoReconstructor::fTracks.

Definition at line 364 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 364 of file KFParticleTopoReconstructor.h

void __attribute__::Init ( std::vector< KFParticle > &  particles,
std::vector< int > *  pdg = 0,
std::vector< int > *  nPixelHits = 0 
)

Copies provided particles to the vector KFParticleTopoReconstructor::fTracks assuming a given PDG hypothesis for each particle. If pointer to pdg-vector is not provided "-1" PDG is assigned to each input particle. If pointer to number of precise measurements is provided then this field of KFPTrackVector is also initialised. Only tracks at the first hit position are initialised by this method. The KFParticleTopoReconstructor::fKFParticlePVReconstructor is initialised with the copied tracks.

Parameters
[in]particles- vector with input particles (tracks)
[in]pdg- pointer to the vector with PDG hypothesis for each track, if pointer is not provided "-1" is set as the pdg hypothesis for all tracks
[in]nPixelHits- pointer to the vector with number of precise measurement in each track

Referenced by DoDeltaPtCutStudy(), DoFastTrackCutStudy(), DoStandaloneCorrelatorCalculation(), DoTrackCutStudy(), Fun4All_EMCalBadTowerID(), Jetscape::Hadronization::Init(), Jetscape::Afterburner::Init(), Jetscape::HardProcess::Init(), Jetscape::PreequilibriumDynamics::Init(), Jetscape::JetEnergyLoss::Init(), Jetscape::FluidDynamics::Init(), testing::internal::RE::RE(), and RunMatcherComparator().

+ Here is the caller graph for this function:

void __attribute__::Init ( const KFPTrackVector particles,
const std::vector< KFParticle > &  pv 
)

Initialises the pointer KFParticleTopoReconstructor::fTracks with the external pointer "particles". Primary vertices are assumed to be found and are also provided externally. Only reconstruction of short-lived particles should be run if this initialisation method is used. After reconstruction of short-lived particles the KFParticleTopoReconstructor::DeInit() method should be called, otherwise an external memory will be released that can lead to the memory corruption and segmentation fault.

Parameters
[in]particles- pointer to the external vectors with input tracks
[in]pv- vector with externally reconstructed primary vertex candidates
void __attribute__::Init ( KFPTrackVector tracks,
KFPTrackVector tracksAtLastPoint 
)

Initialises tracks at the first and last hit positions. The KFParticleTopoReconstructor::fKFParticlePVReconstructor is initialised with the copied tracks at the first hit position.

Parameters
[in]tracks- vector with the tracks at the first hit position
[in]tracksAtLastPoint- vector with the tracks at the last hit position
__attribute__::KFParticleTopoReconstructor ( )

The default constructor. Allocates memory for all pointers.

Definition at line 283 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 283 of file KFParticleTopoReconstructor.h

__attribute__::KFParticleTopoReconstructor ( const KFParticleTopoReconstructor a)

A copy constructor. All pointers are set to zero, other members are copied.

Definition at line 452 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 452 of file KFParticleTopoReconstructor.h

int __attribute__::NPrimaryVertices ( ) const

Returns number of the found primary vertex candidates.

Definition at line 355 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 355 of file KFParticleTopoReconstructor.h

const KFParticleTopoReconstructor& __attribute__::operator= ( const KFParticleTopoReconstructor a)

Copy operator. All pointers are set to zero, other members are copied. Returns the current object after copying is finished.

Definition at line 439 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 439 of file KFParticleTopoReconstructor.h

Referenced by Acts::AnyBase< ACTS_SOURCELINK_SBO_SIZE >::AnyBase(), Acts::Test::BOOST_AUTO_TEST_CASE(), ClassImpQ(), std::tr1::GTEST_1_TUPLE_(), std::tr1::GTEST_2_TUPLE_(), std::tr1::GTEST_3_TUPLE_(), std::tr1::GTEST_4_TUPLE_(), std::tr1::GTEST_5_TUPLE_(), std::tr1::GTEST_6_TUPLE_(), std::tr1::GTEST_7_TUPLE_(), std::tr1::GTEST_8_TUPLE_(), std::tr1::GTEST_9_TUPLE_(), and Jetscape::JetScapeParticleBase::operator=().

+ Here is the caller graph for this function:

bool __attribute__::ParticleHasRepeatingDaughters ( const KFParticle particle)
void __attribute__::ReconstructParticles ( )
void __attribute__::ReconstructPrimVertex ( bool  isHeavySystem = 1)
void __attribute__::RemoveParticle ( const int  iParticle)

Logically kills the candidate for short-lived particle with index "iParticle" by setting its PDG hypothesis to "-1".

Definition at line 363 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 363 of file KFParticleTopoReconstructor.h

void __attribute__::SaveInputParticles ( const std::string  prefix = "KFPData",
bool  onlySecondary = 0 
)
void __attribute__::SelectParticleCandidates ( )
void __attribute__::SetBeamLine ( KFParticle p)

Sets the beam line for precise reconstruction of the primary vertex.

Definition at line 408 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 408 of file KFParticleTopoReconstructor.h

void __attribute__::SetChi2PrimaryCut ( float  chi)

Sets the same chi-primary cut to the primary vertex finder and KF Particle Finder.

Definition at line 430 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 430 of file KFParticleTopoReconstructor.h

void __attribute__::SetEmcClusters ( KFPEmcCluster clusters)

Sets input clusters of the electromagnetic calorimeter to KFParticleFinder.

Definition at line 341 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 341 of file KFParticleTopoReconstructor.h

void __attribute__::SetMixedEventAnalysis ( )

KFParticleFinder is forced to be run in the mixed event analysis mode.

Definition at line 342 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 342 of file KFParticleTopoReconstructor.h

void __attribute__::SetNThreads ( short int  n)

Sets the number of threads to be run in KFParticleFinder. Currently is not used.

Definition at line 428 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 428 of file KFParticleTopoReconstructor.h

void __attribute__::SortTracks ( )
void __attribute__::TransportPVTracksToPrimVertex ( )
private
__attribute__::~KFParticleTopoReconstructor ( )

Variable Documentation

kfvector_float fChiToPrimVtx[2]

Chi2-deviation of the secondary tracks.

Definition at line 482 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 482 of file KFParticleTopoReconstructor.h

KFParticleFinder* fKFParticleFinder

Pointer to the KFParticleFinder object. Allocated in the constructor.

Definition at line 467 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 467 of file KFParticleTopoReconstructor.h

KFParticlePVReconstructor* fKFParticlePVReconstructor

Pointer to the KFParticlePVReconstructor. Allocated in the constructor.

Definition at line 466 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 466 of file KFParticleTopoReconstructor.h

short int fNThreads

Number of threads to be run in KFParticleFinder. Currently is not used.

Definition at line 486 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 486 of file KFParticleTopoReconstructor.h

std::vector<KFParticle> fParticles

Vector of the reconstructed candidates of short-lived particles.

Definition at line 483 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 483 of file KFParticleTopoReconstructor.h

Vector of the reconstructed primary vertices.

Definition at line 484 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 484 of file KFParticleTopoReconstructor.h

KFPTrackVector fTracks

Pointer to the array with the input tracks. Memory is allocated by the Init() functions. For reconstruction of primary vertex candidates unsorted tracks are used. For reconstruction of short-lived particles Tracks should be sorted by the KFParticleTopoReconstructor::SortTracks() function. The tracks after sorting are divided into several groups:
0) secondary positive at the first hit position;
1) secondary negative at the first hit position;
2) primary positive at the first hit position;
3) primary negative at the first hit position;
4) secondary positive at the last hit position;
5) secondary negative at the last hit position;
6) primary positive at the last hit position;
7) primary negative at the last hit position.

Array of track vectors:
0 - positive secondary tracks stored at the first point;
1 - negative secondary tracks stored at the first point;
2 - positive primary tracks stored at the first point;
3 - positive primary tracks stored at the first point;
4 - positive secondary tracks stored at the last point;
5 - negative secondary tracks stored at the last point;
6 - positive primary tracks stored at the last point;
7 - positive primary tracks stored at the last point.

See Also
KFPTrackVector for documentation.

Definition at line 481 of file KFParticleTopoReconstructor.h.

View newest version in sPHENIX GitHub at line 481 of file KFParticleTopoReconstructor.h

Referenced by KFPInputData::GetTracks(), KFPInputData::KFPInputData(), KFPInputData::operator=(), KFPInputData::Print(), KFPInputData::ReadDataFromFile(), KFPInputData::ReadDataFromVector(), and KFPInputData::SetDataToVector().