CbmRoot
Loading...
Searching...
No Matches
cbm::ca::OutputQa Class Reference

QA-task for CA tracking output results. More...

#include <CbmCaOutputQa.h>

Inheritance diagram for cbm::ca::OutputQa:
[legend]
Collaboration diagram for cbm::ca::OutputQa:
[legend]

Classes

struct  DrawAtt
 Structure to keep drawing attributes of histograms. More...
 

Public Types

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

Public Member Functions

 OutputQa (int verbose, bool isMCUsed, ECbmRecoMode recoMode=ECbmRecoMode::EventByEvent)
 Constructor from parameters.
 
void AddTrackType (ETrackType type, bool flag=true)
 Adds track type.
 
void EnableDebugger (const char *filename)
 Enables debugger.
 
void ReadParameters (const char *filename)
 Reads defined parameters object from file.
 
void SetEventDisplay (bool bDrawEvents, int minNofPoints=2)
 Sets event display.
 
void SetUseMvd (bool flag=true)
 Sets MVD use flag.
 
void SetUseSts (bool flag=true)
 Sets STS use flag.
 
void SetUseMuch (bool flag=true)
 Sets MuCh use flag.
 
void SetUseTrd (bool flag=true)
 Sets TRD use flag.
 
void SetUseTof (bool flag=true)
 Sets TOF use flag.
 
void SetStsTrackingMode ()
 Sets STS tracking mode.
 
void SetMcbmTrackingMode ()
 Sets mCBM global tracking mode.
 
void SetPerformanceMode (int mode)
 Sets performance mode.
 
void SetTrackTypeListForSummary (std::set< ETrackType > &&trackTypes)
 Set track type list for summary table.
 
bool CompareQaObjects ()
 Process ROOT objects comparison.
 
void DisableEventMode ()
 Disables event-by-event execution.
 
const std::map< std::string, CheckFlags > & GetCheckList () const
 Gets check-list.
 
const TString & GetDefaultTag () const
 Gets default tag.
 
const std::string & GetSetupName () const
 Gets name of the setup.
 
const TString & GetVersionTag () const
 Gets version tag.
 
bool IsMCUsed () const
 Returns flag, whether MC information is used or not in the task.
 
void ReadCheckListFromConfig ()
 Reads check-list from the configuration file.
 
void SetCheckFile (const std::shared_ptr< TFile > &pCheckFile)
 Sets check-file.
 
void SetCompareOutput (const std::shared_ptr< TFile > &pCompareOutput)
 Sets compare output file.
 
void SetVersionTag (const TString &tag)
 Sets version tag.
 
void SetDefaultTag (const TString &tag)
 Sets default tag.
 
void SetRecoMode (ECbmRecoMode recoMode)
 Sets data processing (reconstruction) mode.
 
void SetSetupName (const char *setup)
 Sets name of the setup.
 
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.
 

Protected Member Functions

void Check () override
 Method to check, if the QA results are acceptable.
 
void CreateSummary () override
 Creates summary cavases, tables etc.
 
void DeInit () override
 De-initializes histograms.
 
void FillTrackTypeHistograms ()
 Fills histograms for a given track types.
 
InitStatus InitQa () override
 Initialises the QA-task.
 
void ExecQa () override
 Fills histograms from time slice or event.
 
void Exec (Option_t *) override final
 FairTask: Defines action of the task in the event/TS.
 
void Finish () override final
 FairTask: Defines action of the task in the end of run.
 
InitStatus Init () override final
 FairTask: Task initialization in the beginning of the run.
 
InitStatus ReInit () override final
 FairTask: Task reinitialization.
 
int GetEventNumber () const
 Get current event number.
 
template<typename T >
bool CheckRange (std::string_view name, T var, T lo, T hi) const
 Checks range of variable.
 
template<typename T >
bool CheckRange (std::string_view name, T var, T varErr, T lo, T hi) const
 Checks range of variable.
 
bool CheckRange (TH1 *h, double meanMax, double rmsMin, double rmsMax)
 Checks ranges for mean and standard deviation.
 
void PutSetupNameOnPad (double xMin, double yMin, double xMax, double yMax)
 Puts setup title on the canvas.
 
CbmEventGetCurrentEvent ()
 Gets pointer to current event.
 
void StoreCheckResult (const std::string &tag, bool result, const std::string &msg="")
 Stores check flag to the check-list.
 
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 Types

enum class  EMonitorKey {
  kEvent , kTrack , kHit , kMcTrack ,
  kMcPoint , END
}
 QA monitor counters. More...
 
template<typename T >
using TTypeArr_t = std::array<T, ETrackType::END>
 Array for track type properties.
 

Private Member Functions

void FillRecoTrack (ETrackType type, int iTrkReco)
 Fills reconstructed track by its index.
 
void FillMCTrack (ETrackType type, int iTrkMC)
 Fills MC track by its index.
 
void DrawEvent ()
 Draws event.
 
template<class TObj >
void DrawSetOf (const std::vector< ETrackType > &vTypes, std::function< TObj *(ETrackType)> GetObj)
 Utility function to draw a generic comparison of histograms from different track types.
 
