44 init(p, M, theCovMatrix);
48 const TString&
name,
const TString&
title, TVector3*
p, Double_t M,
const TMatrixD* theCovMatrix)
50 init(p, M, theCovMatrix);
57 if (newname.Length() > 0)
58 myclone->SetName(newname);
80 if (params ==
nullptr) {
84 if (params->GetNcols() != 1 || params->GetNrows() !=
_nPar) {
85 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
89 Double_t
r = (*params)(0, 0);
90 Double_t
theta = (*params)(1, 0);
91 Double_t
phi = (*params)(2, 0);
93 Double_t
X = r * TMath::Cos(phi) * TMath::Sin(theta);
94 Double_t
Y = r * TMath::Sin(phi) * TMath::Sin(theta);
95 Double_t
Z = r * TMath::Cos(theta);
96 Double_t E = TMath::Sqrt(X * X + Y * Y + Z * Z +
_pini.M2());
98 TLorentzVector* vec =
new TLorentzVector(X, Y, Z, E);
106 TVector3 vec(pini->Vect());
115 _u1.SetXYZ(0., 0., 0.);
116 _u3.SetXYZ(0., 0., 0.);
117 _u2.SetXYZ(0., 0., 0.);
118 _pini.SetXYZM(0., 0., 0., M);
127 _pini.SetXYZM(p->x(), p->y(), p->z(), M);
141 _u1.SetXYZ(TMath::Cos(phi) * TMath::Sin(theta), TMath::Sin(phi) * TMath::Sin(theta), TMath::Cos(theta));
142 _u2.SetXYZ(TMath::Cos(phi) * TMath::Cos(theta), TMath::Sin(phi) * TMath::Cos(theta), -1. * TMath::Sin(theta));
143 _u3.SetXYZ(-1. * TMath::Sin(phi), TMath::Cos(phi), 0.);
152 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 3);
153 (*DerivativeMatrix) *= 0.;
160 (*DerivativeMatrix)(0, 0) = TMath::Cos(phi) * TMath::Sin(theta);
161 (*DerivativeMatrix)(1, 0) = TMath::Sin(phi) * TMath::Sin(theta);
162 (*DerivativeMatrix)(2, 0) = TMath::Cos(theta);
163 (*DerivativeMatrix)(3, 0) = r /
_pcurr.E();
166 (*DerivativeMatrix)(0, 1) = r * TMath::Cos(phi) * TMath::Cos(theta);
167 (*DerivativeMatrix)(1, 1) = r * TMath::Sin(phi) * TMath::Cos(theta);
168 (*DerivativeMatrix)(2, 1) = -1. * r * TMath::Sin(theta);
169 (*DerivativeMatrix)(3, 1) = 0.;
172 (*DerivativeMatrix)(0, 2) = -1. * r * TMath::Sin(phi) * TMath::Sin(theta);
173 (*DerivativeMatrix)(1, 2) = r * TMath::Cos(phi) * TMath::Sin(theta);
175 (*DerivativeMatrix)(2, 2) = 0.;
176 (*DerivativeMatrix)(3, 2) = 0.;
178 return DerivativeMatrix;
186 TMatrixD* tparams =
new TMatrixD(
_nPar, 1);
187 (*tparams)(0, 0) = vec.P();
188 (*tparams)(1, 0) = vec.Theta();
189 (*tparams)(2, 0) = vec.Phi();
void init(TVector3 *p, Double_t M, const TMatrixD *theCovMatrix)
Geom::Theta< T > theta() const
~TFitParticleMCSpher() override
Log< level::Error, false > LogError
TMatrixD * transform(const TLorentzVector &vec) override
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
void setIni4Vec(const TLorentzVector *pini) override
TMatrixD * getDerivative() override
TAbsFitParticle * clone(const TString &newname=TString("")) const override
TLorentzVector * calc4Vec(const TMatrixD *params) override