CbmRoot
Loading...
Searching...
No Matches
cbm::algo::ca::Qa Class Reference

#include <CaQa.h>

Inheritance diagram for cbm::algo::ca::Qa:
[legend]
Collaboration diagram for cbm::algo::ca::Qa:
[legend]

Public Member Functions

 Qa (const std::unique_ptr< qa::Manager > &pManager, std::string_view name)
 Constructor.
 
 Qa ()=default
 Constructor from the configuration object.
 
 Qa (const Qa &)=delete
 Copy constructor.
 
 Qa (Qa &&)=delete
 Move constructor.
 
 ~Qa ()=default
 Destructor.
 
Qaoperator= (const Qa &)=delete
 Copy assignment operator.
 
Qaoperator= (Qa &&)=delete
 Move assignment operator.
 
void Exec ()
 QA execution function.
 
void Init ()
 Initializes the QA.
 
bool CheckInit () const
 Check initialization.
 
void RegisterInputData (const InputData *pInputData)
 Registers tracking input data object.
 
void RegisterTracks (const Vector< Track > *pvTracks)
 Registers track vector.
 
void RegisterRecoHitIndices (const Vector< HitIndex_t > *pvRecoHits)
 Registers reco hits indices vector.
 
void RegisterParameters (const Parameters< fvec > *pParameters)
 Registers tracking parameters object.
 
bool IsActive () const
 Checks, if the task is active.
 
const std::string & GetTaskName ()
 Gets name of the task.
 

Protected Member Functions

void AddCanvasConfig (const CanvasConfig &canvas)
 Adds a canvas configuration.
 
template<class Obj, typename... Args>
Obj * MakeObj (Args... args)
 Creates a QA-object and returns the pointer to it.
 

Private Types

enum class  EHitSet { Input , Used , END }
 Hit set entries. More...
 
template<typename T>
using HitSetArray_t = EnumArray<EHitSet, T>
 Definition of enum array over EHitSet entries.
 
using OccupHistContainer_t = std::vector<HitSetArray_t<qa::H2D*>>
 

Private Member Functions

void FillHitDistributionsForHitSet (EHitSet hitSet, const ca::Hit &hit)
 Fills hit distributions.
 

Private Attributes

double fMinHitTime = std::numeric_limits<double>::max()
 
double fMaxHitTime = std::numeric_limits<double>::lowest()
 
const Parameters< fvec > * fpParameters = nullptr
 Pointer to tracking parameters.
 
const InputDatafpInputData = nullptr
 Pointer to input data.
 
const Vector< Track > * fpvTracks = nullptr
 Pointer to tracks vector.
 
const Vector< HitIndex_t > * fpvRecoHits = nullptr
 Pointer to reco hit indices.
 
OccupHistContainer_t fvphHitOccupXY
 hist: Hit occupancy in different stations in XY plane
 
OccupHistContainer_t fvphHitOccupZX
 hist: Hit occupancy in different stations in ZX plane
 
OccupHistContainer_t fvphHitOccupZY
 hist: Hit occupancy in different stations in ZY plane
 
std::vector< qa::Prof2D * > fvphHitUsageXY
 prof: Hit usage in different stations in XY plane
 
HitSetArray_t< qa::H1D * > fvphHitFrontKeyIndex = {nullptr, nullptr}
 Indices of front hit keys.
 
HitSetArray_t< qa::H1D * > fvphHitBackKeyIndex = {nullptr, nullptr}
 Indices of back hit keys.
 
std::vector< HitSetArray_t< qa::H1D * > > fvphHitTime
 Time distribution of hits.
 
std::array< qa::H1D *, knTrkParPointsfvphTrkTheta = {{0}}
 hist: theta at first/last hit
 
std::array< qa::H1D *, knTrkParPointsfvphTrkPhi = {{0}}
 hist: phi at first/last hit
 
std::array< qa::H1D *, knTrkParPointsfvphTrkChi2Ndf = {{0}}
 hist: chi2/NDF at first/last hit
 
std::array< qa::H2D *, knTrkParPointsfvphTrkPhiTheta = {{0}}
 hist: theta vs. phi at first/last hit
 
qa::H2DfphTrkOriginXY = nullptr
 hist: origin of tracks in x-y plane [cm]
 
qa::H2DfphTrkFstLstSta = nullptr
 hist: fst vs lst station index
 
qa::H1DfphTrkNofHits = nullptr
 hist: number of hits in track
 
std::string fsName {}
 Name of the task.
 
std::shared_ptr< DatafpData {nullptr}
 An instance of the QA data (shared between different tasks)
 

Static Private Attributes

