ROOT logo

// You have to load the class before ... ;-)
// .L DetectorK.cxx++

//void standardPlots() {

void testDetectorUp() {


  DetectorK its("ALICE","ITS");

  its.AddLayer((char*)"bpipe",2.0.0,0.0022);
  its.AddLayer((char*)"vertex",     0,     0); // dummy vertex for matrix calculation
  // new ideal Pixel properties?
  Double_t x0IB     = 0.003;
  Double_t x0OB     = 0.008;
  Double_t resRPhiIB     = 0.0004;
  Double_t resZIB        = 0.0004;
  Double_t resRPhiOB     = 0.0004;
  Double_t resZOB        = 0.0004;
  Double_t eff           = 0.95;
  //
  //  /*
  its.AddLayer((char*)"ddd1",  2.32 ,  x0IB, resRPhiIB, resZIB,eff); 
  its.AddLayer((char*)"ddd2",  3.13 ,  x0IB, resRPhiIB, resZIB,eff); 
  its.AddLayer((char*)"ddd3",  3.91 ,  x0IB, resRPhiIB, resZIB,eff); 
  its.AddLayer((char*)"ddd4",  19.41,  x0OB, resRPhiOB, resZOB,eff); 
  its.AddLayer((char*)"ddd5",  24.71 ,  x0OB, resRPhiOB, resZOB,eff); 
  its.AddLayer((char*)"ddd6",  35.33 ,  x0OB, resRPhiOB, resZOB,eff); 
  its.AddLayer((char*)"ddd7",  40.53 ,  x0OB, resRPhiOB, resZOB,eff); 
  //  */
  //
  /*
  its.AddLayer((char*)"ddd1",  2.32 ,  x0IB, resRPhiIB, resZIB,eff); 
  its.AddLayer((char*)"ddd2",  3.13 ,  x0IB, resRPhiIB, resZIB,eff); 
  its.AddLayer((char*)"ddd3",  3.91 ,  x0IB, resRPhiIB, resZIB,eff); 
  its.AddLayer((char*)"ddd4",  19.41+5,  x0OB, resRPhiOB, resZOB,eff); 
  its.AddLayer((char*)"ddd5",  24.71+5,  x0OB, resRPhiOB, resZOB,eff); 
  //  its.AddLayer((char*)"ddd4",  5.,  x0OB, resRPhiOB, resZOB,eff); 
  //  its.AddLayer((char*)"ddd5",  32. ,  x0OB, resRPhiOB, resZOB,eff); 
  its.AddLayer((char*)"ddd6",  35.33 ,  x0OB, resRPhiOB, resZOB,eff); 
  its.AddLayer((char*)"ddd7",  40.53 ,  x0OB, resRPhiOB, resZOB,eff); 
  */

  its.SetAtLeastHits(5);
  its.SetAtLeastCorr(5);
  its.SetAtLeastFake(1);
  //
  its.PrintLayout();
  its.SolveViaBilloir(0);
 
  its.MakeStandardPlots(0,2,1,kTRUE);
  //  return;
  its.AddTPC(0.1,0.1);
  //  its.AddTRD(0.02,2.5);
  its.SolveViaBilloir(0);
 
  its.MakeStandardPlots(1,1,1,kTRUE);
  //  its.PrintLayout(1);
}

void testDetectorCurr() {
  DetectorK its("ALICE","ITS");
  its.MakeAliceCurrent(0,0);
  its.SetAtLeastCorr(4);
  its.SetAtLeastFake(1);
  its.PrintLayout();
  its.SolveViaBilloir(0);
 
  its.MakeStandardPlots(0,2,1,kTRUE);
  //  return;
  its.AddTPC(0.1,0.1);
  its.SolveViaBilloir(0);
 
  its.MakeStandardPlots(1,1,1,kTRUE);
  
}

