CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
tmtt::KFParamsComb Class Reference

#include <KFParamsComb.h>

Inheritance diagram for tmtt::KFParamsComb:
tmtt::KFbase tmtt::TrackFitGeneric

Public Member Functions

 KFParamsComb (const Settings *settings, const uint nHelixPar, const std::string &fitterName)
 
 ~KFParamsComb () override=default
 
- Public Member Functions inherited from tmtt::KFbase
L1fittedTrack fit (const L1track3D &l1track3D) override
 
 KFbase (const Settings *settings, const uint nHelixPar, const std::string &fitterName="", const uint nMeas=2)
 
 KFbase (const KFbase &kf)=delete
 
 KFbase (KFbase &&kf)=delete
 
KFbaseoperator= (const KFbase &kf)=delete
 
KFbaseoperator= (KFbase &&kf)=delete
 
 ~KFbase () override
 
- Public Member Functions inherited from tmtt::TrackFitGeneric
 TrackFitGeneric (const Settings *settings, const std::string &fitterName="")
 
virtual ~TrackFitGeneric ()=default
 

Protected Member Functions

bool isGoodState (const KalmanState &state) const override
 
TMatrixD matrixF (const Stub *stub, const KalmanState *state) const override
 
TMatrixD matrixH (const Stub *stub) const override
 
TMatrixD matrixV (const Stub *stub, const KalmanState *state) const override
 
TMatrixD seedC (const L1track3D &l1track3D) const override
 
TVectorD seedX (const L1track3D &l1track3D) const override
 
TVectorD trackParams (const KalmanState *state) const override
 
TVectorD trackParams_BeamConstr (const KalmanState *state, double &chi2rphi) const override
 
TVectorD vectorM (const Stub *stub) const override
 
- Protected Member Functions inherited from tmtt::KFbase
virtual void adjustChi2 (const KalmanState *state, const TMatrixD &covRinv, const TVectorD &delta, double &chi2rphi, double &chi2rz) const
 
void adjustState (const TMatrixD &K, const TMatrixD &pxcov, const TVectorD &x, const TMatrixD &h, const TVectorD &delta, TVectorD &new_x, TMatrixD &new_xcov) const
 
float approxB (float z, float r) const
 
const KalmanStatedoKF (const L1track3D &l1track3D, const std::vector< Stub *> &stubs, const TP *tpa)
 
TMatrixD getKalmanGainMatrix (const TMatrixD &h, const TMatrixD &pxcov, const TMatrixD &covRinv) const
 
virtual bool isHLS ()
 
virtual bool kalmanAmbiguousLayer (unsigned int iEtaReg, unsigned int kfLayer)
 
std::set< unsigned > kalmanDeadLayers (bool &remove2PSCut) const
 
virtual unsigned int kalmanLayer (unsigned int iEtaReg, unsigned int layerIDreduced, bool barrel, float r, float z) const
 
virtual const KalmanStatekalmanUpdate (unsigned nSkipped, unsigned layer, Stub *stub, const KalmanState *state, const TP *tp)
 
TMatrixD matrixHCHt (const TMatrixD &h, const TMatrixD &c) const
 
TMatrixD matrixRinv (const TMatrixD &matH, const TMatrixD &matCref, const TMatrixD &matV) const
 
const KalmanStatemkState (const L1track3D &candidate, unsigned nSkipped, unsigned layer, const KalmanState *last_state, const TVectorD &x, const TMatrixD &pxx, const TMatrixD &K, const TMatrixD &dcov, Stub *stub, double chi2rphi, double chi2rz)
 
void printStub (const Stub *stub) const
 
void printStubLayers (const std::vector< Stub *> &stubs, unsigned int iEtaReg) const
 
void printStubs (const std::vector< Stub *> &stubs) const
 
void printTP (const TP *tp) const
 
void resetStates ()
 
virtual TVectorD residual (const Stub *stub, const TVectorD &x, double candQoverPt) const
 