static constexpr HitSetArray_t< EHitSetkHitSets = {EHitSet::Input, EHitSet::Used}
 Array of EHitSet entries for iteration.
 
static constexpr double kXYZMargin = 0.05
 Margin for occupancy distributions in XY plane.
 
static constexpr int knHitSets = 2
 Number of hit sets: input/used.
 
static constexpr int knTrkParPoints = 2
 Number of track points to build par distributions.
 
static constexpr int knStaMax = 16
 Max number of stations (histogram binning)
 
static constexpr bool kDebug = false
 Additional histograms.
 
static constexpr int kOriginB = 400
 Track X(Y) at origin: n bins.
 
static constexpr double kOriginL = -1.
 Track X(Y) at origin: lower bound [cm].
 
static constexpr double kOriginU = +1.
 Track X(Y) at origin: upper bound [cm].
 

Detailed Description

Definition at line 40 of file CaQa.h.

Member Typedef Documentation

◆ HitSetArray_t

template<typename T>
using cbm::algo::ca::Qa::HitSetArray_t = EnumArray<EHitSet, T>
private

Definition of enum array over EHitSet entries.

Definition at line 51 of file CaQa.h.

◆ OccupHistContainer_t

Definition at line 133 of file CaQa.h.

Member Enumeration Documentation

◆ EHitSet

enum class cbm::algo::ca::Qa::EHitSet
strongprivate

Hit set entries.

Enumerator
Input 

Input hits.

Used 

Hits used in tracks.

END 

Definition at line 42 of file CaQa.h.

Constructor & Destructor Documentation

◆ Qa() [1/4]

cbm::algo::ca::Qa::Qa ( const std::unique_ptr< qa::Manager > & pManager,
std::string_view name )
inline

Constructor.

Parameters
pManagerPointer to the QA manager
nameName of the QA (directory)

Definition at line 60 of file CaQa.h.

References cbm::algo::qa::TaskHeader::TaskHeader().

Referenced by operator=(), operator=(), Qa(), and Qa().

◆ Qa() [2/4]

cbm::algo::ca::Qa::Qa ( )
default

Constructor from the configuration object.

Parameters
configQA configuration object

◆ Qa() [3/4]

cbm::algo::ca::Qa::Qa ( const Qa & )
delete

Copy constructor.

References Qa().

◆ Qa() [4/4]

cbm::algo::ca::Qa::Qa ( Qa && )
delete

Move constructor.

References Qa().

◆ ~Qa()

cbm::algo::ca::Qa::~Qa ( )
default

Destructor.

Member Function Documentation

◆ AddCanvasConfig()

void cbm::algo::qa::TaskHeader::AddCanvasConfig ( const CanvasConfig & canvas)
inlineprotectedinherited

◆ CheckInit()

bool Qa::CheckInit ( ) const

Check initialization.

Returns
true All variables are initialized
false Some of are not initialized

Definition at line 30 of file CaQa.cxx.

References CheckInit(), fpInputData, fpParameters, fpvRecoHits, fpvTracks, and L_.

Referenced by CheckInit(), and Exec().

◆ Exec()

◆ FillHitDistributionsForHitSet()

void Qa::FillHitDistributionsForHitSet ( Qa::EHitSet hitSet,
const ca::Hit & hit )
private

◆ GetTaskName()

const std::string & cbm::algo::qa::TaskHeader::GetTaskName ( )
inlineinherited

◆ Init()

◆ IsActive()

bool cbm::algo::qa::TaskHeader::IsActive ( ) const
inlineinherited

Checks, if the task is active.

The task can be inactive, if a nullptr qa::Manager was passed to the constructor. If it is the case, the fpData instance is not defined, and no actions on the task should be performed

Definition at line 54 of file QaTaskHeader.h.

References fpData.

Referenced by cbm::algo::bmon::HitfindQa::Exec(), cbm::algo::ca::Qa::Exec(), cbm::algo::tof::HitfindQa::Exec(), cbm::algo::bmon::HitfindQa::Init(), cbm::algo::ca::Qa::Init(), and cbm::algo::tof::HitfindQa::Init().

◆ MakeObj()

template<class Obj, typename... Args>
Obj * cbm::algo::qa::TaskHeader::MakeObj ( Args... args)
inlineprotectedinherited

Creates a QA-object and returns the pointer to it.

Template Parameters
ObjA type of the histogram (H1D, H2D, Prof1D, Prof2D)
Args...A signature of the histogram constructor
Parameters
argsParameters, passed to a histogram constructor

Definition at line 69 of file QaTaskHeader.h.

References fpData.

Referenced by cbm::algo::bmon::HitfindQa::Init(), cbm::algo::ca::Qa::Init(), cbm::algo::evbuild::V0TriggerQa::Init(), cbm::algo::kfp::V0FinderQa::Init(), and cbm::algo::tof::HitfindQa::Init().

