16 nParticles_(particles.
size()),
17 nPar_((NFreeTrackPar-NFreeVertexPar)*particles.
size()+NFreeVertexPar),
25 for(
unsigned int p=0;
p<particles.size();
p++){
33 TDecompBK Inverter(
cov_);
34 double det =
cov_.Determinant();
35 if(!Inverter.Decompose()){
36 edm::LogWarning(
"TrackHelixVertexFitter::TrackHelixVertexFitter") <<
"Fit failed: unable to invert SYM gain matrix " << det <<
" \n" << std::endl;
63 TVectorT<double> dalpha=vprime-
val_;
69 std::vector<TrackParticle> refitParticles;
73 for(
int i=0;
i<FreeParCov.GetNrows();
i++){
75 for(
int j=0;j<FreeParCov.GetNrows();j++){
83 return refitParticles;
87 std::vector<LorentzVectorParticle> refitParticles;
103 return refitParticles;
110 for(
int i=0;
i<
par_.GetNrows();
i++){
112 for(
int j=0;j<
par_.GetNrows();j++){FreeParCov(
i,j)=
parcov_(
i,j);}
137 void TrackHelixVertexFitter::computedxydz(
const TVectorT<double>& inpar,
int p,
double&
kappa,
double& lam,
double& phi,
double& x,
double& y,
double& z,
double&
s,
double&
dxy,
double&
dz){
144 double v=(2.0*kappa*(x*
cos(phi)+y*
sin(phi)));
147 else if(v<=-1.0){arcsinv=-
TMath::Pi()/2;}
148 else{arcsinv=asin(v);}
149 s=1.0/(2.0*
kappa)*arcsinv;
157 for(
int p=0;
p<nparticles;
p++){
168 TrackHelixVertexFitter::computedxydz(inpar,p,kappa,lam,phi,x,y,z,s,dxy,dz);
184 TrackHelixVertexFitter::computedxydz(inpar,p,kappa,lam,phi,x,y,z,s,dxy,dz);
185 double phi1 = 2*s*kappa+phi;
186 double bOverK = B*(1.0/fabs(kappa));
201 for(
int p=0;
p<
np;
p++){
227 if(Par==
x0)
return "x0";
228 if(Par==
y0)
return "y0";
229 if(Par==
z0)
return "z0";
235 if(index==
kappa0) n=
"kappa0";
236 if(index==
lambda0) n=
"lambda0";
237 if(index==
phi0) n=
"phi0";
TMatrixTSym< double > cov_
virtual TVector3 getVertex()
TMatrixTSym< double > cov_inv_
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()
T x() const
Cartesian x coordinate.
math::XYZTLorentzVectorD LV
static TVectorT< double > computePar(const TVectorT< double > &inpar)
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
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()
static void parSizeInfo(const TVectorT< double > &inpar, int &np, int &parsize, bool hasextras=0)
LorentzVectorParticle getMother(int pdgid)
static const G4double kappa
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)