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

#include <CaQa.h>

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

Public Member Functions

 Qa (std::shared_ptr< HistogramSender > pSender)
 Default destructor.
 
 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.
 
bool IsSenderDefined () const
 Checks, if the histogram sender is defined.
 
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.
 

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()
 
qa::Data fQaData
 QA data.
 
std::shared_ptr< HistogramSenderfpSender = nullptr
 Histogram sender.
 
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::H2DfphTrkFstLstSta = nullptr
 hist: fst vs lst station index
 
qa::H1DfphTrkNofHits = nullptr
 hist: number of hits in track
 

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.
 

Detailed Description

Definition at line 39 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 50 of file CaQa.h.

◆ OccupHistContainer_t

Definition at line 135 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 41 of file CaQa.h.

Constructor & Destructor Documentation

◆ Qa() [1/4]

cbm::algo::ca::Qa::Qa ( std::shared_ptr< HistogramSender > pSender)
inline

Default destructor.

Parameters
pSenderPointer to the histogram sender

Definition at line 58 of file CaQa.h.

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

◆ Qa() [4/4]

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

Move constructor.

◆ ~Qa()

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

Destructor.

Member Function Documentation

◆ 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 fpInputData, fpParameters, fpvRecoHits, fpvTracks, and L_.

Referenced by Exec().

◆ Exec()

◆ FillHitDistributionsForHitSet()

◆ Init()

◆ IsSenderDefined()

bool cbm::algo::ca::Qa::IsSenderDefined ( ) const
inline

Checks, if the histogram sender is defined.

Definition at line 91 of file CaQa.h.

References fpSender.

Referenced by cbm::algo::TrackingChain::Init(), and cbm::algo::TrackingChain::PrepareOutput().

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ RegisterInputData()

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

Registers tracking input data object.

Note
Call per TS

Definition at line 95 of file CaQa.h.

References fpInputData.

Referenced by cbm::algo::TrackingChain::PrepareOutput().

◆ RegisterParameters()

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

Registers tracking parameters object.

Note
Call per run

Definition at line 107 of file CaQa.h.

References fpParameters.

Referenced by cbm::algo::TrackingChain::Init().

◆ 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 103 of file CaQa.h.

References fpvRecoHits.

Referenced by cbm::algo::TrackingChain::PrepareOutput().

◆ RegisterTracks()

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

Registers track vector.

Note
Call per TS

Definition at line 99 of file CaQa.h.

References fpvTracks.

Referenced by cbm::algo::TrackingChain::PrepareOutput().

Member Data Documentation

◆ fMaxHitTime

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

Definition at line 123 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 122 of file CaQa.h.

Referenced by Exec(), and FillHitDistributionsForHitSet().

◆ fphTrkFstLstSta

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

hist: fst vs lst station index

Definition at line 153 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 154 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 130 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 129 of file CaQa.h.

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

◆ fpSender

std::shared_ptr<HistogramSender> cbm::algo::ca::Qa::fpSender = nullptr
private

Histogram sender.

Definition at line 128 of file CaQa.h.

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

◆ fpvRecoHits

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

Pointer to reco hit indices.

Definition at line 132 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 131 of file CaQa.h.

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

◆ fQaData

qa::Data cbm::algo::ca::Qa::fQaData
private

QA data.

Definition at line 126 of file CaQa.h.

Referenced by Exec(), and Init().

◆ fvphHitBackKeyIndex

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

Indices of back hit keys.

Definition at line 143 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 142 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 136 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 137 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 138 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 145 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 140 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 150 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 149 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 151 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 148 of file CaQa.h.

Referenced by Exec(), and Init().

◆ kDebug

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

Additional histograms.

Definition at line 120 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 53 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 117 of file CaQa.h.

◆ knStaMax

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

Max number of stations (histogram binning)

Definition at line 119 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 118 of file CaQa.h.

Referenced by Exec(), and Init().

◆ kXYZMargin

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

Margin for occupancy distributions in XY plane.

Definition at line 116 of file CaQa.h.

Referenced by Init().


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