void InitDrawingAttributes ()
 Defines drawing attributes for histograms of different track types.
 
 ClassDefOverride (OutputQa, 0)
 
void DeInitBase ()
 De-initializes this task.
 
template<class Obj >
bool CompareTwoObjects (const TObject *pObjL, const TObject *pObjR, const TString &objName, const ObjectComparisonConfig &cfg)
 Process object comparison.
 
template<typename T , typename... Args>
T * ConstructAndRegisterQaObject (TString name, Args... args)
 Creates and registers a ROOT object.
 

Private Attributes

bool fbUseMvd = false
 is MVD used
 
bool fbUseSts = false
 is STS used
 
bool fbUseMuch = false
 is MuCh used
 
bool fbUseTrd = false
 is TRD used
 
bool fbUseTof = false
 is TOF used
 
bool fbDrawEvents = false
 flag to draw events with the event display
 
int fEvtDisplayMinNofPoints = 2
 minimum number of MC points in the event display
 
int fPerformanceMode = 1
 Performance mode.
 
ECbmCaTrackingMode fTrackingMode = ECbmCaTrackingMode::kSTS
 Tracking mode.
 
std::string fsParametersFilename = ""
 
std::unique_ptr< TimeSliceReaderfpTSReader = nullptr
 Reader of the time slice.
 
std::shared_ptr< MCModulefpMCModule = nullptr
 MC module.
 
std::shared_ptr< ca::DataManagerfpDataManager = nullptr
 Data manager.
 
std::shared_ptr< tools::DebuggerfpDebugger = nullptr
 Debugger.
 
std::shared_ptr< ca::Parameters< float > > fpParameters = nullptr
 Tracking parameters object.
 
ca::Vector< CbmL1HitIdfvHitIds {"CbmCaOutputQa::fvHitIds"}
 
ca::Vector< CbmL1HitDebugInfofvHits {"CbmCaOutputQa::fvHits"}
 
ca::Vector< CbmL1TrackfvRecoTracks {"CbmCaOutputQa::fvRecoTracks"}
 
tools::MCData fMCData
 Input MC data (points and tracks)
 
ca::Monitor< EMonitorKeyfMonitor {"Output tracking QA"}
 
std::set< ETrackTypefmSummaryTableEntries
 Which track types should be listed in the summary table.
 
TTypeArr_t< std::string > fvsTrackTypeName
 Array of track type unique names.
 
TTypeArr_t< std::unique_ptr< TrackTypeQa > > fvpTrackHistograms
 Histogrammers for different track types.
 
TTypeArr_t< bool > fvbTrackTypeOn = {0}
 Usage flag for different track types.
 
TTypeArr_t< DrawAttfvTrackDrawAtts
 Drawing attributes for track types.
 
bool fbUseMC = false
 Flag, if MC is used.
 
ECbmRecoMode fRecoMode = ECbmRecoMode::Timeslice
 Reconstruction mode.
 
std::map< std::string, CheckFlagsfmCheckList
 A QA check-list map.
 
TClonesArray * fpBrEvents = nullptr
 Pointer to CbmEvent branch.
 
CbmEventfpCurrentEvent = nullptr
 Pointer to the current event.
 
std::string fsSetupName = ""
 Name of the setup (to draw on the canvases)
 
TParameter< int > fNofEvents {"nEvents", 0}
 Number of processed events.
 
TString fsVersionTag = ""
 Version tag (git SHA etc.)
 
TString fsDefaultTag = ""
 Default tag (git SHA etc.)
 
std::shared_ptr< TFile > fpBenchmarkInput = nullptr
 A file with default ROOT objects used for the cross-check.
 
std::shared_ptr< TFile > fpBenchmarkOutput = nullptr
 An output file for histograms cross-check.
 

Static Private Attributes

static constexpr bool kEXPTRACKFILL = false
 
static constexpr int kCXSIZEPX = 600
 Canvas size along x-axis [px].
 
static constexpr int kCYSIZEPX = 600
 Canvas size along y-axis [px].
 

Detailed Description

QA-task for CA tracking output results.

Definition at line 97 of file CbmCaOutputQa.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.

◆ TTypeArr_t

template<typename T >
using cbm::ca::OutputQa::TTypeArr_t = std::array<T, ETrackType::END>
private

Array for track type properties.

Definition at line 107 of file CbmCaOutputQa.h.

Member Enumeration Documentation

◆ EMonitorKey

enum class cbm::ca::OutputQa::EMonitorKey
strongprivate

QA monitor counters.

Enumerator
kEvent 
kTrack 
kHit 
kMcTrack 
kMcPoint 
END 

Definition at line 270 of file CbmCaOutputQa.h.

◆ 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

◆ OutputQa()

Member Function Documentation

◆ AddTrackType()

void cbm::ca::OutputQa::AddTrackType ( ETrackType type,
bool flag = true )
inline

Adds track type.

Parameters
typeTrack type
flagFlag: true/false

