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);
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();
-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;
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;
}
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");
-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");
}
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;
}
--- /dev/null
+/**
+ 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;
+ }
+}
+
+
+++ /dev/null
-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;
- }
-
-}