SetMinTracks();
fTrksToSkip = 0;
fNTrksToSkip = 0;
- fDCAcut=0;
+
}
//----------------------------------------------------------------------------
AliITSVertexerTracks::AliITSVertexerTracks(TFile *inFile,TFile *outFile,
SetMinTracks();
fTrksToSkip = 0;
fNTrksToSkip = 0;
- fDCAcut=0;
SetDebug();
}
//----------------------------------------------------------------------------
SetMinTracks();
fTrksToSkip = 0;
fNTrksToSkip = 0;
- fDCAcut=0;
}
//______________________________________________________________________
AliITSVertexerTracks::AliITSVertexerTracks(const AliITSVertexerTracks &vtxr) : AliITSVertexer(vtxr) {
if(fDebug) {
printf(" PrepareTracks()\n");
- trkTree.Print();
+ // trkTree.Print();
}
for(Int_t i=0; i<nEntries; i++) {
track->PropagateTo(xlStart,field); // to vtxSeed
// select tracks with d0rphi < maxd0rphi
+
d0rphi = TMath::Abs(track->GetD(fNominalPos[0],fNominalPos[1],field));
if(d0rphi > maxd0rphi) { delete track; continue; }
+
fTrkArray.AddLast(track);
trkTree->Branch("tracks","AliESDtrack",&esdTrack);
for(Int_t i=0; i<entr; i++) {
- esdTrack = (AliESDtrack*)esdEvent->GetTrack(i);
+ AliESDtrack *et = esdEvent->GetTrack(i);
+ esdTrack = new AliESDtrack(*et);
if(!esdTrack->GetStatus()&AliESDtrack::kITSin) continue;
+ if(!esdTrack->GetStatus()&AliESDtrack::kITSrefit) continue;
+ Int_t nclus=esdTrack->GetNcls(0); // check number of clusters in ITS
+ if(nclus<5) continue;
+
trkTree->Fill();
}
delete esdTrack;
esdEvent->SetVertex(fCurrentVertex);
- cout<<"Vertex: "<<vtx[0]<<", "<<vtx[1]<<", "<<vtx[2]<<endl;
return fCurrentVertex;
}
//---------------------------------------------------------------------------
PrintStatus();
}
AliVertexerTracks *vertexer=new AliVertexerTracks(fNominalPos[0],fNominalPos[1]);
- vertexer->SetFinderAlgorithm(5);
+ vertexer->SetFinderAlgorithm(1);
AliVertex *thevert=(AliVertex*)vertexer->VertexForSelectedTracks(&fTrkArray);
Double_t initPos[3];
thevert->GetXYZ(initPos);
+ // cout<<"Finder: "<<initPos[0]<<"; "<<initPos[1]<<"; "<<initPos[2]<<endl;
delete vertexer;
void SetSkipTracks(Int_t n,Int_t *skipped);
void SetVtxStart(Double_t x=0,Double_t y=0)
{ fNominalPos[0]=x; fNominalPos[1]=y; return; }
- void SetDCAcut(Double_t maxdca)
- { fDCAcut=maxdca; return;}
private:
// copy constructor (NO copy allowed: the constructor is protected
TFile *fOutFile; // output file for vertices
Double_t fNominalPos[2]; // initial knowledge on vertex position
Int_t fMinTracks; // minimum number of tracks
- Double_t fDCAcut; // maximum DCA between 2 tracks used for vertex
Double_t fMaxChi2PerTrack; // maximum contribition to the chi2
TObjArray fTrkArray; // array with tracks to be processed
Int_t *fTrksToSkip; // tracks to be skipped for find and fit
// void VertexFinder(Int_t OptUseWeights=0);
void VertexFitter();
- ClassDef(AliITSVertexerTracks,2) // 3D Vertexing with ITS tracks
+ ClassDef(AliITSVertexerTracks,3) // 3D Vertexing with ITS tracks
};
#endif