]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliCascadeComparison.C
silvermy@ornl.gov - SMcalib - directory with tools for SuperModule calibrations at...
[u/mrichter/AliRoot.git] / STEER / AliCascadeComparison.C
index 31a3085dbe30602527ee14b9636eb22ea3116a09..3c5b76c65d222c366f57a392ed6db656c6fabe31 100644 (file)
   #include "AliTrackReference.h"
   #include "AliRunLoader.h"
   #include "AliRun.h"
-  #include "AliESD.h"
+  #include "AliESDEvent.h"
+  #include "AliESDcascade.h"
 #else
-const Int_t kXiMinus    = 3312;
-const Int_t kXiPlusBar  = -3312;
-const Int_t kOmegaMinus = 3334;
-const Int_t kOmegaPlusBar = -3334;
+  const Int_t kXiMinus    = 3312;
+  const Int_t kXiPlusBar  = -3312;
+  const Int_t kOmegaMinus = 3334;
+  const Int_t kOmegaPlusBar = -3334;
 #endif
 
 Int_t GoodCascades(const Char_t *dir=".");
@@ -190,13 +191,13 @@ Int_t AliCascadeComparison(Int_t code=3312, const Char_t *dir=".") {
          return 5;
       }
    }
-   AliESD* event = new AliESD;
+   AliESDEvent* event = new AliESDEvent();
    TTree* esdTree = (TTree*) ef->Get("esdTree");
    if (!esdTree) {
       ::Error("AliCascadeComparison.C", "no ESD tree found");
       return 6;
    }
-   esdTree->SetBranchAddress("ESD", &event);
+   event->ReadFromTree(esdTree);
 
 
    //******* Loop over events *********
@@ -321,13 +322,14 @@ Int_t AliCascadeComparison(Int_t code=3312, const Char_t *dir=".") {
    } //**** End of the loop over events
 
    delete event;
+   delete esdTree;
    ef->Close();
 
    delete csTree;
    refFile->Close();
 
-   Stat_t ng=hgood->GetEntries(), nf=hfound->GetEntries();
-   if (ng!=0) cout<<"Integral efficiency is about "<<nf/ng*100.<<" %\n";
+   Stat_t ngg=hgood->GetEntries(), nf=hfound->GetEntries();
+   if (ngg!=0) cout<<"Integral efficiency is about "<<nf/ngg*100.<<" %\n";
    cout<<
    "Total number of found cascades: "<<allfound<<" ("<<nf<<" in the peak)\n";
    cout<<"Total number of \"good\" cascades: "<<allgood<<endl;