◆ operator=() [1/2]

Qa & cbm::algo::ca::Qa::operator= ( const Qa & )
delete

Copy assignment operator.

References Qa().

◆ operator=() [2/2]

Qa & cbm::algo::ca::Qa::operator= ( Qa && )
delete

Move assignment operator.

References Qa().

◆ RegisterInputData()

void cbm::algo::ca::Qa::RegisterInputData ( const InputData * pInputData)
inline

Registers tracking input data object.

Note
Call per TS

Definition at line 94 of file CaQa.h.

References fpInputData.

◆ RegisterParameters()

void cbm::algo::ca::Qa::RegisterParameters ( const Parameters< fvec > * pParameters)
inline

Registers tracking parameters object.

Note
Call per run

Definition at line 106 of file CaQa.h.

References fpParameters.

◆ RegisterRecoHitIndices()

void cbm::algo::ca::Qa::RegisterRecoHitIndices ( const Vector< HitIndex_t > * pvRecoHits)
inline

Registers reco hits indices vector.

Note
Call per TS

Definition at line 102 of file CaQa.h.

References fpvRecoHits.

◆ RegisterTracks()

void cbm::algo::ca::Qa::RegisterTracks ( const Vector< Track > * pvTracks)
inline

Registers track vector.

Note
Call per TS

Definition at line 98 of file CaQa.h.

References fpvTracks.

Member Data Documentation

◆ fMaxHitTime

double cbm::algo::ca::Qa::fMaxHitTime = std::numeric_limits<double>::lowest()
private

Definition at line 125 of file CaQa.h.

Referenced by Exec(), and FillHitDistributionsForHitSet().

◆ fMinHitTime

double cbm::algo::ca::Qa::fMinHitTime = std::numeric_limits<double>::max()
private

Definition at line 124 of file CaQa.h.

Referenced by Exec(), and FillHitDistributionsForHitSet().

◆ fpData

std::shared_ptr<Data> cbm::algo::qa::TaskHeader::fpData {nullptr}
privateinherited

An instance of the QA data (shared between different tasks)

Definition at line 76 of file QaTaskHeader.h.

Referenced by AddCanvasConfig(), IsActive(), MakeObj(), and TaskHeader().

◆ fphTrkFstLstSta

qa::H2D* cbm::algo::ca::Qa::fphTrkFstLstSta = nullptr
private

hist: fst vs lst station index

Definition at line 152 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fphTrkNofHits

qa::H1D* cbm::algo::ca::Qa::fphTrkNofHits = nullptr
private

hist: number of hits in track

Definition at line 153 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fphTrkOriginXY

qa::H2D* cbm::algo::ca::Qa::fphTrkOriginXY = nullptr
private

hist: origin of tracks in x-y plane [cm]

Definition at line 151 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fpInputData

const InputData* cbm::algo::ca::Qa::fpInputData = nullptr
private

Pointer to input data.

Definition at line 128 of file CaQa.h.

Referenced by CheckInit(), Exec(), FillHitDistributionsForHitSet(), and RegisterInputData().

◆ fpParameters

const Parameters<fvec>* cbm::algo::ca::Qa::fpParameters = nullptr
private

Pointer to tracking parameters.

Definition at line 127 of file CaQa.h.

Referenced by CheckInit(), FillHitDistributionsForHitSet(), Init(), and RegisterParameters().

◆ fpvRecoHits

const Vector<HitIndex_t>* cbm::algo::ca::Qa::fpvRecoHits = nullptr
private

Pointer to reco hit indices.

Definition at line 130 of file CaQa.h.

Referenced by CheckInit(), Exec(), and RegisterRecoHitIndices().

◆ fpvTracks

const Vector<Track>* cbm::algo::ca::Qa::fpvTracks = nullptr
private

Pointer to tracks vector.

Definition at line 129 of file CaQa.h.

Referenced by CheckInit(), Exec(), and RegisterTracks().

◆ fsName

std::string cbm::algo::qa::TaskHeader::fsName {}
privateinherited

Name of the task.

Definition at line 75 of file QaTaskHeader.h.

Referenced by GetTaskName(), and TaskHeader().

◆ fvphHitBackKeyIndex

HitSetArray_t<qa::H1D*> cbm::algo::ca::Qa::fvphHitBackKeyIndex = {nullptr, nullptr}
private

Indices of back hit keys.

Definition at line 141 of file CaQa.h.

Referenced by FillHitDistributionsForHitSet(), and Init().

◆ fvphHitFrontKeyIndex

