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

Class to calculate efficiency of KF Particle Finder. More...

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

+ Inheritance diagram for KFPVEfficiencies:
+ Collaboration diagram for KFPVEfficiencies:

Public Member Functions

 KFPVEfficiencies ()
 
virtual ~KFPVEfficiencies ()
 
virtual void AddCounter (TString shortname, TString name)
 
KFPVEfficienciesoperator+= (KFPVEfficiencies &a)
 Operator to add efficiency table from object "a" to the current object. Returns the current object after addition.
 
void CalcEff ()
 Function to calculate efficiency after all counters are set. If the counters are modified the function should be called again.
 
void Inc (bool isReco, int nClones, TString name)
 
void IncReco (bool isGhost, bool isBg, TString name)
 
void PrintEff ()
 Prints the efficiency table on the screen.
 
void AddFromFile (TString fileName)
 Adds efficiency from the file with the name defined by "fileName" to the current objects.
 

Private Attributes

std::vector< TString > names
 Names of the counters. The same for all counters objects.
 
std::map< TString, int > indices
 Map between the counter index and its short name.
 
KFMCCounter< doubleratio_reco
 Efficiency.
 
KFMCCounter< int > mc
 Counters of the Monte Carlo vertices.
 
KFMCCounter< int > reco
 Counters of the reconstructed vertices.
 
KFMCCounter< doubleratio_ghost
 Ratio of the ghost candidates to the total number of candidates.
 
KFMCCounter< doubleratio_bg
 Ratio of the physics background candidates to the total number of candidates.
 
KFMCCounter< doubleratio_clone
 Ratio of double reconstructed vertices to the total number of signal candidates.
 
KFMCCounter< int > ghost
 Counters of the ghost candidates.
 
KFMCCounter< int > bg
 Counters of the physics background candidates.
 
KFMCCounter< int > clone
 Counters of the double reconstructed vertices.
 

Friends

std::fstream & operator<< (std::fstream &strm, KFPVEfficiencies &a)
 Operator to write efficiencies to file.
 
std::fstream & operator>> (std::fstream &strm, KFPVEfficiencies &a)
 Operator to read efficiencies from file.
 

Detailed Description

Class to calculate efficiency of KF Particle Finder.

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

The class calculates reconstruction efficiency of the primary vertices.
Definitions:
background - physics background, when daughter particle come from the secondary vertex;
ghost - combinatorial background, tracks do not form a real vertex;
clone - a vertex is reconstructed several times, for example, half of tracks form one group and another half form second group.

Definition at line 47 of file KFPVEfficiencies.h.

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

Constructor & Destructor Documentation

KFPVEfficiencies::KFPVEfficiencies ( )
inline

Definition at line 51 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 51 of file KFPVEfficiencies.h

References AddCounter().

+ Here is the call graph for this function:

virtual KFPVEfficiencies::~KFPVEfficiencies ( )
inlinevirtual

Definition at line 69 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 69 of file KFPVEfficiencies.h

Member Function Documentation

virtual void KFPVEfficiencies::AddCounter ( TString  shortname,
TString  name 
)
inlinevirtual

Adds a counter with the name defined by "name" to all counter objects. For easiness of operation with counters, a shortname is assigned to each of them and the corresponding entry in the map indices is done.

Parameters
[in]shortname- a short name of the counter for fast and easy access to its index
[in]name- name of the counter which is added to each counter object.

Definition at line 71 of file KFPVEfficiencies.h.

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

References KFMCCounter< T >::AddCounter(), bg, clone, ghost, indices, mc, names, ratio_bg, ratio_clone, ratio_ghost, ratio_reco, and reco.

Referenced by KFPVEfficiencies().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KFPVEfficiencies::AddFromFile ( TString  fileName)
inline

Adds efficiency from the file with the name defined by "fileName" to the current objects.

Definition at line 206 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 206 of file KFPVEfficiencies.h

References file, and in.

void KFPVEfficiencies::CalcEff ( )
inline

Function to calculate efficiency after all counters are set. If the counters are modified the function should be called again.

Definition at line 102 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 102 of file KFPVEfficiencies.h

References bg, clone, ghost, mc, ratio_bg, ratio_clone, ratio_ghost, ratio_reco, and reco.

void KFPVEfficiencies::Inc ( bool  isReco,
int  nClones,
TString  name 
)
inline

