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 = r*TMath::Cos(phi)*TMath::Sin(theta);
112 Double_t Y = r*TMath::Sin(phi)*TMath::Sin(theta);
113 Double_t
Z = 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.;
184 (*DerivativeMatrix)(0,0) = TMath::Cos(phi)*TMath::Sin(theta);
185 (*DerivativeMatrix)(1,0) = TMath::Sin(phi)*TMath::Sin(theta);
186 (*DerivativeMatrix)(2,0) = TMath::Cos(theta);
187 (*DerivativeMatrix)(3,0) = r/
_pcurr.E();
190 (*DerivativeMatrix)(0,1) = r*TMath::Cos(phi)*TMath::Cos(theta);
191 (*DerivativeMatrix)(1,1) = r*TMath::Sin(phi)*TMath::Cos(theta);
192 (*DerivativeMatrix)(2,1) = -1.*r*TMath::Sin(theta);
193 (*DerivativeMatrix)(3,1) = 0.;
196 (*DerivativeMatrix)(0,2) = -1.*r*TMath::Sin(phi)*TMath::Sin(theta);
197 (*DerivativeMatrix)(1,2) = r*TMath::Cos(phi)*TMath::Sin(theta);;
198 (*DerivativeMatrix)(2,2) = 0.;
199 (*DerivativeMatrix)(3,2) = 0.;
201 return DerivativeMatrix;
210 TMatrixD* tparams =
new TMatrixD(
_nPar, 1 );
211 (*tparams)(0,0) = vec.P();
212 (*tparams)(1,0) = vec.Theta();
213 (*tparams)(2,0) = vec.Phi();
const double Z[kNumberCalorimeter]
void init(TVector3 *p, Double_t M, const TMatrixD *theCovMatrix)
virtual TAbsFitParticle * clone(TString newname="") const
Geom::Theta< T > theta() const
virtual TMatrixD * getDerivative()
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
virtual TMatrixD * transform(const TLorentzVector &vec)
virtual ~TFitParticleMCSpher()
virtual void setIni4Vec(const TLorentzVector *pini)
virtual TLorentzVector * calc4Vec(const TMatrixD *params)