52 init(pini, theCovMatrix);
58 const TMatrixD* theCovMatrix)
60 init(pini, theCovMatrix);
67 if (newname.Length() > 0)
68 myclone->SetName(newname);
96 if (params ==
nullptr) {
100 if (params->GetNcols() != 1 || params->GetNrows() !=
_nPar) {
101 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
105 Double_t
X =
_pini.P() * (*params)(0, 0) *
_u1.X() + (*params)(1, 0) *
_u2.X() + (*params)(2, 0) *
_u3.X();
106 Double_t
Y =
_pini.P() * (*params)(0, 0) *
_u1.Y() + (*params)(1, 0) *
_u2.Y() + (*params)(2, 0) *
_u3.Y();
107 Double_t
Z =
_pini.P() * (*params)(0, 0) *
_u1.Z() + (*params)(1, 0) *
_u2.Z() + (*params)(2, 0) *
_u3.Z();
108 Double_t pcurr = TMath::Sqrt(X * X + Y * Y + Z * Z);
111 TLorentzVector* vec =
new TLorentzVector(X, Y, Z, E);
119 if (pini ==
nullptr) {
120 _u1.SetXYZ(0., 0., 0.);
121 _u3.SetXYZ(0., 0., 0.);
122 _u2.SetXYZ(0., 0., 0.);
123 _pini.SetXYZT(0., 0., 0., 0.);
132 TVector3 uz(0., 0., 1.);
148 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 3);
149 (*DerivativeMatrix) *= 0.;
152 (*DerivativeMatrix)(0, 0) =
_pini.P() *
_u1.X();
153 (*DerivativeMatrix)(1, 0) =
_pini.P() *
_u1.Y();
154 (*DerivativeMatrix)(2, 0) =
_pini.P() *
_u1.Z();
157 (*DerivativeMatrix)(0, 1) =
_u2.X();
158 (*DerivativeMatrix)(1, 1) =
_u2.Y();
159 (*DerivativeMatrix)(2, 1) =
_u2.Z();
162 (*DerivativeMatrix)(0, 2) =
_u3.X();
163 (*DerivativeMatrix)(1, 2) =
_u3.Y();
164 (*DerivativeMatrix)(2, 2) =
_u3.Z();
168 return DerivativeMatrix;
181 TVector3
vec3(vec.Vect());
185 TMatrixD* tparams =
new TMatrixD(
_nPar, 1);
187 (*tparams)(1, 0) =
vec3(1);
188 (*tparams)(2, 0) =
vec3(2);
TMatrixD * transform(const TLorentzVector &vec) override
Log< level::Error, false > LogError
void setIni4Vec(const TLorentzVector *pini) override
void init(TLorentzVector *pini, const TMatrixD *theCovMatrix)
TAbsFitParticle * clone(const TString &newname="") const override
TLorentzVector * calc4Vec(const TMatrixD *params) override
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
TFitParticleEScaledMomDev()
TMatrixD * getDerivative() override
~TFitParticleEScaledMomDev() override