CbmRoot
Loading...
Searching...
No Matches
CbmHistManager Class Reference

Histogram manager. More...

#include <CbmHistManager.h>

Inheritance diagram for CbmHistManager:
[legend]
Collaboration diagram for CbmHistManager:
[legend]

Public Member Functions

 CbmHistManager ()
 Constructor.
 
virtual ~CbmHistManager ()
 Destructor.
 
void Add (const std::string &name, TNamed *object)
 Add new named object to manager.
 
template<class T >
void Create1 (const std::string &name, const std::string &title, Int_t nofBins, Double_t minBin, Double_t maxBin)
 Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", 100, 0, 100);.
 
template<class T >
void Create1 (const std::string &name, const std::string &title, const std::vector< Double_t > &binsX)
 Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", binsX);.
 
template<class T >
void Create2 (const std::string &name, const std::string &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY)
 Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create2<TH2F>("name", "title", 100, 0, 100, 200, 0, 200);.
 
template<class T >
void Create2 (const std::string &name, const std::string &title, const std::vector< Double_t > &binsX, const std::vector< Double_t > &binsY)
 Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create2<TH2F>("name", "title", binsX, binsY);.
 
template<class T >
void Create3 (const std::string &name, const std::string &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY, Int_t nofBinsZ, Double_t minBinZ, Double_t maxBinZ)
 Helper function for creation of 3-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create3<TH3F>("name", "title", 100, 0, 100, 200, 0, 200, 300, 0, 300);.
 
template<class T , int nDim>
void CreateSparse (const std::string &name, const std::string &title, const std::array< Int_t, nDim > &nBins, const std::array< Double_t, nDim > &minVals, const std::array< Double_t, nDim > &maxVals)
 Helper function for creation of THnSparse objects.
 
TNamed * GetObject (const std::string &name) const
 
TH1 * H1 (const std::string &name) const
 Return pointer to TH1 histogram.
 
TH1 * H1Clone (const std::string &name) const
 Return clone of TH1 histogram.
 
std::vector< TH1 * > H1Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TH1 histogram.
 
std::vector< TH1 * > H1Vector (const std::string &pattern) const
 Return vector of pointers to TH1 histogram.
 
TH2 * H2 (const std::string &name) const
 Return pointer to TH2 histogram.
 
TH2 * H2Clone (const std::string &name) const
 Return clone of TH2 histogram.
 
std::vector< TH2 * > H2Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TH2 histogram.
 
std::vector< TH2 * > H2Vector (const std::string &pattern) const
 Return vector of pointers to TH2 histogram.
 
TH3 * H3 (const std::string &name) const
 Return pointer to TH3 histogram.
 
TH3 * H3Clone (const std::string &name) const
 Return clone of TH3 histogram.
 
THnSparse * HnSparse (const std::string &name) const
 Return pointer to THnSparse histogram.
 
TGraph * G1 (const std::string &name) const
 Return pointer to TGraph.
 
std::vector< TGraph * > G1Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TGraph.
 
std::vector< TGraph * > G1Vector (const std::string &pattern) const
 Return vector of pointers to TGraph.
 
TGraph2D * G2 (const std::string &name) const
 Return pointer to TGraph2D.
 
std::vector< TGraph2D * > G2Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TGraph2D.
 
std::vector< TGraph2D * > G2Vector (const std::string &pattern) const
 Return vector of pointers to TGraph2D.
 
TProfile * P1 (const std::string &name) const
 Return pointer to TProfile.
 
std::vector< TProfile * > P1Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TProfile.
 
std::vector< TProfile * > P1Vector (const std::string &pattern) const
 Return vector of pointers to TProfile.
 
TProfile2D * P2 (const std::string &name) const
 Return pointer to TProfile2D.
 
std::vector< TProfile2D * > P2Vector (const std::vector< std::string > &names) const
 Return vector of pointers to TProfile2D.
 
std::vector< TProfile2D * > P2Vector (const std::string &pattern) const
 Return vector of pointers to TProfile2D.
 
Bool_t Exists (const std::string &name) const
 Check existence of object in manager.
 
void WriteToFile ()
 Write all objects to current opened file.
 
void WriteCanvasToFile ()
 Write all canvas to current opened file.
 
void ReadFromFile (TFile *file)
 Read histograms from file.
 
void AddTNamedObject (TObject *obj)
 Add TName object to map. Used in ReadFromFile method.
 
void AddTDirectoryObject (TObject *obj)
 Add all TName objects to map in directory. Used in ReadFromFile method.
 
void Clear (Option_t *="")
 Clear memory. Remove all histograms and canvases.
 
void ShrinkEmptyBinsH1 (const std::string &histName)
 Shrink empty bins in H1.
 
void ShrinkEmptyBinsH1ByPattern (const std::string &pattern)
 Shrink empty bins in H1.
 
void ShrinkEmptyBinsH2 (const std::string &histName)
 Shrink empty bins in H2.
 
void ShrinkEmptyBinsH2ByPattern (const std::string &pattern)
 Shrink empty bins in H2.
 
void Scale (const std::string &histName, Double_t scale)
 Scale histogram.
 
void ScaleByPattern (const std::string &pattern, Double_t scale)
 Scale histograms which name matches specified pattern.
 
