General updates
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Mar 2001 16:24:03 +0000 (16:24 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Mar 2001 16:24:03 +0000 (16:24 +0000)
HLT/hough/AliL3HoughEval.cxx
HLT/hough/AliL3HoughEval.h
HLT/hough/hough.C
HLT/hough/hough_merge.C

index 9e0aaca1c9675c012ccc641ff95f3bf4771fddd9..b7c608f252256e448d083e53ac6228364f6f8fe9 100644 (file)
@@ -54,7 +54,7 @@ void AliL3HoughEval::LookInsideRoad(AliL3TrackArray *tracks,TH2F *hist,TH2F *fak
   Int_t patch = fHoughTransformer->fPatch;
   Int_t slice = fHoughTransformer->fSlice;
   Int_t num_of_pads_to_look = 1;
-  Int_t rows_to_miss = 2;
+  Int_t rows_to_miss = 1;
 
   for(Int_t i=0; i<tracks->GetNTracks(); i++)
     {
@@ -142,12 +142,9 @@ void AliL3HoughEval::DisplaySlice(TH2F *hist)
   
 }
 
-
-void AliL3HoughEval::CompareMC(Char_t *rootfile,AliL3TrackArray *merged_tracks,Float_t *eta)
+TClonesArray *AliL3HoughEval::GetParticles(Char_t *rootfile)
 {
   
-  Int_t slice = fSlice;
-  
   TFile *file = new TFile(rootfile);
   file->cd();
 
@@ -155,6 +152,19 @@ void AliL3HoughEval::CompareMC(Char_t *rootfile,AliL3TrackArray *merged_tracks,F
   gAlice->GetEvent(0);
   
   TClonesArray *particles=gAlice->Particles();
+  return particles;
+
+  file->Close();
+  delete file;
+}
+
+
+void AliL3HoughEval::CompareMC(Char_t *rootfile,AliL3TrackArray *merged_tracks,Float_t *eta)
+{
+  
+  Int_t slice = fSlice;
+  
+  TClonesArray *particles = GetParticles(rootfile);
   Int_t n=particles->GetEntriesFast();
   Float_t torad=TMath::Pi()/180;
   Float_t phi_min = slice*20 - 10;
@@ -198,8 +208,5 @@ void AliL3HoughEval::CompareMC(Char_t *rootfile,AliL3TrackArray *merged_tracks,F
     Double_t dphi0 = fabs(phi_part-sel_track->GetPhi0());
     //printf("Found match, min_dist %f dPt %f dPhi0 %f\n",min_dist,dpt,dphi0);
   }
-  file->Close();
-  delete file;
-
-  
+    
 }
index 42ee1293ee5ad232771c19b9f88472557c780c11..1d64d91f74c901e1d43af2f83fae780bbe071184 100644 (file)
@@ -23,7 +23,8 @@ class AliL3HoughEval : public TObject {
   AliL3HoughEval(); 
   AliL3HoughEval(AliL3HoughTransformer *transformer);
   virtual ~AliL3HoughEval();
-  
+
+  TClonesArray *GetParticles(Char_t *rootfile);
   void LookInsideRoad(AliL3TrackArray *tracks,TH2F *hist=0,TH2F *fake=0);
   void DisplaySlice(TH2F *hist);
   void CompareMC(Char_t *rootfile,AliL3TrackArray *merged_tracks,Float_t *eta);
index e58f4b57b6c245b2e6b9e428b261f8c59d7e4474..d74be959e822f98d120f75f98f4752ef6f742da0 100644 (file)
@@ -41,15 +41,7 @@ void hough(char *rootfile,int patch,Bool_t MC=false)
   //b->SetThreshold(10000);
   //AliL3TrackArray *tracks = b->FindMaxima(hist);
   
-  Double_t peak[2];
-  b->FindPeak(hist,peak);
-  printf("Found peak %f %f\n",peak[0],peak[1]);
-  peaks->Fill(peak[0],peak[1],1);
-  peaks->SetMarkerStyle(3);
-  peaks->SetMarkerColor(3);
-  hist->Draw("box");
-  peaks->Draw("same");
-  return;
+  AliL3TrackArray *tracks = b->FindPeak(hist,2,0.95,2);
 
   AliL3HoughEval *c = new AliL3HoughEval(a);
   printf("number of peaks before %d\n",tracks->GetNTracks());
index 9eaffcb9c7a703ec2c54c899b5045d8ec96dc32f..74c7c79b8770602d8c1889c0232f60a164ffed44 100644 (file)
@@ -35,7 +35,7 @@ void hough_merge(char *rootfile,Bool_t MC=false)
       a->GetPixels(rootfile,raw);
       a->Transform2Circle(hist,87);
       
-      b = new AliL3HoughMaxFinder("KappaPsi");
+      b = new AliL3HoughMaxFinder("KappaPhi");
       AliL3TrackArray *tracks = b->FindMaxima(hist);
       c->SetTransformer(a);
       c->LookInsideRoad(tracks);