]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/exa/Eval.C
Get the Bfield from AliL3Transform
[u/mrichter/AliRoot.git] / HLT / exa / Eval.C
1 void Eval(char *rootfile="")
2 {
3
4   AliL3Logger l;
5 //  l.UnSet(AliL3Logger::kDebug);
6 //  l.UnSet(AliL3Logger::kAll);
7   l.Set(AliL3Logger::kError);
8   l.UseStdout();
9   //l.UseStream();
10     
11   int slice[2] = {1,3};
12   e = new AliL3Evaluate(rootfile,slice);
13   e->SetupSlow("tracks.raw",".");
14   //e->SetupFast("tracks.raw","/nfs/david/subatom/alice/data/V3.04/fast/clusters/hg_8k_v0_s1-3_e0_cl.root",".");
15   
16   ntuppel = (TNtuple*)e->EvaluatePoints();
17   
18
19   file = new TFile("CFeval_nodeconv.root","RECREATE");
20   file->cd();
21   ntuppel->Write();
22   file->Close();
23   delete file;
24 }
25
26 void plotPt(char *rootfile)
27 {
28   gStyle->SetStatColor(10);
29   gStyle->SetOptStat(0);
30   gStyle->SetOptFit(1100);  
31   
32   
33   c = new TCanvas("c","",2);
34   SetCanvasOptions(c);
35   
36
37   f1 = new TFile(rootfile);
38
39   hist = new TH1F("hist","",50,-10,10);
40   SetTH1Options(hist);
41   fNtuppel->Draw("(pt_found-pt_gen)/pt_gen*100>>hist","nHits>30");
42   hist->GetXaxis()->SetTitle("%");
43   hist->GetYaxis()->SetTitle("Counts");
44
45   float rms = hist->GetRMS();
46   printf("Rms value : %f\n",rms);
47   
48   TF1 *f = new TF1("f","gaus",-rms,rms);
49   hist->Fit("f","R");
50   
51   
52 }
53
54 void plot(char *rootfile)
55 {
56
57   gStyle->SetStatColor(10);
58   gStyle->SetOptStat(1);
59   gStyle->SetOptFit(1);
60   
61   file = new TFile(rootfile);
62   hist = new TH1F("hist","",100,-0.6,0.6);
63   SetTH1Options(hist);
64   
65
66   can = new TCanvas("can","Residuals",900,600);
67   can->Divide(2);
68   SetCanvasOptions(can);
69   can->cd(1);
70   //ntuppel->Draw("residual_trans>>hist","zHit < 50 && padrow > 55");//beta < 10*4.1515/180");
71   ntuppel->Draw("resy>>hist","ptgen > 1.0");
72   
73   float rms = hist->GetRMS();
74   printf("Rms value : %f\n",rms);
75   
76   TF1 *f = new TF1("f","gaus",-rms,rms);
77   hist->Fit("f","R");
78     
79   hist->GetXaxis()->SetTitle("#delta_{T} [cm]");
80   hist->GetYaxis()->SetTitle("Counts");
81   
82   f2 = new TFile("results_fast_oldparams.root");
83   hist2 = new TH1F("hist2","",100,-0.6,0.6);
84   SetTH1Options(hist2);
85   can->cd(2);
86   ntuppel_fast->Draw("residual_trans>>hist2","nHits>100 && pt>1.0 && padrow > 0 && zHit < 50");//dipangle < 20*3.1415/180");
87   
88     
89   can->Update();
90   
91
92 }