23 constexpr
float undefinedValue{-9999.};
24 constexpr
float smallestAllowableSin(1
e-8);
25 constexpr
float smallestAllowableTan(1
e-8);
26 constexpr
float smallestAllowableQoverPt(1
e-8);
30 m_resolutionMethod(
IDPVM::ResolutionHelper::iterRMS_convergence),
58 m_reswidth_vs_lowpt{},
65 m_pullwidth_vs_lowpt{},
66 m_pullmean_vs_lowpt{},
72 m_resHelperlowpt_pos{},
73 m_resHelperlowpt_neg{},
75 m_reswidth_vs_eta_pos{},
76 m_resmean_vs_eta_pos{},
77 m_reswidth_vs_pt_pos{},
78 m_resmean_vs_pt_pos{},
79 m_reswidth_vs_lowpt_pos{},
80 m_resmean_vs_lowpt_pos{},
82 m_reswidth_vs_eta_neg{},
83 m_resmean_vs_eta_neg{},
84 m_reswidth_vs_pt_neg{},
85 m_resmean_vs_pt_neg{},
86 m_reswidth_vs_lowpt_neg{},
87 m_resmean_vs_lowpt_neg{},
89 m_pullProjections_vs_pt{},
90 m_pullProjections_vs_lowpt{},
91 m_pullProjections_vs_eta{},
92 m_resProjections_vs_pt{},
93 m_resProjections_vs_lowpt{},
94 m_resProjections_vs_eta{},
101 TString tsDir = (TString)
sDir;
103 if (tsDir.Contains(
"Primary")) {
105 }
else if (tsDir.Contains(
"Secondary")) {
114 for (
int ipt = 0; ipt <= m_nPtBins; ipt++) {
115 m_PtBins[ipt] = (
float) ptBins[ipt];
119 for (
int ipt = 0; ipt <= m_nLowPtBins; ipt++) {
120 m_LowPtBins[ipt] = (
float) lowPtBins[ipt];
130 for (
unsigned int iparam = 0; iparam <
NPARAMS; iparam++) {
135 if(iparam ==
PT)
continue;
234 std::string tmpName, tmpTitle;
240 std::shared_ptr<TH1D> refHistEta {
m_pullHelpereta[iparam]->ProjectionY(
"refEta")};
241 std::shared_ptr<TH1D> refHistPt {
m_pullHelperpt[iparam]->ProjectionY(
"refPt")};
242 std::shared_ptr<TH1D> refHistLowPt {
m_pullHelperlowpt[iparam]->ProjectionY(
"refLowPt")};
246 for (
int ibins = 0; ibins < nPtBins; ibins++) {
258 for (
int ibins = 0; ibins < nLowPtBins; ibins++) {
270 for (
int ibins = 0; ibins <
nEtaBins; ibins++) {
304 if (!isPrimTrk && !isSecdTrk) {
326 const bool tanThetaIsSane = std::abs(tanHalfTheta) > smallestAllowableTan;
327 float eta = undefinedValue;
329 for (
unsigned int iparam = 0; iparam <
NPARAMS; iparam++) {
330 if(iparam ==
PT)
continue;
363 for (
unsigned int iparam = 0; iparam <
NPARAMS; iparam++) {
370 if (not saneQoverPt){
375 bool saneQoverPtrec = std::abs(
m_trkP[
QOVERPT]) > smallestAllowableQoverPt;
376 if (not saneQoverPtrec){
391 const bool saneSineValue = (std::abs(sinTheta) > smallestAllowableSin);
392 const float inverseSinTheta = saneSineValue ? 1./sinTheta : undefinedValue;
416 throw std::runtime_error(
417 "TrackParticle without covariance matrix for defining parameters or the covariance matrix is wrong dimensionality.");
419 if (std::abs(trkprt.
qOverP()) < 0) {
421 throw std::runtime_error(
"q/p is zero");
423 double pt = trkprt.
pt();
424 double diff_qp = -
pt / std::abs(trkprt.
qOverP());
427 double pt_err2 = diff_qp * (diff_qp *
cov[14] + diff_theta *
cov[13]) + diff_theta * diff_theta *
cov[9];
438 for (
int iParams = 0; iParams <
NPARAMS; iParams++) {
441 if (
acc.isAvailable(truthprt)) {
451 const float qOverP = qOverPAcc.
isAvailable(truthprt) ? qOverPAcc(truthprt) : undefinedValue;
454 if (std::abs(sinTheta) > smallestAllowableSin){
475 for (
unsigned int iparam = 0; iparam <
NPARAMS; iparam++) {
476 if(iparam ==
PT)
continue;