Analysis Software
Documentation for sPHENIX simulation software
|
A common object containing histograms for all particle species. More...
#include <KFParticle/blob/master/KFParticlePerformance/KFPHistogram/KFPHistogram.h>
Public Member Functions | |
KFPHistogram () | |
Default Constructor. Creates histograms, allocates memory for them. | |
~KFPHistogram () | |
void | SetOutFileName (std::string name) |
Set the name of the output file. | |
void | Fill (const KFParticle &particle) |
Fills histograms using parameters of the given particle. | |
void | Fill (const KFParticleTopoReconstructor &topoReconstructor) |
Fills histograms for each particle reconstructed by the KFParticleFinder object from the given KFParticleTopoReconstructor. | |
KFPHistogramSet | GetHistogramSet (int iSet) const |
Returns set of histograms for the decay with index iSet. | |
KFPHistogram1D | GetHistogram (int iSet, int iHistogram) const |
Returns "iHistogram" histogram from the set of histograms for the decay with index "iSet". | |
void | Save () |
Stores all histograms to the file with the name defined in KFPHistogram::fOutFileName. | |
bool | FillFromFile (std::string prefix) |
Reads object from the file with the name defined by "prefix". | |
void | operator+= (const KFPHistogram &h) |
Adds all histograms from object "h" to the current object. | |
Private Member Functions | |
KFPHistogram (const KFPHistogram &) | |
Does not allow copying of the objects of this class. | |
KFPHistogram & | operator= (const KFPHistogram &) |
Does not allow copying of the objects of this class. | |
Private Attributes | |
std::map< int, int > | fPdgToIndex |
A map between PDG code and index of the decay in the KF Particle Finder scheme. A copy of an object from KFPartEfficiencies. | |
std::string | fOutFileName |
The name of the output file, where histograms will be stored. | |
KFPHistogramSet | fKFPHistogramSet [KFPartEfficiencies::nParticles] |
A set of histograms for all decays reconstructed by KF Particle Finder. | |
int * | fMemory |
A pointer to the memory for all histograms. | |
Friends | |
std::fstream & | operator<< (std::fstream &strm, KFPHistogram &histograms) |
Stores all histograms to the output file. | |
A common object containing histograms for all particle species.
The class is used to collect histograms in the environment, where ROOT is not available, for example at Intel Xeon Phi cards. Contains a set of histograms for each decay reconstructed by the KF Particle Finder package, allocates the memory for all histograms: This allows faster allocation, faster transfer of the memory, easier access from the Intel Xeon Phi, better performance.
Definition at line 47 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 47 of file KFPHistogram.h
|
inline |
Default Constructor. Creates histograms, allocates memory for them.
Definition at line 50 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 50 of file KFPHistogram.h
References KFPHistogramSet::DataSize(), fKFPHistogramSet, fMemory, fPdgToIndex, KFPartEfficiencies::GetPdgToIndexMap(), KFPartEfficiencies::nParticles, and KFPHistogramSet::SetHistogramMemory().
|
inline |
Definition at line 72 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 72 of file KFPHistogram.h
References fMemory.
|
private |
Does not allow copying of the objects of this class.
|
inline |
Fills histograms using parameters of the given particle.
Definition at line 76 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 76 of file KFPHistogram.h
References KFPHistogramSet::Fill(), fKFPHistogramSet, fPdgToIndex, KFParticleBase::GetPDG(), and it.
Referenced by Fill().
|
inline |
Fills histograms for each particle reconstructed by the KFParticleFinder object from the given KFParticleTopoReconstructor.
Definition at line 84 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 84 of file KFPHistogram.h
References Fill(), and KFParticleTopoReconstructor::GetParticles().
|
inline |
Reads object from the file with the name defined by "prefix".
Definition at line 120 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 120 of file KFPHistogram.h
References fKFPHistogramSet, KFPHistogramSet::GetNHisto1D(), in, perf_headwind::name, NBins, KFPartEfficiencies::nParticles, and KFPHistogramSet::SetHisto1DBinContent().
|
inline |
Returns "iHistogram" histogram from the set of histograms for the decay with index "iSet".
Definition at line 92 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 92 of file KFPHistogram.h
References fKFPHistogramSet, and KFPHistogramSet::GetHistogram1D().
|
inline |
Returns set of histograms for the decay with index iSet.
Definition at line 90 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 90 of file KFPHistogram.h
References fKFPHistogramSet.
|
inline |
Adds all histograms from object "h" to the current object.
Definition at line 158 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 158 of file KFPHistogram.h
References fKFPHistogramSet, i, and KFPartEfficiencies::nParticles.
|
private |
Does not allow copying of the objects of this class.
|
inline |
Stores all histograms to the file with the name defined in KFPHistogram::fOutFileName.
Definition at line 113 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 113 of file KFPHistogram.h
References file, fOutFileName, and out.
|
inline |
Set the name of the output file.
Definition at line 74 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 74 of file KFPHistogram.h
References fOutFileName, and perf_headwind::name.
|
friend |
Stores all histograms to the output file.
Definition at line 94 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 94 of file KFPHistogram.h
|
private |
A set of histograms for all decays reconstructed by KF Particle Finder.
Definition at line 167 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 167 of file KFPHistogram.h
Referenced by Fill(), FillFromFile(), GetHistogram(), GetHistogramSet(), KFPHistogram(), and operator+=().
|
private |
A pointer to the memory for all histograms.
Definition at line 168 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 168 of file KFPHistogram.h
Referenced by KFPHistogram(), and ~KFPHistogram().
|
private |
The name of the output file, where histograms will be stored.
Definition at line 166 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 166 of file KFPHistogram.h
Referenced by Save(), and SetOutFileName().
|
private |
A map between PDG code and index of the decay in the KF Particle Finder scheme. A copy of an object from KFPartEfficiencies.
Definition at line 165 of file KFPHistogram.h.
View newest version in sPHENIX GitHub at line 165 of file KFPHistogram.h
Referenced by Fill(), and KFPHistogram().