]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliV0FindVertices.C
User stepping methods added (E. Futo)
[u/mrichter/AliRoot.git] / ITS / AliV0FindVertices.C
CommitLineData
ca28c5f5 1#ifndef __CINT__
548b1270 2 #include "Riostream.h"
ca28c5f5 3 #include "AliV0vertexer.h"
4 #include "TFile.h"
5 #include "TStopwatch.h"
6#endif
7
5d390eda 8Int_t AliV0FindVertices(Int_t nev=1) {
ca28c5f5 9 cerr<<"Looking for V0 vertices...\n";
10
11 TFile *out=TFile::Open("AliV0vertices.root","new");
12 if (!out->IsOpen()) {cerr<<"Delete old AliV0vertices.root !\n"; return 1;}
13
14 TFile *in=TFile::Open("AliITStracksV2.root");
15 if (!in->IsOpen()) {cerr<<"Can't open AliITStracksV2.root !\n"; return 2;}
16
17 Double_t cuts[]={33, // max. allowed chi2
04b2a5f1 18 0.16,// min. allowed negative daughter's impact parameter
19 0.05,// min. allowed positive daughter's impact parameter
ca28c5f5 20 0.080,// max. allowed DCA between the daughter tracks
21 0.998,// max. allowed cosine of V0's pointing angle
22 0.9, // min. radius of the fiducial volume
23 2.9 // max. radius of the fiducial volume
24 };
25 TStopwatch timer;
5d390eda 26 AliV0vertexer vtxer(cuts);
27 Int_t rc=0;
28 for (Int_t i=0; i<nev; i++) {
29 //Double_t vtx[3]={0.,0.,0.}; vtxer.SetVertex(vtx); // primary vertex (cm)
30 vtxer.SetEvent(i);
31 rc=vtxer.Tracks2V0vertices(in,out);
32 }
ca28c5f5 33 timer.Stop(); timer.Print();
34
35 in->Close();
36 out->Close();
37
38 return rc;
39}