ROOT logo

ALICE SSD example (full 3D, with B field)

{
  KDetector det;
  det.SStep=3;
  det.nx=250;
  det.ny=100;
  det.nz=300;
  Float_t dimX=1000;
  Float_t dimY=300;
  Float_t dimZ=900;
  //init geometry
  det.EG=new TH3I("EG","EG",det.nx,0,dimX,det.ny,0,dimY,det.nz,0,dimZ);
  det.EG->GetXaxis()->SetTitle("x [#mum]");
  det.EG->GetYaxis()->SetTitle("y [#mum]");
  det.EG->GetZaxis()->SetTitle("z [#mum]");
  //init material
  det.DM=new TH3I("DM","DM",det.nx,0,dimX,det.ny,0,dimY,det.nz,0,dimZ);
  det.DM->GetXaxis()->SetTitle("x [#mum]");
  det.DM->GetYaxis()->SetTitle("y [#mum]");
  det.DM->GetZaxis()->SetTitle("z [#mum]");
  //init space charge histo
  det.NeffH=new TH3F("Neff","Neff",det.nx,0,dimX,det.ny,0,dimY,det.nz,0,dimZ);
  det.NeffH->GetXaxis()->SetTitle("x [#mum]");
  det.NeffH->GetYaxis()->SetTitle("y [#mum]");
  det.NeffH->GetZaxis()->SetTitle("z [#mum]");

  // Collection electrodes
  Float_t BackPos[3]={950,299,450};
  Float_t BackSiz[3]={30,0.5,100};
  for(int el=0;el<3;el++)
    {
      BackPos[2]=el*300+150;; 
      if(el==1) det.ElRectangle(BackPos,BackSiz,16385,0);  
      else det.ElRectangle(BackPos,BackSiz,1,0);  
    }
 
  // Field Strips - definitions
  Float_t StripPos[3]={50,300,dimZ/2};
  Float_t StripSiz[3]={30,0.5,dimZ/2};

  // definition of votlages to be applied to the field strips

  det->Voltages->Set(291);
  for(int i=0; i<=7; i++)
    {
      StripPos[0]=i*120; 
     det->Voltages[i]=-70+i*6;
     StripPos[1]=299;
     det.ElRectangle(StripPos,StripSiz,det->SetElecVolt(i),0);  
    
     StripPos[1]=1;
     det.ElRectangle(StripPos,StripSiz,det->SetElecVolt(i),0);  
    }

  //  SetUpMaterial
 for(int k=0;k<=det.nz;k++) 
  for(int j=0;j<=det.ny;j++)
    for(int i=0;i<=det.nx;i++) 

      {
          det->DM->SetBinContent(i,j,k,0); 
          det->NeffH->SetBinContent(i,j,k,0.5);  // very high resistivity Neff=1e11 cm-3
      }

  det->SetBoundaryConditions();

    det->CalField(0);
    det->CalField(1);
    det->B[0]=2e-4;
    det->B[1]=0;
    det->B[0]=0;




    det->SetEntryPoint(200,300,450);
    det->SetExitPoint(200,1,450);

    det.SetDriftHisto(500e-9);
    det.SetPrecision(1e-9);
    det->diff=1;
    det->ShowMipIR(300);
}
 SiDriftExample_4.C:1
 SiDriftExample_4.C:2
 SiDriftExample_4.C:3
 SiDriftExample_4.C:4
 SiDriftExample_4.C:5
 SiDriftExample_4.C:6
 SiDriftExample_4.C:7
 SiDriftExample_4.C:8
 SiDriftExample_4.C:9
 SiDriftExample_4.C:10
 SiDriftExample_4.C:11
 SiDriftExample_4.C:12
 SiDriftExample_4.C:13
 SiDriftExample_4.C:14
 SiDriftExample_4.C:15
 SiDriftExample_4.C:16
 SiDriftExample_4.C:17
 SiDriftExample_4.C:18
 SiDriftExample_4.C:19
 SiDriftExample_4.C:20
 SiDriftExample_4.C:21
 SiDriftExample_4.C:22
 SiDriftExample_4.C:23
 SiDriftExample_4.C:24
 SiDriftExample_4.C:25
 SiDriftExample_4.C:26
 SiDriftExample_4.C:27
 SiDriftExample_4.C:28
 SiDriftExample_4.C:29
 SiDriftExample_4.C:30
 SiDriftExample_4.C:31
 SiDriftExample_4.C:32
 SiDriftExample_4.C:33
 SiDriftExample_4.C:34
 SiDriftExample_4.C:35
 SiDriftExample_4.C:36
 SiDriftExample_4.C:37
 SiDriftExample_4.C:38
 SiDriftExample_4.C:39
 SiDriftExample_4.C:40
 SiDriftExample_4.C:41
 SiDriftExample_4.C:42
 SiDriftExample_4.C:43
 SiDriftExample_4.C:44
 SiDriftExample_4.C:45
 SiDriftExample_4.C:46
 SiDriftExample_4.C:47
 SiDriftExample_4.C:48
 SiDriftExample_4.C:49
 SiDriftExample_4.C:50
 SiDriftExample_4.C:51
 SiDriftExample_4.C:52
 SiDriftExample_4.C:53
 SiDriftExample_4.C:54
 SiDriftExample_4.C:55
 SiDriftExample_4.C:56
 SiDriftExample_4.C:57
 SiDriftExample_4.C:58
 SiDriftExample_4.C:59
 SiDriftExample_4.C:60
 SiDriftExample_4.C:61
 SiDriftExample_4.C:62
 SiDriftExample_4.C:63
 SiDriftExample_4.C:64
 SiDriftExample_4.C:65
 SiDriftExample_4.C:66
 SiDriftExample_4.C:67
 SiDriftExample_4.C:68
 SiDriftExample_4.C:69
 SiDriftExample_4.C:70
 SiDriftExample_4.C:71
 SiDriftExample_4.C:72
 SiDriftExample_4.C:73
 SiDriftExample_4.C:74
 SiDriftExample_4.C:75
 SiDriftExample_4.C:76
 SiDriftExample_4.C:77
 SiDriftExample_4.C:78
 SiDriftExample_4.C:79
 SiDriftExample_4.C:80
 SiDriftExample_4.C:81
 SiDriftExample_4.C:82
 SiDriftExample_4.C:83