]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Smaller changes to make macros work with newest lib version. Also added some comments.
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Jul 2002 08:55:51 +0000 (08:55 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Jul 2002 08:55:51 +0000 (08:55 +0000)
HLT/exa/Binary.C
HLT/exa/Display.C
HLT/exa/Eval.C
HLT/exa/Make_Init.C
HLT/exa/display.C
HLT/exa/eval.C
HLT/exa/read.C
HLT/exa/rootlogon.C
HLT/exa/runhough.C
HLT/exa/runtracker.C
HLT/exa/trigger_pp.C

index 3638bc961d3ad4d1779ee36656b3147c28792cd8..649a775a8f93c4d1ae12f4492fb098de0c684c59 100644 (file)
@@ -1,10 +1,18 @@
-/* $Id$ */
+// $Id$
 
 /**
-Macro for converting AliRoot digits into L3 RawData. Binary create for each patch its own file. singlepatch uses one file per slice. 
- */
+   Macro for converting AliRoot digits into L3 RawData. 
+   Binary creates for each patch its own file. 
+   Singlepatch uses one file per slice (sp=kTRUE). 
+*/
+
+Binary(char* in,int first, int last,char *path=".",Bool_t sp=kFALSE){
+
+  if(sp) {
+    singlepatch(in,first,last,path);
+    return;
+  }
 
-Binary(char* in,int first, int last,char *path="."){
   char name[256];
   const Int_t npatch = 6;
   AliL3Logger l;
@@ -39,8 +47,8 @@ void singlepatch(char* in,int first=0, int last=0,char *path=".",int event=0)
   //l.UnSet(AliL3Logger::kDebug);
   //l.UnSet(AliL3Logger::kAll);
   //l.Set(AliL3Logger::kInformational);
-  //l.UseStdout();
-  l.UseStream();
+  l.UseStdout();
+  //l.UseStream();
   
   char name[256];
   AliL3FileHandler *fFileHandler = new AliL3FileHandler(); 
index 2286b5fd5d754e9913ab72e154e2e41cba943416..6bc527688f5aae0579274767579ae32d60438ef5 100644 (file)
@@ -1,7 +1,8 @@
+// $Id$
+
 /**
    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")
index 06db20474df5261f86a30a84fc470c1ad5a8062b..3c0f25b150c6b7d9c2ef5f38f03975386e084521 100644 (file)
@@ -1,6 +1,7 @@
+// $Id$
+
 void Eval(char *rootfile="")
 {
-
   AliL3Logger l;
 //  l.UnSet(AliL3Logger::kDebug);
 //  l.UnSet(AliL3Logger::kAll);
@@ -8,14 +9,12 @@ void Eval(char *rootfile="")
   l.UseStdout();
   //l.UseStream();
     
-  int slice[2] = {1,3};
+  int slice[2] = {0,35};
   e = new AliL3Evaluate(rootfile,slice);
   e->SetupSlow("tracks.raw",".");
   //e->SetupFast("tracks.raw","/nfs/david/subatom/alice/data/V3.04/fast/clusters/hg_8k_v0_s1-3_e0_cl.root",".");
   
-  ntuppel = (TNtuple*)e->EvaluatePoints();
-  
-
+  TNtuple *ntuppel = (TNtuple*)e->EvaluatePoints();
   file = new TFile("CFeval_nodeconv.root","RECREATE");
   file->cd();
   ntuppel->Write();
@@ -29,11 +28,9 @@ void plotPt(char *rootfile)
   gStyle->SetOptStat(0);
   gStyle->SetOptFit(1100);  
   
-  
   c = new TCanvas("c","",2);
   SetCanvasOptions(c);
   
-
   f1 = new TFile(rootfile);
 
   hist = new TH1F("hist","",50,-10,10);
@@ -47,13 +44,10 @@ void plotPt(char *rootfile)
   
   TF1 *f = new TF1("f","gaus",-rms,rms);
   hist->Fit("f","R");
-  
-  
 }
 
 void plot(char *rootfile)
 {
-
   gStyle->SetStatColor(10);
   gStyle->SetOptStat(1);
   gStyle->SetOptFit(1);
@@ -62,7 +56,6 @@ void plot(char *rootfile)
   hist = new TH1F("hist","",100,-0.6,0.6);
   SetTH1Options(hist);
   
-
   can = new TCanvas("can","Residuals",900,600);
   can->Divide(2);
   SetCanvasOptions(can);
@@ -85,8 +78,7 @@ void plot(char *rootfile)
   can->cd(2);
   ntuppel_fast->Draw("residual_trans>>hist2","nHits>100 && pt>1.0 && padrow > 0 && zHit < 50");//dipangle < 20*3.1415/180");
   
-    
   can->Update();
-  
-
 }
+
+
index 43ec8b8b535cf2bc1b75113ffb564734c026f2f8..7ba3d912040901394ea9930ea4d7b1942aa24051 100644 (file)
@@ -1,8 +1,9 @@
-/** $Id$ 
+// $Id$ 
 
-Important macro to get certain Aliroot parameters. They are stored
-in a file "Init.cxx". New init of AliL3Transform uses output to read certain 
-TPC parameters.
+/**
+   Important macro to get certain Aliroot parameters. They are stored
+   in a file "Init.cxx". New init of AliL3Transform uses output to read certain
+   TPC parameters.
 */
 
 void Make_Init(char *file, char *tofile="Init.cxx"){
index a7537bb38208df5c694296dd8d6222132a77d379..3f65eb559a8e5fefec63886fc300313f3673004a 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 /**
    Macro for displaying L3 cluster/track or raw data. 
    Uses the AliL3Display class. 
index 6680c36ad789b622ba8aaefff83283ad2aaff286..b8225b75ddbc28f3525b0cfe0e53d1bdc6240eec 100644 (file)
@@ -1,7 +1,7 @@
+// $Id$
+
 void eval(char *inFile)
 {
-
-
   // Connect the Root Galice file containing Geometry, Kine and Hits
 
   file = new TFile(inFile);
index de7d33aa5a3d88f7feb2ecc984c164127f65c752..a21b925b100112fb3712acc13bdaaa5e4f5230c2 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 void read(int min=0,int max=35)
 {
 
index 795030096898b1c84087fb5ad24d6ca37f295005..b2f33383881052bbdb3eab956fe39e6ca4d550e5 100644 (file)
@@ -1,4 +1,3 @@
-
 {
   printf("\nWELCOME to the magic world of Level3\n\n"); 
 
       }
       cout<<"TPC libraries loaded"<<endl;
     }
-  if(0)
+
+  if(1)
     {
       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");
+        gSystem->Load("$(TOPDIR)/lib_$(USEPACKAGE)/libAliL3");
+        gSystem->Load("$(TOPDIR)/lib_$(USEPACKAGE)/libAliL3Misc");
+        gSystem->Load("$(TOPDIR)/lib_$(USEPACKAGE)/libAliL3Hough");
+        gSystem->Load("$(TOPDIR)/lib_$(USEPACKAGE)/libAliL3Comp");
       } else {
         gSystem->Load("$(LEVEL3)/kip/MLUC/lib/linux-i386/libMLUC.so");
         gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3");
+        gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Misc");
         gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Hough");
         gSystem->Load("$(LEVEL3)/lib_$(USERNAME)/libAliL3Comp");
       }
index 7daaf6beb8d046b05e9b60415a3c0816e9c27a18..5c69027d32c11ecc38e850c760c43bef9abe98e1 100644 (file)
@@ -1,8 +1,16 @@
-void runhough(Int_t slice,Char_t *path,Int_t n_eta_segments)
+// $Id$
+
+/**
+   Shows how to use the hough code. Stores tracks parameters
+   in files.
+*/
+
+void runhough(Int_t slice,Char_t *path,Int_t n_eta_segments,Int_t vseg=-1)
 {
   
-  AliL3Transform::Init("/prog/alice/data/new/fixed-slice0/");
-  
+  //AliL3Transform::Init("/prog/alice/data/new/fixed-slice0/");
+  AliL3Transform::Init(path);  
+
   hough = new AliL3Hough();
   Bool_t binary = kTRUE;
   Bool_t bit8 = kTRUE;
@@ -22,11 +30,12 @@ void runhough(Int_t slice,Char_t *path,Int_t n_eta_segments)
       track = (AliL3HoughTrack*)tracks->GetCheckedTrack(i);
       if(!track) continue;
       cout<<"pt "<<track->GetPt()<<" psi "<<track->GetPsi()<<" eta "<<track->GetEta()<<" etaindex "<<track->GetEtaIndex()<<" weight "<<track->GetWeight()<<endl;
+      if(vseg==-1) vseg=track->GetEtaIndex();
     }
   
   hough->WriteTracks(slice);
-  cout<<"Found in total "<<tracks->GetNTracks()<<" tracks"<<endl;
-  display(hough,25);
+  cout<<"Found in slice " << slice << " total "<<tracks->GetNTracks()<<" tracks"<<endl;
+  display(hough,vseg);
   
 }
 
index 6129628c5d9cc05e5bcd2e9a88aae1b5c9991777..ce1f383483227b2747aedd2f918ceb1186ed3c68 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 /**
    Run this macro for cluster finder and track follower (see steering class
    AliLevel3. 
@@ -35,20 +37,20 @@ void runtracker(int minslice,int maxslice,char* path=0,char *rootfile=0,int neve
 
       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;
+      phi_segments = 50;   //devide the space into phi_segments and eta_segments
+      eta_segments = 100;  //to access the search of points to that area!
+      trackletlength = 3;  //number of hits a tracklet has to have
+      tracklength = 5;     //number of hits a track has to have 
+      rowscopetracklet = 2;//search range of rows for a tracklet
+      rowscopetrack = 2;   //search range of rows for a track
+      min_pt_fit = 0;      
+      maxangle = 1.31;     //maximum angle for the three point look ahead
+      goodDist = 5;        //threshold distance between two hits when building tracklets
+      maxphi=100;          //maximum phi difference for neighboring hits
+      maxeta=100;          //maximum eta difference for neighboring hits
+      hitChi2Cut = 100;    //maximum chi2 of added hit to track
+      goodHitChi2 = 20;    //stop looking for next hit to add if chi2 is less than goodHitChi2
+      trackChi2Cut = 50;   //maximum chi2 for track after final fit
        
       //main vertex tracking parameters:
       a->SetTrackerParam(phi_segments,eta_segments,trackletlength,tracklength,
index ddec0eea9fb11d676ab23532a3bfadc749a3c19a..2eab2fb38eaa3e90e66baf6334dbf3efc92d8cfa 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 void trigger_pp(char *outfile="results.root")
 {