44 init(pini, theCovMatrix);
50 const TMatrixD* theCovMatrix)
52 init(pini, theCovMatrix);
59 if (newname.Length() > 0)
60 myclone->SetName(newname);
82 if (params ==
nullptr) {
86 if (params->GetNcols() != 1 || params->GetNrows() !=
_nPar) {
87 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
91 Double_t
X = (*params)(0, 0);
92 Double_t
Y = (*params)(1, 0);
93 Double_t
Z = (*params)(2, 0);
94 Double_t E = TMath::Sqrt(X * X + Y * Y + Z * Z + (*params)(3, 0) * (*params)(3, 0) *
_pini.M2());
96 TLorentzVector* vec =
new TLorentzVector(X, Y, Z, E);
104 if (pini ==
nullptr) {
105 _u1.SetXYZ(0., 0., 0.);
106 _u3.SetXYZ(0., 0., 0.);
107 _u2.SetXYZ(0., 0., 0.);
108 _pini.SetXYZT(0., 0., 0., 0.);
127 _u1.SetXYZ(1., 0., 0.);
128 _u2.SetXYZ(0., 1., 0.);
129 _u3.SetXYZ(0., 0., 1.);
146 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 4);
147 (*DerivativeMatrix) *= 0.;
150 (*DerivativeMatrix)(0, 0) = 1.;
151 (*DerivativeMatrix)(1, 0) = 0.;
152 (*DerivativeMatrix)(2, 0) = 0.;
153 (*DerivativeMatrix)(3, 0) = 0.;
156 (*DerivativeMatrix)(0, 1) = 0;
157 (*DerivativeMatrix)(1, 1) = 1;
158 (*DerivativeMatrix)(2, 1) = 0;
159 (*DerivativeMatrix)(3, 1) = 0.;
162 (*DerivativeMatrix)(0, 2) = 0.;
163 (*DerivativeMatrix)(1, 2) = 0.;
164 (*DerivativeMatrix)(2, 2) = 1.;
165 (*DerivativeMatrix)(3, 2) = 0.;
168 (*DerivativeMatrix)(0, 3) = 0.;
169 (*DerivativeMatrix)(1, 3) = 0.;
170 (*DerivativeMatrix)(2, 3) = 0.;
173 return DerivativeMatrix;
180 TMatrixD* tparams =
new TMatrixD(
_nPar, 1);
181 (*tparams)(0, 0) = vec.X();
182 (*tparams)(1, 0) = vec.Y();
183 (*tparams)(2, 0) = vec.Z();
184 (*tparams)(3, 0) = vec.M() /
_pini.M();
TMatrixD * getDerivative() override
Log< level::Error, false > LogError
TLorentzVector * calc4Vec(const TMatrixD *params) override
TAbsFitParticle * clone(const TString &newname=TString("")) const override
void setIni4Vec(const TLorentzVector *pini) override
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
TMatrixD * transform(const TLorentzVector &vec) override
~TFitParticleCart() override
void init(TLorentzVector *pini, const TMatrixD *theCovMatrix)