Adds a track type for building distributions. By default, only all, primary, secondary and ghost track distributions are booked.

Definition at line 128 of file CbmCaOutputQa.h.

References fvbTrackTypeOn.

Referenced by OutputQa().

◆ Check()

◆ 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().

◆ CheckRange() [1/3]

template<typename T >
bool CbmQaTask::CheckRange ( std::string_view name,
T var,
T lo,
T hi ) const
protectedinherited

Checks range of variable.

Parameters
nameName of the variable
varVariable to check
loLower limit of the variable
hiUpper limit of the variable
Returns
False, if variable exits the range

Definition at line 275 of file CbmQaTask.h.

References CbmQaTask::CheckRange().

Referenced by CbmQaTask::CheckRange(), and CbmQaTask::CheckRange().

◆ CheckRange() [2/3]

template<typename T >
bool CbmQaTask::CheckRange ( std::string_view name,
T var,
T varErr,
T lo,
T hi ) const
protectedinherited

Checks range of variable.

Parameters
nameName of the variable
varVariable to check
varErrStandard Error of the variable
loLower limit of the variable
hiUpper limit of the variable
Returns
False, if variable exits the range

Definition at line 283 of file CbmQaTask.h.

◆ CheckRange() [3/3]

bool CbmQaTask::CheckRange ( TH1 * h,
double meanMax,
double rmsMin,
double rmsMax )
protectedinherited

Checks ranges for mean and standard deviation.

Returns
False, if variable exits the range

Definition at line 141 of file CbmQaTask.cxx.

References CbmQaTask::CheckRange().

◆ ClassDefOverride()

cbm::ca::OutputQa::ClassDefOverride ( OutputQa ,
0  )
private

◆ CompareQaObjects()

◆ CompareTwoObjects()

template<class Obj >
bool CbmQaTask::CompareTwoObjects ( const TObject * pObjL,
const TObject * pObjR,
const TString & objName,
const ObjectComparisonConfig & cfg )
privateinherited

Process object comparison.

Template Parameters
ObjClass of the ROOT object
Parameters
pObjLFirst object (this)
pObjRSecond object (default)
objNameName of the object (contains full path to the object)
cfgComparison configuration entry
Returns
true Histograms are equal within selected method
false Histograms differ within one of the comparison methods

Definition at line 306 of file CbmQaTask.h.

References CbmQaTask::ObjectComparisonConfig::fCanvOpt, CbmQaTask::ObjectComparisonConfig::fChi2NdfMax, CbmQaTask::fpBenchmarkOutput, CbmQaTask::ObjectComparisonConfig::fPoint, CbmQaTask::ObjectComparisonConfig::fRatio, CbmQaTask::ObjectComparisonConfig::fRatioMax, CbmQaTask::ObjectComparisonConfig::fRatioMin, CbmQaTask::fsDefaultTag, CbmQaTask::ObjectComparisonConfig::fStat, CbmQaTask::ObjectComparisonConfig::fStatOpt, and CbmQaTask::fsVersionTag.

Referenced by CbmQaTask::CompareQaObjects().

◆ 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().

◆ CreateSummary()

◆ DeInit()

void cbm::ca::OutputQa::DeInit ( )
inlineoverrideprotectedvirtual

De-initializes histograms.

Reimplemented from CbmQaTask.

Definition at line 203 of file CbmCaOutputQa.h.

◆ DeInitBase()

void CbmQaTask::DeInitBase ( )
privateinherited

De-initializes this task.

Definition at line 129 of file CbmQaTask.cxx.

References CbmQaTask::DeInit().

Referenced by CbmQaTask::Init().

◆ DisableEventMode()

void CbmQaTask::DisableEventMode ( )
inherited

Disables event-by-event execution.

By default, if the branch

◆ DrawEvent()

◆ DrawSetOf()

template<class TObj >
void cbm::ca::OutputQa::DrawSetOf ( const std::vector< ETrackType > & vTypes,
std::function< TObj *(ETrackType)> GetObj )
private

Utility function to draw a generic comparison of histograms from different track types.

Template Parameters
TObjType of ROOT object
Parameters
vTypesVector of types to draw
GetObjFunction, returning an object of a given type

Definition at line 313 of file CbmCaOutputQa.h.

References CbmQaCmpDrawer< Obj >::Clear(), CbmQaCmpDrawer< Obj >::Draw(), fvbTrackTypeOn, fvpTrackHistograms, CbmQaTask::IsMCUsed(), CbmQaCmpDrawer< Obj >::RegisterObject(), and CbmQaCmpDrawer< Obj >::SetMinimum().

Referenced by CreateSummary().

◆ EnableDebugger()

void cbm::ca::OutputQa::EnableDebugger ( const char * filename)
inline

Enables debugger.

Parameters
filenameName of output ROOT file

Creates a debugger and enables its usage inside a QA task

Definition at line 134 of file CbmCaOutputQa.h.

References fpDebugger.

◆ Exec()

void CbmQaTask::Exec ( Option_t * )
finaloverrideprotectedinherited

