50 init(pini, theCovMatrix);
56 const TMatrixD* theCovMatrix)
58 init(pini, theCovMatrix);
65 if (newname.Length() > 0)
66 myclone->SetName(newname);
90 if (pini ==
nullptr) {
96 _u1.SetXYZ(0., 0., 0.);
97 _u3.SetXYZ(0., 0., 0.);
98 _u2.SetXYZ(0., 0., 0.);
99 _pini.SetXYZT(0., 0., 0., 0.);
114 TVector3 uz(0., 0., 1.);
130 if (params ==
nullptr) {
134 if (params->GetNcols() != 1 || params->GetNrows() !=
_nPar) {
135 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
139 Double_t
X =
_pini.P() * (*params)(0, 0) *
_u1.X() + (*params)(1, 0) *
_u2.X() + (*params)(2, 0) *
_u3.X();
140 Double_t
Y =
_pini.P() * (*params)(0, 0) *
_u1.Y() + (*params)(1, 0) *
_u2.Y() + (*params)(2, 0) *
_u3.Y();
141 Double_t
Z =
_pini.P() * (*params)(0, 0) *
_u1.Z() + (*params)(1, 0) *
_u2.Z() + (*params)(2, 0) *
_u3.Z();
142 Double_t E =
_pini.E() * (*params)(3, 0);
144 TLorentzVector* vec =
new TLorentzVector(X, Y, Z, E);
153 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 4);
154 (*DerivativeMatrix) *= 0.;
157 (*DerivativeMatrix)(0, 0) =
_pini.P() *
_u1.X();
158 (*DerivativeMatrix)(1, 0) =
_pini.P() *
_u1.Y();
159 (*DerivativeMatrix)(2, 0) =
_pini.P() *
_u1.Z();
160 (*DerivativeMatrix)(3, 0) = 0.;
163 (*DerivativeMatrix)(0, 1) =
_u2.X();
164 (*DerivativeMatrix)(1, 1) =
_u2.Y();
165 (*DerivativeMatrix)(2, 1) =
_u2.Z();
166 (*DerivativeMatrix)(3, 1) = 0.;
169 (*DerivativeMatrix)(0, 2) =
_u3.X();
170 (*DerivativeMatrix)(1, 2) =
_u3.Y();
171 (*DerivativeMatrix)(2, 2) =
_u3.Z();
172 (*DerivativeMatrix)(3, 2) = 0.;
175 (*DerivativeMatrix)(0, 3) = 0.;
176 (*DerivativeMatrix)(1, 3) = 0.;
177 (*DerivativeMatrix)(2, 3) = 0.;
178 (*DerivativeMatrix)(3, 3) =
_pini.E();
180 return DerivativeMatrix;
193 TVector3
vec3(vec.Vect());
197 TMatrixD* tparams =
new TMatrixD(
_nPar, 1);
199 (*tparams)(1, 0) =
vec3.y();
200 (*tparams)(2, 0) =
vec3.z();
201 (*tparams)(3, 0) = vec.E() /
_pini.E();
TLorentzVector * calc4Vec(const TMatrixD *params) override
~TFitParticleEMomDev() override
Log< level::Error, false > LogError
TAbsFitParticle * clone(const TString &newname="") const override
void setIni4Vec(const TLorentzVector *pini) override
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
TMatrixD * getDerivative() override
TMatrixD * transform(const TLorentzVector &vec) override
void init(TLorentzVector *pini, const TMatrixD *theCovMatrix)