void particleDependendResolution() { 
// particle dependency on resolution

  // .L Detector.cxx++

  Detector its("ALICE","ITS");

  its.MakeAliceCurrent(); 
  its.PrintLayout();
  its.PlotLayout();

  its.SolveViaBilloir(0);
 
  its.SetRadius("bpipe",2.1);
  its.AddLayer("spd0",2.2,0.001,0.0012,0.0012);

  TCanvas *c1 = new TCanvas("c1","c1");
 
  c1->Divide(2,1);
  c1->cd(1); gPad->SetGridx();   gPad->SetGridy(); 
  gPad->SetLogx(); //gPad->SetLogy();
  c1->cd(2); gPad->SetGridx();   gPad->SetGridy(); 
  gPad->SetLogx(); //gPad->SetLogy();

  
  // compare to telescope equation ?
  //  c1->cd(1); its.GetGraphPointingResolutionTeleEqu(0,1)->Draw("AC");
  //  c1->cd(2); its.GetGraphPointingResolutionTeleEqu(1,1)->Draw("AC");

  its.SetParticleMass(0.140); // pion  
  its.SolveViaBilloir(0,0);
  c1->cd(1); its.GetGraphPointingResolution(0,1)->Draw("AC");
  c1->cd(2); its.GetGraphPointingResolution(1,1)->Draw("AC");
 
  its.SetParticleMass(0.498); // kaon  
  its.SolveViaBilloir(0,0);
  c1->cd(1); its.GetGraphPointingResolution(0,2)->Draw("C");
  c1->cd(2); its.GetGraphPointingResolution(1,2)->Draw("C");

  its.SetParticleMass(0.00051); // electron  
  its.SolveViaBilloir(0,0);
  c1->cd(1); its.GetGraphPointingResolution(0,3)->Draw("C");
  c1->cd(2); its.GetGraphPointingResolution(1,3)->Draw("C");

  its.SetParticleMass(0.938); // proton  
  its.SolveViaBilloir(0,0);
  c1->cd(1); its.GetGraphPointingResolution(0,4)->Draw("C");
  c1->cd(2); its.GetGraphPointingResolution(1,4)->Draw("C");



}

 testDetectorUp.C:1
 testDetectorUp.C:2
 testDetectorUp.C:3
 testDetectorUp.C:4
 testDetectorUp.C:5
 testDetectorUp.C:6
 testDetectorUp.C:7
 testDetectorUp.C:8
 testDetectorUp.C:9
 testDetectorUp.C:10
 testDetectorUp.C:11
 testDetectorUp.C:12
 testDetectorUp.C:13
 testDetectorUp.C:14
 testDetectorUp.C:15
 testDetectorUp.C:16
 testDetectorUp.C:17
 testDetectorUp.C:18
 testDetectorUp.C:19
 testDetectorUp.C:20
 testDetectorUp.C:21
 testDetectorUp.C:22
 testDetectorUp.C:23
 testDetectorUp.C:24
 testDetectorUp.C:25
 testDetectorUp.C:26
 testDetectorUp.C:27
 testDetectorUp.C:28
 testDetectorUp.C:29
 testDetectorUp.C:30
 testDetectorUp.C:31
 testDetectorUp.C:32
 testDetectorUp.C:33
 testDetectorUp.C:34
 testDetectorUp.C:35
 testDetectorUp.C:36
 testDetectorUp.C:37
 testDetectorUp.C:38
 testDetectorUp.C:39
 testDetectorUp.C:40
 testDetectorUp.C:41
 testDetectorUp.C:42
 testDetectorUp.C:43
 testDetectorUp.C:44
 testDetectorUp.C:45
 testDetectorUp.C:46
 testDetectorUp.C:47
 testDetectorUp.C:48
 testDetectorUp.C:49
 testDetectorUp.C:50
 testDetectorUp.C:51
 testDetectorUp.C:52
 testDetectorUp.C:53
 testDetectorUp.C:54
 testDetectorUp.C:55
 testDetectorUp.C:56
 testDetectorUp.C:57
 testDetectorUp.C:58
 testDetectorUp.C:59
 testDetectorUp.C:60
 testDetectorUp.C:61
 testDetectorUp.C:62
 testDetectorUp.C:63
 testDetectorUp.C:64
 testDetectorUp.C:65
 testDetectorUp.C:66
 testDetectorUp.C:67
 testDetectorUp.C:68
 testDetectorUp.C:69
 testDetectorUp.C:70
 testDetectorUp.C:71
 testDetectorUp.C:72
 testDetectorUp.C:73
 testDetectorUp.C:74
 testDetectorUp.C:75
 testDetectorUp.C:76
 testDetectorUp.C:77
 testDetectorUp.C:78
 testDetectorUp.C:79
 testDetectorUp.C:80
 testDetectorUp.C:81
 testDetectorUp.C:82
 testDetectorUp.C:83
 testDetectorUp.C:84
 testDetectorUp.C:85
 testDetectorUp.C:86
 testDetectorUp.C:87
 testDetectorUp.C:88
 testDetectorUp.C:89
 testDetectorUp.C:90
 testDetectorUp.C:91
 testDetectorUp.C:92
 testDetectorUp.C:93
 testDetectorUp.C:94
 testDetectorUp.C:95
 testDetectorUp.C:96
 testDetectorUp.C:97
 testDetectorUp.C:98
 testDetectorUp.C:99
 testDetectorUp.C:100
 testDetectorUp.C:101
 testDetectorUp.C:102
 testDetectorUp.C:103
 testDetectorUp.C:104
 testDetectorUp.C:105
 testDetectorUp.C:106
 testDetectorUp.C:107
 testDetectorUp.C:108
 testDetectorUp.C:109
 testDetectorUp.C:110
 testDetectorUp.C:111
 testDetectorUp.C:112
 testDetectorUp.C:113
 testDetectorUp.C:114
 testDetectorUp.C:115
 testDetectorUp.C:116
 testDetectorUp.C:117
 testDetectorUp.C:118
 testDetectorUp.C:119
 testDetectorUp.C:120
 testDetectorUp.C:121
 testDetectorUp.C:122
 testDetectorUp.C:123
 testDetectorUp.C:124
 testDetectorUp.C:125
 testDetectorUp.C:126
 testDetectorUp.C:127
 testDetectorUp.C:128
 testDetectorUp.C:129
 testDetectorUp.C:130
 testDetectorUp.C:131
 testDetectorUp.C:132