HitSetArray_t<qa::H1D*> cbm::algo::ca::Qa::fvphHitFrontKeyIndex = {nullptr, nullptr}
private

Indices of front hit keys.

Definition at line 140 of file CaQa.h.

Referenced by FillHitDistributionsForHitSet(), and Init().

◆ fvphHitOccupXY

OccupHistContainer_t cbm::algo::ca::Qa::fvphHitOccupXY
private

hist: Hit occupancy in different stations in XY plane

Definition at line 134 of file CaQa.h.

Referenced by FillHitDistributionsForHitSet(), and Init().

◆ fvphHitOccupZX

OccupHistContainer_t cbm::algo::ca::Qa::fvphHitOccupZX
private

hist: Hit occupancy in different stations in ZX plane

Definition at line 135 of file CaQa.h.

Referenced by FillHitDistributionsForHitSet(), and Init().

◆ fvphHitOccupZY

OccupHistContainer_t cbm::algo::ca::Qa::fvphHitOccupZY
private

hist: Hit occupancy in different stations in ZY plane

Definition at line 136 of file CaQa.h.

Referenced by FillHitDistributionsForHitSet(), and Init().

◆ fvphHitTime

std::vector<HitSetArray_t<qa::H1D*> > cbm::algo::ca::Qa::fvphHitTime
private

Time distribution of hits.

Definition at line 143 of file CaQa.h.

Referenced by FillHitDistributionsForHitSet(), and Init().

◆ fvphHitUsageXY

std::vector<qa::Prof2D*> cbm::algo::ca::Qa::fvphHitUsageXY
private

prof: Hit usage in different stations in XY plane

Definition at line 138 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fvphTrkChi2Ndf

std::array<qa::H1D*, knTrkParPoints> cbm::algo::ca::Qa::fvphTrkChi2Ndf = {{0}}
private

hist: chi2/NDF at first/last hit

Definition at line 148 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fvphTrkPhi

std::array<qa::H1D*, knTrkParPoints> cbm::algo::ca::Qa::fvphTrkPhi = {{0}}
private

hist: phi at first/last hit

Definition at line 147 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fvphTrkPhiTheta

std::array<qa::H2D*, knTrkParPoints> cbm::algo::ca::Qa::fvphTrkPhiTheta = {{0}}
private

hist: theta vs. phi at first/last hit

Definition at line 149 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fvphTrkTheta

std::array<qa::H1D*, knTrkParPoints> cbm::algo::ca::Qa::fvphTrkTheta = {{0}}
private

hist: theta at first/last hit

Definition at line 146 of file CaQa.h.

Referenced by Exec(), and Init().

◆ kDebug

bool cbm::algo::ca::Qa::kDebug = false
staticconstexprprivate

Additional histograms.

Definition at line 119 of file CaQa.h.

Referenced by Exec(), FillHitDistributionsForHitSet(), and Init().

◆ kHitSets

HitSetArray_t<EHitSet> cbm::algo::ca::Qa::kHitSets = {EHitSet::Input, EHitSet::Used}
staticconstexprprivate

Array of EHitSet entries for iteration.

Definition at line 54 of file CaQa.h.

Referenced by Init().

◆ knHitSets

int cbm::algo::ca::Qa::knHitSets = 2
staticconstexprprivate

Number of hit sets: input/used.

Definition at line 116 of file CaQa.h.

◆ knStaMax

int cbm::algo::ca::Qa::knStaMax = 16
staticconstexprprivate

Max number of stations (histogram binning)

Definition at line 118 of file CaQa.h.

Referenced by Init().

◆ knTrkParPoints

int cbm::algo::ca::Qa::knTrkParPoints = 2
staticconstexprprivate

Number of track points to build par distributions.

Definition at line 117 of file CaQa.h.

Referenced by Exec(), and Init().

◆ kOriginB

int cbm::algo::ca::Qa::kOriginB = 400
staticconstexprprivate

Track X(Y) at origin: n bins.

Definition at line 120 of file CaQa.h.

Referenced by Init().

◆ kOriginL

double cbm::algo::ca::Qa::kOriginL = -1.
staticconstexprprivate

Track X(Y) at origin: lower bound [cm].

Definition at line 121 of file CaQa.h.

Referenced by Init().

◆ kOriginU

double cbm::algo::ca::Qa::kOriginU = +1.
staticconstexprprivate

Track X(Y) at origin: upper bound [cm].

Definition at line 122 of file CaQa.h.

Referenced by Init().

◆ kXYZMargin

double cbm::algo::ca::Qa::kXYZMargin = 0.05
staticconstexprprivate

Margin for occupancy distributions in XY plane.

Definition at line 115 of file CaQa.h.

Referenced by Init().


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