double sectorPhi () const
 

Protected Attributes

std::vector< double > kfLayerVsChiSq4_
 
std::vector< double > kfLayerVsChiSq5_
 
std::vector< double > kfLayerVsD0Cut5_
 
std::vector< double > kfLayerVsPtToler_
 
std::vector< double > kfLayerVsZ0Cut4_
 
std::vector< double > kfLayerVsZ0Cut5_
 
- Protected Attributes inherited from tmtt::KFbase
unsigned int iEtaReg_
 
unsigned int iPhiSec_
 
std::vector< std::unique_ptr< const KalmanState > > listAllStates_
 
unsigned nHelixPar_
 
unsigned nMeas_
 
unsigned numEtaRegions_
 
unsigned int numUpdateCalls_
 
const TPtpa_
 
- Protected Attributes inherited from tmtt::TrackFitGeneric
const std::string fitterName_
 
const Settingssettings_
 

Additional Inherited Members

- Public Types inherited from tmtt::KFbase
enum  MEAS_IDS { PHI, Z }
 
enum  PAR_IDS {
  INV2R, PHI0, T, Z0,
  D0
}
 
enum  PAR_IDS_VAR { QOVERPT }
 
- Static Public Attributes inherited from tmtt::KFbase
static constexpr unsigned int invalidKFlayer_ = nKFlayer_
 
static constexpr std::pair< unsigned, unsigned > layerMap_ [nEta_/2][nGPlayer_+1]
 
static const unsigned int nEta_ = 16
 
static const unsigned int nGPlayer_ = 7
 
static const unsigned int nKFlayer_ = 7
 

Detailed Description

Definition at line 35 of file KFParamsComb.h.

Constructor & Destructor Documentation

◆ KFParamsComb()

tmtt::KFParamsComb::KFParamsComb ( const Settings settings,
const uint  nHelixPar,
const std::string &  fitterName 
)

Definition at line 17 of file KFParamsComb.cc.

18  : KFbase(settings, nHelixPar, fitterName),
19  // Initialize cuts applied to helix states vs KF layer number of last added stub.
20  kfLayerVsPtToler_(settings->kfLayerVsPtToler()),
21  kfLayerVsD0Cut5_(settings->kfLayerVsD0Cut5()),
22  kfLayerVsZ0Cut5_(settings->kfLayerVsZ0Cut5()),
23  kfLayerVsZ0Cut4_(settings->kfLayerVsZ0Cut4()),
24  kfLayerVsChiSq5_(settings->kfLayerVsChiSq5()),
25  kfLayerVsChiSq4_(settings->kfLayerVsChiSq4()) {}
std::vector< double > kfLayerVsZ0Cut5_
Definition: KFParamsComb.h:69
std::vector< double > kfLayerVsChiSq4_
Definition: KFParamsComb.h:72
std::vector< double > kfLayerVsPtToler_
Definition: KFParamsComb.h:67
std::vector< double > kfLayerVsChiSq5_
Definition: KFParamsComb.h:71
std::vector< double > kfLayerVsZ0Cut4_
Definition: KFParamsComb.h:70
KFbase(const Settings *settings, const uint nHelixPar, const std::string &fitterName="", const uint nMeas=2)
std::vector< double > kfLayerVsD0Cut5_
Definition: KFParamsComb.h:68

◆ ~KFParamsComb()

tmtt::KFParamsComb::~KFParamsComb ( )
overridedefault

Member Function Documentation

◆ isGoodState()

bool tmtt::KFParamsComb::isGoodState ( const KalmanState state) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 227 of file KFParamsComb.cc.