FairTask: Defines action of the task in the event/TS.

Definition at line 44 of file CbmQaTask.cxx.

References CbmQaTask::ExecQa(), CbmQaTask::fNofEvents, CbmQaTask::fpBrEvents, and CbmQaTask::fpCurrentEvent.

◆ ExecQa()

◆ FillMCTrack()

void cbm::ca::OutputQa::FillMCTrack ( ETrackType type,
int iTrkMC )
inlineprivate

Fills MC track by its index.

Parameters
typeTrack type
iTrkRecoIndex of MC track

Definition at line 334 of file CbmCaOutputQa.h.

Referenced by ExecQa().

◆ FillRecoTrack()

void cbm::ca::OutputQa::FillRecoTrack ( ETrackType type,
int iTrkReco )
inlineprivate

Fills reconstructed track by its index.

Parameters
typeTrack type
iTrkRecoIndex of reconstructed track

Definition at line 218 of file CbmCaOutputQa.h.

References fvbTrackTypeOn, and fvpTrackHistograms.

Referenced by ExecQa().

◆ FillTrackTypeHistograms()

void cbm::ca::OutputQa::FillTrackTypeHistograms ( )
protected

Fills histograms for a given track types.

◆ Finish()

void CbmQaTask::Finish ( )
finaloverrideprotectedinherited

FairTask: Defines action of the task in the end of run.

Definition at line 64 of file CbmQaTask.cxx.

References CbmQaTask::CreateSummary(), CbmQaTask::fNofEvents, and CbmQaIO::WriteToFile().

◆ GetCheckList()

const std::map< std::string, CheckFlags > & CbmQaTask::GetCheckList ( ) const
inlineinherited

Gets check-list.

Definition at line 113 of file CbmQaTask.h.

References CbmQaTask::fmCheckList.

◆ 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.

◆ GetCurrentEvent()

CbmEvent * CbmQaTask::GetCurrentEvent ( )
inlineprotectedinherited

Gets pointer to current event.

Definition at line 216 of file CbmQaTask.h.

References CbmQaTask::fpCurrentEvent.

Referenced by ExecQa().

◆ GetDefaultTag()

const TString & CbmQaTask::GetDefaultTag ( ) const
inlineinherited

Gets default tag.

Definition at line 116 of file CbmQaTask.h.

References CbmQaTask::fsDefaultTag.

◆ GetEventNumber()

int CbmQaTask::GetEventNumber ( ) const
inlineprotectedinherited

Get current event number.

Definition at line 183 of file CbmQaTask.h.

References CbmQaTask::fNofEvents.

Referenced by Check(), and DrawEvent().

◆ GetSetupName()

const std::string & CbmQaTask::GetSetupName ( ) const
inlineinherited

Gets name of the setup.

Definition at line 119 of file CbmQaTask.h.

References CbmQaTask::fsSetupName.

◆ GetVersionTag()

const TString & CbmQaTask::GetVersionTag ( ) const
inlineinherited

Gets version tag.

Definition at line 122 of file CbmQaTask.h.

References CbmQaTask::fsVersionTag.

◆ Init()

InitStatus CbmQaTask::Init ( )
finaloverrideprotectedinherited

FairTask: Task initialization in the beginning of the run.

Definition at line 88 of file CbmQaTask.cxx.

References CbmQaTask::DeInitBase(), EventByEvent, CbmQaTask::fNofEvents, CbmQaTask::fpBrEvents, CbmQaTask::fRecoMode, CbmQaTask::InitQa(), and Timeslice.

Referenced by CbmQaTask::ReInit().

◆ InitDrawingAttributes()

◆ InitQa()

InitStatus OutputQa::InitQa ( )
overrideprotectedvirtual

Initialises the QA-task.

Reimplemented from CbmQaTask.

Definition at line 787 of file CbmCaOutputQa.cxx.

References fbUseMuch, fbUseMvd, fbUseSts, fbUseTof, fbUseTrd, fMCData, fMonitor, fmSummaryTableEntries, fpDataManager, fPerformanceMode, fpMCModule, fpParameters, fpTSReader, CbmQaIO::fpvObjList, fsParametersFilename, CbmQaIO::fsPrefix, CbmQaIO::fsRootFolderName, fTrackingMode, fvbTrackTypeOn, fvHitIds, fvHits, fvpTrackHistograms, fvRecoTracks, fvsTrackTypeName, fvTrackDrawAtts, cbm::ca::ParametersHandler::Get(), cbm::ca::ParametersHandler::Instance(), CbmQaTask::IsMCUsed(), cbm::ca::kAll, cbm::ca::kAllE, cbm::ca::kAllK, cbm::ca::kAllMU, cbm::ca::kAllPI, cbm::ca::kAllPPBAR, kEvent, cbm::ca::kGhost, kHit, kMcPoint, kMcTrack, cbm::ca::kPrim, cbm::ca::kPrimE, cbm::ca::kPrimEM, cbm::ca::kPrimEP, cbm::ca::kPrimFast, cbm::ca::kPrimK, cbm::ca::kPrimKM, cbm::ca::kPrimKP, cbm::ca::kPrimLong, cbm::ca::kPrimLongFast, cbm::ca::kPrimMU, cbm::ca::kPrimMUM, cbm::ca::kPrimMUP, cbm::ca::kPrimP, cbm::ca::kPrimPBAR, cbm::ca::kPrimPI, cbm::ca::kPrimPIM, cbm::ca::kPrimPIP, cbm::ca::kPrimPPBAR, cbm::ca::kSec, cbm::ca::kSecE, cbm::ca::kSecEM, cbm::ca::kSecEP, cbm::ca::kSecFast, cbm::ca::kSecK, cbm::ca::kSecKM, cbm::ca::kSecKP, cbm::ca::kSecMU, cbm::ca::kSecMUM, cbm::ca::kSecMUP, cbm::ca::kSecP, cbm::ca::kSecPBAR, cbm::ca::kSecPI, cbm::ca::kSecPIM, cbm::ca::kSecPIP, cbm::ca::kSecPPBAR, kTrack, cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetCounterName(), and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetRatioKeys().

