51 init(pini, theCovMatrix);
57 const TMatrixD* theCovMatrix)
59 init(pini, theCovMatrix);
66 if (newname.Length() > 0)
67 myclone->SetName(newname);
96 if (pini ==
nullptr) {
97 _u1.SetXYZ(0., 0., 0.);
98 _u3.SetXYZ(0., 0., 0.);
99 _u2.SetXYZ(0., 0., 0.);
100 _pini.SetXYZT(0., 0., 0., 0.);
110 TVector3 uz(0., 0., 1.);
126 if (params ==
nullptr) {
130 if (params->GetNcols() != 1 || params->GetNrows() !=
_nPar) {
131 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
135 Double_t
X =
_pini.P() * (*params)(0, 0) *
_u1.X() + (*params)(1, 0) *
_u2.X() + (*params)(2, 0) *
_u3.X();
136 Double_t
Y =
_pini.P() * (*params)(0, 0) *
_u1.Y() + (*params)(1, 0) *
_u2.Y() + (*params)(2, 0) *
_u3.Y();
137 Double_t
Z =
_pini.P() * (*params)(0, 0) *
_u1.Z() + (*params)(1, 0) *
_u2.Z() + (*params)(2, 0) *
_u3.Z();
138 Double_t E = TMath::Sqrt(X * X + Y * Y + Z * Z + (*params)(3, 0) * (*params)(3, 0) *
_pini.M2());
140 TLorentzVector* vec =
new TLorentzVector(X, Y, Z, E);
149 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 4);
150 (*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();
156 (*DerivativeMatrix)(3, 0) = 0.;
159 (*DerivativeMatrix)(0, 1) =
_u2.X();
160 (*DerivativeMatrix)(1, 1) =
_u2.Y();
161 (*DerivativeMatrix)(2, 1) =
_u2.Z();
162 (*DerivativeMatrix)(3, 1) = 0.;
165 (*DerivativeMatrix)(0, 2) =
_u3.X();
166 (*DerivativeMatrix)(1, 2) =
_u3.Y();
167 (*DerivativeMatrix)(2, 2) =
_u3.Z();
168 (*DerivativeMatrix)(3, 2) = 0.;
171 (*DerivativeMatrix)(0, 3) = 0.;
172 (*DerivativeMatrix)(1, 3) = 0.;
173 (*DerivativeMatrix)(2, 3) = 0.;
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);
197 (*tparams)(3, 0) = vec.M() /
_pini.M();
void setIni4Vec(const TLorentzVector *pini) override
Log< level::Error, false > LogError
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
TLorentzVector * calc4Vec(const TMatrixD *params) override
~TFitParticleMomDev() override
void init(TLorentzVector *pini, const TMatrixD *theCovMatrix)
TMatrixD * getDerivative() override
TMatrixD * transform(const TLorentzVector &vec) override
TAbsFitParticle * clone(const TString &newname=TString("")) const override