|
CbmRoot
|
Set of histograms to monitor track parameters. More...
#include <CbmCaTrackFitQa.h>
Public Types | |
| enum class | EStoringMode { kSAMEDIR , kSUBDIR } |
| using | ObjList_t = std::vector<std::pair<TObject*, TString>> |
Public Member Functions | |
| TrackFitQa (const char *pointTag, const char *prefix, std::shared_ptr< ObjList_t > pObjList) | |
| Constructor. | |
| TrackFitQa (const TrackFitQa &)=delete | |
| Copy constructor. | |
| TrackFitQa (TrackFitQa &&)=delete | |
| Move constructor. | |
| ~TrackFitQa ()=default | |
| Destructor. | |
| TrackFitQa & | operator= (const TrackFitQa &)=delete |
| Copy assignment operator. | |
| TrackFitQa & | operator= (TrackFitQa &&)=delete |
| Move assignment operator. | |
| const char * | GetTitle () const |
| Gets title of fit parameters. | |
| void | Init () |
| Initializes histograms. | |
| void | Fill (const cbm::algo::kf::TrackParamD &trPar, const McPoint &mcPoint, bool bTimeMeasured, double weight=1) |
| Fills pull and residual histograms. | |
| void | SetParticleMass (double mass) |
| Sets particle mass, used for fitting a track. | |
| void | SetTitle (const char *title) |
| Sets title, which is to be reflected on legends and titles. | |
| void | FitHistograms () |
| Fit histograms. | |
| CbmQaCanvas * | CreateResidualPlot () |
| Creates residuals plot. | |
| CbmQaCanvas * | CreatePullPlot () |
| Creates pulls plot. | |
| CbmQaCanvas * | CreateResolutionPlot () |
| Creates resolutionis plot. | |
| void | SetResidualHistoProperties (ETrackParType type, int nBins, double lo, double up) |
| Sets properties for a residual histogram. | |
| void | SetPullHistoProperties (ETrackParType type, int nBins, double lo, double up) |
| Sets properties for a pull histogram. | |
| void | SetDefaultProperties () |
| Sets default histogram and track parameter properties. | |
| 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 | |
| TH1F * | fph_res_x = nullptr |
| Residual of x-coordinate [cm]. | |
| TH1F * | fph_res_y = nullptr |
| Residual of y-coordinate [cm]. | |
| TH1F * | fph_res_tx = nullptr |
| Residual of slope along x-axis. | |
| TH1F * | fph_res_ty = nullptr |
| Residual of slope along y-axis. | |
| TH1F * | fph_res_qp = nullptr |
| Residual of q/p [ec/GeV]. | |
| TH1F * | fph_res_t = nullptr |
| Residual of time [ns]. | |
| TH1F * | fph_res_vi = nullptr |
| Residual of inverse speed [1/c]. | |
| TH1F * | fph_pull_x = nullptr |
| Pull of x-coordinate. | |
| TH1F * | fph_pull_y = nullptr |
| Pull of y-coordinate. | |
| TH1F * | fph_pull_tx = nullptr |
| Pull of slope along x-axis. | |
| TH1F * | fph_pull_ty = nullptr |
| Pull of slope along y-axis. | |
| TH1F * | fph_pull_qp = nullptr |
| Pull of q/p. | |
| TH1F * | fph_pull_t = nullptr |
| Pull of time. | |
| TH1F * | fph_pull_vi = nullptr |
| Pull of inverse speed. | |
| TH1F * | fph_chiSqNdf = nullptr |
| Chi^2/ndf of the track fit. | |
| TH1F * | fph_prob = nullptr |
| prob() of the track fit | |
| TProfile * | fph_res_p_pMC = nullptr |
| Resolution of momentum [GeV/c]. | |
| TProfile * | fph_res_phi_phiMC = nullptr |
| Resolution of azimuthal angle [rad]. | |
| TProfile * | fph_res_theta_thetaMC = nullptr |
| Resolution of polar angle [rad]. | |
Static Public Attributes | |
| static constexpr int | kCXSIZEPX = 600 |
| Canvas size along x-axis [px]. | |
| static constexpr int | kCYSIZEPX = 600 |
| Canvas size along y-axis [px]. | |
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_t > | fpvObjList = nullptr |
| List of registered ROOT objects. | |
| YAML::Node | fConfigNode {} |
| Configuration node. | |
Private Types | |
| using | FnVal_t = std::function<double()> |
Private Member Functions | |
| void | FillResAndPull (ETrackParType type, double recoVal, double recoErr, double trueVal) |
| Fills residual and pull for a given track parameter. | |
| ClassDefNV (TrackFitQa, 0) | |
| Mass of particle. | |
| template<typename T, typename... Args> | |
| T * | ConstructAndRegisterQaObject (TString name, Args... args) |
| Creates and registers a ROOT object. | |
Private Attributes | |
| TrackParArray_t< TH1F * > | fvphResiduals = {{0}} |
| Residuals for different track parameters. | |
| TrackParArray_t< TH1F * > | fvphPulls = {{0}} |
| Pulls for different track parameters. | |
| TrackParArray_t< bool > | fvbParIgnored = {{0}} |
| Flag: true - parameter is ignored. | |
| TrackParArray_t< int > | fvRBins = {{0}} |
| Number of bins, residuals. | |
| TrackParArray_t< double > | fvRLo = {{0}} |
| Lower boundary, residuals. | |
| TrackParArray_t< double > | fvRUp = {{0}} |
| Upper boundary, residuals. | |
| TrackParArray_t< int > | fvPBins = {{0}} |
| Number of bins, pulls. | |
| TrackParArray_t< double > | fvPLo = {{0}} |
| Lower boundary, pulls. | |
| TrackParArray_t< double > | fvPUp = {{0}} |
| Upper boundary, pulls. | |
| TString | fsTitle = "" |
| Title of the point. | |
| double | fMass = constants::phys::MuonMass |
Set of histograms to monitor track parameters.
Class provides histograms to monitor track fit parameters at a selected z-coordinate. The parameters include x, y, tx, ty, time, q/p, vi (inverse speed).
Definition at line 72 of file CbmCaTrackFitQa.h.
|
private |
Definition at line 184 of file CbmCaTrackFitQa.h.
|
inherited |
|
stronginherited |
| TrackFitQa::TrackFitQa | ( | const char * | pointTag, |
| const char * | prefix, | ||
| std::shared_ptr< ObjList_t > | pObjList ) |
Constructor.
| pointTag | Tag for point, in which the parameters are analyzed |
| prefix | Name of unique prefix |
| pObjList | List of registered ROOT objects |
Definition at line 37 of file CbmCaTrackFitQa.cxx.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
default |
Destructor.
|
protectedinherited |
Function to check, if a property is defined.
Definition at line 177 of file CbmQaIO.h.
Referenced by MakeQaObject().
|
private |
Mass of particle.
|
privateinherited |
Creates and registers a ROOT object.
| name | A name of the ROOT object, which can contain a sub-directory |
| args | Other arguments, passed to the ROOT object constructor |
Definition at line 197 of file CbmQaIO.h.
References fpvObjList, fsRootFolderName, fStoringMode, kSUBDIR, SetCanvasProperties(), SetTH1Properties(), SetTH2Properties(), and SetTProfile2DProperties().
Referenced by MakeQaObject().
| CbmQaCanvas * TrackFitQa::CreatePullPlot | ( | ) |
Creates pulls plot.
Definition at line 66 of file CbmCaTrackFitQa.cxx.
| CbmQaCanvas * TrackFitQa::CreateResidualPlot | ( | ) |
Creates residuals plot.
Definition at line 46 of file CbmCaTrackFitQa.cxx.
|
inline |
Creates resolutionis plot.
Definition at line 125 of file CbmCaTrackFitQa.h.
| void TrackFitQa::Fill | ( | const cbm::algo::kf::TrackParamD & | trPar, |
| const McPoint & | mcPoint, | ||
| bool | bTimeMeasured, | ||
| double | weight = 1 ) |
Fills pull and residual histograms.
| iTrkReco | Index of reconstructed track |
| weight | Weight |
Definition at line 155 of file CbmCaTrackFitQa.cxx.
|
private |
Fills residual and pull for a given track parameter.
| type | Type of the track parameter |
| recoVal | Reconstructed error of quantity |
| recoErr | Error of quantity |
| trueVal | True value of quantity |
Definition at line 88 of file CbmCaTrackFitQa.cxx.
|
inline |
Fit histograms.
Definition at line 116 of file CbmCaTrackFitQa.h.
|
inlineinherited |
|
inline |
Gets title of fit parameters.
Definition at line 96 of file CbmCaTrackFitQa.h.
| void TrackFitQa::Init | ( | ) |
Initializes histograms.
Definition at line 104 of file CbmCaTrackFitQa.cxx.
|
inherited |
Definition at line 132 of file CbmQaIO.cxx.
References fsRootFolderName.
Referenced by cbm::ca::InputQaSetup::InitQa(), and CbmCaInputQaBase< DetID >::InitQa().
|
inherited |
Definition at line 260 of file CbmQaIO.h.
References CheckProperty(), ConstructAndRegisterQaObject(), and fConfigNode.
Referenced by cbm::mvd::CbmMvdMcQaTask::BookHists_(), cbm::ca::OutputQa::Check(), CbmRichRingRecoQa::Check(), cbm::ca::TrackFitQa::CreatePullPlot(), cbm::ca::TrackFitQa::CreateResidualPlot(), cbm::ca::InputQaSetup::CreateSummary(), cbm::ca::OutputQa::CreateSummary(), CbmCaInputQaBase< DetID >::CreateSummary(), cbm::ca::OutputQa::DrawEvent(), cbm::ca::TrackFitQa::Init(), cbm::ca::TrackTypeQa::Init(), cbm::kfp::V0FinderQa::InitHistograms(), CbmRichRingRecoQa::InitHistograms(), cbm::ca::InputQaSetup::InitQa(), and CbmCaInputQaBase< DetID >::InitQa().
|
delete |
Copy assignment operator.
|
delete |
Move assignment operator.
|
inlineprotectedinherited |
Reads the specific configuration structure from the YAML node.
| Config | Type of the configuration class |
The function is to be called in the user-defined class method InitDataBranches
Definition at line 126 of file CbmQaIO.h.
References fConfigNode, and cbm::util::yaml::Read().
Referenced by CbmCaInputQaBase< DetID >::InitQa().
|
protectedvirtualinherited |
Applies properties on the canvas created with the MakeQaObject funciton.
| pCanv | Pointer to the canvas |
Definition at line 84 of file CbmQaIO.cxx.
Referenced by ConstructAndRegisterQaObject().
|
inherited |
Creates a ROOT object.
Sets config name
| name | A path to the config |
Definition at line 95 of file CbmQaIO.cxx.
References fsConfigName.
| void TrackFitQa::SetDefaultProperties | ( | ) |
Sets default histogram and track parameter properties.
< Number of bins, residual of x
< Lower boundary, residual of x [cm]
< Upper boundary, residual of x [cm]
< Number of bins, residual of y
< Lower boundary, residual of y [cm]
< Upper boundary, residual of y [cm]
< Number of bins, residual of slope along x-axis
< Lower boundary, residual of slope along x-axis
< Upper boundary, residual of slope along x-axis
< Number of bins, residual of slope along y-axis
< Lower boundary, residual of slope along y-axis
< Upper boundary, residual of slope along y-axis
< Number of bins, residual of q/p
< Lower boundary, residual of q/p [ec/GeV]
< Upper boundary, residual of q/p [ec/GeV]
< Number of bins, residual of time
< Lower boundary, residual of time [ns]
< Upper boundary, residual of time [ns]
< Number of bins, residual of inverse speed
< Lower boundary, residual of inverse speed [1/c]
< Upper boundary, residual of inverse speed [1/c]
< Number of bins, pull of x
< Lower boundary, pull of x [cm]
< Upper boundary, pull of x [cm]
< Number of bins, pull of y
< Lower boundary, pull of y [cm]
< Upper boundary, pull of y [cm]
< Number of bins, pull of slope along x-axis
< Lower boundary, pull of slope along x-axis
< Upper boundary, pull of slope along x-axis
< Number of bins, pull of slope along y-axis
< Lower boundary, pull of slope along y-axis
< Upper boundary, pull of slope along y-axis
< Number of bins, pull of q/p
< Lower boundary, pull of q/p [ec/GeV]
< Upper boundary, pull of q/p [ec/GeV]
< Number of bins, pull of time
< Lower boundary, pull of time [ns]
< Upper boundary, pull of time [ns]
< Number of bins, pull of inverse speed
< Lower boundary, pull of inverse speed [1/c]
< Upper boundary, pull of inverse speed [1/c]
Definition at line 205 of file CbmCaTrackFitQa.cxx.
|
inline |
Sets particle mass, used for fitting a track.
| mass | Particle mass [GeV/c2] |
Definition at line 109 of file CbmCaTrackFitQa.h.
| void TrackFitQa::SetPullHistoProperties | ( | ETrackParType | type, |
| int | nBins, | ||
| double | lo, | ||
| double | up ) |
Sets properties for a pull histogram.
| type | Type of track parameter |
| nBins | Number of bins |
| lo | Lower boundary |
| up | Upper boundary |
Definition at line 265 of file CbmCaTrackFitQa.cxx.
| void TrackFitQa::SetResidualHistoProperties | ( | ETrackParType | type, |
| int | nBins, | ||
| double | lo, | ||
| double | up ) |
Sets properties for a residual histogram.
| type | Type of track parameter |
| nBins | Number of bins |
| lo | Lower boundary |
| up | Upper boundary |
Definition at line 256 of file CbmCaTrackFitQa.cxx.
|
inlineinherited |
Sets a common root path to the objects in the output file.
| path | A path to the object |
Definition at line 108 of file CbmQaIO.h.
References fsRootFolderName.
Referenced by CbmQaTask::CbmQaTask().
|
inlineinherited |
Set storing mode.
Definition at line 111 of file CbmQaIO.h.
References fStoringMode.
Referenced by CbmCaInputQaBase< DetID >::CbmCaInputQaBase().
|
protectedvirtualinherited |
Applies properties on the histogram created with the MakeQaObject function.
| pHist | Pointer to the histogram |
Reimplemented in cbm::ca::TrackTypeQa, and TrackTypeQa.
Definition at line 36 of file CbmQaIO.cxx.
References cbm::qa::util::GetHistStats().
Referenced by ConstructAndRegisterQaObject().
|
protectedvirtualinherited |
Applies properties on the histogram created with the MakeQaObject function.
| pHist | Pointer to the histogram |
Definition at line 50 of file CbmQaIO.cxx.
Referenced by ConstructAndRegisterQaObject().
|
inline |
Sets title, which is to be reflected on legends and titles.
| title | Title of fit distributions |
Definition at line 113 of file CbmCaTrackFitQa.h.
|
protectedvirtualinherited |
Applies properties on the profile 2D created with the MakeQaObject function.
| pHist | Pointer to the profile |
Definition at line 67 of file CbmQaIO.cxx.
Referenced by ConstructAndRegisterQaObject().
|
protectedinherited |
Writes objects into file.
| pOutFile | Pointer to output ROOT file |
Definition at line 116 of file CbmQaIO.cxx.
References fpvObjList.
Referenced by CbmQaTask::Finish().
|
protectedinherited |
Configuration node.
Definition at line 163 of file CbmQaIO.h.
Referenced by CbmQaTask::CompareQaObjects(), MakeQaObject(), CbmQaTask::ReadCheckListFromConfig(), and ReadSpecificConfig().
|
private |
Definition at line 208 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_chiSqNdf = nullptr |
Chi^2/ndf of the track fit.
Definition at line 167 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_prob = nullptr |
prob() of the track fit
Definition at line 168 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_pull_qp = nullptr |
Pull of q/p.
Definition at line 162 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_pull_t = nullptr |
Pull of time.
Definition at line 163 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_pull_tx = nullptr |
Pull of slope along x-axis.
Definition at line 160 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_pull_ty = nullptr |
Pull of slope along y-axis.
Definition at line 161 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_pull_vi = nullptr |
Pull of inverse speed.
Definition at line 164 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_pull_x = nullptr |
Pull of x-coordinate.
Definition at line 158 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_pull_y = nullptr |
Pull of y-coordinate.
Definition at line 159 of file CbmCaTrackFitQa.h.
| TProfile* cbm::ca::TrackFitQa::fph_res_p_pMC = nullptr |
Resolution of momentum [GeV/c].
Definition at line 171 of file CbmCaTrackFitQa.h.
| TProfile* cbm::ca::TrackFitQa::fph_res_phi_phiMC = nullptr |
Resolution of azimuthal angle [rad].
Definition at line 172 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_res_qp = nullptr |
Residual of q/p [ec/GeV].
Definition at line 153 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_res_t = nullptr |
Residual of time [ns].
Definition at line 154 of file CbmCaTrackFitQa.h.
| TProfile* cbm::ca::TrackFitQa::fph_res_theta_thetaMC = nullptr |
Resolution of polar angle [rad].
Definition at line 173 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_res_tx = nullptr |
Residual of slope along x-axis.
Definition at line 151 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_res_ty = nullptr |
Residual of slope along y-axis.
Definition at line 152 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_res_vi = nullptr |
Residual of inverse speed [1/c].
Definition at line 155 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_res_x = nullptr |
Residual of x-coordinate [cm].
Definition at line 149 of file CbmCaTrackFitQa.h.
| TH1F* cbm::ca::TrackFitQa::fph_res_y = nullptr |
Residual of y-coordinate [cm].
Definition at line 150 of file CbmCaTrackFitQa.h.
|
protectedinherited |
List of registered ROOT objects.
Definition at line 161 of file CbmQaIO.h.
Referenced by CbmQaIO(), ConstructAndRegisterQaObject(), cbm::ca::TrackTypeQa::Init(), cbm::ca::OutputQa::InitQa(), and WriteToFile().
|
protectedinherited |
Name of configuration file.
Definition at line 157 of file CbmQaIO.h.
Referenced by GetConfigName(), and SetConfigName().
|
protectedinherited |
Unique prefix for all writeable root.
Definition at line 158 of file CbmQaIO.h.
Referenced by CbmQaIO(), cbm::ca::TrackFitQa::CreatePullPlot(), cbm::ca::TrackTypeQa::Init(), and cbm::ca::OutputQa::InitQa().
|
protectedinherited |
Name of root folder.
Definition at line 156 of file CbmQaIO.h.
Referenced by ConstructAndRegisterQaObject(), cbm::ca::TrackTypeQa::Init(), cbm::ca::OutputQa::InitQa(), MakeQaDirectory(), and SetRootFolderName().
|
private |
Title of the point.
Definition at line 206 of file CbmCaTrackFitQa.h.
|
protectedinherited |
Objects storing mode.
Definition at line 160 of file CbmQaIO.h.
Referenced by CbmQaTask::CbmQaTask(), ConstructAndRegisterQaObject(), SetStoringMode(), cbm::ca::TrackFitQa::TrackFitQa(), and cbm::ca::TrackTypeQa::TrackTypeQa().
|
private |
Flag: true - parameter is ignored.
Definition at line 195 of file CbmCaTrackFitQa.h.
|
private |
Number of bins, pulls.
Definition at line 202 of file CbmCaTrackFitQa.h.
|
private |
Pulls for different track parameters.
Definition at line 193 of file CbmCaTrackFitQa.h.
|
private |
Residuals for different track parameters.
Definition at line 192 of file CbmCaTrackFitQa.h.
|
private |
Lower boundary, pulls.
Definition at line 203 of file CbmCaTrackFitQa.h.
|
private |
Upper boundary, pulls.
Definition at line 204 of file CbmCaTrackFitQa.h.
|
private |
Number of bins, residuals.
Definition at line 198 of file CbmCaTrackFitQa.h.
|
private |
Lower boundary, residuals.
Definition at line 199 of file CbmCaTrackFitQa.h.
|
private |
Upper boundary, residuals.
Definition at line 200 of file CbmCaTrackFitQa.h.
|
staticconstexpr |
Canvas size along x-axis [px].
Definition at line 180 of file CbmCaTrackFitQa.h.
|
staticconstexpr |
Canvas size along y-axis [px].
Definition at line 181 of file CbmCaTrackFitQa.h.