◆ IsMCUsed()

◆ MakeQaDirectory()

void CbmQaIO::MakeQaDirectory ( TString sName)
inherited

◆ MakeQaObject()

◆ PutSetupNameOnPad()

void CbmQaTask::PutSetupNameOnPad ( double xMin,
double yMin,
double xMax,
double yMax )
protectedinherited

Puts setup title on the canvas.

Definition at line 248 of file CbmQaTask.cxx.

References CbmQaTask::fsSetupName.

Referenced by cbm::ca::InputQaSetup::CreateSummary().

◆ ReadCheckListFromConfig()

void CbmQaTask::ReadCheckListFromConfig ( )
inherited

Reads check-list from the configuration file.

Definition at line 263 of file CbmQaTask.cxx.

References CbmQaIO::fConfigNode, and CbmQaTask::fmCheckList.

◆ ReadParameters()

void cbm::ca::OutputQa::ReadParameters ( const char * filename)
inline

Reads defined parameters object from file.

Parameters
filenameName of parameter file
Note
TEMPORARY FUNCTION, A SEPARATE PARAMETERS INITIALIZATION CLASS IS TO BE USED

Definition at line 144 of file CbmCaOutputQa.h.

References fsParametersFilename.

◆ 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().

◆ ReInit()

InitStatus CbmQaTask::ReInit ( )
finaloverrideprotectedinherited

FairTask: Task reinitialization.

Definition at line 122 of file CbmQaTask.cxx.

References CbmQaTask::Init().

◆ 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().

◆ SetCheckFile()

void CbmQaTask::SetCheckFile ( const std::shared_ptr< TFile > & pCheckFile)
inlineinherited

Sets check-file.

Parameters
pCheckFileShared pointer to the cross-check file

Definition at line 134 of file CbmQaTask.h.

References CbmQaTask::fpBenchmarkInput.

◆ SetCompareOutput()

void CbmQaTask::SetCompareOutput ( const std::shared_ptr< TFile > & pCompareOutput)
inlineinherited

Sets compare output file.

Parameters
pCompareOutputShared pointer to the comparison output file

Definition at line 138 of file CbmQaTask.h.

References CbmQaTask::fpBenchmarkOutput.

◆ 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.

◆ SetDefaultTag()

void CbmQaTask::SetDefaultTag ( const TString & tag)
inlineinherited

Sets default tag.

Definition at line 144 of file CbmQaTask.h.

References CbmQaTask::fsDefaultTag.

◆ SetEventDisplay()

void cbm::ca::OutputQa::SetEventDisplay ( bool bDrawEvents,
int minNofPoints = 2 )
inline

Sets event display.

Parameters
flagOn/off
minNofPointsMinimum number of points to draw the event

The event display draws xz- and yz-projection of the event snapshot, which includes MC and Reco tracks, hits and MC-points

Definition at line 152 of file CbmCaOutputQa.h.

References fbDrawEvents, and fEvtDisplayMinNofPoints.

◆ SetMcbmTrackingMode()

void cbm::ca::OutputQa::SetMcbmTrackingMode ( )
inline

Sets mCBM global tracking mode.

Definition at line 182 of file CbmCaOutputQa.h.

References fTrackingMode, and kMCBM.

◆ SetPerformanceMode()

void cbm::ca::OutputQa::SetPerformanceMode ( int mode)
inline

Sets performance mode.

Parameters
modePerformance mode (1 is default: TODO - test)

Definition at line 186 of file CbmCaOutputQa.h.

References fPerformanceMode.

◆ SetRecoMode()

void CbmQaTask::SetRecoMode ( ECbmRecoMode recoMode)
inlineinherited

Sets data processing (reconstruction) mode.

The reconstruction mode can be either ECbmRecoMode::Timeslice or ECbmRecoMode::EventByEvent. The first variant implies, that the data are processed within entire time-slice (in the event-by-event simulation within the entire event). For the second variant the data are processed within a loop of CbmEvent objects, if the branch of latter is accessible. By default the ECbmRecoMode::Timeslice is used.

