]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStestV2.C
Updated code for tracking V2 (from Y. Belikov)
[u/mrichter/AliRoot.git] / ITS / AliITStestV2.C
index 197a120545b3b988fa20ee881a53ce6e4be24475..afe92577aec9c66298ad83ad2e68127a22fd02bb 100644 (file)
@@ -1,6 +1,32 @@
-Int_t AliITStestV2() {
+Int_t AliITStestV2(Char_t SlowOrFast='s') {
    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(100/0.299792458/0.2/gAlice->Field()->Factor());
+   delete gAlice; gAlice=0;
+   in->Close();
+
+   if (SlowOrFast=='f') {
+      cerr<<"Fast AliITSRecPoint(s) !\n";
+      gROOT->LoadMacro("$(ALICE_ROOT)/ITS/ITSHitsToFastPoints.C");
+      ITSHitsToFastPoints();
+   } else {
+      cerr<<"Slow AliITSRecPoint(s) !\n";
+      gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSHits2Digits.C");
+      AliITSHits2Digits();
+      gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindClusters.C");
+      AliITSFindClusters();
+   }
+
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindClustersV2.C");
    if (rc=AliITSFindClustersV2()) return rc;