CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions | Private Attributes
tauImpactParameter::TrackHelixVertexFitter Class Referenceabstract

#include <TrackHelixVertexFitter.h>

Inheritance diagram for tauImpactParameter::TrackHelixVertexFitter:
tauImpactParameter::Chi2VertexFitter

Public Types

enum  ExtraPar { BField0 = 0, MassOffSet = 1, NExtraPar = 1 }
 
enum  FreeTrackPar { kappa0 = 3, lambda0, phi0, NFreeTrackPar }
 
enum  FreeVertexPar { x0 = 0, y0, z0, NFreeVertexPar }
 

Public Member Functions

virtual double chiSquare ()
 
virtual bool fit ()=0
 
LorentzVectorParticle getMother (int pdgid)
 
std::vector< LorentzVectorParticlegetRefitLorentzVectorParticles ()
 
virtual std::vector< TrackParticlegetRefitTracks ()
 
virtual TVector3 getVertex ()
 
virtual TMatrixTSym< double > getVertexError ()
 
virtual double ndf ()
 
 TrackHelixVertexFitter (const std::vector< TrackParticle > &particles, const TVector3 &vguess)
 
virtual double updateChisquare (const TVectorT< double > &inpar)
 
virtual ~TrackHelixVertexFitter ()
 

Static Public Member Functions

static void computedxydz (const TVectorT< double > &inpar, int particle, double &kappa, double &lam, double &phi, double &x, double &y, double &z, double &s, double &dxy, double &dz)
 
static TVectorT< double > computeLorentzVectorPar (const TVectorT< double > &inpar)
 

Protected Member Functions

virtual TString freeParName (int Par)
 

Protected Attributes

double chi2_
 
bool isConfigured_
 
bool isFit_
 
double ndf_
 
TVectorT< double > par_
 
TMatrixTSym< double > parcov_
 

Static Private Member Functions

static TVectorT< double > computeMotherLorentzVectorPar (const TVectorT< double > &inpar)
 
static TVectorT< double > computePar (const TVectorT< double > &inpar)
 
static TVectorT< double > computeTrackPar (const TVectorT< double > &inpar, int p=0)
 
static int freeParIndex (int Par, int Particle)
 
static int measuredValueIndex (int TrackPar, int Particle)
 
static void parSizeInfo (const TVectorT< double > &inpar, int &np, int &parsize, bool hasextras=false)
 

Private Attributes

TMatrixTSym< double > cov_
 
TMatrixTSym< double > cov_inv_
 
int nPar_
 
int nParticles_
 
int nVal_
 
std::vector< TrackParticleparticles_
 
TVectorT< double > val_
 

Detailed Description

Definition at line 24 of file TrackHelixVertexFitter.h.

Member Enumeration Documentation

◆ ExtraPar

◆ FreeTrackPar

◆ FreeVertexPar

Constructor & Destructor Documentation

◆ TrackHelixVertexFitter()

TrackHelixVertexFitter::TrackHelixVertexFitter ( const std::vector< TrackParticle > &  particles,
const TVector3 &  vguess 
)

Definition at line 13 of file TrackHelixVertexFitter.cc.

References cov_, cov_inv_, freeParIndex(), isConfigured_, dqmiolumiharvest::j, dqmdumpme::k, tauImpactParameter::TrackParticle::kappa, kappa0, tauImpactParameter::TrackParticle::lambda, lambda0, measuredValueIndex(), ndf_, tauImpactParameter::TrackParticle::NHelixPar, nPar_, nVal_, AlCaHLTBitMon_ParallelJobs::p, par_, parcov_, ecalTrigSettings_cff::particles, particles_, tauImpactParameter::TrackParticle::phi, phi0, val_, x0, y0, and z0.