Definition at line 152 of file CbmQaTask.h.

References CbmQaTask::fRecoMode.

◆ 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().

◆ SetSetupName()

void CbmQaTask::SetSetupName ( const char * setup)
inlineinherited

Sets name of the setup.

Definition at line 155 of file CbmQaTask.h.

References CbmQaTask::fsSetupName.

◆ 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().

◆ SetStsTrackingMode()

void cbm::ca::OutputQa::SetStsTrackingMode ( )
inline

Sets STS tracking mode.

Definition at line 179 of file CbmCaOutputQa.h.

References fTrackingMode, and kSTS.

◆ 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().

◆ SetTrackTypeListForSummary()

void cbm::ca::OutputQa::SetTrackTypeListForSummary ( std::set< ETrackType > && trackTypes)
inline

Set track type list for summary table.

Parameters
trackTypesA of track type set

Definition at line 190 of file CbmCaOutputQa.h.

References fmSummaryTableEntries.

◆ SetUseMuch()

void cbm::ca::OutputQa::SetUseMuch ( bool flag = true)
inline

Sets MuCh use flag.

Parameters
flagBoolean flag: true - detector subsystem is used, false - detector subsystem is ignored

Definition at line 168 of file CbmCaOutputQa.h.

References fbUseMuch.

◆ SetUseMvd()

void cbm::ca::OutputQa::SetUseMvd ( bool flag = true)
inline

Sets MVD use flag.

Parameters
flagBoolean flag: true - detector subsystem is used, false - detector subsystem is ignored

Definition at line 160 of file CbmCaOutputQa.h.

References fbUseMvd.

◆ SetUseSts()

void cbm::ca::OutputQa::SetUseSts ( bool flag = true)
inline

Sets STS use flag.

Parameters
flagBoolean flag: true - detector subsystem is used, false - detector subsystem is ignored

Definition at line 164 of file CbmCaOutputQa.h.

References fbUseSts.

◆ SetUseTof()

void cbm::ca::OutputQa::SetUseTof ( bool flag = true)
inline

Sets TOF use flag.

Parameters
flagBoolean flag: true - detector subsystem is used, false - detector subsystem is ignored

Definition at line 176 of file CbmCaOutputQa.h.

References fbUseTof.

◆ SetUseTrd()

void cbm::ca::OutputQa::SetUseTrd ( bool flag = true)
inline

Sets TRD use flag.

Parameters
flagBoolean flag: true - detector subsystem is used, false - detector subsystem is ignored

Definition at line 172 of file CbmCaOutputQa.h.

References fbUseTrd.

◆ SetVersionTag()

void CbmQaTask::SetVersionTag ( const TString & tag)
inlineinherited

Sets version tag.

Definition at line 141 of file CbmQaTask.h.

References CbmQaTask::fsVersionTag.

◆ StoreCheckResult()

void CbmQaTask::StoreCheckResult ( const std::string & tag,
bool result,
const std::string & msg = "" )
protectedinherited

Stores check flag to the check-list.

Parameters
tagThe flag name
resultCheck result
msgSupporting message (optional)

Definition at line 311 of file CbmQaTask.cxx.

References CbmQaTask::fmCheckList.

Referenced by CbmCaInputQaSts::Check().

◆ 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().

Member Data Documentation

◆ fbDrawEvents

bool cbm::ca::OutputQa::fbDrawEvents = false
private

flag to draw events with the event display

Definition at line 250 of file CbmCaOutputQa.h.

Referenced by ExecQa(), and SetEventDisplay().

◆ fbUseMC

bool CbmQaTask::fbUseMC = false
privateinherited

Flag, if MC is used.

Definition at line 240 of file CbmQaTask.h.

Referenced by CbmQaTask::IsMCUsed().

◆ fbUseMuch

bool cbm::ca::OutputQa::fbUseMuch = false
private

is MuCh used

Definition at line 247 of file CbmCaOutputQa.h.

Referenced by InitQa(), and SetUseMuch().

◆ fbUseMvd

bool cbm::ca::OutputQa::fbUseMvd = false
private

is MVD used

Definition at line 245 of file CbmCaOutputQa.h.

Referenced by InitQa(), and SetUseMvd().

◆ fbUseSts

bool cbm::ca::OutputQa::fbUseSts = false
private

is STS used

Definition at line 246 of file CbmCaOutputQa.h.

Referenced by InitQa(), and SetUseSts().

◆ fbUseTof

bool cbm::ca::OutputQa::fbUseTof = false
private

is TOF used

Definition at line 249 of file CbmCaOutputQa.h.

Referenced by InitQa(), and SetUseTof().

◆ fbUseTrd

bool cbm::ca::OutputQa::fbUseTrd = false
private

is TRD used

Definition at line 248 of file CbmCaOutputQa.h.

Referenced by InitQa(), and SetUseTrd().

◆ fConfigNode

YAML::Node CbmQaIO::fConfigNode {}
protectedinherited

