CbmRoot
Loading...
Searching...
No Matches
cbm::kfp::V0FinderQa Class Reference

A simple QA for the V0 finder. More...

#include <CbmKFV0FinderQa.h>

Inheritance diagram for cbm::kfp::V0FinderQa:
[legend]
Collaboration diagram for cbm::kfp::V0FinderQa:
[legend]

Public Types

enum class  EStoringMode { kSAMEDIR , kSUBDIR }
 
using ObjList_t = std::vector<std::pair<TObject*, TString>>
 

Public Member Functions

 V0FinderQa (bool bUseMc)
 Constructor from parameters.
 
 ~V0FinderQa ()=default
 Destructor.
 
 V0FinderQa (const V0FinderQa &)=delete
 
 V0FinderQa (V0FinderQa &&)=delete
 
V0FinderQaoperator= (const V0FinderQa &)=delete
 
V0FinderQaoperator= (V0FinderQa &&)=delete
 
void InitHistograms ()
 Initializes histograms.
 
void WriteHistograms (const TString &)
 Writes histograms into file.
 
const char * GetConfigName () const
 Gets config name.
 
template<typename T , typename... Args>
T * MakeQaObject (TString sName, TString sTitle, Args... args)
 
void MakeQaDirectory (TString sName)
 
void SetConfigName (const char *path)
 Creates a ROOT object.
 
void SetRootFolderName (const TString &path)
 Sets a common root path to the objects in the output file.
 
void SetStoringMode (EStoringMode mode)
 Set storing mode.
 

Public Attributes

TH1D * fph_tof_lst_hit_time {nullptr}
 Time of tof hits, used for track momentum estimation.
 
TH1D * fph_beta_all {nullptr}
 Beta of tracks.
 
TH1D * fph_dca {nullptr}
 Track DCA to origin.
 
TH2D * fph_dca2D {nullptr}
 Track DCA to origin (2D)
 
TH1D * fph_dca_projectionX {nullptr}
 Track DCA to origin (x-component)
 
TH1D * fph_dca_projectionY {nullptr}
 Track DCA to origin (y-component)
 
TH2D * fph_track_rapidity_vs_pt_all {nullptr}
 Phase space of all accepted tracks.
 
TH2D * fph_track_rapidity_vs_pt_pion {nullptr}
 Phase space of pion candidates.
 
TH2D * fph_track_rapidity_vs_pt_proton {nullptr}
 Phase space of proton candidates.
 
TH1D * fph_lambda_cand_mass {nullptr}
 Mass of lambda candidates.
 

Protected Member Functions

template<typename T >
void CheckProperty (T &&property, const char *name) const
 Function to check, if a property is defined.
 
template<class Config >
std::optional< Config > ReadSpecificConfig () const
 Reads the specific configuration structure from the YAML node.
 
virtual void SetTH1Properties (TH1 *pHist) const
 Applies properties on the histogram created with the MakeQaObject function.
 
virtual void SetTH2Properties (TH2 *pHist) const
 Applies properties on the histogram created with the MakeQaObject function.
 
virtual void SetTProfile2DProperties (TProfile2D *pHist) const
 Applies properties on the profile 2D created with the MakeQaObject function.
 
virtual void SetCanvasProperties (TCanvas *pCanv) const
 Applies properties on the canvas created with the MakeQaObject funciton.
 
void WriteToFile (TFile *pOutFile) const
 Writes objects into file.
 

Protected Attributes

TString fsRootFolderName = ""
 Name of root folder.
 
TString fsConfigName = ""
 Name of configuration file.
 
TString fsPrefix = ""
 Unique prefix for all writeable root.
 
EStoringMode fStoringMode = EStoringMode::kSUBDIR
 Objects storing mode.
 
std::shared_ptr< ObjList_tfpvObjList = nullptr
 List of registered ROOT objects.
 
YAML::Node fConfigNode {}
 Configuration node.
 

Private Member Functions

 ClassDef (V0FinderQa, 0)
 
template<typename T , typename... Args>
T * ConstructAndRegisterQaObject (TString name, Args... args)
 Creates and registers a ROOT object.
 

Private Attributes

bool fbUseMc {false}
 

Detailed Description

A simple QA for the V0 finder.

Definition at line 29 of file CbmKFV0FinderQa.h.

Member Typedef Documentation

◆ ObjList_t

using CbmQaIO::ObjList_t = std::vector<std::pair<TObject*, TString>>
inherited
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 46 of file CbmQaIO.h.

Member Enumeration Documentation

◆ EStoringMode

enum class CbmQaIO::EStoringMode
stronginherited
Enumerator
kSAMEDIR 

Objects of different type will be stored to root directory.

kSUBDIR 

Objects of different type will be stored in different subdirectories like histograms/ canvases/.

Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 48 of file CbmQaIO.h.

Constructor & Destructor Documentation

◆ V0FinderQa() [1/3]

