Renamed macro test.C in runtracker.C
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 May 2002 19:46:03 +0000 (19:46 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 May 2002 19:46:03 +0000 (19:46 +0000)
HLT/exa/Binary.C
HLT/exa/Display.C
HLT/exa/display.C
HLT/exa/rootlogon.C
HLT/exa/runtracker.C [new file with mode: 0644]
HLT/exa/test.C [deleted file]

index 49b7ca0c9891547dfae7dd440a9cc61529603fdc..b176e7993669a4800feda09a5ee0710dd7411c82 100644 (file)
@@ -7,7 +7,6 @@ Macro for converting AliRoot digits into L3 RawData. Binary create for each patc
 Binary(char* in,int first, int last,char *path="."){
   char name[256];
   const Int_t npatch = 6;
-  Int_t row[npatch][2] = {{0,31},{32,63},{64,91},{92,119},{120,143},{144,175}};
   AliL3Logger l;
   //l.UnSet(AliL3Logger::kDebug);
   //l.UnSet(AliL3Logger::kAll);
@@ -23,7 +22,7 @@ Binary(char* in,int first, int last,char *path="."){
     for(int patch=0;patch<npatch;patch++){
       cerr<<"reading slice: "<<slice<<" patch: "<<patch<<" and storing to: "<<path<<"digits_"<<slice<<"_"<<patch<<".raw"<<endl;
       fFileHandler->Free();
-      fFileHandler->Init(slice,patch,row[patch]);      
+      fFileHandler->Init(slice,patch);      
       sprintf(name,"%s/digits_%d_%d.raw",path,slice,patch);
       fFileHandler->SetBinaryOutput(name);
       fFileHandler->AliDigits2CompBinary();
index 063665df31918364e5fae164e61c5496e247e52b..2286b5fd5d754e9913ab72e154e2e41cba943416 100644 (file)
@@ -1,4 +1,10 @@
-void Display(char *trackfile=0,Bool_t rpoints = kFALSE,Bool_t tpoints = kTRUE)
+/**
+   Displays tracks and clusters read from a file. 
+   Functionality is now in AliL3Display. See also the
+   display.C macro.
+*/
+
+void Display(char *trackfile=0,Bool_t rpoints = kFALSE,Bool_t tpoints = kTRUE,Char_t *gfile="/prog/alice/data/GEO/alice.geom")
 {
 //  gROOT->Reset();
   Int_t minslice=0;
@@ -16,7 +22,6 @@ void Display(char *trackfile=0,Bool_t rpoints = kFALSE,Bool_t tpoints = kTRUE)
       fff[s][p] = new AliL3FileHandler();
       sprintf(fname,"points_%d_%d.raw",s,p);
       if(!fff[s][p]->SetBinaryInput(fname)){
-//        printf("no file %s\n",fname);
         delete fff[s][p];
         continue;
       }
@@ -121,7 +126,8 @@ void Display(char *trackfile=0,Bool_t rpoints = kFALSE,Bool_t tpoints = kTRUE)
          current_line->Draw("same");
        }
     }
-  TFile *geofile = new TFile("/prog/alice/data/GEO/alice.geom","READ");  
+
+  TFile *geofile = new TFile(gfile,"READ");  
   TGeometry *geom=(TGeometry*)geofile->Get("AliceGeom");
   geom->Draw("same");
   
index 81c4f17580ca3671fe29180dcd435f7a3acc72b8..a7537bb38208df5c694296dd8d6222132a77d379 100644 (file)
@@ -1,24 +1,29 @@
-void display(int minslice,int maxslice,char *file="")
+/**
+   Macro for displaying L3 cluster/track or raw data. 
+   Uses the AliL3Display class. 
+*/
+
+void display(int minslice,int maxslice,char *file="tracks.raw",char *path="./",char *gfile="$(LEVEL3)/GEO/alice.geom")
 {
   AliL3Logger l;
-//  l.UnSet(AliL3Logger::kDebug);
-//  l.UnSet(AliL3Logger::kAll);
-//  l.Set(AliL3Logger::kInformational);
+  //l.UnSet(AliL3Logger::kDebug);
+  //l.UnSet(AliL3Logger::kAll);
+  //l.Set(AliL3Logger::kInformational);
   //l.UseStdout();
-   l.UseStream();
-   
-  gStyle->SetOptStat(0);
+  l.UseStream();
 
+  gStyle->SetOptStat(0);
   int slice[2] = {minslice,maxslice};
 
-  a = new AliL3Display(slice);
-  a->Setup("tracks.raw","./");
+  a = new AliL3Display(slice,gfile);
+  a->Setup(file,path);
   //a->Setup("/prog/alice/data/Rawdata/1_patch/pp/recon_6/tracks.raw","/prog/alice/data/Rawdata/1_patch/pp/recon_6/");
+
   //a->DisplayAll();
   a->DisplayTracks();
   //a->DisplayClusters();
-  //a->DisplayClusterRow(1,151,file,"colz");
 
+  //a->DisplayClusterRow(1,151,file,"colz");
 }
 
 
index 47e0ccf031cda98cf5257749822cb932b2d6be1f..5433838594e9043dbf3f92aa118edba58145b0bf 100644 (file)
@@ -7,17 +7,30 @@
 
   if(1)
     {
-      gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTEER");
-      gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libCONTAINERS");
-      gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTPC");
+      if(getenv("MLUCDIR")) {
+        gSystem->Load("$(ALICE_ROOT)/lib/libSTEER");
+        gSystem->Load("$(ALICE_ROOT)/lib/libCONTAINERS");
+        gSystem->Load("$(ALICE_ROOT)/lib/libTPC");
+      } else {
+        gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTEER");
+        gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libCONTAINERS");
+        gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTPC");
+      }
       cout<<"TPC libraries loaded"<<endl;
     }
   if(1)
     {
-      gSystem->Load("$(LEVEL3)/kip/MLUC/lib/linux-i386/libMLUC.so");
-      gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3");
-      gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Hough");
-      gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Comp");
+      if(getenv("MLUCDIR")) {
+        gSystem->Load("$(MLUCDIR/lib/linux-i386/libMLUC");
+        gSystem->Load("$(TOPDIR)/lib_ALIROOT/libAliL3");
+        gSystem->Load("$(TOPDIR)/lib_ALIROOT/libAliL3Hough");
+        gSystem->Load("$(TOPDIR)/lib_ALIROOT/libAliL3Comp");
+      } else {
+        gSystem->Load("$(LEVEL3)/kip/MLUC/lib/linux-i386/libMLUC.so");
+        gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3");
+        gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Hough");
+        gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Comp");
+      }
       cout<<"HLT libraries loaded"<<endl;
     }
 
diff --git a/HLT/exa/runtracker.C b/HLT/exa/runtracker.C
new file mode 100644 (file)
index 0000000..6129628
--- /dev/null
@@ -0,0 +1,70 @@
+/**
+   Run this macro for cluster finder and track follower (see steering class
+   AliLevel3. 
+*/
+
+void runtracker(int minslice,int maxslice,char* path=0,char *rootfile=0,int nevent=1)
+{
+  AliL3Logger l;
+  l.Set(AliL3Logger::kAll);
+  l.UseStdout();
+  //l.UseStream();
+
+  char path_to_use[1024];
+  if(!path) 
+    strcpy(path_to_use,"/usr/local/anders/data/hg_42105_s1-3/");
+  //strcpy(path_to_use,"/prog/alice/data/Rawdata/6_patch/hg_1000_s1-3/");
+  //strcpy(path_to_use,"/prog/alice/data/Rawdata/6_patch/1track_s1/");
+  //strcpy(path_to_use,"/prog/alice/data/Rawdata/6_patch/pp/event_0/");
+  //strcpy(path_to_use,"/prog/alice/data/Rawdata/1_patch/pp/pileups/event_1/");
+  else strcpy(path_to_use,path);
+
+  //AliL3Transform::Init(path_to_use);  
+
+  Int_t phi_segments,eta_segments,trackletlength,tracklength;
+  Int_t rowscopetracklet,rowscopetrack;
+  Double_t min_pt_fit,maxangle,goodDist,hitChi2Cut;
+  Double_t goodHitChi2,trackChi2Cut,maxphi,maxeta;
+
+  for(Int_t ev=0; ev<nevent; ev++)
+    {
+      if(!rootfile)
+       a = new AliLevel3();
+      else
+       a = new AliLevel3(rootfile);
+
+      a->Init(path_to_use);
+
+      phi_segments = 50;
+      eta_segments = 100;
+      trackletlength = 3;
+      tracklength = 5;
+      rowscopetracklet = 2;
+      rowscopetrack = 2;
+      min_pt_fit = 0;
+      maxangle = 1.31;
+      goodDist = 5;
+      maxphi=100;
+      maxeta=100;
+      hitChi2Cut = 100;
+      goodHitChi2 = 20;
+      trackChi2Cut = 50;
+       
+      //main vertex tracking parameters:
+      a->SetTrackerParam(phi_segments,eta_segments,trackletlength,tracklength,
+                        rowscopetracklet,rowscopetrack,
+                        min_pt_fit,maxangle,goodDist,hitChi2Cut,
+                        goodHitChi2,trackChi2Cut,50,maxphi,maxeta,kTRUE);
+
+      //a->DoRoi();    /*do region of interest*/
+      //a->DoMc();     /*do monte carlo identification*/
+      a->WriteFiles(); /*enable output*/
+
+      a->ProcessEvent(minslice,maxslice);
+      //a->DoBench("benchmark_0");
+
+      delete a;
+    }
+}
+
+
diff --git a/HLT/exa/test.C b/HLT/exa/test.C
deleted file mode 100644 (file)
index 32ce0d2..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-void test(int minslice,int maxslice,char *rootfile=0,int nevent=1)
-{
-  AliL3Logger l;
-  l.Set(AliL3Logger::kAll);
-  l.UseStdout();
-  l.UseStream();
-  
-  for(Int_t ev=0; ev<nevent; ev++)
-    {
-      if(!rootfile)
-       a = new AliLevel3();
-      else
-       a = new AliLevel3(rootfile);
-
-      //a->Init("/usr/local/anders/data/hg_42105_s1-3/");
-      a->Init("/prog/alice/data/Rawdata/6_patch/hg_1000_s1-3/");
-      //a->Init("/prog/alice/data/Rawdata/6_patch/1track_s1/");
-      //a->Init("/prog/alice/data/Rawdata/6_patch/pp/event_0/");
-      //a->Init("/prog/alice/data/Rawdata/1_patch/pp/pileups/event_1/");
-
-      //  a->DoRoi();
-      //a->DoMc();
-      
-      Int_t phi_segments,eta_segments,trackletlength,tracklength;
-      Int_t rowscopetracklet,rowscopetrack;
-      Double_t min_pt_fit,maxangle,goodDist,hitChi2Cut;
-      Double_t goodHitChi2,trackChi2Cut,maxphi,maxeta;
-      
-      phi_segments = 50;//50;
-      eta_segments = 100;//100;
-      trackletlength = 3;
-      tracklength = 5;
-      rowscopetracklet = 2;
-      rowscopetrack = 2;
-      min_pt_fit = 0;
-      maxangle = 1.31;
-      goodDist = 5;
-      maxphi=100;
-      maxeta=100;
-      hitChi2Cut = 100;
-      goodHitChi2 = 20;
-      trackChi2Cut = 50;
-       
-      //main vertex tracking parameters:
-       a->SetTrackerParam(phi_segments,eta_segments,trackletlength,tracklength,
-                        rowscopetracklet,rowscopetrack,
-                        min_pt_fit,maxangle,goodDist,hitChi2Cut,
-                        goodHitChi2,trackChi2Cut,50,maxphi,maxeta,kTRUE);
-      
-       a->WriteFiles();
-       a->ProcessEvent(minslice,maxslice);
-       //a->DoBench("benchmark_0");
-       delete a;
-    }
-  
-}