43 init(pini, theCovMatrix);
49 const TMatrixD* theCovMatrix)
51 init(pini, theCovMatrix);
58 if (newname.Length() > 0)
59 myclone->SetName(newname);
81 if (params ==
nullptr) {
85 if (params->GetNcols() != 1 || params->GetNrows() !=
_nPar) {
86 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
90 Double_t
X = (*params)(0, 0);
91 Double_t
Y = (*params)(1, 0);
92 Double_t
Z = (*params)(2, 0);
93 Double_t E = (*params)(3, 0);
95 TLorentzVector* vec =
new TLorentzVector(X, Y, Z, E);
103 if (pini ==
nullptr) {
104 _u1.SetXYZ(0., 0., 0.);
105 _u3.SetXYZ(0., 0., 0.);
106 _u2.SetXYZ(0., 0., 0.);
107 _pini.SetXYZT(0., 0., 0., 0.);
123 _u1.SetXYZ(1., 0., 0.);
124 _u2.SetXYZ(0., 1., 0.);
125 _u3.SetXYZ(0., 0., 1.);
142 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 4);
143 (*DerivativeMatrix) *= 0.;
146 (*DerivativeMatrix)(0, 0) = 1.;
147 (*DerivativeMatrix)(1, 0) = 0.;
148 (*DerivativeMatrix)(2, 0) = 0.;
149 (*DerivativeMatrix)(3, 0) = 0.;
152 (*DerivativeMatrix)(0, 1) = 0;
153 (*DerivativeMatrix)(1, 1) = 1;
154 (*DerivativeMatrix)(2, 1) = 0;
155 (*DerivativeMatrix)(3, 1) = 0.;
158 (*DerivativeMatrix)(0, 2) = 0.;
159 (*DerivativeMatrix)(1, 2) = 0.;
160 (*DerivativeMatrix)(2, 2) = 1.;
161 (*DerivativeMatrix)(3, 2) = 0.;
164 (*DerivativeMatrix)(0, 3) = 0.;
165 (*DerivativeMatrix)(1, 3) = 0.;
166 (*DerivativeMatrix)(2, 3) = 0.;
167 (*DerivativeMatrix)(3, 3) = 1.;
169 return DerivativeMatrix;
176 TMatrixD* tparams =
new TMatrixD(
_nPar, 1);
177 (*tparams)(0, 0) = vec.X();
178 (*tparams)(1, 0) = vec.Y();
179 (*tparams)(2, 0) = vec.Z();
180 (*tparams)(3, 0) = vec.E();
TMatrixD * getDerivative() override
Log< level::Error, false > LogError
TLorentzVector * calc4Vec(const TMatrixD *params) override
void setIni4Vec(const TLorentzVector *pini) override
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
TMatrixD * transform(const TLorentzVector &vec) override
TAbsFitParticle * clone(const TString &newname=TString("")) const override
void init(TLorentzVector *pini, const TMatrixD *theCovMatrix)
~TFitParticleECart() override