14  : isFit_(false),
15  isConfigured_(false),
16  nParticles_(particles.size()),
20  par_.ResizeTo(nPar_);
21  parcov_.ResizeTo(nPar_, nPar_);
22  val_.ResizeTo(nVal_);
23  cov_.ResizeTo(nVal_, nVal_);
24  for (unsigned int p = 0; p < particles.size(); p++) {
25  for (unsigned int j = 0; j < TrackParticle::NHelixPar; j++) {
26  val_(measuredValueIndex(j, p)) = particles[p].parameter(j);
27  for (unsigned int k = 0; k < TrackParticle::NHelixPar; k++) {
28  cov_(measuredValueIndex(j, p), measuredValueIndex(k, p)) = particles[p].covariance(j, k);
29  }
30  }
31  }
32  TDecompBK Inverter(cov_);
33  double det = cov_.Determinant();
34  if (!Inverter.Decompose()) {
35  edm::LogWarning("TrackHelixVertexFitter::TrackHelixVertexFitter")
36  << "Fit failed: unable to invert SYM gain matrix " << det << " \n"
37  << std::endl;
38  return;
39  }
40 
41  cov_inv_.ResizeTo(nVal_, nVal_);
42  cov_inv_ = Inverter.Invert();
43  ndf_ = nVal_ - nPar_;
44  // Set Initial conditions within reason
45  par_(x0) = vguess.X();
46  parcov_(x0, x0) = 1.0;
47  par_(y0) = vguess.Y();
48  parcov_(y0, y0) = 1.0;
49  par_(z0) = vguess.Z();
50  parcov_(z0, z0) = 1.0;
51  for (unsigned int p = 0; p < particles_.size(); p++) {
55 
62  }
63  isConfigured_ = true;
64 }
static int measuredValueIndex(int TrackPar, int Particle)
static int freeParIndex(int Par, int Particle)
Log< level::Warning, false > LogWarning

◆ ~TrackHelixVertexFitter()

TrackHelixVertexFitter::~TrackHelixVertexFitter ( )
virtual

Definition at line 66 of file TrackHelixVertexFitter.cc.

66 {}

Member Function Documentation

◆ chiSquare()

virtual double tauImpactParameter::TrackHelixVertexFitter::chiSquare ( )
inlinevirtual

Definition at line 35 of file TrackHelixVertexFitter.h.

References chi2_.

◆ computedxydz()

void TrackHelixVertexFitter::computedxydz ( const TVectorT< double > &  inpar,
int  particle,
double &  kappa,
double &  lam,
double &  phi,
double &  x,
double &  y,
double &  z,
double &  s,
double &  dxy,
double &  dz 
)
static

Definition at line 157 of file TrackHelixVertexFitter.cc.

References funct::cos(), PVValHelper::dxy, PVValHelper::dz, freeParIndex(), hgcalLayerClusters_cfi::kappa, kappa0, lambda0, AlCaHLTBitMon_ParallelJobs::p, phi0, Pi, alignCSCRings::s, funct::sin(), funct::tan(), findQualityFiles::v, x, x0, y0, and z0.

Referenced by computeLorentzVectorPar(), computeTrackPar(), and tauImpactParameter::ParticleBuilder::createTrackParticle().

167  {
168  kappa = inpar(freeParIndex(kappa0, p));
169  lam = inpar(freeParIndex(lambda0, p));
170  phi = inpar(freeParIndex(phi0, p));
171  x = inpar(freeParIndex(x0, p));
172  y = inpar(freeParIndex(y0, p));
173  z = inpar(freeParIndex(z0, p));
174  double v = (2.0 * kappa * (x * cos(phi) + y * sin(phi)));
175  double arcsinv = 0;
176  if (v >= 1.0) {
177  arcsinv = TMath::Pi() / 2;
178  } else if (v <= -1.0) {
179  arcsinv = -TMath::Pi() / 2;
180  } else {
181  arcsinv = asin(v);
182  }
183  s = 1.0 / (2.0 * kappa) * arcsinv;
184  dxy = y * cos(phi) - x * sin(phi) - (1 / kappa) * sin(kappa * s) * sin(kappa * s);
185  dz = z - s * tan(lam);
186 }
const double Pi
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static int freeParIndex(int Par, int Particle)

