55 init(p, M, theCovMatrix);
59 TVector3*
p, Double_t M,
const TMatrixD* theCovMatrix)
62 init(p, M, theCovMatrix);
69 if ( newname.Length() > 0 ) myclone->SetName(newname);
101 if ( params->GetNcols() != 1 || params->GetNrows() !=
_nPar ) {
103 << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
107 Double_t
r = (*params)(0,0);
108 Double_t
theta = (*params)(1,0);
109 Double_t
phi = (*params)(2,0);
111 Double_t
X = 1/r*TMath::Cos(phi)*TMath::Sin(theta);
112 Double_t Y = 1/r*TMath::Sin(phi)*TMath::Sin(theta);
113 Double_t
Z = 1/r*TMath::Cos(theta);
114 Double_t E = TMath::Sqrt( X*X + Y*Y + Z*Z +
_pini.M2() );
116 TLorentzVector* vec =
new TLorentzVector( X, Y, Z, E );
125 TVector3 vec( pini->Vect() );
136 _u1.SetXYZ(0., 0., 0.);
137 _u3.SetXYZ(0., 0., 0.);
138 _u2.SetXYZ(0., 0., 0.);
139 _pini.SetXYZM(0., 0., 0., M);
149 _pini.SetXYZM( p->x(), p->y(), p->z(), M);
163 _u1.SetXYZ( TMath::Cos(phi)*TMath::Sin(theta), TMath::Sin(phi)*TMath::Sin(theta), TMath::Cos(theta) );
164 _u2.SetXYZ( TMath::Cos(phi)*TMath::Cos(theta), TMath::Sin(phi)*TMath::Cos(theta), -1.*TMath::Sin(theta) );
165 _u3.SetXYZ( -1.*TMath::Sin(phi), TMath::Cos(phi), 0. );
176 TMatrixD* DerivativeMatrix =
new TMatrixD(4,3);
177 (*DerivativeMatrix) *= 0.;
185 (*DerivativeMatrix)(0,0) = -1.*p*p*TMath::Cos(phi)*TMath::Sin(theta);
186 (*DerivativeMatrix)(1,0) = -1.*p*p*TMath::Sin(phi)*TMath::Sin(theta);
187 (*DerivativeMatrix)(2,0) = -1.*p*p*TMath::Cos(theta);
188 (*DerivativeMatrix)(3,0) = -1.*p*p*p/
_pcurr.E();
191 (*DerivativeMatrix)(0,1) = p*TMath::Cos(phi)*TMath::Cos(theta);
192 (*DerivativeMatrix)(1,1) = p*TMath::Sin(phi)*TMath::Cos(theta);
193 (*DerivativeMatrix)(2,1) = -1.*p*TMath::Sin(theta);
194 (*DerivativeMatrix)(3,1) = 0.;
197 (*DerivativeMatrix)(0,2) = -1.*p*TMath::Sin(phi)*TMath::Sin(theta);
198 (*DerivativeMatrix)(1,2) = p*TMath::Cos(phi)*TMath::Sin(theta);;
199 (*DerivativeMatrix)(2,2) = 0.;
200 (*DerivativeMatrix)(3,2) = 0.;
202 return DerivativeMatrix;
211 TMatrixD* tparams =
new TMatrixD(
_nPar, 1 );
212 (*tparams)(0,0) = 1./vec.P();
213 (*tparams)(1,0) = vec.Theta();
214 (*tparams)(2,0) = vec.Phi();
const double Z[kNumberCalorimeter]
Geom::Theta< T > theta() const
TFitParticleMCPInvSpher()
void init(TVector3 *p, Double_t M, const TMatrixD *theCovMatrix)
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
virtual TLorentzVector * calc4Vec(const TMatrixD *params)
virtual TMatrixD * getDerivative()
virtual void setIni4Vec(const TLorentzVector *pini)
virtual TMatrixD * transform(const TLorentzVector &vec)
virtual ~TFitParticleMCPInvSpher()
virtual TAbsFitParticle * clone(TString newname="") const