References funct::abs(), tmtt::KFbase::D0, d0, alignBH_cfg::fixed, tmtt::Settings::hybrid(), tmtt::Settings::kalmanDebugLevel(), kfLayerVsChiSq4_, kfLayerVsChiSq5_, kfLayerVsD0Cut5_, kfLayerVsPtToler_, kfLayerVsZ0Cut4_, kfLayerVsZ0Cut5_, tmtt::KFbase::nHelixPar_, tmtt::KFbase::PHI0, DiDispStaMuonMonitor_cfi::pt, tmtt::TP::pt(), tmtt::KFbase::QOVERPT, tmtt::TrackFitGeneric::settings_, tmtt::KFbase::T, submitPVValidationJobs::text, tmtt::KFbase::tpa_, trackParams(), and tmtt::KFbase::Z0.

227  {
228  // Set cut values that are different for 4 & 5 param helix fits.
229  vector<double> kfLayerVsZ0Cut = (nHelixPar_ == 5) ? kfLayerVsZ0Cut5_ : kfLayerVsZ0Cut4_;
230  vector<double> kfLayerVsChiSqCut = (nHelixPar_ == 5) ? kfLayerVsChiSq5_ : kfLayerVsChiSq4_;
231 
232  unsigned nStubLayers = state.nStubLayers();
233  bool goodState(true);
234 
235  TVectorD vecY = trackParams(&state);
236  double qOverPt = vecY[QOVERPT];
237  double pt = std::abs(1 / qOverPt);
238  double z0 = std::abs(vecY[Z0]);
239 
240  // state parameter selections
241 
242  if (z0 > kfLayerVsZ0Cut[nStubLayers])
243  goodState = false;
244  if (pt < settings_->houghMinPt() - kfLayerVsPtToler_[nStubLayers])
245  goodState = false;
246  if (nHelixPar_ == 5) { // fit without d0 constraint
247  double d0 = std::abs(state.vectorX()[D0]);
248  if (d0 > kfLayerVsD0Cut5_[nStubLayers])
249  goodState = false;
250  }
251 
252  // chi2 selection
253 
254  double chi2scaled = state.chi2scaled(); // chi2(r-phi) scaled down to improve electron performance.
255 
256  if (chi2scaled > kfLayerVsChiSqCut[nStubLayers])
257  goodState = false; // No separate pT selection needed
258 
259  const bool countUpdateCalls = false; // Print statement to count calls to Updator.
260 
261  if (countUpdateCalls || (settings_->kalmanDebugLevel() >= 2 && tpa_ != nullptr) ||
262  (settings_->kalmanDebugLevel() >= 2 && settings_->hybrid())) {
263  std::stringstream text;
264  text << std::fixed << std::setprecision(4);
265  if (not goodState)
266  text << "State veto:";
267  if (goodState)
268  text << "State kept:";
269  text << " nlay=" << nStubLayers << " nskip=" << state.nSkippedLayers() << " chi2_scaled=" << chi2scaled;
270  if (tpa_ != nullptr)
271  text << " pt(mc)=" << tpa_->pt();
272  text << " pt=" << pt << " q/pt=" << qOverPt << " tanL=" << vecY[T] << " z0=" << vecY[Z0]
273  << " phi0=" << vecY[PHI0];
274  if (nHelixPar_ == 5) // fit without d0 constraint
275  text << " d0=" << vecY[D0];
276  text << " fake" << (tpa_ == nullptr);
277  if (tpa_ != nullptr)
278  text << " pt(mc)=" << tpa_->pt();
279  PrintL1trk() << text.str();
280  }
281 
282  return goodState;
283  }
TVectorD trackParams(const KalmanState *state) const override
std::vector< double > kfLayerVsZ0Cut5_
Definition: KFParamsComb.h:69
std::vector< double > kfLayerVsChiSq4_
Definition: KFParamsComb.h:72
unsigned kalmanDebugLevel() const
Definition: Settings.h:297
std::vector< double > kfLayerVsPtToler_
Definition: KFParamsComb.h:67
std::vector< double > kfLayerVsChiSq5_
Definition: KFParamsComb.h:71
const TP * tpa_
Definition: KFbase.h:186
std::vector< double > kfLayerVsZ0Cut4_
Definition: KFParamsComb.h:70
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const Settings * settings_
static constexpr float d0
float pt() const
Definition: TP.h:48
unsigned nHelixPar_
Definition: KFbase.h:174
bool hybrid() const
Definition: Settings.h:409
std::vector< double > kfLayerVsD0Cut5_
Definition: KFParamsComb.h:68