◆ fEvtDisplayMinNofPoints

int cbm::ca::OutputQa::fEvtDisplayMinNofPoints = 2
private

minimum number of MC points in the event display

Definition at line 251 of file CbmCaOutputQa.h.

Referenced by ExecQa(), and SetEventDisplay().

◆ fMCData

tools::MCData cbm::ca::OutputQa::fMCData
private

Input MC data (points and tracks)

Definition at line 266 of file CbmCaOutputQa.h.

Referenced by DrawEvent(), ExecQa(), and InitQa().

◆ fmCheckList

std::map<std::string, CheckFlags> CbmQaTask::fmCheckList
privateinherited

A QA check-list map.

The check list is updated with new entries with the StoreCheckResult(tag, result) function, which is to be called from the Check() function. The result is stored to CheckFlags::fResult field, while the CheckFlags::fStatus stays uninitialized. Than, when the ReadCheckListFromConfig() function is called, the fStatus is updated according to the check list entries in the qa_tasks_config_mcbm.yaml/qa_tasks_config_cbm.yaml. If the fStatus is false (default), the check is ignored in the final verdict making.

Definition at line 251 of file CbmQaTask.h.

Referenced by CbmQaTask::GetCheckList(), CbmQaTask::ReadCheckListFromConfig(), and CbmQaTask::StoreCheckResult().

◆ fMonitor

ca::Monitor<EMonitorKey> cbm::ca::OutputQa::fMonitor {"Output tracking QA"}
private

Definition at line 280 of file CbmCaOutputQa.h.

Referenced by Check(), ExecQa(), and InitQa().

◆ fmSummaryTableEntries

std::set<ETrackType> cbm::ca::OutputQa::fmSummaryTableEntries
private

Which track types should be listed in the summary table.

Definition at line 282 of file CbmCaOutputQa.h.

Referenced by Check(), InitQa(), and SetTrackTypeListForSummary().

◆ fNofEvents

TParameter<int> CbmQaTask::fNofEvents {"nEvents", 0}
privateinherited

Number of processed events.

Definition at line 256 of file CbmQaTask.h.

Referenced by CbmQaTask::Exec(), CbmQaTask::Finish(), CbmQaTask::GetEventNumber(), and CbmQaTask::Init().

◆ fpBenchmarkInput

std::shared_ptr<TFile> CbmQaTask::fpBenchmarkInput = nullptr
privateinherited

A file with default ROOT objects used for the cross-check.

Definition at line 261 of file CbmQaTask.h.

Referenced by CbmQaTask::CompareQaObjects(), and CbmQaTask::SetCheckFile().

◆ fpBenchmarkOutput

std::shared_ptr<TFile> CbmQaTask::fpBenchmarkOutput = nullptr
privateinherited

An output file for histograms cross-check.

Definition at line 262 of file CbmQaTask.h.

Referenced by CbmQaTask::CompareTwoObjects(), and CbmQaTask::SetCompareOutput().

◆ fpBrEvents

TClonesArray* CbmQaTask::fpBrEvents = nullptr
privateinherited

Pointer to CbmEvent branch.

Definition at line 253 of file CbmQaTask.h.

Referenced by CbmQaTask::Exec(), and CbmQaTask::Init().

◆ fpCurrentEvent

CbmEvent* CbmQaTask::fpCurrentEvent = nullptr
privateinherited

Pointer to the current event.

Definition at line 254 of file CbmQaTask.h.

Referenced by CbmQaTask::Exec(), and CbmQaTask::GetCurrentEvent().

◆ fpDataManager

std::shared_ptr<ca::DataManager> cbm::ca::OutputQa::fpDataManager = nullptr
private

Data manager.

Definition at line 259 of file CbmCaOutputQa.h.

Referenced by InitQa().

◆ fpDebugger

std::shared_ptr<tools::Debugger> cbm::ca::OutputQa::fpDebugger = nullptr
private

Debugger.

Definition at line 260 of file CbmCaOutputQa.h.

Referenced by EnableDebugger().

◆ fPerformanceMode

int cbm::ca::OutputQa::fPerformanceMode = 1
private

Performance mode.

Definition at line 252 of file CbmCaOutputQa.h.

Referenced by InitQa(), and SetPerformanceMode().

◆ fpMCModule

std::shared_ptr<MCModule> cbm::ca::OutputQa::fpMCModule = nullptr
private

MC module.

Definition at line 258 of file CbmCaOutputQa.h.

Referenced by Check(), ExecQa(), and InitQa().

◆ fpParameters

std::shared_ptr<ca::Parameters<float> > cbm::ca::OutputQa::fpParameters = nullptr
private

Tracking parameters object.

Definition at line 261 of file CbmCaOutputQa.h.

Referenced by ExecQa(), and InitQa().

◆ fpTSReader

std::unique_ptr<TimeSliceReader> cbm::ca::OutputQa::fpTSReader = nullptr
private

Reader of the time slice.

Definition at line 257 of file CbmCaOutputQa.h.