void NormalizeToIntegral (const std::string &histName)
 Normalize histogram to integral.
 
void NormalizeToIntegralByPattern (const std::string &pattern)
 Normalize histograms to integral which name matches specified pattern.
 
void Rebin (const std::string &histName, Int_t ngroup)
 Rebin histogram.
 
void RebinByPattern (const std::string &pattern, Int_t ngroup)
 Rebin histograms which name matches specified pattern.
 
std::string ToString () const
 Return string representation of class.
 
TCanvas * CreateCanvas (const std::string &name, const std::string &title, Int_t width, Int_t height)
 Create and draw TCanvas and store pointer to it.
 
void SaveCanvasToImage (const std::string &outputDir, const std::string &options="png,eps")
 Save all stored canvases to images.
 
template<class T >
vector< T > ObjectVector (const string &pattern) const
 
template<class T >
vector< T > ObjectVector (const vector< string > &names) const
 

Private Member Functions

template<class T >
std::vector< T > ObjectVector (const std::string &pattern) const
 
template<class T >
std::vector< T > ObjectVector (const std::vector< std::string > &names) const
 

Private Attributes

std::map< std::string, TNamed * > fMap
 
std::vector< TCanvas * > fCanvases
 

Friends

std::ostream & operator<< (std::ostream &strm, const CbmHistManager &histManager)
 Operator << for convenient output to std::ostream.
 

Detailed Description

Histogram manager.

Author
Semen Lebedev s.leb.nosp@m.edev.nosp@m.@gsi..nosp@m.de
Date
2011

Definition at line 48 of file CbmHistManager.h.

Constructor & Destructor Documentation

◆ CbmHistManager()

CbmHistManager::CbmHistManager ( )

Constructor.

Definition at line 50 of file core/base/CbmHistManager.cxx.

◆ ~CbmHistManager()

CbmHistManager::~CbmHistManager ( )
virtual

Destructor.

Definition at line 52 of file core/base/CbmHistManager.cxx.

Member Function Documentation

◆ Add()

◆ AddTDirectoryObject()

void CbmHistManager::AddTDirectoryObject ( TObject * obj)

Add all TName objects to map in directory. Used in ReadFromFile method.

Definition at line 155 of file core/base/CbmHistManager.cxx.

References AddTDirectoryObject(), and AddTNamedObject().

Referenced by AddTDirectoryObject(), and ReadFromFile().

◆ AddTNamedObject()

void CbmHistManager::AddTNamedObject ( TObject * obj)

Add TName object to map. Used in ReadFromFile method.

Definition at line 145 of file core/base/CbmHistManager.cxx.

References Add().

Referenced by AddTDirectoryObject(), and ReadFromFile().

◆ Clear()

void CbmHistManager::Clear ( Option_t * = "")

Clear memory. Remove all histograms and canvases.

Definition at line 169 of file core/base/CbmHistManager.cxx.

References fCanvases, and fMap.

Referenced by CbmRichGeoTest::Finish(), and CbmRichUrqmdTest::Finish().

◆ Create1() [1/2]

template<class T >
void CbmHistManager::Create1 ( const std::string & name,
const std::string & title,
const std::vector< Double_t > & binsX )
inline

Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", binsX);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]binsXarray of low-edges for each bin in X

Definition at line 103 of file CbmHistManager.h.

References Add().

◆ Create1() [2/2]

template<class T >
void CbmHistManager::Create1 ( const std::string & name,
const std::string & title,
Int_t nofBins,
Double_t minBin,
Double_t maxBin )
inline

Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create1<TH1F>("name", "title", 100, 0, 100);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]nofBinsNumber of bins.
[in]minBinLow axis limit.
[in]maxBinUpper axis limit.

Definition at line 88 of file CbmHistManager.h.

References Add().

Referenced by CbmAnaJpsiTask::CreateAnalysisStepsH1(), CbmAnaJpsiTask::CreateAnaStepsPairSourceH1(), CbmLitClusteringQa::CreateClusterParametersHistograms(), CbmStsDigitizeQa::CreateDigiHistograms(), CbmLitClusteringQa::CreateHistograms(), CbmStsDigitizeQa::CreateHistograms(), CbmTrdMCQa::CreateHistograms(), CbmLitClusteringQa::CreateNofObjectsHistograms(), CbmLitClusteringQa::CreateNofObjectsHistograms(), CbmStsDigitizeQa::CreateNofObjectsHistograms(), CbmTrdMCQa::CreateNofObjectsHistograms(), CbmTrdMCQa::CreatePointHistograms(), CbmAnaJpsiTask::CreateSourceTypesH1(), CbmRichGeoTestOpt::DrawMeanEff(), CbmRichGeoTestOpt::DrawMeanRms(), CbmAnaJpsiSuperEvent::InitHist(), CbmAnaJpsiTask::InitHist(), CbmRichPMTMapping::InitHist(), CbmRichAlignment::InitHistAlignment(), CbmRichCorrectionVector::InitHistAlignment(), CbmPsdMCbmQaReal::InitHistograms(), CbmRichDigiQa::InitHistograms(), CbmRichGeoTest::InitHistograms(), CbmRichMCbmAerogelAna::InitHistograms(), CbmRichMCbmQa::InitHistograms(), CbmRichMCbmQaReal::InitHistograms(), CbmRichMCbmQaRichOnly::InitHistograms(), CbmRichRecoQa::InitHistograms(), CbmRichRecoTbQa::InitHistograms(), CbmRichUrqmdTest::InitHistograms(), CbmRichMirrorSortingCorrection::InitHistoMap(), CbmRichCorrection::InitHistProjection(), CbmRichCorrectionVector::InitHistProjection(), CbmRichMirrorSortingCorrection::InitHistProjection(), CbmAnaJpsiReport::SignalOverBgAllSteps(), and CbmAnaJpsiSuperEventReport::SignalOverBgAllSteps().