◆ matrixF()

TMatrixD tmtt::KFParamsComb::matrixF ( const Stub stub,
const KalmanState state 
) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 180 of file KFParamsComb.cc.

References tmtt::KFbase::nHelixPar_.

180  {
181  const TMatrixD unitMatrix(TMatrixD::kUnit, TMatrixD(nHelixPar_, nHelixPar_));
182  return unitMatrix;
183  }
unsigned nHelixPar_
Definition: KFbase.h:174

◆ matrixH()

TMatrixD tmtt::KFParamsComb::matrixH ( const Stub stub) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 165 of file KFParamsComb.cc.

References tmtt::KFbase::D0, tmtt::KFbase::INV2R, tmtt::KFbase::nHelixPar_, tmtt::KFbase::PHI, tmtt::KFbase::PHI0, tmtt::Stub::r(), tmtt::KFbase::Z, and tmtt::KFbase::Z0.

165  {
166  TMatrixD matH(2, nHelixPar_);
167  double r = stub->r();
168  matH(PHI, INV2R) = -r;
169  matH(PHI, PHI0) = 1;
170  if (nHelixPar_ == 5) { // fit without d0 constraint
171  matH(PHI, D0) = -1. / r;
172  }
173  matH(Z, Z0) = 1;
174  matH(Z, T) = r;
175  return matH;
176  }
unsigned nHelixPar_
Definition: KFbase.h:174
long double T

◆ matrixV()

TMatrixD tmtt::KFParamsComb::matrixV ( const Stub stub,
const KalmanState state 
) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 80 of file KFParamsComb.cc.

References a, tmtt::Stub::alpha(), tmtt::KFbase::approxB(), b, tmtt::Stub::barrel(), HLT_2023v12_cff::beta, funct::cos(), tmtt::Settings::invPtToInvR(), tmtt::Settings::kalmanHOalpha(), tmtt::Settings::kalmanHOfw(), tmtt::Settings::kalmanHOprojZcorr(), tmtt::Settings::kalmanHOtilted(), tmtt::Settings::kalmanMultiScattTerm(), tmtt::KFbase::PHI, tmtt::Stub::psModule(), tmtt::Stub::r(), diffTwoXMLs::r2, tmtt::TrackFitGeneric::settings_, tmtt::Stub::sigmaPar(), tmtt::Stub::sigmaPerp(), funct::sin(), tmtt::KFbase::T, tmtt::Stub::tiltAngle(), tmtt::Stub::tiltedBarrel(), tmtt::Settings::useApproxB(), tmtt::KFbase::Z, and tmtt::Stub::z().