cbm::kfp::V0FinderQa::V0FinderQa ( bool bUseMc)
inline

Constructor from parameters.

Parameters
bUseMcIf MC truth should be used

Definition at line 33 of file CbmKFV0FinderQa.h.

◆ ~V0FinderQa()

cbm::kfp::V0FinderQa::~V0FinderQa ( )
default

Destructor.

◆ V0FinderQa() [2/3]

cbm::kfp::V0FinderQa::V0FinderQa ( const V0FinderQa & )
delete

◆ V0FinderQa() [3/3]

cbm::kfp::V0FinderQa::V0FinderQa ( V0FinderQa && )
delete

Member Function Documentation

◆ CheckProperty()

template<typename T >
void CbmQaIO::CheckProperty ( T && property,
const char * name ) const
protectedinherited

Function to check, if a property is defined.

Parameters
propertyA property to be tested
nameA name of property (used for logging)
Note
Throws an exception, if property is undefined
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 178 of file CbmQaIO.h.

Referenced by CbmQaIO::MakeQaObject().

◆ ClassDef()

cbm::kfp::V0FinderQa::ClassDef ( V0FinderQa ,
0  )
private

◆ ConstructAndRegisterQaObject()

template<typename T , typename... Args>
T * CbmQaIO::ConstructAndRegisterQaObject ( TString name,
Args... args )
privateinherited

Creates and registers a ROOT object.

Parameters
nameA name of the ROOT object, which can contain a sub-directory
argsOther arguments, passed to the ROOT object constructor
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 198 of file CbmQaIO.h.

References CbmQaIO::fpvObjList, CbmQaIO::fsRootFolderName, CbmQaIO::fStoringMode, CbmQaIO::kSUBDIR, CbmQaIO::SetCanvasProperties(), CbmQaIO::SetTH1Properties(), CbmQaIO::SetTH2Properties(), and CbmQaIO::SetTProfile2DProperties().

Referenced by CbmQaIO::MakeQaObject().

◆ GetConfigName()

const char * CbmQaIO::GetConfigName ( ) const
inlineinherited

Gets config name.

Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 76 of file CbmQaIO.h.

References CbmQaIO::fsConfigName.

◆ InitHistograms()

void V0FinderQa::InitHistograms ( )

◆ MakeQaDirectory()

void CbmQaIO::MakeQaDirectory ( TString sName)
inherited

◆ MakeQaObject()

◆ operator=() [1/2]

V0FinderQa & cbm::kfp::V0FinderQa::operator= ( const V0FinderQa & )
delete

◆ operator=() [2/2]

V0FinderQa & cbm::kfp::V0FinderQa::operator= ( V0FinderQa && )
delete

◆ ReadSpecificConfig()

template<class Config >
std::optional< Config > CbmQaIO::ReadSpecificConfig ( ) const
inlineprotectedinherited

Reads the specific configuration structure from the YAML node.

Template Parameters
ConfigType of the configuration class

The function is to be called in the user-defined class method InitDataBranches

Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 127 of file CbmQaIO.h.

References CbmQaIO::fConfigNode, and cbm::algo::yaml::Read().

◆ SetCanvasProperties()

void CbmQaIO::SetCanvasProperties ( TCanvas * pCanv) const
protectedvirtualinherited

Applies properties on the canvas created with the MakeQaObject funciton.

Parameters
pCanvPointer to the canvas
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 84 of file CbmQaIO.cxx.

Referenced by CbmQaIO::ConstructAndRegisterQaObject().

◆ SetConfigName()

void CbmQaIO::SetConfigName ( const char * path)
inherited

Creates a ROOT object.

Sets config name

Parameters
nameA path to the config
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 95 of file CbmQaIO.cxx.

References CbmQaIO::fConfigNode, CbmQaIO::fsConfigName, and CbmQaIO::fsPrefix.

◆ SetRootFolderName()

void CbmQaIO::SetRootFolderName ( const TString & path)
inlineinherited

Sets a common root path to the objects in the output file.

Parameters
pathA path to the object
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 109 of file CbmQaIO.h.

References CbmQaIO::fsRootFolderName.

Referenced by CbmQaTask::CbmQaTask().

◆ SetStoringMode()

void CbmQaIO::SetStoringMode ( EStoringMode mode)
inlineinherited

Set storing mode.

Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 112 of file CbmQaIO.h.

References CbmQaIO::fStoringMode.

Referenced by CbmCaInputQaBase< DetID >::CbmCaInputQaBase().

◆ SetTH1Properties()

void CbmQaIO::SetTH1Properties ( TH1 * pHist) const
protectedvirtualinherited

Applies properties on the histogram created with the MakeQaObject function.

Parameters
pHistPointer to the histogram

Reimplemented in cbm::ca::TrackTypeQa.

Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 36 of file CbmQaIO.cxx.

References cbm::qa::util::GetHistStats().

Referenced by CbmQaIO::ConstructAndRegisterQaObject().