◆ Create2() [1/2]

template<class T >
void CbmHistManager::Create2 ( const std::string & name,
const std::string & title,
const std::vector< Double_t > & binsX,
const std::vector< Double_t > & binsY )
inline

Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create2<TH2F>("name", "title", binsX, binsY);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]binsXarray of low-edges for each bin in X
[in]binsYarray of low-edges for each bin in Y

Definition at line 140 of file CbmHistManager.h.

References Add().

◆ Create2() [2/2]

template<class T >
void CbmHistManager::Create2 ( const std::string & name,
const std::string & title,
Int_t nofBinsX,
Double_t minBinX,
Double_t maxBinX,
Int_t nofBinsY,
Double_t minBinY,
Double_t maxBinY )
inline

◆ Create3()

template<class T >
void CbmHistManager::Create3 ( const std::string & name,
const std::string & title,
Int_t nofBinsX,
Double_t minBinX,
Double_t maxBinX,
Int_t nofBinsY,
Double_t minBinY,
Double_t maxBinY,
Int_t nofBinsZ,
Double_t minBinZ,
Double_t maxBinZ )
inline

Helper function for creation of 3-dimensional histograms and profiles. Template argument is a real object type that has to be created, for example, Create3<TH3F>("name", "title", 100, 0, 100, 200, 0, 200, 300, 0, 300);.

Parameters
[in]nameObject name.
[in]titleObject title.
[in]nofBinsXNumber of bins for X axis.
[in]minBinXLow X axis limit.
[in]maxBinXUpper X axis limit.
[in]nofBinsYNumber of bins for Y axis.
[in]minBinYLow Y axis limit.
[in]maxBinYUpper Y axis limit.
[in]nofBinsZNumber of bins for Z axis.
[in]minBinZLow Z axis limit.
[in]maxBinZUpper Z axis limit.

Definition at line 164 of file CbmHistManager.h.

References Add().

Referenced by CbmRichGeoTest::DrawPmts(), CbmPsdMCbmQaReal::InitHistograms(), CbmRichGeoTest::InitHistograms(), CbmRichMCbmQaReal::InitHistograms(), CbmRichRecoQa::InitHistograms(), and CbmRichMirrorSortingCorrection::InitHistoMap().

◆ CreateCanvas()

TCanvas * CbmHistManager::CreateCanvas ( const std::string & name,
const std::string & title,
Int_t width,
Int_t height )

Create and draw TCanvas and store pointer to it.

Parameters
[in]nameName of the canvas.
[in]titleTitle of the canvas.
[in]widthWidth of the canvas.
[in]heightHeight of the canvas.
Returns
Pointer to the created canvas.

Definition at line 303 of file core/base/CbmHistManager.cxx.

References fCanvases.

