Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFMCCounter< T > Class Template Reference

A helper structure to store information on the number of reconstructed and Monte Carlo particles for efficiency calculation. More...

#include <KFParticle/blob/master/KFParticlePerformance/KFMCCounter.h>

Public Member Functions

 KFMCCounter ()
 
 KFMCCounter (int nCounters)
 Constructs the object with the set of counters "nCounters".
 
void AddCounter ()
 Adds a counter to the existing list.
 
void AddCounters (int nCounters)
 Adds several counters to the existing list.
 
KFMCCounteroperator+= (KFMCCounter &a)
 
KFMCCounter operator+ (KFMCCounter &a)
 
template<typename T2 >
KFMCCounter< doubleoperator/ (KFMCCounter< T2 > &a)
 
template<typename T2 >
KFMCCounter< T2operator/ (double a)
 

Public Attributes

int NCounters
 Number of counters in the current object.
 
std::vector< Tcounters
 Counters of different set of particles.
 

Private Member Functions

double Div (double a, double b)
 

Friends

std::fstream & operator<< (std::fstream &strm, const KFMCCounter< T > &a)
 
std::ostream & operator<< (std::ostream &strm, const KFMCCounter< T > &a)
 
std::fstream & operator>> (std::fstream &strm, KFMCCounter< T > &a)
 

Detailed Description

template<typename T>
class KFMCCounter< T >

A helper structure to store information on the number of reconstructed and Monte Carlo particles for efficiency calculation.

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

The class is used to calculate reconstruction efficiency and ratios of a given set of particles.

Definition at line 39 of file KFMCCounter.h.

View newest version in sPHENIX GitHub at line 39 of file KFMCCounter.h

Constructor & Destructor Documentation

template<typename T>
KFMCCounter< T >::KFMCCounter ( )
inline

Definition at line 45 of file KFMCCounter.h.

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

template<typename T>
KFMCCounter< T >::KFMCCounter ( int  nCounters)
inline

Constructs the object with the set of counters "nCounters".

Definition at line 46 of file KFMCCounter.h.

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

Member Function Documentation

template<typename T>
void KFMCCounter< T >::AddCounter ( )
inline

Adds a counter to the existing list.

Definition at line 48 of file KFMCCounter.h.

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

Referenced by KFPVEfficiencies::AddCounter(), and KFPartEfficiencies::AddCounter().

+ Here is the caller graph for this function:

template<typename T>
void KFMCCounter< T >::AddCounters ( int  nCounters)
inline

Adds several counters to the existing list.

Definition at line 49 of file KFMCCounter.h.

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

template<typename T>
double KFMCCounter< T >::Div ( double  a,
double  b 
)
inlineprivate

Divides value "a" on value "b" if b is not zero, otherwise returns "-1".

Definition at line 126 of file KFMCCounter.h.

View newest version in sPHENIX GitHub at line 126 of file KFMCCounter.h

Referenced by KFMCCounter< int >::operator/().

+ Here is the caller graph for this function:

template<typename T>
KFMCCounter KFMCCounter< T >::operator+ ( KFMCCounter< T > &  a)
inline

Operator adds all counters from object "a" to the current object, result is stored to the temporary object. Returns the temporary object.

Definition at line 64 of file KFMCCounter.h.

View newest version in sPHENIX GitHub at line 64 of file KFMCCounter.h

template<typename T>
KFMCCounter& KFMCCounter< T >::operator+= ( KFMCCounter< T > &  a)
inline

Operator adds all counters from object "a" to the current object. Returns the current object.

Definition at line 52 of file KFMCCounter.h.

View newest version in sPHENIX GitHub at line 52 of file KFMCCounter.h

template<typename T>
template<typename T2 >
KFMCCounter<double> KFMCCounter< T >::operator/ ( KFMCCounter< T2 > &  a)
inline

Operator divides all counters from the current object to the counters from object "a", result is stored to the temporary object. Returns the temporary object.

Definition at line 71 of file KFMCCounter.h.

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

template<typename T>
template<typename T2 >
KFMCCounter<T2> KFMCCounter< T >::operator/ ( double  a)
inline

Operator divides all counters from the current object to the value "a", result is stored to the temporary object. Returns the temporary object.

Definition at line 85 of file KFMCCounter.h.

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

Friends And Related Function Documentation

template<typename T>
std::fstream& operator<< ( std::fstream &  strm,
const KFMCCounter< T > &  a 
)
friend

Operator to write the object "a" to the file "strm".

Definition at line 93 of file KFMCCounter.h.

View newest version in sPHENIX GitHub at line 93 of file KFMCCounter.h

template<typename T>
std::ostream& operator<< ( std::ostream &  strm,
const KFMCCounter< T > &  a 
)
friend

Operator to write the object "a" to the stream "strm".

Definition at line 101 of file KFMCCounter.h.

View newest version in sPHENIX GitHub at line 101 of file KFMCCounter.h

template<typename T>
std::fstream& operator>> ( std::fstream &  strm,
KFMCCounter< T > &  a 
)
friend

Operator to read the object "a" from the file "strm".

Definition at line 109 of file KFMCCounter.h.

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

Member Data Documentation

template<typename T>
int KFMCCounter< T >::NCounters

Number of counters in the current object.

Definition at line 41 of file KFMCCounter.h.

View newest version in sPHENIX GitHub at line 41 of file KFMCCounter.h

Referenced by KFMCCounter< int >::AddCounter(), KFMCCounter< int >::AddCounters(), KFMCCounter< int >::operator+=(), KFMCCounter< int >::operator/(), KFPVEfficiencies::PrintEff(), and KFPartEfficiencies::PrintEff().


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