80  {
81  // Take Pt from input track candidate as more stable.
82  double inv2R = (settings_->invPtToInvR()) * 0.5 * state->candidate().qOverPt();
83  double inv2R2 = inv2R * inv2R;
84 
85  double tanl = state->vectorX()(T); // factor of 0.9 improves rejection
86  double tanl2 = tanl * tanl;
87 
88  double vphi(0);
89  double vz(0);
90  double vcorr(0);
91 
92  double a = stub->sigmaPerp() * stub->sigmaPerp();
93  double b = stub->sigmaPar() * stub->sigmaPar();
94  double r2 = stub->r() * stub->r();
95  double invr2 = 1. / r2;
96 
97  // Scattering term scaling as 1/Pt.
98  double sigmaScat = settings_->kalmanMultiScattTerm() / (state->candidate().pt());
99  double sigmaScat2 = sigmaScat * sigmaScat;
100 
101  if (stub->barrel()) {
102  vphi = (a * invr2) + sigmaScat2;
103 
104  if (stub->tiltedBarrel()) {
105  // Convert uncertainty in (r,phi) to (z,phi).
106  float scaleTilted = 1.;
107  if (settings_->kalmanHOtilted()) {
108  if (settings_->useApproxB()) { // Simple firmware approximation
109  scaleTilted = approxB(stub->z(), stub->r());
110  } else { // Exact C++ implementation.
111  float tilt = stub->tiltAngle();
112  scaleTilted = sin(tilt) + cos(tilt) * tanl;
113  }
114  }
115  float scaleTilted2 = scaleTilted * scaleTilted;
116  // This neglects the non-radial strip effect, assumed negligeable for PS.
117  vz = b * scaleTilted2;
118  } else {
119  vz = b;
120  }
121 
122  if (settings_->kalmanHOfw()) {
123  // Use approximation corresponding to current firmware.
124  vz = b;
125  }
126 
127  } else {
128  vphi = a * invr2 + sigmaScat2;
129  vz = (b * tanl2);
130 
131  if (not stub->psModule()) { // Neglect these terms in PS
132  double beta = 0.;
133  // Add correlation term related to conversion of stub residuals from (r,phi) to (z,phi).
134  if (settings_->kalmanHOprojZcorr() == 2)
135  beta += -inv2R;
136  // Add alpha correction for non-radial 2S endcap strips..
137  if (settings_->kalmanHOalpha() == 2)
138  beta += -stub->alpha(); // alpha is 0 except in endcap 2S disks
139 
140  double beta2 = beta * beta;
141  vphi += b * beta2;
142  vcorr = b * (beta * tanl);
143 
144  if (settings_->kalmanHOfw()) {
145  // Use approximation corresponding to current firmware.
146  vphi = (a * invr2) + (b * inv2R2) + sigmaScat2;
147  vcorr = 0.;
148  vz = (b * tanl2);
149  }
150  }
151  }
152 
153  TMatrixD matV(2, 2);
154  matV(PHI, PHI) = vphi;
155  matV(Z, Z) = vz;
156  matV(PHI, Z) = vcorr;
157  matV(Z, PHI) = vcorr;
158 
159  return matV;
160  }
unsigned int kalmanHOalpha() const
Definition: Settings.h:333
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
bool kalmanHOtilted() const
Definition: Settings.h:329
float approxB(float z, float r) const
Definition: KFbase.cc:832
bool useApproxB() const
Definition: Settings.h:103
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double kalmanMultiScattTerm() const
Definition: Settings.h:324
const Settings * settings_
bool kalmanHOfw() const
Definition: Settings.h:337
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
unsigned int kalmanHOprojZcorr() const
Definition: Settings.h:335
double invPtToInvR() const
Definition: Settings.h:395

◆ seedC()

TMatrixD tmtt::KFParamsComb::seedC ( const L1track3D l1track3D) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 44 of file KFParamsComb.cc.

References tmtt::KFbase::D0, tmtt::KFbase::INV2R, tmtt::Settings::invPtToInvR(), tmtt::KFbase::nHelixPar_, tmtt::KFbase::PHI0, conifer::pow(), tmtt::TrackFitGeneric::settings_, tmtt::KFbase::T, and tmtt::KFbase::Z0.