Referenced by LmvmDrawAll::CalcCutEffRange(), LmvmDraw::Draw1DCut(), LmvmDraw::Draw2DCut(), LmvmDraw::DrawAccRecVsMom(), LmvmHist::DrawAllCands(), LmvmHist::DrawAllCandsAndSteps(), LmvmHist::DrawAllGTracks(), LmvmDraw::DrawAnaStepMany(), LmvmDraw::DrawBetaMomSpectra(), LmvmDrawAll::DrawBetaMomSpectra(), LmvmDraw::DrawBgSourcePairsAll(), LmvmDraw::DrawBgSourceTracks(), LmvmDraw::DrawCombinatorialPairs(), LmvmDrawAll::DrawCutEffSignal(), CbmRichMirrorSortingCorrection::DrawDistanceComp(), LmvmDraw::DrawElPurity(), CbmRichMCbmQa::DrawEvent(), CbmRichMCbmSEDisplay::DrawEvent(), LmvmDraw::DrawGammaVertex(), LmvmDrawAll::DrawGTrackVertex(), CbmRichGeoTest::DrawH2MeanRms(), CbmPsdMCbmQaReal::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichMCbmQa::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichRecoQa::DrawHist(), CbmRichRecoTbQa::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichGeoTestOpt::DrawMeanEff(), CbmRichGeoTestOpt::DrawMeanEff2D(), CbmRichGeoTestOpt::DrawMeanRms(), CbmRichGeoTestOpt::DrawMeanRms2D(), LmvmDraw::DrawMinvAll(), LmvmDrawAll::DrawMinvAll(), LmvmDraw::DrawMinvBg(), LmvmDrawAll::DrawMinvBgSourcesAll(), LmvmDrawAll::DrawMinvCombBgAndSignal(), LmvmDrawAll::DrawMinvOfficialStyle(), LmvmDrawAll::DrawMinvPtAll(), LmvmDrawAll::DrawMinvScaleValues(), LmvmDraw::DrawMisc(), LmvmDraw::DrawMismatchesAndGhosts(), CbmRichRecoQa::DrawMismatchSrc(), LmvmDrawAll::DrawMomentum(), LmvmDrawAll::DrawMomPluto(), LmvmDrawAll::DrawMomRecoPrecision(), LmvmDraw::DrawMvdAndStsHist(), LmvmDraw::DrawMvdCutQa(), CbmRichEventDisplay::DrawOneEvent(), LmvmDrawAll::DrawPionSuppression(), CbmRichGeoTest::DrawPmts(), LmvmDraw::DrawPmtXY(), LmvmDrawAll::DrawPtYAndTofM2Elid(), LmvmDrawAll::DrawPurity(), CbmRichMCbmQaReal::DrawRichTofEv(), CbmRichGeoTest::DrawRing(), CbmRichMCbmQaReal::DrawRing(), CbmRichMCbmQaRichOnly::DrawRing(), CbmRichRecoQa::DrawRingTrackDist(), CbmRichMirrorSortingCorrection::DrawRingTrackDistance(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffixPmtHalf(), LmvmDrawAll::DrawSBgResults(), LmvmDrawAll::DrawSBgVsMinv(), LmvmDrawAll::DrawSignificance(), LmvmDraw::DrawSource2D(), LmvmDrawAll::DrawTofHitXY(), LmvmDrawAll::DrawTofM2(), LmvmDrawAll::DrawTofPilePids(), LmvmDrawAll::InvestigateMisid(), and LmvmDrawAll::SBgRangeAll().

◆ CreateSparse()

template<class T , int nDim>
void CbmHistManager::CreateSparse ( const std::string & name,
const std::string & title,
const std::array< Int_t, nDim > & nBins,
const std::array< Double_t, nDim > & minVals,
const std::array< Double_t, nDim > & maxVals )
inline

Helper function for creation of THnSparse objects.

Template Parameters
<T>{ real object type that has to be created, for example THnSparseD }
<nDim>{ Array dimensions for nBins, minVals and maxVals } CreateSparse<THnSparseD, 3>("name", "title", nDim, nBins, minVals, maxVals);
Parameters
[in]nameObject name.
[in]titleObject title.
[in]nBinsArray of size nDim with number of bins for each dimension.
[in]minValsArray of size nDim with minimum values for each dimension.
[in]maxValsArray of size nDim with maximum values for each dimension.

Definition at line 184 of file CbmHistManager.h.

References Add().

◆ Exists()

◆ G1()

TGraph * CbmHistManager::G1 ( const std::string & name) const
inline

Return pointer to TGraph.

Parameters
[in]nameName of TGraph.
Returns
pointer to TGraph.

Definition at line 313 of file CbmHistManager.h.

References fMap.

Referenced by CbmLitFieldQaReport::DrawFieldAlongZ(), and CbmLitFieldQa::FillBHistos().

◆ G1Vector() [1/2]

std::vector< TGraph * > CbmHistManager::G1Vector ( const std::string & pattern) const

Return vector of pointers to TGraph.

Parameters
[in]patternRegex for TGraph name.
Returns
Vector of pointers to TGraph.

◆ G1Vector() [2/2]

std::vector< TGraph * > CbmHistManager::G1Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TGraph.

Parameters
[in]namesVector of TGraph names.
Returns
Vector of pointers to TGraph.

Referenced by CbmLitFieldQaReport::DrawFieldAlongZ().

◆ G2()

◆ G2Vector() [1/2]

std::vector< TGraph2D * > CbmHistManager::G2Vector ( const std::string & pattern) const

Return vector of pointers to TGraph2D.

Parameters
[in]patternRegex for TGraph2D name.
Returns
Vector of pointers to TGraph2D.

◆ G2Vector() [2/2]

std::vector< TGraph2D * > CbmHistManager::G2Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TGraph2D.

Parameters
[in]namesVector of TGraph2D names.
Returns
Vector of pointers to TGraph2D.

Referenced by CbmLitFieldApproximationQaReport::DrawApr(), CbmLitFieldQaReport::DrawFieldSlices(), and CbmLitFieldApproximationQaReport::DrawSlices().

◆ GetObject()

TNamed * CbmHistManager::GetObject ( const std::string & name) const
inline

Definition at line 192 of file CbmHistManager.h.

References fMap.

Referenced by LmvmHist::CreateHByClone(), and LmvmHist::GetObject().

◆ H1()

TH1 * CbmHistManager::H1 ( const std::string & name) const
inline

Return pointer to TH1 histogram.

Parameters
[in]nameName of TH1 histogram.
Returns
pointer to TH1 histogram.

Definition at line 207 of file CbmHistManager.h.

References fMap.

Referenced by CbmRichMCbmQaReal::analyseRing(), CbmRichMCbmQaRichOnly::analyseRing(), CbmRichAlignment::CalculateAnglesAndDrawDistrib(), CbmRichCorrectionVector::CalculateAnglesAndDrawDistrib(), CbmLitClusteringQaReport::Create(), CbmLitTrackingQaReport::Create(), CbmStsDigitizeQaReport::Create(), CbmRichGeoTest::CreateAccVsMinNofHitsHist(), DefaultAccAndRecLabelFormatter(), DefaultHitEfficiencyLabelFormatter(), CbmAnaJpsiTask::DifferenceSignalAndBg(), CbmAnaJpsiSuperEvent::DoSuperEvent(), CbmAnaJpsiSuperEvent::Draw(), CbmAnaJpsiSuperEventReport::Draw(), CbmLitTrackingQaReport::DrawAccAndRec(), CbmLitTrackingQaStudyReport::DrawAccAndRec(), CbmLitFieldApproximationQaReport::DrawApr(), CbmAnaJpsiSuperEventReport::DrawComparison(), CbmRichMirrorSortingCorrection::DrawDistanceComp(), CbmLitTrackingQaStudyReport::DrawEfficiency(), CbmLitTrackingQaReport::DrawEfficiencyHistos(), CbmPsdMCbmQaReal::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichMCbmQa::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichPMTMapping::DrawHist(), CbmRichRecoQa::DrawHist(), CbmRichRecoTbQa::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichAlignment::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistAlignment(), LmvmDraw::DrawHistFromFile(), CbmRichCorrection::DrawHistProjection(), CbmRichCorrectionVector::DrawHistProjection(), CbmLitTrackingQaReport::DrawHitsHistos(), CbmRichGeoTestOpt::DrawMeanEff(), CbmRichGeoTestOpt::DrawMeanRms(), CbmAnaJpsiSuperEventReport::DrawMinvDiffPtBins(), CbmAnaJpsiSuperEventReport::DrawMinvMismatchPt(), CbmAnaJpsiSuperEventReport::DrawMinvSignalBg(), CbmRichRecoQa::DrawMismatchSrc(), CbmLitClusteringQaReport::DrawNofObjectsHistograms(), CbmStsDigitizeQaReport::DrawNofObjectsHistograms(), CbmAnaJpsiSuperEventReport::DrawPairSource(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmRichRecoTbQa::DrawTimeLog(), CbmLitFitQaReport::DrawTrackMomentumAtVertex(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmAnaJpsiTask::Exec(), CbmLitClusteringQa::Exec(), CbmLitTrackingQa::Exec(), CbmPsdMCbmQaReal::Exec(), CbmRichDigiQa::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmRichMCbmQa::Exec(), CbmRichMCbmQaReal::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmStsDigitizeQa::Exec(), CbmTrdMCQa::Exec(), CbmLitRadLengthQa::ExecDetector(), CbmLitClusteringQa::FillEventCounterHistograms(), CbmLitFieldApproximationQa::FillFieldApproximationHistos(), CbmLitTrackingQa::FillGlobalReconstructionHistos(), CbmLitTrackingQa::FillGlobalReconstructionHistosRich(), CbmLitFieldApproximationQa::FillGridCreatorHistos(), CbmLitRadLengthQa::FillHistosDetector(), CbmRichCorrection::FillHistProjection(), CbmRichCorrectionVector::FillHistProjection(), CbmRichMirrorSortingCorrection::FillHistProjection(), CbmLitClusteringQa::FillHitEfficiencyHistograms(), CbmAnaJpsiTask::FillPairHists(), CbmRichMirrorSortingCorrection::FillRingTrackDistance(), CbmRichMirrorSortingCorrection::FillRingTrackDistanceCorr(), CbmLitFitQa::FillTrackParamHistogramm(), CbmLitTrackingQa::FillTrackQualityHistograms(), CbmRichCorrection::Finish(), CbmRichCorrectionVector::Finish(), CbmStsDigitizeQa::Finish(), CbmTrdMCQa::Finish(), CbmRichGeoTest::FitAndFillHistCircle(), CbmRichGeoTest::FitAndFillHistEllipse(), CbmSimulationReport::H1(), LmvmHist::H1(), H1Clone(), CbmLitTrackingQa::IncreaseCounters(), CbmRichUrqmdTest::NofHitsAndPoints(), CbmRichUrqmdTest::NofProjections(), CbmRichUrqmdTest::NofRings(), NormalizeToIntegral(), CbmAnaJpsiTask::PairMcAndAcceptance(), CbmAnaJpsiTask::PairSource(), CbmLitTrackingQa::PionSuppression(), CbmLitTrackingQaReport::PrintNofGhosts(), CbmLitTrackingQaReport::PrintPionSuppression(), CbmLitTrackingQaReport::PrintTrackingEfficiency(), CbmRichRecoTbQa::Process(), CbmStsDigitizeQa::ProcessAngles(), CbmLitClusteringQa::ProcessClusters(), CbmLitClusteringQa::ProcessDigis(), CbmStsDigitizeQa::ProcessDigisAndPoints(), CbmLitTofQa::ProcessGlobalTracks(), CbmLitTrackingQa::ProcessGlobalTracks(), CbmLitClusteringQa::ProcessHits(), CbmRichGeoTest::ProcessHits(), CbmRichGeoTest::ProcessMc(), CbmRichRecoTbQa::ProcessMc(), CbmLitTrackingQa::ProcessMvd(), CbmLitClusteringQa::ProcessPoints(), CbmTrdMCQa::ProcessPoints(), CbmLitTofQa::ProcessTofHits(), CbmLitTofQa::ProcessTofTracks(), CbmLitFitQa::ProcessTrackMomentumAtVertex(), CbmLitFitQa::ProcessTrackParamsAtVertex(), CbmRichPMTMapping::ProjectionProducer(), CbmRichPMTMapping::ProjectionProducer2(), CbmAnaJpsiSuperEvent::ReadCandidates(), Rebin(), CbmCosy2018MonitorPulser::ResetAllHistos(), CbmMcbm2018MonitorAlgoMuchLite::ResetAllHistos(), CbmMcbm2018MonitorMuch::ResetAllHistos(), CbmMcbm2018MonitorMuchLite::ResetAllHistos(), CbmMcbm2018MonitorSts::ResetAllHistos(), CbmMcbm2018MonitorStsSync::ResetAllHistos(), CbmRichMCbmAerogelAna::RichRings(), CbmRichMCbmQaReal::RichRings(), CbmRichMCbmQaRichOnly::RichRings(), CbmRichGeoTest::RingParameters(), CbmRichRecoTbQa::RingRecoEfficiency(), CbmRichRecoQa::RingTrackMismatchSource(), CbmCosy2018MonitorPulser::SaveAllHistos(), CbmMcbm2018MonitorAlgoMuchLite::SaveAllHistos(), CbmMcbm2018MonitorMuch::SaveAllHistos(), CbmMcbm2018MonitorMuchLite::SaveAllHistos(), CbmMcbm2018MonitorSts::SaveAllHistos(), CbmMcbm2018MonitorStsSync::SaveAllHistos(), Scale(), CbmLitClusteringQaReport::ScaleAndShrinkHistograms(), CbmStsDigitizeQaReport::ScaleHistograms(), ShrinkEmptyBinsH1(), CbmAnaJpsiTask::SignalAndBgReco(), CbmAnaJpsiSuperEventReport::SignalOverBg(), CbmAnaJpsiReport::SignalOverBgAllSteps(), CbmAnaJpsiSuperEventReport::SignalOverBgAllSteps(), CbmAnaJpsiTask::SingleParticleAcceptance(), CbmAnaJpsiTask::TrackSource(), and CbmRichUrqmdTest::Vertex().

◆ H1Clone()

TH1 * CbmHistManager::H1Clone ( const std::string & name) const
inline

Return clone of TH1 histogram.

Parameters
[in]nameName of TH1 histogram.
Returns
pointer of TH1 clone histogram.

Definition at line 221 of file CbmHistManager.h.

References H1().

Referenced by CbmRichGeoTest::DrawHist().

◆ H1Vector() [1/2]

std::vector< TH1 * > CbmHistManager::H1Vector ( const std::string & pattern) const

Return vector of pointers to TH1 histogram.

Parameters
[in]patternRegex for TH1 histogram name.
Returns
Vector of pointers to TH1 histogram.

◆ H1Vector() [2/2]

◆ H2()

TH2 * CbmHistManager::H2 ( const std::string & name) const
inline

Return pointer to TH2 histogram.

Parameters
[in]nameName of TH2 histogram.
Returns
pointer to TH2 histogram.

Definition at line 243 of file CbmHistManager.h.

References fMap.

Referenced by CbmRichMCbmQaReal::analyseRing(), CbmRichMCbmQaRichOnly::analyseRing(), CbmRichAlignment::CalculateAnglesAndDrawDistrib(), CbmRichCorrectionVector::CalculateAnglesAndDrawDistrib(), CbmAnaJpsiTask::DifferenceSignalAndBg(), CbmLitTrackingQaReport::DrawEfficiencyHistos(), CbmRichAlignment::DrawFit(), CbmRichCorrectionVector::DrawFit(), CbmPsdMCbmQaReal::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichMCbmQa::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichPMTMapping::DrawHist(), CbmRichRecoQa::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichAlignment::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistMapping(), CbmRichGeoTestOpt::DrawMeanEff2D(), CbmRichGeoTestOpt::DrawMeanRms2D(), CbmLitFitQaReport::DrawResidualAndPullHistograms(), CbmLitClusteringQaReport::DrawResidualsAndPulls(), CbmRichRecoQa::DrawRingTrackDist(), CbmRichMirrorSortingCorrection::DrawRingTrackDistance(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmLitTrackingQaReport::DrawYPt(), CbmPsdMCbmQaReal::Exec(), CbmRichDigiQa::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmRichMCbmQa::Exec(), CbmRichMCbmQaReal::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmLitFieldApproximationQa::FillFieldApproximationHistos(), CbmLitFieldApproximationQa::FillGridCreatorHistos(), CbmRichGeoTest::FillMcVsHitFitCircle(), CbmRichGeoTest::FillMcVsHitFitEllipse(), CbmAnaJpsiTask::FillPairHists(), CbmRichCorrectionVector::FillPMTMap(), CbmRichPMTMapping::FillPMTMap(), CbmRichCorrectionVector::FillPMTMapEllipse(), CbmRichPMTMapping::FillPMTMapEllipse(), CbmLitClusteringQa::FillResidualAndPullHistograms(), CbmLitFitQa::FillResidualsAndPulls(), CbmRichMirrorSortingCorrection::FillRingTrackDistance(), CbmRichRecoQa::FillRingTrackDistance(), CbmRichMirrorSortingCorrection::FillRingTrackDistanceCorr(), CbmTrdMCQa::Finish(), CbmRichGeoTest::FitAndFillHistCircle(), CbmRichGeoTest::FitAndFillHistEllipse(), CbmLitTofQa::FitHistograms(), CbmLitTofQaReport::FitHistograms(), CbmSimulationReport::H2(), LmvmHist::H2(), H2Clone(), CbmAnaJpsiTask::MCPairs(), CbmRichUrqmdTest::NofHitsAndPoints(), CbmRichUrqmdTest::NofProjections(), CbmAnaJpsiTask::PairMcAndAcceptance(), CbmRichUrqmdTest::PmtXYSource(), CbmStsDigitizeQa::ProcessAngles(), CbmStsDigitizeQa::ProcessDigisAndPoints(), CbmRichGeoTest::ProcessHits(), CbmRichGeoTest::ProcessMc(), CbmTrdMCQa::ProcessPoints(), CbmAnaJpsiTask::RichPmtXY(), CbmRichMCbmAerogelAna::RichRings(), CbmRichMCbmQaReal::RichRings(), CbmRichMCbmQaRichOnly::RichRings(), CbmRichGeoTest::RingParameters(), ShrinkEmptyBinsH2(), CbmAnaJpsiTask::TrackSource(), and CbmRichUrqmdTest::Vertex().

◆ H2Clone()

TH2 * CbmHistManager::H2Clone ( const std::string & name) const
inline

Return clone of TH2 histogram.

Parameters
[in]nameName of TH2 histogram.
Returns
pointer of TH2 clone histogram.

Definition at line 257 of file CbmHistManager.h.

References H2().

Referenced by CbmRichGeoTest::DrawHist(), and CbmRichUrqmdTest::DrawHist().

◆ H2Vector() [1/2]

std::vector< TH2 * > CbmHistManager::H2Vector ( const std::string & pattern) const

Return vector of pointers to TH2 histogram.

Parameters
[in]patternRegex for TH2 histogram name.
Returns
Vector of pointers to TH2 histogram.

◆ H2Vector() [2/2]

std::vector< TH2 * > CbmHistManager::H2Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TH2 histogram.

Parameters
[in]namesVector of TH2 histogram names.
Returns
Vector of pointers to TH2 histogram.

Referenced by CbmSimulationReport::DrawH2ByPattern(), and CbmLitFitQaReport::PrintResAndPullRow().

◆ H3()

◆ H3Clone()

TH3 * CbmHistManager::H3Clone ( const std::string & name) const
inline

Return clone of TH3 histogram.

Parameters
[in]nameName of TH3 histogram.
Returns
pointer of TH3 clone histogram.

Definition at line 292 of file CbmHistManager.h.

References H3().

◆ HnSparse()

THnSparse * CbmHistManager::HnSparse ( const std::string & name) const
inline

Return pointer to THnSparse histogram.

Parameters
[in]nameName of THnSparse histogram.
Returns
pointer to THnSparse histogram.

Definition at line 299 of file CbmHistManager.h.

References fMap.

◆ NormalizeToIntegral()

void CbmHistManager::NormalizeToIntegral ( const std::string & histName)

Normalize histogram to integral.

Parameters
[in]histNameName of histogram.

Definition at line 260 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by CbmRichGeoTest::DrawHist(), CbmRichUrqmdTest::DrawHist(), and NormalizeToIntegralByPattern().

◆ NormalizeToIntegralByPattern()

void CbmHistManager::NormalizeToIntegralByPattern ( const std::string & pattern)

Normalize histograms to integral which name matches specified pattern.

Parameters
[in]histPatternNameRegular expression for histogram name.

Definition at line 266 of file core/base/CbmHistManager.cxx.

References H1Vector(), and NormalizeToIntegral().

Referenced by CbmLitTofQaReport::Draw(), and CbmLitClusteringQaReport::ScaleAndShrinkHistograms().

◆ ObjectVector() [1/4]

template<class T >
std::vector< T > CbmHistManager::ObjectVector ( const std::string & pattern) const
private

◆ ObjectVector() [2/4]

template<class T >
std::vector< T > CbmHistManager::ObjectVector ( const std::vector< std::string > & names) const
private

◆ ObjectVector() [3/4]

template<class T >
vector< T > CbmHistManager::ObjectVector ( const string & pattern) const

Definition at line 55 of file core/base/CbmHistManager.cxx.

References fMap.

◆ ObjectVector() [4/4]

template<class T >
vector< T > CbmHistManager::ObjectVector ( const vector< string > & names) const

Definition at line 93 of file core/base/CbmHistManager.cxx.

References fMap.

◆ P1()

◆ P1Vector() [1/2]

std::vector< TProfile * > CbmHistManager::P1Vector ( const std::string & pattern) const

Return vector of pointers to TProfile.

Parameters
[in]patternRegex for TProfile name.
Returns
Vector of pointers to TProfile.

◆ P1Vector() [2/2]

std::vector< TProfile * > CbmHistManager::P1Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TProfile.

Parameters
[in]namesVector of TProfile names.
Returns
Vector of pointers to TProfile.

◆ P2()

TProfile2D * CbmHistManager::P2 ( const std::string & name) const
inline

◆ P2Vector() [1/2]

std::vector< TProfile2D * > CbmHistManager::P2Vector ( const std::string & pattern) const

Return vector of pointers to TProfile2D.

Parameters
[in]patternRegex for TProfile2D name.
Returns
Vector of pointers to TProfile2D.

◆ P2Vector() [2/2]

std::vector< TProfile2D * > CbmHistManager::P2Vector ( const std::vector< std::string > & names) const

Return vector of pointers to TProfile2D.

Parameters
[in]namesVector of TProfile2D names.
Returns
Vector of pointers to TProfile2D.

◆ ReadFromFile()

◆ Rebin()

void CbmHistManager::Rebin ( const std::string & histName,
Int_t ngroup )

Rebin histogram.

Parameters
[in]histNameName of histogram.
[in]ngroupRebining factor.

Definition at line 275 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by RebinByPattern().

◆ RebinByPattern()

void CbmHistManager::RebinByPattern ( const std::string & pattern,
Int_t ngroup )

Rebin histograms which name matches specified pattern.

Parameters
[in]histPatternNameRegular expression for histogram name.
[in]ngroupRebining factor.

Definition at line 284 of file core/base/CbmHistManager.cxx.

References H1Vector(), and Rebin().

Referenced by CbmAnaJpsiReport::Draw(), CbmAnaJpsiSuperEvent::Draw(), and CbmAnaJpsiSuperEventReport::Draw().

◆ SaveCanvasToImage()

◆ Scale()

void CbmHistManager::Scale ( const std::string & histName,
Double_t scale )

Scale histogram.

Parameters
[in]histNameName of histogram.
[in]scaleScaling factor.

Definition at line 249 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by CbmRichUrqmdTest::DrawHist(), CbmRichRecoQa::DrawMismatchSrc(), CbmTrdMCQa::Finish(), and ScaleByPattern().

◆ ScaleByPattern()

void CbmHistManager::ScaleByPattern ( const std::string & pattern,
Double_t scale )

◆ ShrinkEmptyBinsH1()

void CbmHistManager::ShrinkEmptyBinsH1 ( const std::string & histName)

Shrink empty bins in H1.

Parameters
[in]histNameName of histogram.

Definition at line 182 of file core/base/CbmHistManager.cxx.

References H1().

Referenced by ShrinkEmptyBinsH1ByPattern().

◆ ShrinkEmptyBinsH1ByPattern()

void CbmHistManager::ShrinkEmptyBinsH1ByPattern ( const std::string & pattern)

◆ ShrinkEmptyBinsH2()

void CbmHistManager::ShrinkEmptyBinsH2 ( const std::string & histName)

Shrink empty bins in H2.

Parameters
[in]histNameName of histogram.

Definition at line 212 of file core/base/CbmHistManager.cxx.

References H2().

Referenced by ShrinkEmptyBinsH2ByPattern().

◆ ShrinkEmptyBinsH2ByPattern()

void CbmHistManager::ShrinkEmptyBinsH2ByPattern ( const std::string & pattern)

Shrink empty bins in H2.

Parameters
[in]histPatternNameRegular expression for histogram name.

Definition at line 240 of file core/base/CbmHistManager.cxx.

References H1Vector(), and ShrinkEmptyBinsH2().

Referenced by CbmLitRadLengthQa::Finish(), and CbmLitClusteringQaReport::ScaleAndShrinkHistograms().

◆ ToString()

string CbmHistManager::ToString ( ) const

Return string representation of class.

Returns
string representation of class.

Definition at line 293 of file core/base/CbmHistManager.cxx.

References fMap.

Referenced by CbmLitRadLengthQa::CreateHistograms(), CbmLitTrackingQa::CreateHistograms(), and CbmLitFieldApproximationQa::CreateHistos().

◆ WriteCanvasToFile()

void CbmHistManager::WriteCanvasToFile ( )

Write all canvas to current opened file.

Definition at line 124 of file core/base/CbmHistManager.cxx.

References fCanvases.

◆ WriteToFile()

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & strm,
const CbmHistManager & histManager )
friend

Operator << for convenient output to std::ostream.

Returns
Insertion stream in order to be able to call a succession of insertion operations.

Definition at line 532 of file CbmHistManager.h.

Member Data Documentation

◆ fCanvases

std::vector<TCanvas*> CbmHistManager::fCanvases
private

Definition at line 563 of file CbmHistManager.h.

Referenced by Clear(), CreateCanvas(), SaveCanvasToImage(), and WriteCanvasToFile().

◆ fMap

std::map<std::string, TNamed*> CbmHistManager::fMap
private

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