fMaxd0z0(0.5),
fITSin(kTRUE),
fITSrefit(kTRUE),
+fnSigmaForUi00(1.5),
fDebug(0)
{
//
// Default constructor
//
- SetVtxStartPos();
+ SetVtxStart();
SetVtxStartSigma();
SetMinTracks();
SetMinITSClusters();
fMaxd0z0(0.5),
fITSin(kTRUE),
fITSrefit(kTRUE),
+fnSigmaForUi00(1.5),
fDebug(0)
{
//
// Standard constructor
//
- SetVtxStartPos();
+ SetVtxStart();
SetVtxStartSigma();
SetMinTracks();
SetMinITSClusters();
} // end loop on the two iterations
- // take true pos from SPD vertex in ESD and write it in tracks' vertex
- Double_t tp[3];
- esdEvent->GetVertex()->GetTruePos(tp);
- fCurrentVertex->SetTruePos(tp);
-
if(fConstraint) {
if(fOnlyFitter) {
fCurrentVertex->SetTitle("VertexerTracksWithConstraintOnlyFitter");
// store data in the vertex object
AliESDVertex *outVtx = new AliESDVertex(position,cov,chi2,nUsedTrks);
outVtx->SetTitle(inVtx->GetTitle());
- Double_t tp[3];
- inVtx->GetTruePos(tp);
- outVtx->SetTruePos(tp);
UShort_t *inindices = inVtx->GetIndices();
UShort_t *outindices = new UShort_t[outVtx->GetNContributors()];
Int_t j=0;
t->GetPxPyPz(p);
pt = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]);
ptot = TMath::Sqrt(pt*pt+p[2]*p[2]);
- Double_t cp = p[0]/pt; //cos(phi)=px/pt
- Double_t sp = p[1]/pt; //sin(phi)=py/pt
- Double_t ct = p[2]/ptot; //cos(theta)=pz/ptot
- Double_t st = TMath::Sqrt(1.-ct*ct); //sin(theta)
+ Double_t cphi = p[0]/pt; //cos(phi)=px/pt
+ Double_t sphi = p[1]/pt; //sin(phi)=py/pt
+ Double_t clambda = pt/ptot; //cos(lambda)=pt/ptot
+ Double_t slambda = p[2]/ptot; //sin(lambda)=pz/ptot
Double_t covfVert[6];
fVert.GetCovMatrix(covfVert);
Double_t covfVertalongt =
- covfVert[0]*cp*cp*ct*ct
- +covfVert[1]*2.*cp*sp*ct*ct
- +covfVert[3]*2.*cp*ct*st
- +covfVert[2]*sp*sp*ct*ct
- +covfVert[4]*2.*sp*ct*st
- +covfVert[5]*st*st;
+ covfVert[0]*cphi*cphi*clambda*clambda
+ +covfVert[1]*2.*cphi*sphi*clambda*clambda
+ +covfVert[3]*2.*cphi*clambda*slambda
+ +covfVert[2]*sphi*sphi*clambda*clambda
+ +covfVert[4]*2.*sphi*clambda*slambda
+ +covfVert[5]*slambda*slambda;
Double_t cc[15];
t->GetExternalCovariance(cc);
// covariance matrix of local (x,y,z) - inverted
TMatrixD uUi(3,3);
- Double_t nSigma = 2.;
- uUi(0,0) = covfVertalongt * nSigma * nSigma;
+ uUi(0,0) = covfVertalongt * fnSigmaForUi00 * fnSigmaForUi00;
if(fDebug) printf("=====> sqrtUi00 cm %f\n",TMath::Sqrt(uUi(0,0)));
uUi(0,1) = 0.;
uUi(0,2) = 0.;
fCurrentVertex = new AliESDVertex(pos,err);
fCurrentVertex->SetNContributors(ncontr);
- Double_t tp[3];
- esdEvent->GetVertex()->GetTruePos(tp);
- fCurrentVertex->SetTruePos(tp);
if(fConstraint) {
fCurrentVertex->SetTitle("VertexerTracksWithConstraint");
} else {
printf("--- VertexFitter(): start\n");
printf(" Number of tracks in array: %d\n",nTrks);
printf(" Minimum # tracks required in fit: %d\n",fMinTracks);
- if(!fOnlyFitter) printf(" Vertex position after finder: %f,%f,%f\n",initPos[0],initPos[1],initPos[2]);
+ printf(" Vertex position after finder: %f,%f,%f\n",initPos[0],initPos[1],initPos[2]);
if(useConstraint) printf(" This vertex will be used in fit: (%f+-%f,%f+-%f)\n",fNominalPos[0],TMath::Sqrt(fNominalCov[0]),fNominalPos[1],TMath::Sqrt(fNominalCov[2]));
}
// vertex fitter
if(optUseFitter){
+ //SetVtxStart(&fVert);
VertexFitter(fConstraint);
if(fDebug) printf(" Vertex fit completed\n");
}else{
void SetOnlyFitter() { if(!fConstraint) AliFatal("Set constraint first!");
fOnlyFitter=kTRUE; return; }
void SetSkipTracks(Int_t n,Int_t *skipped);
- void SetVtxStartPos(Double_t x=0,Double_t y=0,Double_t z=0)
+ void SetVtxStart(Double_t x=0,Double_t y=0,Double_t z=0)
{ fNominalPos[0]=x; fNominalPos[1]=y; fNominalPos[2]=z; return; }
void SetVtxStartSigma(Double_t sx=3.,Double_t sy=3.,Double_t sz=15.)
{ fNominalCov[0]=sx*sx; fNominalCov[2]=sy*sy; fNominalCov[5]=sz*sz;
Double_t GetFieldkG() const {
if(fFieldkG<-99.) AliFatal("Field value not set");
return fFieldkG; }
+ void SetNSigmaForUi00(Double_t n=1.5) { fnSigmaForUi00=n; return; }
+ Double_t GetNSigmaForUi00() const { return fnSigmaForUi00; }
protected:
void HelixVertexFinder();
// if kFALSE, use all tracks (also TPC only)
Bool_t fITSrefit; // if kTRUE (default), use only kITSrefit tracks
// if kFALSE, use all tracks (also TPC only)
+ Double_t fnSigmaForUi00; // n. sigmas from finder in TrackToPoint
Int_t fDebug; //! debug flag - verbose printing if >0
// fAlgo=1 (default) finds minimum-distance point among all selected tracks
// approximated as straight lines
// fAlgo=5 finds the average point among DCA points of all pairs of tracks
// approximated as straight lines
+
private:
AliVertexerTracks(const AliVertexerTracks & source);
AliVertexerTracks & operator=(const AliVertexerTracks & source);
- ClassDef(AliVertexerTracks,8) // 3D Vertexing with ESD tracks
+ ClassDef(AliVertexerTracks,9) // 3D Vertexing with ESD tracks
};
#endif