44  {
45  TMatrixD matC(nHelixPar_, nHelixPar_);
46 
47  double invPtToInv2R = settings_->invPtToInvR() / 2;
48 
49  // Assumed track seed (from HT) uncertainty in transverse impact parameter.
50 
51  // Constants optimised by hand for TMTT algo.
52  const float inv2Rsigma = 0.0314 * invPtToInv2R;
53  constexpr float phi0sigma = 0.0102;
54  constexpr float z0sigma = 5.0;
55  constexpr float tanLsigma = 0.5;
56  constexpr float d0Sigma = 1.0;
57  // (z0, tanL, d0) uncertainties could be smaller for Hybrid, if seeded in PS? -- To check!
58  // if (L1track3D.seedPS() > 0) z0sigma /= 4; ???
59  matC[INV2R][INV2R] = pow(inv2Rsigma, 2);
60  matC[PHI0][PHI0] = pow(phi0sigma, 2);
61  matC[Z0][Z0] = pow(z0sigma, 2);
62  matC[T][T] = pow(tanLsigma, 2);
63  if (nHelixPar_ == 5) { // fit without d0 constraint
64  matC[D0][D0] = pow(d0Sigma, 2);
65  }
66  return matC;
67  }
constexpr int pow(int x)
Definition: conifer.h:24
const Settings * settings_
unsigned nHelixPar_
Definition: KFbase.h:174
double invPtToInvR() const
Definition: Settings.h:395

◆ seedX()

TVectorD tmtt::KFParamsComb::seedX ( const L1track3D l1track3D) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 29 of file KFParamsComb.cc.

References tmtt::KFbase::D0, tmtt::L1track3D::d0(), reco::deltaPhi(), tmtt::KFbase::INV2R, tmtt::Settings::invPtToInvR(), tmtt::KFbase::nHelixPar_, tmtt::KFbase::PHI0, tmtt::L1track3D::phi0(), tmtt::L1track3D::qOverPt(), tmtt::KFbase::sectorPhi(), tmtt::TrackFitGeneric::settings_, tmtt::KFbase::T, tmtt::L1track3D::tanLambda(), tmtt::KFbase::Z0, and tmtt::L1track3D::z0().

29  {
30  TVectorD vecX(nHelixPar_);
31  vecX[INV2R] = settings_->invPtToInvR() * l1track3D.qOverPt() / 2;
32  vecX[PHI0] = reco::deltaPhi(l1track3D.phi0() - sectorPhi(), 0.);
33  vecX[Z0] = l1track3D.z0();
34  vecX[T] = l1track3D.tanLambda();
35  if (nHelixPar_ == 5) { // fit without d0 constraint
36  vecX[D0] = l1track3D.d0();
37  }
38 
39  return vecX;
40  }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
const Settings * settings_
double sectorPhi() const
Definition: KFbase.h:145
unsigned nHelixPar_
Definition: KFbase.h:174
double invPtToInvR() const
Definition: Settings.h:395

◆ trackParams()

TVectorD tmtt::KFParamsComb::trackParams ( const KalmanState state) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 187 of file KFParamsComb.cc.

References tmtt::KFbase::D0, reco::deltaPhi(), tmtt::KFbase::INV2R, tmtt::Settings::invPtToInvR(), tmtt::KFbase::nHelixPar_, tmtt::KFbase::PHI0, tmtt::KFbase::QOVERPT, tmtt::KFbase::sectorPhi(), tmtt::TrackFitGeneric::settings_, tmtt::KFbase::T, and tmtt::KFbase::Z0.

Referenced by isGoodState(), and trackParams_BeamConstr().

187  {
188  TVectorD vecX = state->vectorX();
189  TVectorD vecY(nHelixPar_);
190  vecY[QOVERPT] = 2. * vecX[INV2R] / settings_->invPtToInvR();
191  vecY[PHI0] = reco::deltaPhi(vecX[PHI0] + sectorPhi(), 0.);
192  vecY[Z0] = vecX[Z0];
193  vecY[T] = vecX[T];
194  if (nHelixPar_ == 5) { // fit without d0 constraint
195  vecY[D0] = vecX[D0];
196  }
197  return vecY;
198  }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
const Settings * settings_
double sectorPhi() const
Definition: KFbase.h:145
unsigned nHelixPar_
Definition: KFbase.h:174
double invPtToInvR() const
Definition: Settings.h:395

◆ trackParams_BeamConstr()

TVectorD tmtt::KFParamsComb::trackParams_BeamConstr ( const KalmanState state,
double &  chi2rphi 
) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 203 of file KFParamsComb.cc.

