45 init(
p, M, theCovMatrix);
49 const TString&
name,
const TString&
title, TVector3*
p, Double_t M,
const TMatrixD* theCovMatrix)
51 init(
p, M, theCovMatrix);
58 if (newname.Length() > 0)
59 myclone->SetName(newname);
86 edm::LogError(
"WrongMatrixSize") << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
90 Double_t
r = (*params)(0, 0);
91 Double_t
theta = (*params)(1, 0);
92 Double_t
phi = (*params)(2, 0);
94 Double_t
X = 1 /
r * TMath::Cos(
phi) * TMath::Sin(
theta);
95 Double_t
Y = 1 /
r * TMath::Sin(
phi) * TMath::Sin(
theta);
96 Double_t
Z = 1 /
r * TMath::Cos(
theta);
97 Double_t E = TMath::Sqrt(
X *
X +
Y *
Y +
Z *
Z +
_pini.M2());
99 TLorentzVector* vec =
new TLorentzVector(
X,
Y,
Z, E);
107 TVector3 vec(pini->Vect());
116 _u1.SetXYZ(0., 0., 0.);
117 _u3.SetXYZ(0., 0., 0.);
118 _u2.SetXYZ(0., 0., 0.);
119 _pini.SetXYZM(0., 0., 0., M);
128 _pini.SetXYZM(
p->x(),
p->y(),
p->z(), M);
131 Double_t
r = 1 /
_pini.P();
144 _u3.SetXYZ(-1. * TMath::Sin(
phi), TMath::Cos(
phi), 0.);
153 TMatrixD* DerivativeMatrix =
new TMatrixD(4, 3);
154 (*DerivativeMatrix) *= 0.;
162 (*DerivativeMatrix)(0, 0) = -1. *
p *
p * TMath::Cos(
phi) * TMath::Sin(
theta);
163 (*DerivativeMatrix)(1, 0) = -1. *
p *
p * TMath::Sin(
phi) * TMath::Sin(
theta);
164 (*DerivativeMatrix)(2, 0) = -1. *
p *
p * TMath::Cos(
theta);
165 (*DerivativeMatrix)(3, 0) = -1. *
p *
p *
p /
_pcurr.E();
168 (*DerivativeMatrix)(0, 1) =
p * TMath::Cos(
phi) * TMath::Cos(
theta);
169 (*DerivativeMatrix)(1, 1) =
p * TMath::Sin(
phi) * TMath::Cos(
theta);
170 (*DerivativeMatrix)(2, 1) = -1. *
p * TMath::Sin(
theta);
171 (*DerivativeMatrix)(3, 1) = 0.;
174 (*DerivativeMatrix)(0, 2) = -1. *
p * TMath::Sin(
phi) * TMath::Sin(
theta);
175 (*DerivativeMatrix)(1, 2) =
p * TMath::Cos(
phi) * TMath::Sin(
theta);
177 (*DerivativeMatrix)(2, 2) = 0.;
178 (*DerivativeMatrix)(3, 2) = 0.;
180 return DerivativeMatrix;
188 TMatrixD* tparams =
new TMatrixD(
_nPar, 1);
189 (*tparams)(0, 0) = 1. / vec.P();
190 (*tparams)(1, 0) = vec.Theta();
191 (*tparams)(2, 0) = vec.Phi();