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

A class to store vectors of input cluster from the electro-magnetic calorimeter. More...

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

+ Collaboration diagram for KFPEmcCluster:

Public Member Functions

 KFPEmcCluster ()
 
 ~KFPEmcCluster ()
 
int Size () const
 
void Resize (const int n)
 
void Set (KFPEmcCluster &v, int vSize, int offset)
 
void SetTracks (const KFPEmcCluster &track, const kfvector_uint &trackIndex, const int nIndexes)
 
const kfvector_floatX () const
 Returns constant reference to the vector with X coordinates.
 
const kfvector_floatY () const
 Returns constant reference to the vector with Y coordinates.
 
const kfvector_floatZ () const
 Returns constant reference to the vector with Z coordinates.
 
const kfvector_floatE () const
 Returns constant reference to the vector with energy of the cluster.
 
const kfvector_floatParameter (const int i) const
 Returns constant reference to the parameter vector with index "i".
 
const kfvector_floatCovariance (const int i) const
 Returns constant reference to the vector of the covariance matrix elements with index "i".
 
const kfvector_intId () const
 Returns constant reference to the vector with unique id of the clusters.
 
void SetParameter (float value, int iP, int iTr)
 Sets the "value" of the parameter "iP" of the cluster with index "iTr".
 
void SetCovariance (float value, int iC, int iTr)
 Sets the "value" of the element of covariance matrix "iC" of the cluster with index "iTr".
 
void SetParameter (const float_v &value, int iP, int iTr)
 
void SetCovariance (const float_v &value, int iC, int iTr)
 
void SetId (int value, int iTr)
 Sets the "value" of the id of the cluster with index "iTr".
 
void PrintTrack (int n)
 
void PrintTracks ()
 
 KFPEmcCluster (const KFPEmcCluster &clusters)
 
const KFPEmcClusteroperator= (const KFPEmcCluster &clusters)
 

Private Attributes

kfvector_float fP [4]
 Coordinates of the cluster and energy: X, Y, Z, E.
 
kfvector_float fC [10]
 Covariance matrix of the parameters of the cluster.
 
kfvector_int fId
 Vector with unique ids of the clusters.
 

Detailed Description

A class to store vectors of input cluster from the electro-magnetic calorimeter.

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

A cluster is described with the state vector { X, Y, Z, E } and the corresponding covariance matrix. Also contains a unique id. The data model implemented in the class is "Structure Of Arrays": each parameter is stroed in a separate vector. Such data structure allows fast vectorised access to the aligned data providing the maximum possible speed for data reading, and at the same time easy random access to the data members.

Definition at line 42 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 42 of file KFPEmcCluster.h

Constructor & Destructor Documentation

KFPEmcCluster::KFPEmcCluster ( )
inline

Definition at line 45 of file KFPEmcCluster.h.

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

KFPEmcCluster::~KFPEmcCluster ( )
inline

Definition at line 46 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 46 of file KFPEmcCluster.h

KFPEmcCluster::KFPEmcCluster ( const KFPEmcCluster clusters)
inline

Copy-constructor. Makes one-to-one copy.

Definition at line 76 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 76 of file KFPEmcCluster.h

References fC, fId, fP, i, n, and Size().

+ Here is the call graph for this function:

Member Function Documentation

const kfvector_float& KFPEmcCluster::Covariance ( const int  i) const
inline

Returns constant reference to the vector of the covariance matrix elements with index "i".

Definition at line 61 of file KFPEmcCluster.h.

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

References fC, and i.

Referenced by KFParticleSIMD::Create(), KFParticleSIMD::Load(), and PrintTracks().

+ Here is the caller graph for this function:

const kfvector_float& KFPEmcCluster::E ( ) const
inline

Returns constant reference to the vector with energy of the cluster.

Definition at line 58 of file KFPEmcCluster.h.

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

References fP.

const kfvector_int& KFPEmcCluster::Id ( ) const
inline

Returns constant reference to the vector with unique id of the clusters.

Definition at line 62 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 62 of file KFPEmcCluster.h

References fId.

Referenced by KFParticleFinder::FindParticles(), and PrintTracks().

+ Here is the caller graph for this function:

const KFPEmcCluster& KFPEmcCluster::operator= ( const KFPEmcCluster clusters)
inline

Operator to copy one KFPEmcCluster object to another. Makes one-to-one copy.

Definition at line 100 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 100 of file KFPEmcCluster.h

References fC, fId, fP, i, n, and Size().

+ Here is the call graph for this function:

const kfvector_float& KFPEmcCluster::Parameter ( const int  i) const
inline

Returns constant reference to the parameter vector with index "i".

Definition at line 60 of file KFPEmcCluster.h.

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

References fP, and i.

Referenced by KFParticleSIMD::Create(), KFParticleSIMD::Load(), and PrintTracks().

+ Here is the caller graph for this function:

void KFPEmcCluster::PrintTrack ( int  n)

Prints parameters of the cluster with index "n".

Parameters
[in]n- index of cluster to be printed

Definition at line 141 of file KFPEmcCluster.cxx.

View newest version in sPHENIX GitHub at line 141 of file KFPEmcCluster.cxx

References fC, fId, fP, i, and n.

void KFPEmcCluster::PrintTracks ( )

Prints all field of the current object.

Definition at line 156 of file KFPEmcCluster.cxx.

View newest version in sPHENIX GitHub at line 156 of file KFPEmcCluster.cxx

References Covariance(), Id(), Parameter(), and Size().

+ Here is the call graph for this function:

void KFPEmcCluster::Resize ( const int  n)

Resizes all vectors in the class to a given value.

Parameters
[in]n- new size of the vector

