11 using namespace tauImpactParameter;
16 nParticles_(particles.
size()),
17 nPar_((NFreeTrackPar - NFreeVertexPar) * particles.
size() + NFreeVertexPar),
24 for (
unsigned int p = 0;
p < particles.size();
p++) {
32 TDecompBK Inverter(
cov_);
33 double det =
cov_.Determinant();
34 if (!Inverter.Decompose()) {
36 <<
"Fit failed: unable to invert SYM gain matrix " << det <<
" \n"
70 TVectorT<double> dalpha = vprime -
val_;
71 double c2 = dalpha * (
cov_inv_ * dalpha);
76 std::vector<TrackParticle> refitParticles;
80 for (
int i = 0;
i < FreeParCov.GetNrows();
i++) {
82 for (
int j = 0;
j < FreeParCov.GetNrows();
j++) {
86 TVectorT<double> TrackPar =
computePar(FreePar);
87 TMatrixTSym<double> TrackCov =
96 return refitParticles;
100 std::vector<LorentzVectorParticle> refitParticles;
113 TMatrixTSym<double> LVCov =
115 refitParticles.push_back(
118 return refitParticles;
125 for (
int i = 0;
i <
par_.GetNrows();
i++) {
127 for (
int j = 0;
j <
par_.GetNrows();
j++) {
174 double v = (2.0 * kappa * (x *
cos(phi) + y *
sin(phi)));
178 }
else if (v <= -1.0) {
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);
191 for (
int p = 0;
p < nparticles;
p++) {
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);
214 int np(0), parsize(0);
216 double B = inpar(parsize +
BField0);
219 double kappa, lam, phi, x, y, z,
s,
dxy,
dz;
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));
237 int np(0), parsize(0);
239 for (
int p = 0;
p <
np;
p++) {
TMatrixTSym< double > cov_
const edm::EventSetup & c
virtual TVector3 getVertex()
TMatrixTSym< double > cov_inv_
math::XYZTLorentzVectorD LV
Sin< T >::type sin(const T &t)
TMatrixTSym< double > parcov_
static TVectorT< double > computeMotherLorentzVectorPar(const TVectorT< double > &inpar)
std::vector< TrackParticle > particles_
virtual double updateChisquare(const TVectorT< double > &inpar)
virtual std::vector< TrackParticle > getRefitTracks()
static TVectorT< double > computePar(const TVectorT< double > &inpar)
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
static void parSizeInfo(const TVectorT< double > &inpar, int &np, int &parsize, bool hasextras=false)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
static const std::string B
static int measuredValueIndex(int TrackPar, int Particle)
virtual TString freeParName(int Par)
virtual TMatrixTSym< double > getVertexError()
std::vector< LorentzVectorParticle > getRefitLorentzVectorParticles()
TrackHelixVertexFitter(const std::vector< TrackParticle > &particles, const TVector3 &vguess)
static TVectorT< double > computeTrackPar(const TVectorT< double > &inpar, int p=0)
static int freeParIndex(int Par, int Particle)
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)
virtual ~TrackHelixVertexFitter()
LorentzVectorParticle getMother(int pdgid)
Log< level::Warning, false > LogWarning
tuple size
Write out results.
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)