◆ computeLorentzVectorPar()

TVectorT< double > TrackHelixVertexFitter::computeLorentzVectorPar ( const TVectorT< double > &  inpar)
static

Definition at line 213 of file TrackHelixVertexFitter.cc.

References B, BField0, computedxydz(), funct::cos(), PVValHelper::dxy, PVValHelper::dz, hgcalLayerClusters_cfi::kappa, tauImpactParameter::LorentzVectorParticle::m, HLT_2022v12_cff::massHypothesis, MassOffSet, tauImpactParameter::LorentzVectorParticle::NLorentzandVertexPar, np, AlCaHLTBitMon_ParallelJobs::p, parSizeInfo(), tauImpactParameter::LorentzVectorParticle::px, tauImpactParameter::LorentzVectorParticle::py, tauImpactParameter::LorentzVectorParticle::pz, alignCSCRings::s, funct::sin(), funct::tan(), tauImpactParameter::LorentzVectorParticle::vx, tauImpactParameter::LorentzVectorParticle::vy, tauImpactParameter::LorentzVectorParticle::vz, and x.

Referenced by computeMotherLorentzVectorPar(), tauImpactParameter::ParticleBuilder::createLorentzVectorParticle(), getRefitLorentzVectorParticles(), and tauImpactParameter::TrackTools::lorentzParticleAtPosition().

213  {
214  int np(0), parsize(0);
215  parSizeInfo(inpar, np, parsize, true);
216  double B = inpar(parsize + BField0);
217  double massHypothesis = inpar(parsize + MassOffSet);
219  double kappa, lam, phi, x, y, z, s, dxy, dz;
220  int p = 0;
221  TrackHelixVertexFitter::computedxydz(inpar, p, kappa, lam, phi, x, y, z, s, dxy, dz);
222  double phi1 = 2 * s * kappa + phi;
223  double bOverK = B * (1.0 / fabs(kappa));
224  LV(LorentzVectorParticle::px) = bOverK * cos(phi1);
225  LV(LorentzVectorParticle::py) = bOverK * sin(phi1);
226  LV(LorentzVectorParticle::pz) = bOverK * tan(lam);
231  return LV;
232 }
Definition: APVGainStruct.h:7
math::XYZTLorentzVectorD LV
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
int np
Definition: AMPTWrapper.h:43
static void parSizeInfo(const TVectorT< double > &inpar, int &np, int &parsize, bool hasextras=false)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static void computedxydz(const TVectorT< double > &inpar, int particle, double &kappa, double &lam, double &phi, double &x, double &y, double &z, double &s, double &dxy, double &dz)

◆ computeMotherLorentzVectorPar()

TVectorT< double > TrackHelixVertexFitter::computeMotherLorentzVectorPar ( const TVectorT< double > &  inpar)
staticprivate

Definition at line 234 of file TrackHelixVertexFitter.cc.

References BField0, computeLorentzVectorPar(), freeParIndex(), mps_fire::i, tauImpactParameter::LorentzVectorParticle::m, MassOffSet, NExtraPar, NFreeTrackPar, tauImpactParameter::LorentzVectorParticle::NLorentzandVertexPar, np, AlCaHLTBitMon_ParallelJobs::p, parSizeInfo(), tauImpactParameter::LorentzVectorParticle::px, tauImpactParameter::LorentzVectorParticle::py, tauImpactParameter::LorentzVectorParticle::pz, mathSSE::sqrt(), tauImpactParameter::LorentzVectorParticle::vx, tauImpactParameter::LorentzVectorParticle::vy, and tauImpactParameter::LorentzVectorParticle::vz.

Referenced by getMother().