◆ SetTH2Properties()

void CbmQaIO::SetTH2Properties ( TH2 * pHist) const
protectedvirtualinherited

Applies properties on the histogram created with the MakeQaObject function.

Parameters
pHistPointer to the histogram
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 50 of file CbmQaIO.cxx.

Referenced by CbmQaIO::ConstructAndRegisterQaObject().

◆ SetTProfile2DProperties()

void CbmQaIO::SetTProfile2DProperties ( TProfile2D * pHist) const
protectedvirtualinherited

Applies properties on the profile 2D created with the MakeQaObject function.

Parameters
pHistPointer to the profile
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 67 of file CbmQaIO.cxx.

Referenced by CbmQaIO::ConstructAndRegisterQaObject().

◆ WriteHistograms()

void V0FinderQa::WriteHistograms ( const TString & fileName)

Writes histograms into file.

Definition at line 59 of file CbmKFV0FinderQa.cxx.

References CbmQaIO::WriteToFile().

◆ WriteToFile()

void CbmQaIO::WriteToFile ( TFile * pOutFile) const
protectedinherited

Writes objects into file.

Parameters
pOutFilePointer to output ROOT file
Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 116 of file CbmQaIO.cxx.

References CbmQaIO::fpvObjList.

Referenced by CbmQaTask::Finish(), and WriteHistograms().

Member Data Documentation

◆ fbUseMc

bool cbm::kfp::V0FinderQa::fbUseMc {false}
private

Definition at line 62 of file CbmKFV0FinderQa.h.

◆ fConfigNode

YAML::Node CbmQaIO::fConfigNode {}
protectedinherited

◆ fph_beta_all

TH1D* cbm::kfp::V0FinderQa::fph_beta_all {nullptr}

Beta of tracks.

Definition at line 51 of file CbmKFV0FinderQa.h.

Referenced by InitHistograms().

◆ fph_dca

TH1D* cbm::kfp::V0FinderQa::fph_dca {nullptr}

Track DCA to origin.

Definition at line 52 of file CbmKFV0FinderQa.h.

Referenced by InitHistograms().

◆ fph_dca2D

TH2D* cbm::kfp::V0FinderQa::fph_dca2D {nullptr}

Track DCA to origin (2D)

Definition at line 53 of file CbmKFV0FinderQa.h.

Referenced by InitHistograms().

◆ fph_dca_projectionX

TH1D* cbm::kfp::V0FinderQa::fph_dca_projectionX {nullptr}

Track DCA to origin (x-component)

Definition at line 54 of file CbmKFV0FinderQa.h.

Referenced by InitHistograms().

◆ fph_dca_projectionY

TH1D* cbm::kfp::V0FinderQa::fph_dca_projectionY {nullptr}

Track DCA to origin (y-component)

Definition at line 55 of file CbmKFV0FinderQa.h.

Referenced by InitHistograms().

◆ fph_lambda_cand_mass

TH1D* cbm::kfp::V0FinderQa::fph_lambda_cand_mass {nullptr}

Mass of lambda candidates.

Definition at line 59 of file CbmKFV0FinderQa.h.

Referenced by InitHistograms().

◆ fph_tof_lst_hit_time

TH1D* cbm::kfp::V0FinderQa::fph_tof_lst_hit_time {nullptr}

Time of tof hits, used for track momentum estimation.

Definition at line 50 of file CbmKFV0FinderQa.h.

Referenced by InitHistograms().

◆ fph_track_rapidity_vs_pt_all

TH2D* cbm::kfp::V0FinderQa::fph_track_rapidity_vs_pt_all {nullptr}

Phase space of all accepted tracks.

Definition at line 56 of file CbmKFV0FinderQa.h.

◆ fph_track_rapidity_vs_pt_pion

TH2D* cbm::kfp::V0FinderQa::fph_track_rapidity_vs_pt_pion {nullptr}

Phase space of pion candidates.

Definition at line 57 of file CbmKFV0FinderQa.h.

◆ fph_track_rapidity_vs_pt_proton

TH2D* cbm::kfp::V0FinderQa::fph_track_rapidity_vs_pt_proton {nullptr}

Phase space of proton candidates.

Definition at line 58 of file CbmKFV0FinderQa.h.

◆ fpvObjList

std::shared_ptr<ObjList_t> CbmQaIO::fpvObjList = nullptr
protectedinherited

◆ fsConfigName

TString CbmQaIO::fsConfigName = ""
protectedinherited

Name of configuration file.

Examples
/tmp/builds/computing/cbmroot/core/qa/CbmQaIO.h.

Definition at line 158 of file CbmQaIO.h.

Referenced by CbmQaIO::GetConfigName(), and CbmQaIO::SetConfigName().

◆ fsPrefix

TString CbmQaIO::fsPrefix = ""
protectedinherited

◆ fsRootFolderName

◆ fStoringMode


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