Referenced by ExecQa(), InitQa(), and OutputQa().

◆ fpvObjList

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

◆ fRecoMode

ECbmRecoMode CbmQaTask::fRecoMode = ECbmRecoMode::Timeslice
privateinherited

Reconstruction mode.

Definition at line 242 of file CbmQaTask.h.

Referenced by CbmQaTask::Init(), and CbmQaTask::SetRecoMode().

◆ 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().

◆ fsDefaultTag

TString CbmQaTask::fsDefaultTag = ""
privateinherited

Default tag (git SHA etc.)

Definition at line 259 of file CbmQaTask.h.

Referenced by CbmQaTask::CompareTwoObjects(), CbmQaTask::GetDefaultTag(), and CbmQaTask::SetDefaultTag().

◆ fsParametersFilename

std::string cbm::ca::OutputQa::fsParametersFilename = ""
private

Definition at line 256 of file CbmCaOutputQa.h.

Referenced by InitQa(), and ReadParameters().

◆ fsPrefix

TString CbmQaIO::fsPrefix = ""
protectedinherited

◆ fsRootFolderName

TString CbmQaIO::fsRootFolderName = ""
protectedinherited

◆ fsSetupName

std::string CbmQaTask::fsSetupName = ""
privateinherited

Name of the setup (to draw on the canvases)

Definition at line 255 of file CbmQaTask.h.

Referenced by CbmQaTask::GetSetupName(), CbmQaTask::PutSetupNameOnPad(), and CbmQaTask::SetSetupName().

◆ fStoringMode

◆ fsVersionTag

TString CbmQaTask::fsVersionTag = ""
privateinherited

Version tag (git SHA etc.)

Definition at line 258 of file CbmQaTask.h.

Referenced by CbmQaTask::CompareTwoObjects(), CbmQaTask::GetVersionTag(), and CbmQaTask::SetVersionTag().

◆ fTrackingMode

ECbmCaTrackingMode cbm::ca::OutputQa::fTrackingMode = ECbmCaTrackingMode::kSTS
private

Tracking mode.

Definition at line 254 of file CbmCaOutputQa.h.

Referenced by InitQa(), SetMcbmTrackingMode(), and SetStsTrackingMode().

◆ fvbTrackTypeOn

TTypeArr_t<bool> cbm::ca::OutputQa::fvbTrackTypeOn = {0}
private

Usage flag for different track types.

Definition at line 290 of file CbmCaOutputQa.h.

Referenced by AddTrackType(), Check(), CreateSummary(), DrawSetOf(), FillRecoTrack(), and InitQa().

◆ fvHitIds

ca::Vector<CbmL1HitId> cbm::ca::OutputQa::fvHitIds {"CbmCaOutputQa::fvHitIds"}
private

Definition at line 263 of file CbmCaOutputQa.h.

Referenced by InitQa().

◆ fvHits

ca::Vector<CbmL1HitDebugInfo> cbm::ca::OutputQa::fvHits {"CbmCaOutputQa::fvHits"}
private

Definition at line 264 of file CbmCaOutputQa.h.

Referenced by DrawEvent(), ExecQa(), and InitQa().

◆ fvpTrackHistograms

TTypeArr_t<std::unique_ptr<TrackTypeQa> > cbm::ca::OutputQa::fvpTrackHistograms
private

Histogrammers for different track types.

Definition at line 289 of file CbmCaOutputQa.h.

Referenced by Check(), CreateSummary(), DrawSetOf(), FillRecoTrack(), and InitQa().

◆ fvRecoTracks

ca::Vector<CbmL1Track> cbm::ca::OutputQa::fvRecoTracks {"CbmCaOutputQa::fvRecoTracks"}
private

Definition at line 265 of file CbmCaOutputQa.h.

Referenced by DrawEvent(), ExecQa(), and InitQa().

◆ fvsTrackTypeName

TTypeArr_t<std::string> cbm::ca::OutputQa::fvsTrackTypeName
private

Array of track type unique names.

Definition at line 288 of file CbmCaOutputQa.h.

Referenced by InitQa().

◆ fvTrackDrawAtts

TTypeArr_t<DrawAtt> cbm::ca::OutputQa::fvTrackDrawAtts
private

Drawing attributes for track types.

Definition at line 291 of file CbmCaOutputQa.h.

Referenced by InitDrawingAttributes(), and InitQa().

◆ kCXSIZEPX

int cbm::ca::OutputQa::kCXSIZEPX = 600
staticconstexprprivate

Canvas size along x-axis [px].

Definition at line 297 of file CbmCaOutputQa.h.

Referenced by CreateSummary().

◆ kCYSIZEPX

int cbm::ca::OutputQa::kCYSIZEPX = 600
staticconstexprprivate

Canvas size along y-axis [px].

Definition at line 298 of file CbmCaOutputQa.h.

Referenced by CreateSummary().

◆ kEXPTRACKFILL

bool cbm::ca::OutputQa::kEXPTRACKFILL = false
staticconstexprprivate

Definition at line 103 of file CbmCaOutputQa.h.


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