Definition at line 58 of file KFPEmcCluster.cxx.

View newest version in sPHENIX GitHub at line 58 of file KFPEmcCluster.cxx

References fC, fId, fP, and i.

Referenced by SetTracks().

+ Here is the caller graph for this function:

void KFPEmcCluster::Set ( KFPEmcCluster v,
int  vSize,
int  offset 
)

Copies "vSize" clusters from the KFPEmcCluster "v" to the current object. Tracks are put starting from the "offset" position.

Parameters
[in]v- external KFPEmcCluster with input clusters to be copied
[in]vSize- number of clusters to be copied from "v"
[in]offset- offset position in the current object, starting from which input clusters will be stored

Definition at line 70 of file KFPEmcCluster.cxx.

View newest version in sPHENIX GitHub at line 70 of file KFPEmcCluster.cxx

References fC, fId, fP, and i.

void KFPEmcCluster::SetCovariance ( float  value,
int  iC,
int  iTr 
)
inline

Sets the "value" of the element of covariance matrix "iC" of the cluster with index "iTr".

Definition at line 66 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 66 of file KFPEmcCluster.h

References fC, and value.

void KFPEmcCluster::SetCovariance ( const float_v &  value,
int  iC,
int  iTr 
)

Copies the SIMD vector "value" to the element of the covariance matrix vector KFPEmcCluster::fC[iC] starting at the position "iTr".

Parameters
[in]value- SIMD vector with the values to be stored
[in]iC- number of the element of the covariance matrix
[in]iTr- starting position in the parameter vector where the values should be stored

Definition at line 41 of file KFPEmcCluster.cxx.

View newest version in sPHENIX GitHub at line 41 of file KFPEmcCluster.cxx

References fC, float_vLen, index, and Size().

+ Here is the call graph for this function:

void KFPEmcCluster::SetId ( int  value,
int  iTr 
)
inline

Sets the "value" of the id of the cluster with index "iTr".

Definition at line 71 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 71 of file KFPEmcCluster.h

References fId, and value.

void KFPEmcCluster::SetParameter ( float  value,
int  iP,
int  iTr 
)
inline

Sets the "value" of the parameter "iP" of the cluster with index "iTr".

Definition at line 65 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 65 of file KFPEmcCluster.h

References fP, and value.

void KFPEmcCluster::SetParameter ( const float_v &  value,
int  iP,
int  iTr 
)

Copies the SIMD vector "value" to the parameter vector KFPEmcCluster::fP[iP] starting at the position "iTr".

Parameters
[in]value- SIMD vector with the values to be stored
[in]iP- number of the parameter vector
[in]iTr- starting position in the parameter vector where the values should be stored

Definition at line 25 of file KFPEmcCluster.cxx.

View newest version in sPHENIX GitHub at line 25 of file KFPEmcCluster.cxx

References float_vLen, fP, index, and Size().

+ Here is the call graph for this function:

void KFPEmcCluster::SetTracks ( const KFPEmcCluster track,
const kfvector_uint trackIndex,
const int  nIndexes 
)

The current object is resised to "nIndexes", clusters with indices "trackIndex" are copied to the current object.

Parameters
[in]track- input vector of clusters
[in]trackIndex- indices of clusters in a vector "track", which should be stored to the current object
[in]nIndexes- number of clusters to be copied, defines the new size of the current object

Definition at line 88 of file KFPEmcCluster.cxx.

View newest version in sPHENIX GitHub at line 88 of file KFPEmcCluster.cxx

References fC, fId, float_vLen, fP, index, Resize(), and vec.

+ Here is the call graph for this function:

int KFPEmcCluster::Size ( ) const
inline

Returns size of the vectors. All data vectors have the same size.

Definition at line 49 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 49 of file KFPEmcCluster.h

References fP.

Referenced by KFParticleFinder::FindParticles(), KFPEmcCluster(), operator=(), PrintTracks(), SetCovariance(), and SetParameter().

+ Here is the caller graph for this function:

const kfvector_float& KFPEmcCluster::X ( ) const
inline

Returns constant reference to the vector with X coordinates.

Definition at line 55 of file KFPEmcCluster.h.

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

References fP.

const kfvector_float& KFPEmcCluster::Y ( ) const
inline

Returns constant reference to the vector with Y coordinates.

Definition at line 56 of file KFPEmcCluster.h.

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

References fP.

const kfvector_float& KFPEmcCluster::Z ( ) const
inline

Returns constant reference to the vector with Z coordinates.

Definition at line 57 of file KFPEmcCluster.h.

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

References fP.

Member Data Documentation

kfvector_float KFPEmcCluster::fC[10]
private

Covariance matrix of the parameters of the cluster.

Definition at line 128 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 128 of file KFPEmcCluster.h

Referenced by Covariance(), KFPEmcCluster(), operator=(), PrintTrack(), Resize(), Set(), SetCovariance(), and SetTracks().

kfvector_int KFPEmcCluster::fId
private

Vector with unique ids of the clusters.

Definition at line 130 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 130 of file KFPEmcCluster.h

Referenced by Id(), KFPEmcCluster(), operator=(), PrintTrack(), Resize(), Set(), SetId(), and SetTracks().

kfvector_float KFPEmcCluster::fP[4]
private

Coordinates of the cluster and energy: X, Y, Z, E.

Definition at line 127 of file KFPEmcCluster.h.

View newest version in sPHENIX GitHub at line 127 of file KFPEmcCluster.h

Referenced by E(), KFPEmcCluster(), operator=(), Parameter(), PrintTrack(), Resize(), Set(), SetParameter(), SetTracks(), Size(), X(), Y(), and Z().


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