References tmtt::KFbase::D0, reco::deltaPhi(), tmtt::KFbase::INV2R, tmtt::Settings::invPtToInvR(), tmtt::KFbase::nHelixPar_, tmtt::KFbase::PHI0, tmtt::KFbase::QOVERPT, tmtt::KFbase::sectorPhi(), tmtt::TrackFitGeneric::settings_, tmtt::KFbase::T, trackParams(), and tmtt::KFbase::Z0.

203  {
204  if (nHelixPar_ == 5) { // fit without d0 constraint
205  TVectorD vecX = state->vectorX();
206  TMatrixD matC = state->matrixC();
207  TVectorD vecY(nHelixPar_);
208  double delChi2rphi = (vecX[D0] * vecX[D0]) / matC[D0][D0];
209  chi2rphi = state->chi2rphi() + delChi2rphi;
210  // Apply beam-spot constraint to helix params in transverse plane only, as most sensitive to it.
211  vecX[INV2R] -= vecX[D0] * (matC[INV2R][D0] / matC[D0][D0]);
212  vecX[PHI0] -= vecX[D0] * (matC[PHI0][D0] / matC[D0][D0]);
213  vecX[D0] = 0.0;
214  vecY[QOVERPT] = 2. * vecX[INV2R] / settings_->invPtToInvR();
215  vecY[PHI0] = reco::deltaPhi(vecX[PHI0] + sectorPhi(), 0.);
216  vecY[Z0] = vecX[Z0];
217  vecY[T] = vecX[T];
218  vecY[D0] = vecX[D0];
219  return vecY;
220  } else {
221  return (this->trackParams(state));
222  }
223  }
TVectorD trackParams(const KalmanState *state) const override
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
const Settings * settings_
double sectorPhi() const
Definition: KFbase.h:145
unsigned nHelixPar_
Definition: KFbase.h:174
double invPtToInvR() const
Definition: Settings.h:395

◆ vectorM()

TVectorD tmtt::KFParamsComb::vectorM ( const Stub stub) const
overrideprotectedvirtual

Implements tmtt::KFbase.

Definition at line 71 of file KFParamsComb.cc.

References reco::deltaPhi(), tmtt::KFbase::PHI, tmtt::Stub::phi(), tmtt::KFbase::sectorPhi(), tmtt::KFbase::Z, and tmtt::Stub::z().

71  {
72  TVectorD meas(2);
73  meas[PHI] = reco::deltaPhi(stub->phi(), sectorPhi());
74  meas[Z] = stub->z();
75  return meas;
76  }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
double sectorPhi() const
Definition: KFbase.h:145

Member Data Documentation

◆ kfLayerVsChiSq4_

std::vector<double> tmtt::KFParamsComb::kfLayerVsChiSq4_
protected

Definition at line 72 of file KFParamsComb.h.

Referenced by isGoodState().

◆ kfLayerVsChiSq5_

std::vector<double> tmtt::KFParamsComb::kfLayerVsChiSq5_
protected

Definition at line 71 of file KFParamsComb.h.

Referenced by isGoodState().

◆ kfLayerVsD0Cut5_

std::vector<double> tmtt::KFParamsComb::kfLayerVsD0Cut5_
protected

Definition at line 68 of file KFParamsComb.h.

Referenced by isGoodState().

◆ kfLayerVsPtToler_

std::vector<double> tmtt::KFParamsComb::kfLayerVsPtToler_
protected

Definition at line 67 of file KFParamsComb.h.

Referenced by isGoodState().

◆ kfLayerVsZ0Cut4_

std::vector<double> tmtt::KFParamsComb::kfLayerVsZ0Cut4_
protected

Definition at line 70 of file KFParamsComb.h.

Referenced by isGoodState().

◆ kfLayerVsZ0Cut5_

std::vector<double> tmtt::KFParamsComb::kfLayerVsZ0Cut5_
protected

Definition at line 69 of file KFParamsComb.h.

Referenced by isGoodState().