Updated code/macros to be compliant with the current HEAD (from Y. Belikov)
[u/mrichter/AliRoot.git] / ITS / AliITStestV2.C
index 197a120545b3b988fa20ee881a53ce6e4be24475..156df01178b3c61439e8e83b632f2e9e3967cf32 100644 (file)
@@ -1,8 +1,35 @@
-Int_t AliITStestV2() {
+Int_t AliITStestV2(Char_t SlowOrFast='s') {
    Int_t rc=0;
 
    Int_t rc=0;
 
+   if (gAlice) {delete gAlice; gAlice=0;}
+   TFile *in=TFile::Open("galice.root");
+   if (!in->IsOpen()) {
+      cerr<<"Can't open galice.root !\n"; 
+      return 1;
+   }
+   if (!(gAlice=(AliRun*)in->Get("gAlice"))) {
+      cerr<<"Can't find gAlice !\n";
+      return 2;
+   }
+   AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField());
+   delete gAlice; gAlice=0;
+   in->Close();
+
+   if (SlowOrFast=='f') {
+      cerr<<"Fast AliITSRecPoint(s) !\n";
+      gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSHits2FastRecPoints.C");
+      AliITSHits2FastRecPoints();
+   } else {
+      cerr<<"Slow AliITSRecPoint(s) !\n";
+      gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSHits2SDigits.C");
+      AliITSHits2SDigits();
+      gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSSDigits2Digits.C");
+      AliITSSDigits2Digits();
+      gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSDigits2RecPoints.C");
+      AliITSDigits2RecPoints();
+   }
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindClustersV2.C");
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindClustersV2.C");
-   if (rc=AliITSFindClustersV2()) return rc;
+   if (rc=AliITSFindClustersV2(SlowOrFast)) return rc;
 
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindTracksV2.C");
    if (rc=AliITSFindTracksV2()) return rc;
 
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindTracksV2.C");
    if (rc=AliITSFindTracksV2()) return rc;
@@ -10,5 +37,17 @@ Int_t AliITStestV2() {
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSComparisonV2.C");
    if (rc=AliITSComparisonV2()) return rc;
 
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSComparisonV2.C");
    if (rc=AliITSComparisonV2()) return rc;
 
+   gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliV0FindVertices.C");
+   if (rc=AliV0FindVertices()) return rc;
+
+   gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliV0Comparison.C");
+   if (rc=AliV0Comparison()) return rc;
+
+   gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliCascadeFindVertices.C");
+   if (rc=AliCascadeFindVertices()) return rc;
+
+   gROOT->ProcessLine(".L $(ALICE_ROOT)/ITS/AliCascadeComparison.C+");
+   if (rc=AliCascadeComparison()) return rc;
+
    return rc;
 }
    return rc;
 }