Increases counters by one, if the corresponding boolean variable is "true". MC counter is increased in any case.

Parameters
[in]isReco- "true" if vertex is reconstructed
[in]nClones- number of double reconstructed vertices for the given MC vertex, will be added to the "clone" counters
[in]name- "shortname" of the set of counters, which should be increased

Definition at line 112 of file KFPVEfficiencies.h.

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

References clone, KFMCCounter< T >::counters, index, indices, mc, perf_headwind::name, and reco.

void KFPVEfficiencies::IncReco ( bool  isGhost,
bool  isBg,
TString  name 
)
inline

Increases counters by one, if the corresponding boolean variable is "true".

Parameters
[in]isGhost- "true" if ghost is added
[in]isBg- "true" if physics background is added
[in]name- "shortname" of the set of counters, which should be increased

Definition at line 129 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 129 of file KFPVEfficiencies.h

References bg, KFMCCounter< T >::counters, ghost, index, indices, and perf_headwind::name.

KFPVEfficiencies& KFPVEfficiencies::operator+= ( KFPVEfficiencies a)
inline

Operator to add efficiency table from object "a" to the current object. Returns the current object after addition.

Definition at line 95 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 95 of file KFPVEfficiencies.h

References bg, clone, ghost, mc, and reco.

void KFPVEfficiencies::PrintEff ( )
inline

Prints the efficiency table on the screen.

Definition at line 143 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 143 of file KFPVEfficiencies.h

References bg, clone, KFMCCounter< T >::counters, ghost, mc, names, KFMCCounter< T >::NCounters, ratio_bg, ratio_clone, ratio_ghost, ratio_reco, and reco.

Friends And Related Function Documentation

std::fstream& operator<< ( std::fstream &  strm,
KFPVEfficiencies a 
)
friend

Operator to write efficiencies to file.

Definition at line 176 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 176 of file KFPVEfficiencies.h

std::fstream& operator>> ( std::fstream &  strm,
KFPVEfficiencies a 
)
friend

Operator to read efficiencies from file.

Definition at line 191 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 191 of file KFPVEfficiencies.h

Member Data Documentation

KFMCCounter<int> KFPVEfficiencies::bg
private

Counters of the physics background candidates.

Definition at line 226 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 226 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), IncReco(), operator+=(), and PrintEff().

KFMCCounter<int> KFPVEfficiencies::clone
private

Counters of the double reconstructed vertices.

Definition at line 227 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 227 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), Inc(), operator+=(), and PrintEff().

KFMCCounter<int> KFPVEfficiencies::ghost
private

Counters of the ghost candidates.

Definition at line 225 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 225 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), IncReco(), operator+=(), and PrintEff().

std::map<TString, int> KFPVEfficiencies::indices
private

Map between the counter index and its short name.

Definition at line 214 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 214 of file KFPVEfficiencies.h

Referenced by AddCounter(), Inc(), and IncReco().

KFMCCounter<int> KFPVEfficiencies::mc
private

Counters of the Monte Carlo vertices.

Definition at line 218 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 218 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), Inc(), operator+=(), and PrintEff().

std::vector<TString> KFPVEfficiencies::names
private

Names of the counters. The same for all counters objects.

Definition at line 213 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 213 of file KFPVEfficiencies.h

Referenced by AddCounter(), and PrintEff().

KFMCCounter<double> KFPVEfficiencies::ratio_bg
private

Ratio of the physics background candidates to the total number of candidates.

Definition at line 222 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 222 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), and PrintEff().

KFMCCounter<double> KFPVEfficiencies::ratio_clone
private

Ratio of double reconstructed vertices to the total number of signal candidates.

Definition at line 223 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 223 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), and PrintEff().

KFMCCounter<double> KFPVEfficiencies::ratio_ghost
private

Ratio of the ghost candidates to the total number of candidates.

Definition at line 221 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 221 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), and PrintEff().

KFMCCounter<double> KFPVEfficiencies::ratio_reco
private

Efficiency.

Definition at line 216 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 216 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), and PrintEff().

KFMCCounter<int> KFPVEfficiencies::reco
private

Counters of the reconstructed vertices.

Definition at line 219 of file KFPVEfficiencies.h.

View newest version in sPHENIX GitHub at line 219 of file KFPVEfficiencies.h

Referenced by AddCounter(), CalcEff(), Inc(), operator+=(), and PrintEff().


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