55 init(pini, theCovMatrix);
59 TLorentzVector* pini,
const TMatrixD* theCovMatrix)
62 init(pini, theCovMatrix);
69 if ( newname.Length() > 0 ) myclone->SetName(newname);
100 if ( params->GetNcols() != 1 || params->GetNrows() !=
_nPar ) {
102 << GetName() <<
"::calc4Vec - Parameter matrix has wrong size.";
106 Double_t et = (*params)(0,0);
107 Double_t
theta = (*params)(1,0);
108 Double_t
phi = (*params)(2,0);
110 Double_t
X = et*TMath::Cos(phi);
111 Double_t Y = et*TMath::Sin(phi);
112 Double_t
Z = et/TMath::Tan(theta);
113 Double_t E = et/TMath::Sin(theta);
115 TLorentzVector* vec =
new TLorentzVector( X, Y, Z, E );
126 _u1.SetXYZ(0., 0., 0.);
127 _u3.SetXYZ(0., 0., 0.);
128 _u2.SetXYZ(0., 0., 0.);
129 _pini.SetXYZT(0., 0., 0., 0.);
144 Double_t et = pini->E()*std::fabs(
sin(pini->Theta()));
145 Double_t
theta = pini->Theta();
146 Double_t
phi = pini->Phi();
159 _u1.SetXYZ( TMath::Cos(phi), TMath::Sin(phi), 0.);
160 _u2.SetXYZ( TMath::Cos(phi)*TMath::Cos(theta), TMath::Sin(phi)*TMath::Cos(theta), -1.*TMath::Sin(theta) );
161 _u3.SetXYZ( -1.*TMath::Sin(phi), TMath::Cos(phi), 0. );
172 TMatrixD* DerivativeMatrix =
new TMatrixD(4,3);
173 (*DerivativeMatrix) *= 0.;
179 Double_t CotanTheta = 1./TMath::Tan(theta);
182 (*DerivativeMatrix)(0,0) = TMath::Cos(phi);
183 (*DerivativeMatrix)(1,0) = TMath::Sin(phi);
184 (*DerivativeMatrix)(2,0) = CotanTheta;
185 (*DerivativeMatrix)(3,0) = 1./TMath::Sin(theta);
188 (*DerivativeMatrix)(0,1) = 0.;
189 (*DerivativeMatrix)(1,1) = 0.;
190 (*DerivativeMatrix)(2,1) = -1.*et*(1.+CotanTheta*CotanTheta);
191 (*DerivativeMatrix)(3,1) = -1.*et*CotanTheta/(TMath::Sin(theta));
194 (*DerivativeMatrix)(0,2) = -1.*et*TMath::Sin(phi);
195 (*DerivativeMatrix)(1,2) = et*TMath::Cos(phi);
196 (*DerivativeMatrix)(2,2) = 0.;
197 (*DerivativeMatrix)(3,2) = 0.;
199 return DerivativeMatrix;
208 TMatrixD* tparams =
new TMatrixD(
_nPar, 1 );
209 (*tparams)(0,0) = vec.E()*std::fabs(
sin(vec.Theta()));
210 (*tparams)(1,0) = vec.Theta();
211 (*tparams)(2,0) = vec.Phi();
const double Z[kNumberCalorimeter]
virtual ~TFitParticleEtThetaPhi()
virtual void setIni4Vec(const TLorentzVector *pini)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
virtual TLorentzVector * calc4Vec(const TMatrixD *params)
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
virtual TAbsFitParticle * clone(const TString &newname="") const
virtual TMatrixD * transform(const TLorentzVector &vec)
void init(TLorentzVector *pini, const TMatrixD *theCovMatrix)
virtual TMatrixD * getDerivative()