]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliV0FindVertices.C
Removing obsolete macros
[u/mrichter/AliRoot.git] / ITS / AliV0FindVertices.C
index b2e1cb57b16b1573f2ad1e5988bee786239087b0..61a423d2c022f3651a04665dcdf50fd7d5322f63 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef __CINT__
-  #include <iostream.h>
+  #include "Riostream.h"
   #include "AliV0vertexer.h"
   #include "TFile.h"
   #include "TStopwatch.h"
 #endif
 
-Int_t AliV0FindVertices() {
+Int_t AliV0FindVertices(Int_t nev=1) {
    cerr<<"Looking for V0 vertices...\n";
 
    TFile *out=TFile::Open("AliV0vertices.root","new");
@@ -15,17 +15,21 @@ Int_t AliV0FindVertices() {
    if (!in->IsOpen()) {cerr<<"Can't open AliITStracksV2.root !\n"; return 2;}
 
    Double_t cuts[]={33,  // max. allowed chi2
-                    0.12,// min. allowed negative daughter's impact parameter 
-                    0.06,// min. allowed positive daughter's impact parameter 
+                    0.16,// min. allowed negative daughter's impact parameter 
+                    0.05,// min. allowed positive daughter's impact parameter 
                     0.080,// max. allowed DCA between the daughter tracks
                     0.998,// max. allowed cosine of V0's pointing angle
                     0.9,  // min. radius of the fiducial volume
                     2.9   // max. radius of the fiducial volume
                    };
    TStopwatch timer;
-   AliV0vertexer *vertexer=new AliV0vertexer(cuts);
-   Int_t rc=vertexer->Tracks2V0vertices(in,out);
-   delete vertexer;
+   AliV0vertexer vtxer(cuts);
+   Int_t rc=0;
+   for (Int_t i=0; i<nev; i++) {
+     //Double_t vtx[3]={0.,0.,0.}; vtxer.SetVertex(vtx); // primary vertex (cm)
+     vtxer.SetEvent(i);
+     rc=vtxer.Tracks2V0vertices(in,out);
+   }
    timer.Stop(); timer.Print();
     
    in->Close();