Removing old scripts no longer used.
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Apr 2002 15:32:19 +0000 (15:32 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Apr 2002 15:32:19 +0000 (15:32 +0000)
HLT/hough/hough.C [deleted file]
HLT/hough/hough_line.C [deleted file]
HLT/hough/hough_line_merge.C [deleted file]
HLT/hough/hough_merge.C [deleted file]
HLT/hough/hough_mergehistos.C [deleted file]
HLT/hough/rootlogon.C [deleted file]
HLT/hough/test.C [deleted file]
HLT/hough/testPF.C [deleted file]

diff --git a/HLT/hough/hough.C b/HLT/hough/hough.C
deleted file mode 100644 (file)
index d74be95..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-void hough(char *rootfile,int patch,Bool_t MC=false)
-{
-  gStyle->SetOptStat(0);
-  
-  Int_t xbin = 60;
-  Int_t ybin = 60;
-  Float_t xrange[2] = {-0.006 , 0.006}; //Pt 0.2->
-  //Float_t yrange[2] = {-0.17 , 0.17}; //slice 2 0.55->0.88
-  Float_t yrange[2] = {-0.26 , 0.26};// -15 - 15
-  //Float_t yrange[2] = {0.55 , 0.88}; //slice 2 0.55->0.88
-  TH2F *hist = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  hist->GetXaxis()->SetTitle("#kappa [cm^{-1}]");
-  hist->GetYaxis()->SetTitle("#Phi [rad]");
-  SetTH1Options(hist);
-
-  Int_t xr[2] = {0,250};
-  Int_t yr[2] = {-125,125};
-  TH1F *ntracks = new TH1F("ntracks","",100,0,200);
-  TH2F *raw = new TH2F("raw","",250,xr[0],xr[1],250,yr[0],yr[1]);
-  TH2F *road = new TH2F("road","",250,0,250,250,yr[0],yr[1]);
-  TH2F *fake = new TH2F("fake","",250,0,250,250,-125,125);
-  TH2F *peaks = new TH2F("peaks","",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  
-  int slice = 2,n_phi_segments=30;
-  float eta[2] = {0.3,0.4};
-  //float eta[2] = {0.03,0.04};
-  
-  AliL3HoughTransformer *a = new AliL3HoughTransformer(slice,patch,eta,n_phi_segments);
-  a->GetPixels(rootfile,raw);
-  a->InitTemplates(hist);
-  
-  //a->Transform2Circle(hist,78);
-  TStopwatch sw;
-  a->Transform2Circle(hist);
-  sw.Stop();
-  printf("Transformation done in %f ms\n",sw.CpuTime()*1000);
-  
-  AliL3HoughMaxFinder *b = new AliL3HoughMaxFinder("KappaPhi");
-  //b->SetThreshold(10000);
-  //AliL3TrackArray *tracks = b->FindMaxima(hist);
-  
-  AliL3TrackArray *tracks = b->FindPeak(hist,2,0.95,2);
-
-  AliL3HoughEval *c = new AliL3HoughEval(a);
-  printf("number of peaks before %d\n",tracks->GetNTracks());
-  
-  /*
-    for(int i=0; i<tracks->GetNTracks(); i++)
-    {
-      AliL3HoughTrack *track = (AliL3HoughTrack*)tracks->GetCheckedTrack(i);
-      if(!track) printf("no track\n");
-      printf("Pt %f Phi %f kappa %f weigth %d charge %d\n",track->GetPt(),track->GetPhi0(),track->GetKappa(),track->GetNHits(),track->GetCharge());
-    }
-  */
-  //c->LookInsideRoad(a,tracks,road,fake,ntracks);
-  c->LookInsideRoad(tracks);
-  printf("Number of trackcandidates %d\n",tracks->GetNTracks());
-
-  AliL3Transform *transform = new AliL3Transform();
-  Int_t NRows[5][2] = {{ 0, 45},{46,77},{78,109},{110,141},{142,173}};
-  for(Int_t i=0; i<tracks->GetNTracks(); i++)
-    {
-      AliL3HoughTrack *track = (AliL3HoughTrack*)tracks->GetCheckedTrack(i);
-      if(!track) {printf("NO TRACK\n"); continue;}
-      peaks->Fill(track->GetKappa(),track->GetPhi0(),1);
-      //for(int row=0; row<174; row++)
-      for(int row=NRows[patch][0]; row<=NRows[patch][1]; row++)
-       {
-         Float_t xyz[3];
-         track->GetCrossingPoint(row,xyz);
-         //track->GetCrossingPoint(slice,row,xyz);
-           //printf("Track does not cross line at row %d\n",row);
-         //transform->Local2Global(xyz,slice);
-         road->Fill(xyz[0],xyz[1],1);
-       }
-      //float an[2] = {track->GetPhi0(),0};
-      //transform->Local2GlobalAngle(an,slice);
-      printf("pt %f phi0 %f weight %d\n",track->GetPt(),track->GetPhi0(),track->GetWeight());
-    }
-  
-  
-  TCanvas *c1 = new TCanvas("c1","",900,900);
-  SetCanvasOptions(c1);
-  c1->Divide(2,2);
-  c1->cd(1);
-  hist->Draw("lego1");
-  //  peaks->Draw("same");
-
-  //  TCanvas *c2 = new TCanvas("c2","",2);
-  c1->cd(3);
-  raw->Draw("");
-
-  //TCanvas *c3 = new TCanvas("c3","",2);
-  //road->SetMarkerStyle(5);
-  //road->SetMarkerColor(3);
-  c1->cd(4);
-  road->SetMarkerStyle(9);
-  road->Draw();
-  /*
-  TCanvas *c4 = new TCanvas("c4","",2);
-  fake->Draw("cont1");
-
-  TCanvas *c5 = new TCanvas("c5","",2);
-  ntracks->Draw();
-  */
-  delete tracks;
-  delete a;
-  delete b;
-  delete c;
-
-  //----------------------------------------------------------------------------
-  if(MC)
-    {
-      TFile *file = new TFile(rootfile);
-      file->cd();
-      
-      gAlice = (AliRun*)file->Get("gAlice");
-      gAlice->GetEvent(0);
-      
-      TClonesArray *particles=gAlice->Particles();
-      Int_t n=particles->GetEntriesFast();
-      Float_t torad=TMath::Pi()/180;
-      Float_t phi_min = slice*20 - 10;
-      Float_t phi_max = slice*20 + 10;
-      
-      for (Int_t j=0; j<n; j++) {
-       TParticle *p=(TParticle*)particles->UncheckedAt(j);
-       if (p->GetFirstMother()>=0) continue;  //secondary particle
-       if(p->Eta() < eta[0] || p->Eta() > eta[1]) continue;
-       Double_t ptg=p->Pt(),pxg=p->Px(),pyg=p->Py(),pzg=p->Pz();
-       Double_t phi_part = TMath::ATan2(pyg,pxg);
-       if (phi_part < 0) phi_part += 2*TMath::Pi();
-       
-       if(phi_part < phi_min*torad || phi_part > phi_max*torad) {continue;}
-       if(ptg<0.100) continue;
-               
-       printf("Generated particle %d, with pt %f phi %f\n",p->GetPdgCode(),ptg,phi_part);
-      }
-      file->Close();
-      delete file;
-    }
-  
-}
diff --git a/HLT/hough/hough_line.C b/HLT/hough/hough_line.C
deleted file mode 100644 (file)
index 89e8f41..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-void hough_line(char *rootfile,int patch,Bool_t MC=false)
-{
-  gStyle->SetOptStat(0);
-  
-  
-  Double_t pi = TMath::Pi();
-  Int_t xbin = 60;
-  Int_t ybin = 60;
-  Float_t xrange[2] = {-pi/2,pi/2};
-  Float_t yrange[2] = {-40,40};
-  
-  TH2F *hist = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  hist->GetXaxis()->SetTitle("#Psi");
-  hist->GetYaxis()->SetTitle("D");
-  SetTH1Options(hist);
-
-  Int_t xr[2] = {0,250};
-  Int_t yr[2] = {-125,125};
-  TH1F *ntracks = new TH1F("ntracks","",100,0,200);
-  TH2F *raw = new TH2F("raw","",250,xr[0],xr[1],250,yr[0],yr[1]);
-  TH2F *road = new TH2F("road","",250,0,250,250,yr[0],yr[1]);
-  TH2F *container = new TH2F("container","",250,0,250,250,yr[0],yr[1]);
-  TH2F *peaks = new TH2F("peaks","",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  
-  int slice = 2,n_phi_segments=20;
-  float eta[2] = {0.3,0.4};
-  //float eta[2] = {0.05,0.06};
-  
-  AliL3HoughTransformer *a = new AliL3HoughTransformer(slice,patch,eta,n_phi_segments);
-
-  const Int_t NRows[5][2] = {{ 0, 45},{46,77},{78,109},{110,141},{142,173}};
-  const int ref_row[5]={22,60,93,125,157};
-  int rowrange[2] = {6,12};
-  double phirange[2] = {-10.,10.};
-  a->GetPixels(rootfile,raw);
-  a->Transform2Line(hist,9,rowrange,phirange);
-
-  AliL3HoughMaxFinder *b = new AliL3HoughMaxFinder("DPsi");
-  AliL3TrackArray *tracks = b->FindMaxima(hist,rowrange,5);
-
-  TH2F *cross = new TH2F("cross","",250,xr[0],xr[1],250,yr[0],yr[1]);
-  for(int i=0; i<2; i++)
-  //for(int i=0; i<tracks->GetNTracks(); i++)
-    {
-      AliL3HoughTrack *track = (AliL3HoughTrack*)tracks->GetCheckedTrack(i);
-      if(!track) continue;
-      Double_t xy[2];
-      for(int j=0; j<174; j++)
-       {
-         track->GetLineCrossingPoint(j,xy);
-         cross->Fill(xy[0],xy[1],1);
-       }
-      printf("Segment %f %f weight %d\n",track->GetPsiLine(),track->GetDLine(),track->GetWeight());
-    }
-  cross->SetMarkerStyle(6);
-  cross->SetMarkerColor(2);
-  
-  
-  TCanvas *c1 = new TCanvas("c1","",900,900);
-  SetCanvasOptions(c1);
-  c1->Divide(2,2);
-  c1->cd(1);
-  hist->Draw("box");
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  //peaks->Draw("same");
-
-  c1->cd(2);
-  container->Draw();
-
-  c1->cd(3);
-  raw->Draw("");
-  cross->Draw("same");
-  return;
-  //TCanvas *c3 = new TCanvas("c3","",2);
-  //road->SetMarkerStyle(5);
-  //road->SetMarkerColor(3);
-  c1->cd(4);
-  road->SetMarkerStyle(9);
-  road->Draw();
-  /*
-  TCanvas *c4 = new TCanvas("c4","",2);
-  fake->Draw("cont1");
-
-  TCanvas *c5 = new TCanvas("c5","",2);
-  ntracks->Draw();
-  */
-  delete a;
-  delete b;
-  delete c;
-
-  //----------------------------------------------------------------------------
-  if(MC)
-    {
-      TFile *file = new TFile(rootfile);
-      file->cd();
-      
-      gAlice = (AliRun*)file->Get("gAlice");
-      gAlice->GetEvent(0);
-      
-      TClonesArray *particles=gAlice->Particles();
-      Int_t n=particles->GetEntriesFast();
-      Float_t torad=TMath::Pi()/180;
-      Float_t phi_min = slice*20 - 10;
-      Float_t phi_max = slice*20 + 10;
-      
-      for (Int_t j=0; j<n; j++) {
-       TParticle *p=(TParticle*)particles->UncheckedAt(j);
-       if (p->GetFirstMother()>=0) continue;  //secondary particle
-       if(p->Eta() < eta[0] || p->Eta() > eta[1]) continue;
-       Double_t ptg=p->Pt(),pxg=p->Px(),pyg=p->Py(),pzg=p->Pz();
-       Double_t phi_part = TMath::ATan2(pyg,pxg);
-       if (phi_part < 0) phi_part += 2*TMath::Pi();
-       
-       if(phi_part < phi_min*torad || phi_part > phi_max*torad) {continue;}
-       if(ptg<0.100) continue;
-               
-       printf("Generated particle %d, with pt %f phi %f\n",p->GetPdgCode(),ptg,phi_part);
-      }
-      file->Close();
-      delete file;
-    }
-  
-}
diff --git a/HLT/hough/hough_line_merge.C b/HLT/hough/hough_line_merge.C
deleted file mode 100644 (file)
index f24f069..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-void hough_line_merge(char *rootfile,int patch,Bool_t MC=false)
-{
-  gStyle->SetOptStat(0);
-  
-  
-  Double_t pi = TMath::Pi();
-  Int_t xbin = 60;
-  Int_t ybin = 60;
-  Float_t xrange[2] = {-pi/2,pi/2};
-  Float_t yrange[2] = {-40,40};
-  
-  TH2F *hist;
-  
-  Int_t xr[2] = {0,250};
-  Int_t yr[2] = {-125,125};
-  TH1F *ntracks = new TH1F("ntracks","",100,0,200);
-  TH2F *raw = new TH2F("raw","",250,xr[0],xr[1],250,yr[0],yr[1]);
-  TH2F *road = new TH2F("road","",250,0,250,250,yr[0],yr[1]);
-  TH2F *fake = new TH2F("fake","",250,0,250,250,-125,125);
-  TH2F *peaks = new TH2F("peaks","",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  
-  int slice = 2,n_phi_segments=20;
-  float eta[2] = {0.3,0.4};
-  //float eta[2] = {0.05,0.06};
-  AliL3HoughTransformer *a = new AliL3HoughTransformer(slice,patch,eta,n_phi_segments);
-  a->GetPixels(rootfile,raw);
-  
-  AliL3HoughMaxFinder *b = new AliL3HoughMaxFinder("DPsi");
-  
-  const Int_t NRows[5][2] = {{ 0, 45},{46,77},{78,109},{110,141},{142,173}};
-  //const int ref_row[4]={5,15,25,35};
-  //int rowrange[4][2]={{0,10},{10,20},{20,30},{30,45}};
-  int ref_row[7] = {3,9,15,21,27,33,39};
-  int rowrange[7][2] = {{0,6},{6,12},{12,18},{18,24},{24,30},{30,36},{36,42}};
-  
-  double phirange[7][2] = {{-10.,-5.},{-7.5,-2.5},{-5.,0.},{-2.5,2.5},{0.,5.},{2.5,7.5},{5.,10.}};
-  int npatches = 7;
-  int count=0;
-
-  //AliL3TrackArray **track_pieces = new AliL3TrackArray*[npatches];
-  AliL3TrackArray *track_pieces = new AliL3TrackArray("AliL3HoughTrack");
-
-  double pran[2] = {-10,10};
-  
-  // int pa=3;
-  for(int row_pat=0; row_pat < 7; row_pat++)
-    {
-      
-      for(int pat=0; pat<7; pat++)
-       {
-         
-         TH2F *histo = new TH2F("histo","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-         
-         printf("transforming ref_row %d rowrange %d %d phirange %f %f\n",ref_row[row_pat],rowrange[row_pat][0],rowrange[row_pat][1],phirange[pat][0],phirange[pat][1]);
-         
-         a->Transform2Line(histo,ref_row[row_pat],rowrange[row_pat],phirange[pat]);
-         //a->Transform2Line(histo,ref_row[row_pat],rowrange[row_pat],pran);
-
-         AliL3TrackArray *tmp = (AliL3TrackArray*)b->FindMaxima(histo,rowrange[row_pat],ref_row[row_pat]);
-         
-         track_pieces->AddTracks(tmp);
-         
-         //AliL3HoughTrack *tra = (AliL3HoughTrack*)b->GetTracks()->GetCheckedTrack(0);
-         //printf("psi %f rowrange %d %d\n",tra->GetPsiLine(),tra->GetFirstRow(),tra->GetLastRow());
-         
-         delete histo;
-         delete tmp;
-       }
-      
-    }
-  
-  
-  printf("Transformation complete, genereted %d tracks\n",track_pieces->GetNTracks());
-
-    
-  //track_pieces->Sort();
-  TH2F *cross = new TH2F("cross","",250,xr[0],xr[1],250,yr[0],yr[1]);  
-  Double_t xy[2];
-  //for(int i=0; i<npatches; i++)
-  for(int i=0; i<4; i++)
-    {
-      if(track_pieces->GetNTracks()==0) continue;
-      AliL3HoughTrack *track = (AliL3HoughTrack*)track_pieces->GetCheckedTrack(i);
-      if(!track) {printf("NO TRACK\n"); continue;}
-      //for(int j=rowrange[pa][0]; j<=rowrange[pa][1]; j++)
-      /*
-      for(int j=0; j<174; j++)
-       {
-         track->GetLineCrossingPoint(j,xy);
-         cross->Fill(xy[0],xy[1],1);
-       }
-      */
-      //printf("weight %d psi %f D %f rowrange %d %d\n",track->GetWeight(),track->GetPsiLine(),track->GetDLine(),track->GetFirstRow(),track->GetLastRow());
-      
-    }
-  cross->SetMarkerStyle(6);
-  cross->SetMarkerColor(2);
-  //cross->Draw();
-  
-  
-
-  AliL3HoughTransformer *a2 = new AliL3HoughTransformer(slice,pat,eta,n_phi_segments);
-  
-  xbin = 60 ;
-  ybin = 60;
-  xrange[0] = -0.006;
-  xrange[1] = 0.006;
-  yrange[0] = -0.26;
-  yrange[1] = 0.26;
-  hist = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  
-  TH2F *cross_helix = new TH2F("cross_helix","",250,xr[0],xr[1],250,yr[0],yr[1]);  
-  
-  a2->TransformLines2Circle(hist,(AliL3TrackArray*)track_pieces);
-      
-  AliL3HoughMaxFinder *b2 = new AliL3HoughMaxFinder("KappaPhi");
-  AliL3TrackArray *final_tracks = b2->FindMaxima(hist);
-  
-  printf("Number of track candidates before checking %d\n",final_tracks->GetNTracks());
-  AliL3HoughEval *eval = new AliL3HoughEval(slice);
-  eval->SetTransformer(a);
-  eval->LookInsideRoad(final_tracks);
-  
-  printf("Total number of tracks after checking %d\n",final_tracks->GetNTracks());
-  for(int i=0; i<3; i++)//final_tracks->GetNTracks(); i++)
-    {
-      
-      AliL3HoughTrack *track = (AliL3HoughTrack*)final_tracks->GetCheckedTrack(i);
-      if(!track) continue;
-      
-      for(int r=0; r<174; r++)
-       {
-         Float_t xyz_helix[3];
-         track->GetCrossingPoint(r,xyz_helix);
-         cross_helix->Fill(xyz_helix[0],xyz_helix[1],1);
-       }
-      
-      peaks->Fill(track->GetKappa(),track->GetPhi0(),1);
-      printf("Found track, pt %f phi0 %f\n",track->GetPt(),track->GetPhi0());
-    }
-  cross_helix->SetMarkerStyle(6);
-  cross_helix->SetMarkerColor(2);
-  TCanvas *c1 = new TCanvas("c1","",900,900);
-  SetCanvasOptions(c1);
-  c1->Divide(2,2);
-  c1->cd(1);
-  hist->Draw("box");
-
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  //peaks->Draw("same");
-
-  c1->cd(2);
-  cross_helix->Draw();
-
-  c1->cd(3);
-  raw->Draw("");
-  cross_helix->DrawCopy("same");
-  //cross->Draw("same");
-
-  c1->cd(4);
-  //hist->Draw("box");
-  raw->DrawCopy();
-  
-  delete track_pieces;
-  delete a;
-  delete b;
-  delete a2;
-  delete eval;
-  //----------------------------------------------------------------------------
-  if(MC)
-    {
-      TFile *file = new TFile(rootfile);
-      file->cd();
-      
-      gAlice = (AliRun*)file->Get("gAlice");
-      gAlice->GetEvent(0);
-      
-      TClonesArray *particles=gAlice->Particles();
-      Int_t n=particles->GetEntriesFast();
-      Float_t torad=TMath::Pi()/180;
-      Float_t phi_min = slice*20 - 10;
-      Float_t phi_max = slice*20 + 10;
-      
-      for (Int_t j=0; j<n; j++) {
-       TParticle *p=(TParticle*)particles->UncheckedAt(j);
-       if (p->GetFirstMother()>=0) continue;  //secondary particle
-       if(p->Eta() < eta[0] || p->Eta() > eta[1]) continue;
-       Double_t ptg=p->Pt(),pxg=p->Px(),pyg=p->Py(),pzg=p->Pz();
-       Double_t phi_part = TMath::ATan2(pyg,pxg);
-       if (phi_part < 0) phi_part += 2*TMath::Pi();
-       
-       if(phi_part < phi_min*torad || phi_part > phi_max*torad) {continue;}
-       if(ptg<0.100) continue;
-               
-       printf("Generated particle %d, with pt %f phi %f\n",p->GetPdgCode(),ptg,phi_part);
-      }
-      file->Close();
-      delete file;
-    }
-  
-}
diff --git a/HLT/hough/hough_merge.C b/HLT/hough/hough_merge.C
deleted file mode 100644 (file)
index db1f017..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-void hough_merge(char *rootfile,Bool_t MC=false)
-{
-  gStyle->SetOptStat(0);
-  
-  Int_t xbin = 70;
-  Int_t ybin = 70;
-  Float_t xrange[2] = {-0.006 , 0.006}; //Pt 0.1->4GeV 0.006-0.006
-  //Float_t yrange[2] = {-0.17 , 0.17}; //slice 2 0.55->0.88
-  Float_t yrange[2] = {-0.26 , 0.26}; //slice 2 0.55->0.88
-  //Float_t yrange[2] = {0.55 , 0.88}; //slice 2 0.55->0.88
-
-  Int_t xr[2] = {0,250};
-  Int_t yr[2] = {-125,125};
-  ntracks = new TH1F("ntracks","",100,0,200);
-  raw = new TH2F("raw","",250,xr[0],xr[1],250,yr[0],yr[1]);
-  road = new TH2F("road","",250,0,250,250,yr[0],yr[1]);
-  fake = new TH2F("fake","",300,0,300,250,-125,125);
-  peaks = new TH2F("peaks","",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  road->SetMarkerStyle(6);
-
-  int slice = 2;
-  //float eta[2] = {0.3,0.4};
-  float eta[2] = {0.04,0.05};
-  
-  b = new AliL3HoughMaxFinder("KappaPhi");
-  //hist = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  TH2F **histos = new TH2F*[5];
-  for(int pat=0; pat<5; pat++)
-    {
-      a = new AliL3HoughTransformer(slice,pat,eta);
-      histos[pat] = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-      a->GetPixels(rootfile,raw);
-      a->InitTemplates(hist);
-      a->Transform2Circle(hist);
-      delete a;
-    }
-  
-  hist = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  for(Int_t i=0; i<5; i++)
-    {
-      hist->Add(histos[i],1);
-    }
-  tracks = (AliL3TrackArray*)b->FindPeak(hist,4,0.95,5);
-  track = (AliL3HoughTrack*)tracks->GetCheckedTrack(0);
-  peaks->Fill(track->GetKappa(),track->GetPhi0(),1);
-  
-  
-  for(Int_t padrow=0; padrow<174; padrow++)
-    {
-      Float_t xyz[3];
-      track->GetCrossingPoint(padrow,xyz);
-      road->Fill(xyz[0],xyz[1],1);
-    }
-
-  c1 = new TCanvas("c1","",1000,1000);
-  c1->Divide(2,2);
-  c1->cd(1);
-  hist->Draw("box");
-  peaks->Draw("same");
-  c1->cd(2);
-  raw->Draw();
-  c1->cd(3);
-  road->Draw();
-  printf("Pt %f phi0 %f\n",track->GetPt(),track->GetPhi0());
-  return;
-  
-
-  delete b;
-  delete d;
-  delete c;
-  //----------------------------------------------------------------------------
-  if(MC)
-    {
-      TFile *file = new TFile(rootfile);
-      file->cd();
-      
-      gAlice = (AliRun*)file->Get("gAlice");
-      gAlice->GetEvent(0);
-      
-      TClonesArray *particles=gAlice->Particles();
-      Int_t n=particles->GetEntriesFast();
-      Float_t torad=TMath::Pi()/180;
-      Float_t phi_min = slice*20 - 10;
-      Float_t phi_max = slice*20 + 10;
-      
-      for (Int_t j=0; j<n; j++) {
-       TParticle *p=(TParticle*)particles->UncheckedAt(j);
-       if (p->GetFirstMother()>=0) continue;  //secondary particle
-       if(p->Eta() < eta[0] || p->Eta() > eta[1]) continue;
-       Double_t ptg=p->Pt(),pxg=p->Px(),pyg=p->Py(),pzg=p->Pz();
-       Double_t phi_part = TMath::ATan2(pyg,pxg);
-       if (phi_part < 0) phi_part += 2*TMath::Pi();
-       
-       if(phi_part < phi_min*torad || phi_part > phi_max*torad) {continue;}
-       if(ptg<0.100) continue;
-       int found = 0;
-       for(int m=0; m<mtrs->GetNTracks(); m++)
-         {
-           AliL3HoughTrack *tra = (AliL3HoughTrack*)mtrs->GetCheckedTrack(m);
-           if(tra->GetMCid() != j) continue;
-           found = 1;
-           double dPt = fabs(ptg-tra->GetPt());
-           float  phi0[2] = {tra->GetPhi0(),0};
-           transform->Local2GlobalAngle(phi0,slice);
-           double dPhi0 = fabs(phi_part-phi0[0]);
-           printf("Difference Pt %f Phi0 %f\n",dPt,dPhi0);
-
-         }
-       if(!found) printf("Track %d was not found\n",j);
-       printf("Generated particle %d, with pt %f phi %f\n",p->GetPdgCode(),ptg,phi_part);
-      }
-      file->Close();
-      delete file;
-    }
-  
-}
diff --git a/HLT/hough/hough_mergehistos.C b/HLT/hough/hough_mergehistos.C
deleted file mode 100644 (file)
index b336fc0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-void hough_mergehistos(char *rootfile)
-{
-  gStyle->SetOptStat(0);
-  
-  Int_t xbin = 60;
-  Int_t ybin = 60;
-  Float_t xrange[2] = {-0.006 , 0.006}; //Pt 0.1->4GeV 0.006-0.006
-  //Float_t yrange[2] = {-0.17 , 0.17}; //slice 2 0.55->0.88
-  Float_t yrange[2] = {-0.26 , 0.26}; //slice 2 0.55->0.88
-  //Float_t yrange[2] = {0.55 , 0.88}; //slice 2 0.55->0.88
-
-  Int_t xr[2] = {0,250};
-  Int_t yr[2] = {-125,125};
-  TH1F *ntracks = new TH1F("ntracks","",100,0,200);
-  TH2F *raw = new TH2F("raw","",250,xr[0],xr[1],250,yr[0],yr[1]);
-  TH2F *road = new TH2F("road","",250,0,250,250,yr[0],yr[1]);
-  TH2F *fake = new TH2F("fake","",300,0,300,250,-125,125);
-  TH2F *peaks = new TH2F("peaks","",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  
-  int slice = 2,patch=0,n_phi_segments=40;
-  float eta[2] = {0.3,0.4};
-  // float eta[2] = {0.04,0.05};
-  
-  AliL3HoughTransformer *a;
-  AliL3HoughMaxFinder *b = new AliL3HoughMaxFinder("KappaPsi");
-  
-  TH2F **hist = new TH2F*[5];
-  
-  for(int pat=0; pat<5; pat++)
-    {
-      a = new AliL3HoughTransformer(slice,pat,eta);
-      hist[pat] = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-      a->GetPixels(rootfile,raw);
-      a->InitTemplates(hist[pat]);
-      a->Transform2Circle(hist[pat],0);
-      //AliL3TrackArray *tracks = b->FindMaxima(hist[pat]);
-      
-      delete a;
-      
-    }
-  
-  TCanvas *c1 = new TCanvas("c1","",1000,600);
-  c1->Divide(2);
-  c1->cd(1);
-  hist[4]->DrawCopy("box");
-  c1->cd(2);
-  for(int i=0; i<4; i++)
-    {
-      hist[4]->Add(hist[i]);
-    }  
-  tracks = (AliL3TrackArray*)b->FindPeak(hist[4],3,0.95,5);
-  track = (AliL3HoughTrack*)tracks->GetCheckedTrack(0);
-  printf("Pt %f phi0 %f\n",track->GetPt(),track->GetPhi0());
-  peaks->Fill(track->GetKappa(),track->GetPhi0(),1);
-  hist[4]->Draw("box");
-  peaks->Draw("same");
-  /*
-  hist[4]->DrawCopy("box");
-  c1->cd(3);
-  hist[2]->DrawCopy("box");
-  
-  c1->cd(4);
-  hist[4]->Draw("box");
-  peaks->Draw("same");
-  */
-  delete b;
-  
-  
-  delete [] hist;
-}
diff --git a/HLT/hough/rootlogon.C b/HLT/hough/rootlogon.C
deleted file mode 100644 (file)
index 0a4a8f9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-
-{
-  printf("\nWELCOME to the magic world of Level3\n\n"); 
-
-  gSystem->Load("$(ROOTSYS)/lib/libPhysics");
-  gSystem->Load("$(ROOTSYS)/lib/libEG");
-
-  if(0)
-    {
-      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");
-      cout<<"HLT libraries loaded"<<endl;
-    }
-  gROOT->LoadMacro("$(HOME)/alirootcode/XFunct.C");
-  gStyle->SetStatBorderSize(1);
-  gStyle->SetTitleBorderSize(0);
-
-}
diff --git a/HLT/hough/test.C b/HLT/hough/test.C
deleted file mode 100644 (file)
index 3270df0..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-void test(char *file="/prog/alice/data/Rawdata/1_patch/pp/event_0/",bool bin=true)
-{
-  AliL3Logger l;
-//  l.UnSet(AliL3Logger::kDebug);
-//  l.UnSet(AliL3Logger::kAll);
-  l.Set(AliL3Logger::kAll);
-  //l.UseStdout();
-  l.UseStream();
-  
-  Int_t fNEtaSegments = 1;
-  
-  Char_t histname[50];
-  Int_t i;
-  
-  int slice=1,patch=0;
-  
-  fHoughTransformer = new AliL3HoughTransformer(slice,patch,fNEtaSegments);
-  fMemHandler = new AliL3FileHandler();
-  fMaxFinder = new AliL3HoughMaxFinder("KappaPhi");
-  
-  fTransform = new AliL3Transform();
-  
-  fHoughTransformer->CreateHistograms(64,-0.012,0.012,64,-0.35,0.35);
-  fHoughTransformer->SetThreshold(10);
-  fTracks = new AliL3TrackArray("AliL3HoughTrack");
-    
-  TH2F *road = new TH2F("road","",250,0,250,250,-125,125);
-  TH2F *peaks = new TH2F("peaks","",64,-0.006,0.006,64,-0.26,0.26);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  road->SetMarkerStyle(5);
-  road->SetMarkerColor(2);
-  
-  Char_t name[256];
-  
-  UInt_t ndigits=0;
-  AliL3DigitRowData *digits =0;
-  
-  if(bin) //read data from binary files
-    {
-      Char_t fPath[256];
-      strcpy(fPath,file);
-      fMemHandler->Free();
-      sprintf(name,"%sdigits_%d_%d.raw",fPath,slice,patch);
-      fMemHandler->SetBinaryInput(name);
-      digits = (AliL3DigitRowData *)fMemHandler->CompBinary2Memory(ndigits);
-      fMemHandler->CloseBinaryInput();
-    }
-  else //read data from root file
-    {
-      const Int_t NRows[6][2] = {{0,31},{32,63},{64,91},{92,119},{120,143},{144,175}};
-      const int nr[2] = {0,175};
-      fMemHandler->Free();
-      fMemHandler->SetAliInput(file);
-      fMemHandler->Init(slice,patch,NRows[patch]);
-      fMemHandler->Init(fTransform);
-      digits=(AliL3DigitRowData *)fMemHandler->AliDigits2Memory(ndigits); 
-      fMemHandler->CloseAliInput();
-    }
-    
-  fHoughTransformer->SetInputData(ndigits,digits);
-  fEval = new AliL3HoughEval();
-  fEval->InitTransformer(fHoughTransformer);
-  //fEval->SetNumOfRowsToMiss(0);
-  //fEval->SetNumOfPadsToLook(2);
-  //fEval->RemoveFoundTracks();
-  AliL3HoughTrack *track;
-  AliL3Histogram *histo;
-  Int_t good_count;
-  int eind=0;
-  while(1)
-    {
-      printf("Transforming\n");
-      double init = AliL3Benchmark::GetCpuTime();
-      fHoughTransformer->TransformCircle();
-      double final = AliL3Benchmark::GetCpuTime();
-      printf("done in %f ms\n",(final-init)*1000);
-      good_count=0;
-      for(Int_t e=0; e<fNEtaSegments; e++)
-       {
-         histo = (AliL3Histogram*)fHoughTransformer->GetHistogram(e);
-         if(!histo) continue;
-         
-         fMaxFinder->SetHistogram(histo);
-         Int_t n=10;
-         Int_t weight[10];
-         Float_t x[10];
-         Float_t y[10];
-         fMaxFinder->FindPeak1(x,y,weight,n);
-         track = new AliL3HoughTrack();
-         track->SetTrackParameters(x[0],y[0],1);
-         
-         //      if(!fEval->LookInsideRoad(track,e))
-         // continue;
-         
-         
-         if(e==eind)
-           {
-             for(int t=0; t<176; t++)
-               {
-                 if(t%10) continue;
-                 float xyz_tr[3];
-                 track->GetCrossingPoint(t,xyz_tr);
-                 road->Fill(xyz_tr[0],xyz_tr[1],1);
-               }
-           }
-         delete track;
-         
-       }
-         
-      break;
-      if(good_count==0)
-       break;
-    }
-  
-
-  image = new AliL3Histogram("image","",250,0,250,250,-125,125);
-  fEval->DisplayEtaSlice(eind,image);
-  
-  c1 = new TCanvas("c1","",1000,500);
-  c1->Divide(2);
-  c1->cd(1);
-  histo = (AliL3Histogram*)fHoughTransformer->GetHistogram(eind);
-  if(!histo)
-    {printf("No histogram\n"); return;}
-  histo->Draw("box");
-
-  peaks->Draw("same");
-  c1->cd(2);
-  image->Draw("");
-  road->Draw("same");
-} 
-
-void process(char *digitfile="/prog/alice/data/Rawdata/6_patch/hg_42105_s1-3/",bool bin=true,char *trackfile="good_tracks")
-{
-  AliL3Logger l;
-  //  l.UnSet(AliL3Logger::kDebug);
-  //  l.UnSet(AliL3Logger::kAll);
-  //l.Set(AliL3Logger::kError);
-  //l.UseStdout();
-  l.UseStream();
-  
-  transform = new AliL3Transform();
-
-  double torad = 3.1415/180;
-  int slice=1;
-  a = new AliL3Hough(digitfile,bin,100);
-  a->ReadData(slice);
-  a->Transform();
-  a->AddAllHistograms();
-  a->FindTrackCandidates();
-  a->Evaluate(2);
-  a->WriteTracks("../comp/");
-
-  //a->MergePatches();
-
-  //a->MergeInternally();
-  
-  //tracks = (AliL3TrackArray*)(a->GetInterMerger())->GetOutTracks();
-  //tracks = (AliL3TrackArray*)(a->GetMerger())->GetOutTracks();
-  tracks = (AliL3TrackArray*)a->GetTracks(0);
-  //a->GetEval(0)->CompareMC(tracks,"good_tracks_hg4000_s1");
-  float xyz[3];
-  int row=0;
-  for(int i=0; i<tracks->GetNTracks(); i++)
-    {
-      AliL3HoughTrack *track = (AliL3HoughTrack*)tracks->GetCheckedTrack(i);
-      if(!track) continue;
-      track->GetCrossingPoint(row,xyz);
-      transform->Local2Raw(xyz,1,row);
-      cout<<"Recon. pad "<<(int)xyz[1]<<" time "<<(int)xyz[2]<<endl;
-      cout<<"Pt "<<track->GetPt()<<" phi "<<track->GetPhi0()<<" charge "<<track->GetCharge()<<endl;
-    }
-  
-  delete transform;
-  return;
-
-}
-
-void cf()
-{
-    AliL3Logger l;
-  //  l.UnSet(AliL3Logger::kDebug);
-  //  l.UnSet(AliL3Logger::kAll);
-  //l.Set(AliL3Logger::kError);
-  //l.UseStdout();
-  l.UseStream();
-  
-  AliL3FileHandler *file = new AliL3FileHandler();
-  file->SetBinaryInput("tracks.raw");
-  fTracks = new AliL3TrackArray("AliL3HoughTrack");
-  file->Binary2TrackArray(fTracks);
-  cout<<"Ntracks "<<fTracks->GetNTracks()<<endl;
-  file->CloseBinaryInput();
-  delete file;
-  
-
-  return;
-  /*
-  a = new AliL3ClusterFinder();
-  a->LoadData();
-  a->Process();
-  */
-}
-
-
-void HistogramParticles(char *trackfile)
-{
-  struct GoodTrack 
-  {
-    
-    Int_t label;
-    Double_t eta;
-    Int_t code;
-    Double_t px,py,pz;
-    Double_t pt;
-    Int_t nhits;
-  };
-  struct GoodTrack goodtracks[15000];
-  Int_t nt=0;
-  ifstream in(trackfile);
-  if(in)
-    {
-      printf("Reading good tracks from file %s\n",trackfile);
-      while (in>>goodtracks[nt].label>>goodtracks[nt].code>>
-            goodtracks[nt].px>>goodtracks[nt].py>>goodtracks[nt].pz>>
-            goodtracks[nt].pt>>goodtracks[nt].eta>>goodtracks[nt].nhits) 
-       {
-         nt++;
-         if (nt==15000) 
-           {
-             cerr<<"Too many good tracks"<<endl;
-             break;
-           }
-       }
-    }
-  
-  int fNEtaSegments = 150;
-  Double_t etaslice = (0.9 - 0)/fNEtaSegments;
-  Int_t *particles = new Int_t[fNEtaSegments];
-  for(Int_t i=0; i<fNEtaSegments; i++)
-    particles[i]=0;
-  
-  for(Int_t i=0; i<nt; i++)
-    {
-      //if(goodtracks[i].nhits < 150) continue;
-      if(goodtracks[i].pt < 0.5) continue;
-      Int_t particleindex = (Int_t)(goodtracks[i].eta/etaslice);
-      if(particleindex < 0 || particleindex >= fNEtaSegments) continue;
-      particles[particleindex]++;
-    }
-  
-  hist = new TH1F("hist","",21,0,20);
-  for(int i=0; i<fNEtaSegments; i++)
-    hist->Fill(particles[i]);
-  
-  
-  c1 = new TCanvas("c1","",2);
-  hist->Draw();
-  
-}
diff --git a/HLT/hough/testPF.C b/HLT/hough/testPF.C
deleted file mode 100644 (file)
index c722630..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-void testPF(char *rootfile,int patch)
-{
-  gStyle->SetOptStat(0);
-  
-  Int_t xbin = 70;
-  Int_t ybin = 70;
-  Float_t xrange[2] = {-0.006 , 0.006}; //Pt 0.2->
-  //Float_t yrange[2] = {-0.17 , 0.17}; //slice 2 0.55->0.88
-  Float_t yrange[2] = {-0.26 , 0.26};// -15 - 15
-  //Float_t yrange[2] = {0.55 , 0.88}; //slice 2 0.55->0.88
-  
-  TH2F *hist = new TH2F("hist","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  hist->GetXaxis()->SetTitle("#kappa [cm^{-1}]");
-  hist->GetYaxis()->SetTitle("#Phi [rad]");
-  SetTH1Options(hist);
-  
-  hist1 = new TH2F("hist1","Parameter space",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  
-  Int_t xr[2] = {0,250};
-  Int_t yr[2] = {-125,125};
-  TH2F *raw = new TH2F("raw","",250,xr[0],xr[1],250,yr[0],yr[1]);
-  TH2F *road = new TH2F("road","",250,0,250,250,yr[0],yr[1]);
-  TH2F *peaks = new TH2F("peaks","",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(2);
-  road->SetMarkerStyle(6);
-  road->SetMarkerColor(2);
-  
-  real_peaks = new TH2F("real_peaks","",xbin,xrange[0],xrange[1],ybin,yrange[0],yrange[1]);
-  real_peaks->SetMarkerStyle(3);
-  real_peaks->SetMarkerColor(4);
-
-  int slice = 2,n_phi_segments=30;
-  //double eta[2] = {0.3,0.4};
-  double eta[2] = {0.84,0.85};
-  
-  a = new AliL3HoughTransformer(slice,patch,eta,1);
-  a->GetPixels(rootfile,raw);
-  a->InitTemplates(hist);
-  a->Transform2Circle(hist,3);
-  
-  b = new AliL3HoughMaxFinder("KappaPhi");
-  c = new AliL3HoughEval(a);
-  //  tracks = (AliL3TrackArray*)b->FindMaxima(hist);
-  
-  int n_iter=1;
-  
-  
-  AliL3TrackArray **track_cand = new AliL3TrackArray*[n_iter];
-  for(int k=0; k<n_iter; k++)
-    {
-      hist1->Reset();
-      a->Transform2Circle(hist1,3);
-      //track_cand[k] = (AliL3TrackArray*)b->FindPeak(hist1,3,0.95,5);
-      //track_cand[k] = (AliL3TrackArray*)b->LookInWindows(hist1,3,3,0.95,5);
-      track_cand[k] = (AliL3TrackArray*)b->FindMaxima(hist1);
-      //c->LookInsideRoad(track_cand[k],true);
-    }
-  printf("found %d\n",track_cand[0]->GetNTracks());
-  //tracks = (AliL3TrackArray*)b->LookInWindows(hist,4,4,0.95,5);
-  
-  //tracks = (AliL3TrackArray*)b->FindMaxima(hist);
-  //cout << "Found "<<tracks->GetNTracks()<<" peaks"<<endl;
-  
-  
-  //for(int j=0; j<n_iter; j++)
-  for(int j=0; j<track_cand[0]->GetNTracks(); j++)  
-    {
-      track = (AliL3HoughTrack*)track_cand[0]->GetCheckedTrack(j);
-      if(!track) continue;
-      //printf("Pt %f phi0 %f weight %d\n",track->GetPt(),track->GetPhi0(),track->GetWeight());
-      for(int padrow=0; padrow<174; padrow++)
-       {
-         Float_t xyz[3];
-         track->GetCrossingPoint(padrow,xyz);
-         road->Fill(xyz[0],xyz[1],1);
-       }
-      peaks->Fill(track->GetKappa(),track->GetPhi0(),1);
-    }
-  
-  /*  
-  tracks = (AliL3TrackArray*)b->FindPeak(hist,3,0.95,5);
-  cout<<"NTracks after checking "<<tracks->GetNTracks()<<endl;
-  for(int i=0; i<tracks->GetNTracks(); i++)
-    {
-      track = (AliL3HoughTrack*)tracks->GetCheckedTrack(i);
-      peaks->Fill(track->GetKappa(),track->GetPhi0(),1);
-      if(!track) continue;
-      printf("Pt %f phi0 %f weight %d\n",track->GetPt(),track->GetPhi0(),track->GetWeight());
-      for(int padrow=0; padrow<174; padrow++)
-       {
-         Float_t xyz[3];
-         track->GetCrossingPoint(padrow,xyz);
-         road->Fill(xyz[0],xyz[1],1);
-       }
-    }  
-  */
-  
-  c2 = new TCanvas("c2","",900,900);
-  c2->Divide(2,2);
-  c2->cd(1);
-  raw->Draw("");
-  c2->cd(2);
-  raw->DrawCopy();
-  road->Draw("same");
-  c2->cd(3);
-  hist->Draw("box");
-  peaks->Draw("same");
-  //real_peaks->Draw("same");
-  c2->cd(4);
-  hist->DrawCopy("lego1");
-
-  delete a;
-  delete b;
-  delete c;
-
-}