1 #if !defined(__CINT__) || defined(__MAKECINT__)
3 #include "AliCascadeVertexer.h"
5 #include "TStopwatch.h"
8 #include "AliRunLoader.h"
9 #include "AliITSLoader.h"
12 Int_t AliCascadeFindVertices(Int_t nev=5) {
13 cerr<<"Looking for cascade vertices...\n";
16 delete gAlice->GetRunLoader();
20 AliRunLoader* rl = AliRunLoader::Open("galice.root");
22 cerr<<"AliCascadeFindVertices.C : Can not open session RL=NULL"<< endl;
25 AliITSLoader* itsl = (AliITSLoader*)rl->GetLoader("ITSLoader");
27 cerr<<"AliCascadeFindVertices.C : Can not get ITS loader"<<endl;
30 itsl->LoadTracks("read");
31 itsl->LoadV0s("read");
32 itsl->LoadCascades("recreate");
34 Double_t cuts[]={33., // max. allowed chi2
35 0.05, // min. allowed V0 impact parameter
36 0.008, // window around the Lambda mass
37 0.035, // min. allowed bachelor's impact parameter
38 0.10, // max. allowed DCA between a V0 and a track
39 0.9985, // max. allowed cosine of the cascade pointing angle
40 0.9, // min. radius of the fiducial volume
41 2.9 // max. radius of the fiducial volume
44 AliCascadeVertexer *vertexer=new AliCascadeVertexer(cuts);
46 if (nev>rl->GetNumberOfEvents()) nev=rl->GetNumberOfEvents();
47 for (Int_t i=0; i<nev; i++) {
50 TTree *tTree=itsl->TreeT();
52 cerr<<"AliCascadeFindVertices.C : Can't get the ITS track tree !"<<endl;
55 TTree *vTree=itsl->TreeV0();
57 cerr<<"AliCascadeFindVertices.C : Can't get the V0 tree !"<<endl;
60 TTree *xTree=itsl->TreeX();
66 rc=vertexer->V0sTracks2CascadeVertices(vTree,tTree,xTree);
68 itsl->WriteCascades("OVERWRITE");
71 timer.Stop(); timer.Print();