51 init(p, M, theCovMatrix);
55 const TString&
name,
const TString&
title, TVector3*
p, Double_t M,
const TMatrixD* theCovMatrix)
57 init(p, M, theCovMatrix);
64 if (newname.Length() > 0)
65 myclone->SetName(newname);
93 if (params ==
nullptr) {
97 if (params->GetNcols() != 1 || params->GetNrows() !=
_nPar) {
98 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
102 Double_t
X =
_pini.P() * (*params)(0, 0) *
_u1.X() + (*params)(1, 0) *
_u2.X() + (*params)(2, 0) *
_u3.X();
103 Double_t
Y =
_pini.P() * (*params)(0, 0) *
_u1.Y() + (*params)(1, 0) *
_u2.Y() + (*params)(2, 0) *
_u3.Y();
104 Double_t
Z =
_pini.P() * (*params)(0, 0) *
_u1.Z() + (*params)(1, 0) *
_u2.Z() + (*params)(2, 0) *
_u3.Z();
105 Double_t E = TMath::Sqrt(X * X + Y * Y + Z * Z +
_pini.M2());
107 TLorentzVector* vec =
new TLorentzVector(X, Y, Z, E);
115 TVector3 vec(pini->Vect());
124 _pini.SetXYZM(0., 0., 0., M);
128 _pini.SetXYZM(p->x(), p->y(), p->z(), M);
134 TVector3 uz(0., 0., 1.);
150 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 3);
151 (*DerivativeMatrix) *= 0.;
153 (*DerivativeMatrix)(0, 0) =
_pini.P() *
_u1.X();
154 (*DerivativeMatrix)(1, 0) =
_pini.P() *
_u1.Y();
155 (*DerivativeMatrix)(2, 0) =
_pini.P() *
_u1.Z();
161 (*DerivativeMatrix)(0, 1) =
_u2.X();
162 (*DerivativeMatrix)(1, 1) =
_u2.Y();
163 (*DerivativeMatrix)(2, 1) =
_u2.Z();
169 (*DerivativeMatrix)(0, 2) =
_u3.X();
170 (*DerivativeMatrix)(1, 2) =
_u3.Y();
171 (*DerivativeMatrix)(2, 2) =
_u3.Z();
176 return DerivativeMatrix;
189 TVector3
vec3(vec.Vect());
193 TMatrixD* tparams =
new TMatrixD(
_nPar, 1);
195 (*tparams)(1, 0) =
vec3(1);
196 (*tparams)(2, 0) =
vec3(2);
TMatrixD * transform(const TLorentzVector &vec) override
void init(TVector3 *p, Double_t M, const TMatrixD *theCovMatrix)
void setIni4Vec(const TLorentzVector *pini) override
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
TAbsFitParticle * clone(const TString &newname=TString("")) const override
TLorentzVector * calc4Vec(const TMatrixD *params) override
TMatrixD * getDerivative() override
~TFitParticleMCMomDev() override