]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/testITSUv1/CreateITSUv1.C
SensorThickness was defined twice. Set inner chip thickness to 250mum to bypass bug...
[u/mrichter/AliRoot.git] / ITS / UPGRADE / testITSUv1 / CreateITSUv1.C
CommitLineData
b705c75b 1#if !defined(__CINT__) || defined(__MAKECINT__)
2#include <TSystem.h>
3#include <TMath.h>
4#endif
5
6//---------------------------------------
7double radii2Turbo(double rMin,double rMid,double rMax, double sensW)
8{
9 // compute turbo angle from radii and sensor width
10 return TMath::ASin((rMax*rMax-rMin*rMin)/(2*rMid*sensW))*TMath::RadToDeg();
11}
12
13double radii2Phi(double rMin,double rMid,double rMax, double sensW)
14{
15 // compute phi coverage
16 return 2*TMath::ACos((rMax+rMin)*
17 (rMid*rMid+rMin*rMax-sensW*sensW/4.)/
18 (4.*rMid*rMax*rMin));
19}
20
21void CreateITSUv1()
22{
23 //
24 gSystem->Load("libITSUpgradeBase.so");
25 gSystem->Load("libITSUpgradeSim.so");
3f922a98 26 //
b705c75b 27 // build ITS upgrade detector
28 // sensitive area 13x15mm (X,Z) with 20x20 micron pitch, 2mm dead zone on readout side and 50 micron guardring
29 const double kSensThick = 18e-4;
30 const double kPitchX = 20e-4;
31 const double kPitchZ = 20e-4;
32 const int kNRow = 650;
3f922a98 33 const int kNCol = 1500;
b4bfafe9 34 // const double kSensThick = 120e-4; // -> sensor Si thickness
b705c75b 35 //
36 const double kReadOutEdge = 0.2; // width of the readout edge (passive bottom)
37 const double kGuardRing = 50e-4; // width of passive area on left/right/top of the sensor
38 //
39 const int kNLr = 7;
40 const int kNLrInner = 3;
41 const int kBuildLevel = 3;
42 enum {kRmn,kRmd,kRmx,kNModPerStave,kPhi0,kNStave,kNPar};
43 // Radii are from last TDR (ALICE-TDR-017.pdf Tab. 1.1, rMid is mean value)
44 const double tdr5dat[kNLr][kNPar] = {
3f922a98 45 {2.24, 2.34, 2.67, 9., 16.37, 12}, // for each inner layer: rMin,rMid,rMax,NChip/Stave, phi0, nStaves
b705c75b 46 {3.01, 3.15, 3.46, 9., 12.03, 16},
47 {3.78, 3.93, 4.21, 9., 10.02, 20},
3f922a98 48 {-1, 19.6 , -1, 4., 0. , 24}, // for others: -, rMid, -, NMod/HStave, phi0, nStaves // 24 was 49
b705c75b 49 {-1, 24.55, -1, 4., 0. , 30}, // 30 was 61
50 {-1, 34.39, -1, 7., 0. , 42}, // 42 was 88
51 {-1, 39.34, -1, 7., 0. , 48} // 48 was 100
52 };
3f922a98 53 const int nChipsPerModule = 7; // For OB: how many chips in a row
b705c75b 54
55 // create segmentations:
56 AliITSUSegmentationPix* seg0 = new AliITSUSegmentationPix(0, // segID (0:9)
3f922a98 57 1, // chips per module
58 kNCol, // ncols (total for module)
b705c75b 59 kNRow, // nrows
60 kPitchX, // default row pitch in cm
61 kPitchZ, // default col pitch in cm
62 kSensThick, // sensor thickness in cm
63 -1, // no special left col between chips
64 -1, // no special right col between chips
65 kGuardRing, // left
66 kGuardRing, // right
67 kGuardRing, // top
68 kReadOutEdge // bottom
69 ); // see AliITSUSegmentationPix.h for extra options
70 seg0->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
71 //
b705c75b 72 seg0->Print();
b705c75b 73 //
3f922a98 74 double dzLr,rLr,phi0,turbo;
b705c75b 75 int nStaveLr,nModPerStaveLr,idLr;
3f922a98 76 //
77 AliITSUv1 *ITS = new AliITSUv1("ITS Upgrade",kNLr);
b705c75b 78 ITS->SetStaveModelIB(AliITSUv1::kIBModel22);
79 ITS->SetStaveModelOB(AliITSUv1::kOBModel1);
80 //
81 const int kNWrapVol = 3;
82 const double wrpRMin[kNWrapVol] = { 2.1, 15.0, 32.0};
51907e19 83 const double wrpRMax[kNWrapVol] = { 7.0, 27.0+2.5, 43.0+1.5};
3f922a98 84 const double wrpZSpan[kNWrapVol] = {28.0, 86.0, 150.0};
85 //
b705c75b 86 ITS->SetNWrapVolumes(kNWrapVol); // define wrapper volumes for layers
87 for (int iw=0;iw<kNWrapVol;iw++) ITS->DefineWrapVolume(iw,wrpRMin[iw],wrpRMax[iw],wrpZSpan[iw]);
88 //
89 for (int idLr=0;idLr<kNLr;idLr++) {
90 rLr = tdr5dat[idLr][kRmd];
91 phi0 = tdr5dat[idLr][kPhi0];
3f922a98 92 //
b705c75b 93 nStaveLr = TMath::Nint(tdr5dat[idLr][kNStave]);
b705c75b 94 nModPerStaveLr = TMath::Nint(tdr5dat[idLr][kNModPerStave]);
95 int nChipsPerStaveLr = nModPerStaveLr;
3f922a98 96 //
b705c75b 97 if (idLr>=kNLrInner) {
98 nChipsPerStaveLr *= nChipsPerModule;
3f922a98 99 ITS->DefineLayer(idLr, phi0, rLr, nChipsPerStaveLr*seg0->Dz(), nStaveLr, nModPerStaveLr,
b4bfafe9 100 seg0->Dy()+150e-4, seg0->Dy(), seg0->GetChipTypeID(),kBuildLevel);
3f922a98 101 // printf("Add Lr%d: R=%6.2f DZ:%6.2f Staves:%3d NMod/Stave:%3d\n",
102 // idLr,rLr,nChipsPerStaveLr*seg0->Dz(),nStaveLr,nModPerStaveLr);
b705c75b 103 } else {
3f922a98 104 turbo = -radii2Turbo(tdr5dat[idLr][kRmn],rLr,tdr5dat[idLr][kRmx],seg0->Dx());
105 ITS->DefineLayerTurbo(idLr, phi0, rLr, nChipsPerStaveLr*seg0->Dz(), nStaveLr, nChipsPerStaveLr,
b4bfafe9 106 seg0->Dx(), turbo, seg0->Dy()+250e-4, seg0->Dy(), seg0->GetChipTypeID());
3f922a98 107 // printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n",
108 // idLr,rLr,nChipsPerStaveLr*seg0->Dz(),turbo,nStaveLr,nModPerStaveLr);
b705c75b 109 }
110 //
111 }
112 //
113}