234  {
235  TVectorT<double> mother(LorentzVectorParticle::NLorentzandVertexPar);
236  double E(0);
237  int np(0), parsize(0);
238  parSizeInfo(inpar, np, parsize, true);
239  for (int p = 0; p < np; p++) {
240  TVectorT<double> particlepar(NFreeTrackPar + NExtraPar + MassOffSet);
241  for (int i = 0; i < NFreeTrackPar; i++) {
242  particlepar(i) = inpar(freeParIndex(i, p));
243  }
244  particlepar(NFreeTrackPar + BField0) = inpar(parsize + BField0);
245  particlepar(NFreeTrackPar + MassOffSet) = inpar(parsize + MassOffSet + p);
246  TVectorT<double> daughter = TrackHelixVertexFitter::computeLorentzVectorPar(particlepar);
253  E += sqrt((daughter(LorentzVectorParticle::px) * daughter(LorentzVectorParticle::px) +
256  daughter(LorentzVectorParticle::m) * daughter(LorentzVectorParticle::m)));
257  }
258  double P2 = (mother(LorentzVectorParticle::px) * mother(LorentzVectorParticle::px) +
261  mother(LorentzVectorParticle::m) = (E * E - P2) / sqrt(fabs(E * E - P2));
262  return mother;
263 }
int np
Definition: AMPTWrapper.h:43
T sqrt(T t)
Definition: SSEVec.h:19
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
static void parSizeInfo(const TVectorT< double > &inpar, int &np, int &parsize, bool hasextras=false)
static int freeParIndex(int Par, int Particle)

◆ computePar()

TVectorT< double > TrackHelixVertexFitter::computePar ( const TVectorT< double > &  inpar)
staticprivate

Definition at line 188 of file TrackHelixVertexFitter.cc.

References computeTrackPar(), mps_fire::i, measuredValueIndex(), NFreeTrackPar, NFreeVertexPar, tauImpactParameter::TrackParticle::NHelixPar, l1NNTauProducerPuppi_cfi::nparticles, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by getRefitTracks(), and updateChisquare().

188  {
189  int nparticles = (inpar.GetNrows() - NFreeVertexPar) / (NFreeTrackPar - NFreeVertexPar);
190  TVectorT<double> helices(nparticles * TrackParticle::NHelixPar);
191  for (int p = 0; p < nparticles; p++) {
192  TVectorT<double> TrackPar = computeTrackPar(inpar, p);
193  for (int i = 0; i < TrackParticle::NHelixPar; i++) {
194  helices(measuredValueIndex(i, p)) = TrackPar(i);
195  }
196  }
197  return helices;
198 }
static int measuredValueIndex(int TrackPar, int Particle)
static TVectorT< double > computeTrackPar(const TVectorT< double > &inpar, int p=0)

◆ computeTrackPar()

TVectorT< double > TrackHelixVertexFitter::computeTrackPar ( const TVectorT< double > &  inpar,
int  p = 0 
)
staticprivate

Definition at line 200 of file TrackHelixVertexFitter.cc.

References computedxydz(), tauImpactParameter::TrackParticle::dxy, PVValHelper::dxy, tauImpactParameter::TrackParticle::dz, PVValHelper::dz, tauImpactParameter::TrackParticle::kappa, hgcalLayerClusters_cfi::kappa, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackParticle::NHelixPar, AlCaHLTBitMon_ParallelJobs::p, tauImpactParameter::TrackParticle::phi, alignCSCRings::s, and x.

Referenced by computePar().

200  {
201  TVectorT<double> helix(TrackParticle::NHelixPar);
202  // copy parameters that are 1 to 1
203  double kappa, lam, phi, x, y, z, s, dxy, dz;
204  TrackHelixVertexFitter::computedxydz(inpar, p, kappa, lam, phi, x, y, z, s, dxy, dz);
205  helix(TrackParticle::kappa) = kappa;
206  helix(TrackParticle::lambda) = lam;
207  helix(TrackParticle::phi) = phi;
208  helix(TrackParticle::dxy) = dxy;
209  helix(TrackParticle::dz) = dz;
210  return helix;
211 }
static void computedxydz(const TVectorT< double > &inpar, int particle, double &kappa, double &lam, double &phi, double &x, double &y, double &z, double &s, double &dxy, double &dz)

◆ fit()

virtual bool tauImpactParameter::TrackHelixVertexFitter::fit ( )
pure virtual

◆ freeParIndex()

static int tauImpactParameter::TrackHelixVertexFitter::freeParIndex ( int  Par,
int  Particle 
)
inlinestaticprivate

◆ freeParName()

TString TrackHelixVertexFitter::freeParName ( int  Par)
protectedvirtual

Definition at line 265 of file TrackHelixVertexFitter.cc.

References kappa0, lambda0, dqmiodumpmetadata::n, NFreeTrackPar, NFreeVertexPar, nParticles_, AlCaHLTBitMon_ParallelJobs::p, phi0, x0, y0, and z0.

Referenced by tauImpactParameter::Chi2VertexFitter::fit().

265  {
266  int p(0);
267  if (Par == x0)
268  return "x0";
269  if (Par == y0)
270  return "y0";
271  if (Par == z0)
272  return "z0";
273  for (p = 0; p < nParticles_; p++) {
274  if ((Par - NFreeVertexPar) < (p + 1) * (NFreeTrackPar - NFreeVertexPar))
275  break;
276  }
277  TString n;
278  int index = Par - p * (NFreeTrackPar - NFreeVertexPar);
279  if (index == kappa0)
280  n = "kappa0";
281  if (index == lambda0)
282  n = "lambda0";
283  if (index == phi0)
284  n = "phi0";
285  n += "_particle";
286  n += p;
287  return n;
288 }

◆ getMother()

LorentzVectorParticle TrackHelixVertexFitter::getMother ( int  pdgid)

Definition at line 121 of file TrackHelixVertexFitter.cc.

References b, BField0, c, computeMotherLorentzVectorPar(), mps_fire::i, dqmiolumiharvest::j, EgHLTOffHistBins_cfi::mass, MassOffSet, NExtraPar, AlCaHLTBitMon_ParallelJobs::p, par_, parcov_, particles_, EgammaValidation_cff::pdgid, and tauImpactParameter::ErrorMatrixPropagator::propagateError().

121  {
122  double c(0), b(0);
123  TVectorT<double> FreePar(par_.GetNrows() + NExtraPar + particles_.size());
124  TMatrixTSym<double> FreeParCov(par_.GetNrows() + NExtraPar + particles_.size());
125  for (int i = 0; i < par_.GetNrows(); i++) {
126  FreePar(i) = par_(i);
127  for (int j = 0; j < par_.GetNrows(); j++) {
128  FreeParCov(i, j) = parcov_(i, j);
129  }
130  }
131  for (unsigned int p = 0; p < particles_.size(); p++) {
132  b = particles_[p].bField();
133  c += particles_[p].charge();
134  FreePar(par_.GetNrows() + MassOffSet + p) = particles_[p].mass();
135  }
136  FreePar(par_.GetNrows() + BField0) = b;
137  TVectorT<double> mpar = computeMotherLorentzVectorPar(FreePar);
138  TMatrixTSym<double> mcov = ErrorMatrixPropagator::propagateError(
140  return LorentzVectorParticle(mpar, mcov, pdgid, c, b);
141 }
static TVectorT< double > computeMotherLorentzVectorPar(const TVectorT< double > &inpar)
double b
Definition: hdecay.h:118
static TMatrixTSym< double > propagateError(std::function< TVectorT< double >(const TVectorT< double > &)> f, const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)

◆ getRefitLorentzVectorParticles()

std::vector< LorentzVectorParticle > TrackHelixVertexFitter::getRefitLorentzVectorParticles ( )

Definition at line 99 of file TrackHelixVertexFitter.cc.

References Calorimetry_cff::bField, BField0, ALCARECOTkAlJpsiMuMu_cff::charge, computeLorentzVectorPar(), freeParIndex(), mps_fire::i, dqmiolumiharvest::j, MassOffSet, NExtraPar, NFreeTrackPar, AlCaHLTBitMon_ParallelJobs::p, par_, parcov_, particles_, EgammaValidation_cff::pdgId, and tauImpactParameter::ErrorMatrixPropagator::propagateError().

99  {
100  std::vector<LorentzVectorParticle> refitParticles;
101  for (unsigned int p = 0; p < particles_.size(); p++) {
102  TVectorT<double> FreePar(NFreeTrackPar + NExtraPar + MassOffSet);
103  TMatrixTSym<double> FreeParCov(NFreeTrackPar + NExtraPar + MassOffSet);
104  for (int i = 0; i < NFreeTrackPar; i++) {
105  FreePar(i) = par_(freeParIndex(i, p));
106  for (int j = 0; j < NFreeTrackPar; j++) {
107  FreeParCov(i, j) = parcov_(freeParIndex(i, p), freeParIndex(j, p));
108  }
109  }
110  FreePar(NFreeTrackPar + MassOffSet) = particles_[p].mass();
111  FreePar(NFreeTrackPar + BField0) = particles_[p].bField();
112  TVectorT<double> LVPar = computeLorentzVectorPar(FreePar);
113  TMatrixTSym<double> LVCov =
115  refitParticles.push_back(
117  }
118  return refitParticles;
119 }
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
static int freeParIndex(int Par, int Particle)
static TMatrixTSym< double > propagateError(std::function< TVectorT< double >(const TVectorT< double > &)> f, const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)

◆ getRefitTracks()

std::vector< TrackParticle > TrackHelixVertexFitter::getRefitTracks ( )
virtual

Definition at line 75 of file TrackHelixVertexFitter.cc.

References Calorimetry_cff::bField, ALCARECOTkAlJpsiMuMu_cff::charge, computePar(), freeParIndex(), mps_fire::i, dqmiolumiharvest::j, EgHLTOffHistBins_cfi::mass, NFreeTrackPar, AlCaHLTBitMon_ParallelJobs::p, par_, parcov_, particles_, EgammaValidation_cff::pdgId, and tauImpactParameter::ErrorMatrixPropagator::propagateError().

75  {
76  std::vector<TrackParticle> refitParticles;
77  for (unsigned int p = 0; p < particles_.size(); p++) {
78  TVectorT<double> FreePar(NFreeTrackPar);
79  TMatrixTSym<double> FreeParCov(NFreeTrackPar);
80  for (int i = 0; i < FreeParCov.GetNrows(); i++) {
81  FreePar(i) = par_(freeParIndex(i, p));
82  for (int j = 0; j < FreeParCov.GetNrows(); j++) {
83  FreeParCov(i, j) = parcov_(freeParIndex(i, p), freeParIndex(j, p));
84  }
85  }
86  TVectorT<double> TrackPar = computePar(FreePar);
87  TMatrixTSym<double> TrackCov =
89  refitParticles.push_back(TrackParticle(TrackPar,
90  TrackCov,
91  particles_[p].pdgId(),
92  particles_[p].mass(),
93  particles_[p].charge(),
94  particles_[p].bField()));
95  }
96  return refitParticles;
97 }
static TVectorT< double > computePar(const TVectorT< double > &inpar)
static int freeParIndex(int Par, int Particle)
static TMatrixTSym< double > propagateError(std::function< TVectorT< double >(const TVectorT< double > &)> f, const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)

◆ getVertex()

TVector3 TrackHelixVertexFitter::getVertex ( )
virtual

◆ getVertexError()

TMatrixTSym< double > TrackHelixVertexFitter::getVertexError ( )
virtual

Definition at line 147 of file TrackHelixVertexFitter.cc.

References c, freeParIndex(), mps_fire::i, dqmiolumiharvest::j, NFreeVertexPar, and parcov_.

147  {
148  TMatrixTSym<double> c(NFreeVertexPar);
149  for (unsigned int i = 0; i < NFreeVertexPar; i++) {
150  for (unsigned int j = 0; j < NFreeVertexPar; j++) {
152  }
153  }
154  return c;
155 }
static int freeParIndex(int Par, int Particle)

◆ measuredValueIndex()

static int tauImpactParameter::TrackHelixVertexFitter::measuredValueIndex ( int  TrackPar,
int  Particle 
)
inlinestaticprivate

◆ ndf()

virtual double tauImpactParameter::TrackHelixVertexFitter::ndf ( void  )
inlinevirtual

Definition at line 36 of file TrackHelixVertexFitter.h.

References ndf_.

◆ parSizeInfo()

void TrackHelixVertexFitter::parSizeInfo ( const TVectorT< double > &  inpar,
int &  np,
int &  parsize,
bool  hasextras = false 
)
staticprivate

◆ updateChisquare()

double TrackHelixVertexFitter::updateChisquare ( const TVectorT< double > &  inpar)
virtual

Definition at line 68 of file TrackHelixVertexFitter.cc.

References computePar(), cov_inv_, and val_.

Referenced by tauImpactParameter::ChiSquareFunctionUpdator::operator()().

68  {
69  TVectorT<double> vprime = computePar(inpar);
70  TVectorT<double> dalpha = vprime - val_;
71  double c2 = dalpha * (cov_inv_ * dalpha);
72  return c2;
73 }
static TVectorT< double > computePar(const TVectorT< double > &inpar)

Member Data Documentation

◆ chi2_

double tauImpactParameter::TrackHelixVertexFitter::chi2_
protected

◆ cov_

TMatrixTSym<double> tauImpactParameter::TrackHelixVertexFitter::cov_
private

Definition at line 78 of file TrackHelixVertexFitter.h.

Referenced by TrackHelixVertexFitter().

◆ cov_inv_

TMatrixTSym<double> tauImpactParameter::TrackHelixVertexFitter::cov_inv_
private

Definition at line 79 of file TrackHelixVertexFitter.h.

Referenced by TrackHelixVertexFitter(), and updateChisquare().

◆ isConfigured_

bool tauImpactParameter::TrackHelixVertexFitter::isConfigured_
protected

◆ isFit_

bool tauImpactParameter::TrackHelixVertexFitter::isFit_
protected

Definition at line 57 of file TrackHelixVertexFitter.h.

Referenced by tauImpactParameter::Chi2VertexFitter::fit().

◆ ndf_

double tauImpactParameter::TrackHelixVertexFitter::ndf_
protected

Definition at line 61 of file TrackHelixVertexFitter.h.

Referenced by ndf(), and TrackHelixVertexFitter().

◆ nPar_

int tauImpactParameter::TrackHelixVertexFitter::nPar_
private

Definition at line 80 of file TrackHelixVertexFitter.h.

Referenced by TrackHelixVertexFitter().

◆ nParticles_

int tauImpactParameter::TrackHelixVertexFitter::nParticles_
private

Definition at line 80 of file TrackHelixVertexFitter.h.

Referenced by freeParName().

◆ nVal_

int tauImpactParameter::TrackHelixVertexFitter::nVal_
private

Definition at line 80 of file TrackHelixVertexFitter.h.

Referenced by TrackHelixVertexFitter().

◆ par_

TVectorT<double> tauImpactParameter::TrackHelixVertexFitter::par_
protected

◆ parcov_

TMatrixTSym<double> tauImpactParameter::TrackHelixVertexFitter::parcov_
protected

◆ particles_

std::vector<TrackParticle> tauImpactParameter::TrackHelixVertexFitter::particles_
private

◆ val_

TVectorT<double> tauImpactParameter::TrackHelixVertexFitter::val_
private

Definition at line 77 of file TrackHelixVertexFitter.h.

Referenced by TrackHelixVertexFitter(), and updateChisquare().