42 :
CbmQaIO(Form(
"%s_%s", prefix, pointTag), pObjList)
79 auto fit = TF1(
"fitpull",
"[0] * TMath::Exp(TMath::ASinH(-0.5*[3]*((x-[1])/[2])**2)/[3])", -10., 10.);
80 fit.SetParameters(100, 0., 1., .3);
81 fit.SetParLimits(3, 0., 2.);
96 double res = recoVal - trueVal;
97 double pull = res / recoErr;
99 res = (recoVal / trueVal - 1.);
114 auto CreateResidualHisto = [&](
ETrackParType t,
const char* name,
const char* title) {
118 TString sPrefix = (
fsTitle.Length() > 0) ?
fsTitle +
" point residual for " :
"residual for ";
122 auto CreatePullHisto = [&](
ETrackParType t,
const char* name,
const char* title) {
126 TString sPrefix = (
fsTitle.Length() > 0) ?
fsTitle +
" point pull for " :
"pull for ";
130 CreateResidualHisto(
ETrackParType::kX,
"res_x",
"x-coordinate;x^{reco} - x^{MC} [cm]");
131 CreateResidualHisto(
ETrackParType::kY,
"res_y",
"y-coordinate;y^{reco} - y^{MC} [cm]");
132 CreateResidualHisto(
ETrackParType::kTX,
"res_tx",
"slope along x-axis;T_{x}^{reco} - T_{x}^{MC}");
133 CreateResidualHisto(
ETrackParType::kTY,
"res_ty",
"slope along y-axis;T_{y}^{reco} - T_{y}^{MC}");
134 CreateResidualHisto(
ETrackParType::kQP,
"res_P",
"momentum; (p^{reco} - p^{MC})/p^{MC} []");
136 CreateResidualHisto(
ETrackParType::kVI,
"res_vi",
"inverse speed;v^{-1}_{reco} - v^{-1}_{MC} [c^{-1}]");
138 CreatePullHisto(
ETrackParType::kX,
"pull_x",
"x-coordinate;(x^{reco} - x^{MC})/#sigma_{x}");
139 CreatePullHisto(
ETrackParType::kY,
"pull_y",
"y-coordinate;(y^{reco} - y^{MC})/#sigma_{y}");
140 CreatePullHisto(
ETrackParType::kTX,
"pull_tx",
"slope along x-axis;(T_{x}^{reco} - T_{x}^{MC})/#sigma_{T_{x}}");
141 CreatePullHisto(
ETrackParType::kTY,
"pull_ty",
"slope along y-axis;(T_{y}^{reco} - T_{y}^{MC})/#sigma_{T_{y}}");
142 CreatePullHisto(
ETrackParType::kQP,
"pull_qp",
"charge over mom.;((q/p)^{reco} - (q/p)^{MC})/#sigma_{q/p}");
144 CreatePullHisto(
ETrackParType::kVI,
"pull_vi",
"inverse speed;(v^{-1}_{reco} - v^{-1}_{MC})/#sigma_{v^{-1}}");
152 TString sPrefix = (
fsTitle.Length() > 0) ?
fsTitle +
" point " :
"";
153 fph_res_p_pMC->SetTitle(sPrefix +
" resolution of momentum;p^{MC} [GeV/c];#delta p [GeV/c]");
154 fph_res_phi_phiMC->SetTitle(sPrefix +
" resolution of polar angle;#phi^{MC} [rad];#delta#phi [rad]");
155 fph_res_theta_thetaMC->SetTitle(sPrefix +
" resolution of polar angle;#theta^{MC} [rad];#delta#theta [rad]");
182 double recoP = std::fabs(mcPoint.
GetCharge() / trParExtr.
GetQp()[0]);
183 double resP = recoP - mcPoint.
GetP();
186 double mcPhi = mcPoint.
GetPhi();
187 double recoTx = trParExtr.
Tx()[0];
188 double recoTy = trParExtr.
Ty()[0];
189 double resPhi = atan2(recoTx *
cos(mcPhi) + recoTy *
sin(mcPhi), -recoTx *
cos(mcPhi) + recoTy *
sin(mcPhi));
194 resPhi = std::atan2(std::sin(resPhi), std::cos(resPhi));
QA submodule for track fit results (residuals and puls) at selected z-coordinate (header)
Definition of the CbmQaCanvas class.
Useful utilities for CBM QA tasks.
Magnetic flux density interpolation along the track vs. z-coordinate (header)
friend fvec cos(const fvec &a)
friend fvec sin(const fvec &a)
Track fit utilities for the CA tracking based on the Kalman filter.
ROOT object IO interface for QA.
T * MakeQaObject(TString sName, TString sTitle, Args... args)
TString fsPrefix
Unique prefix for all writeable root.
@ kSAMEDIR
Objects of different type will be stored to root directory.
EStoringMode fStoringMode
Objects storing mode.
Magnetic field region, corresponding to a hit triplet.
static EFieldType fgOriginalFieldType
Global field type.
static FieldFn_t fgOriginalField
Global variable to store the fielf funciton (x,y,z)->(Bx,By,Bz)
void Extrapolate(DataT z, const kf::FieldRegion< DataT > &F)
void SetMask(const DataTmask &m)
kf::TrackParam< DataT > & Tr()
void SetParticleMass(DataT mass)
set particle mass for the fit
void SetTrack(const kf::TrackParam< T > &t)
void SetDoFitVelocity(bool v)
T GetTxError() const
Gets error of slope along x-axis.
T GetVi() const
Gets inverse velocity [ns/cm] in downstream direction.
T GetXError() const
Gets x position error [cm].
T GetYError() const
Gets y position error [cm].
T GetTy() const
Gets slope along y-axis.
T GetTimeError() const
Gets time error [ns].
T Tx() const
Gets slope along x-axis.
T GetTime() const
Gets time [ns].
T GetTyError() const
Gets error of slope along y-axis.
T GetTheta() const
Gets polar angle [rad].
T GetTx() const
Gets slope along x-axis.
T GetViError() const
Gets inverse velocity error [ns/cm].
T GetQp() const
Gets charge over momentum [ec/GeV].
T GetQpError() const
Gets error of charge over momentum [ec/GeV].
T GetY() const
Gets y position [cm].
T Ty() const
Gets slope along y-axis.
T GetX() const
Gets x position [cm].
Set of histograms to monitor track parameters.
static constexpr int kCXSIZEPX
Canvas size along x-axis [px].
TrackParArray_t< double > fvRUp
Upper boundary, residuals.
TrackParArray_t< TH1F * > fvphResiduals
Residuals for different track parameters.
TrackParArray_t< double > fvRLo
Lower boundary, residuals.
TrackFitQa(const char *pointTag, const char *prefix, std::shared_ptr< ObjList_t > pObjList)
Constructor.
TrackParArray_t< int > fvPBins
Number of bins, pulls.
TProfile * fph_res_theta_thetaMC
Resolution of polar angle [rad].
TrackParArray_t< TH1F * > fvphPulls
Pulls for different track parameters.
TString fsTitle
Title of the point.
void Init()
Initializes histograms.
static constexpr int kCYSIZEPX
Canvas size along y-axis [px].
void SetDefaultProperties()
Sets default histogram and track parameter properties.
TProfile * fph_res_phi_phiMC
Resolution of azimuthal angle [rad].
TrackParArray_t< bool > fvbParIgnored
Flag: true - parameter is ignored.
TrackParArray_t< int > fvRBins
Number of bins, residuals.
void FillResAndPull(ETrackParType type, double recoVal, double recoErr, double trueVal)
Fills residual and pull for a given track parameter.
CbmQaCanvas * CreatePullPlot()
Creates pulls plot.
void SetPullHistoProperties(ETrackParType type, int nBins, double lo, double up)
Sets properties for a pull histogram.
TrackParArray_t< double > fvPUp
Upper boundary, pulls.
TrackParArray_t< double > fvPLo
Lower boundary, pulls.
void Fill(const cbm::algo::kf::TrackParamV &trPar, const tools::MCPoint &mcPoint, bool bTimeMeasured, double weight=1)
Fills pull and residual histograms.
void SetResidualHistoProperties(ETrackParType type, int nBins, double lo, double up)
Sets properties for a residual histogram.
TProfile * fph_res_p_pMC
Resolution of momentum [GeV/c].
CbmQaCanvas * CreateResidualPlot()
Creates residuals plot.
TODO: SZh 8.11.2022: add selection of parameterisation.
ETrackParType
Enumeration for track parameter type.
@ BEGIN
begin of enumeration
@ kQP
charge over total momentum
std::tuple< double, double > FitKaniadakisGaussian(TH1 *pHist)
Fit a histogram with Kaniadakis Gaussian Distribution.