]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/testITSU/testDetectorUp.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / ITS / UPGRADE / testITSU / testDetectorUp.C
1
2 // You have to load the class before ... ;-)
3 // .L DetectorK.cxx++
4
5 //void standardPlots() {
6
7
8 void testDetectorUp() {
9
10
11   DetectorK its("ALICE","ITS");
12
13   its.AddLayer((char*)"bpipe",2.0.0,0.0022);
14   its.AddLayer((char*)"vertex",     0,     0); // dummy vertex for matrix calculation
15   // new ideal Pixel properties?
16   Double_t x0IB     = 0.003;
17   Double_t x0OB     = 0.008;
18   Double_t resRPhiIB     = 0.0004;
19   Double_t resZIB        = 0.0004;
20   Double_t resRPhiOB     = 0.0004;
21   Double_t resZOB        = 0.0004;
22   Double_t eff           = 0.95;
23   //
24   //  /*
25   its.AddLayer((char*)"ddd1",  2.32 ,  x0IB, resRPhiIB, resZIB,eff); 
26   its.AddLayer((char*)"ddd2",  3.13 ,  x0IB, resRPhiIB, resZIB,eff); 
27   its.AddLayer((char*)"ddd3",  3.91 ,  x0IB, resRPhiIB, resZIB,eff); 
28   its.AddLayer((char*)"ddd4",  19.41,  x0OB, resRPhiOB, resZOB,eff); 
29   its.AddLayer((char*)"ddd5",  24.71 ,  x0OB, resRPhiOB, resZOB,eff); 
30   its.AddLayer((char*)"ddd6",  35.33 ,  x0OB, resRPhiOB, resZOB,eff); 
31   its.AddLayer((char*)"ddd7",  40.53 ,  x0OB, resRPhiOB, resZOB,eff); 
32   //  */
33   //
34   /*
35   its.AddLayer((char*)"ddd1",  2.32 ,  x0IB, resRPhiIB, resZIB,eff); 
36   its.AddLayer((char*)"ddd2",  3.13 ,  x0IB, resRPhiIB, resZIB,eff); 
37   its.AddLayer((char*)"ddd3",  3.91 ,  x0IB, resRPhiIB, resZIB,eff); 
38   its.AddLayer((char*)"ddd4",  19.41+5,  x0OB, resRPhiOB, resZOB,eff); 
39   its.AddLayer((char*)"ddd5",  24.71+5,  x0OB, resRPhiOB, resZOB,eff); 
40   //  its.AddLayer((char*)"ddd4",  5.,  x0OB, resRPhiOB, resZOB,eff); 
41   //  its.AddLayer((char*)"ddd5",  32. ,  x0OB, resRPhiOB, resZOB,eff); 
42   its.AddLayer((char*)"ddd6",  35.33 ,  x0OB, resRPhiOB, resZOB,eff); 
43   its.AddLayer((char*)"ddd7",  40.53 ,  x0OB, resRPhiOB, resZOB,eff); 
44   */
45
46   its.SetAtLeastHits(5);
47   its.SetAtLeastCorr(5);
48   its.SetAtLeastFake(1);
49   //
50   its.PrintLayout();
51   its.SolveViaBilloir(0);
52  
53   its.MakeStandardPlots(0,2,1,kTRUE);
54   //  return;
55   its.AddTPC(0.1,0.1);
56   its.SolveViaBilloir(0);
57  
58   its.MakeStandardPlots(1,1,1,kTRUE);
59
60 }
61
62 void testDetectorCurr() {
63   DetectorK its("ALICE","ITS");
64   its.MakeAliceCurrent(0,0);
65   its.SetAtLeastCorr(4);
66   its.SetAtLeastFake(1);
67   its.PrintLayout();
68   its.SolveViaBilloir(0);
69  
70   its.MakeStandardPlots(0,2,1,kTRUE);
71   //  return;
72   its.AddTPC(0.1,0.1);
73   its.SolveViaBilloir(0);
74  
75   its.MakeStandardPlots(1,1,1,kTRUE);
76   
77 }
78
79 void particleDependendResolution() { 
80 // particle dependency on resolution
81
82   // .L Detector.cxx++
83
84   Detector its("ALICE","ITS");
85
86   its.MakeAliceCurrent(); 
87   its.PrintLayout();
88   its.PlotLayout();
89
90   its.SolveViaBilloir(0);
91  
92   its.SetRadius("bpipe",2.1);
93   its.AddLayer("spd0",2.2,0.001,0.0012,0.0012);
94
95   TCanvas *c1 = new TCanvas("c1","c1");
96  
97   c1->Divide(2,1);
98   c1->cd(1); gPad->SetGridx();   gPad->SetGridy(); 
99   gPad->SetLogx(); //gPad->SetLogy();
100   c1->cd(2); gPad->SetGridx();   gPad->SetGridy(); 
101   gPad->SetLogx(); //gPad->SetLogy();
102
103   
104   // compare to telescope equation ?
105   //  c1->cd(1); its.GetGraphPointingResolutionTeleEqu(0,1)->Draw("AC");
106   //  c1->cd(2); its.GetGraphPointingResolutionTeleEqu(1,1)->Draw("AC");
107
108   its.SetParticleMass(0.140); // pion  
109   its.SolveViaBilloir(0,0);
110   c1->cd(1); its.GetGraphPointingResolution(0,1)->Draw("AC");
111   c1->cd(2); its.GetGraphPointingResolution(1,1)->Draw("AC");
112  
113   its.SetParticleMass(0.498); // kaon  
114   its.SolveViaBilloir(0,0);
115   c1->cd(1); its.GetGraphPointingResolution(0,2)->Draw("C");
116   c1->cd(2); its.GetGraphPointingResolution(1,2)->Draw("C");
117
118   its.SetParticleMass(0.00051); // electron  
119   its.SolveViaBilloir(0,0);
120   c1->cd(1); its.GetGraphPointingResolution(0,3)->Draw("C");
121   c1->cd(2); its.GetGraphPointingResolution(1,3)->Draw("C");
122
123   its.SetParticleMass(0.938); // proton  
124   its.SolveViaBilloir(0,0);
125   c1->cd(1); its.GetGraphPointingResolution(0,4)->Draw("C");
126   c1->cd(2); its.GetGraphPointingResolution(1,4)->Draw("C");
127
128
129
130 }
131