1 #if !defined(__CINT__) || defined(__MAKECINT__)
3 #include "AliV0vertexer.h"
5 #include "TStopwatch.h"
8 #include "AliRunLoader.h"
9 #include "AliITSLoader.h"
12 extern AliRun *gAlice;
14 Int_t AliV0FindVertices(Int_t nev=5) {
15 cerr<<"Looking for V0 vertices...\n";
18 delete gAlice->GetRunLoader();
22 AliRunLoader* rl = AliRunLoader::Open("galice.root");
24 cerr<<"AliV0FindVertices.C : Can not open session RL=NULL"<< endl;
27 AliITSLoader* itsl = (AliITSLoader*)rl->GetLoader("ITSLoader");
29 cerr<<"AliV0FindVertices.C : Can not get ITS loader"<<endl;
32 itsl->LoadTracks("read");
33 itsl->LoadV0s("recreate");
35 Double_t cuts[]={33, // max. allowed chi2
36 0.16,// min. allowed negative daughter's impact parameter
37 0.05,// min. allowed positive daughter's impact parameter
38 0.080,// max. allowed DCA between the daughter tracks
39 0.998,// max. allowed cosine of V0's pointing angle
40 0.9, // min. radius of the fiducial volume
41 2.9 // max. radius of the fiducial volume
44 AliV0vertexer vtxer(cuts);
46 if (nev>rl->GetNumberOfEvents()) nev=rl->GetNumberOfEvents();
47 for (Int_t i=0; i<nev; i++) {
49 //Double_t vtx[3]={0.,0.,0.}; vtxer.SetVertex(vtx); // primary vertex (cm)
51 TTree *tTree=itsl->TreeT();
53 cerr<<"AliV0FindVertices.C : Can't get the ITS track tree !"<<endl;
56 TTree *vTree=itsl->TreeV0();
62 rc=vtxer.Tracks2V0vertices(tTree,vTree);
64 itsl->WriteV0s("OVERWRITE");
66 timer.Stop(); timer.Print();