]>
Commit | Line | Data |
---|---|---|
43361342 | 1 | #if !defined(__CINT__) || defined(__MAKECINT__) |
2 | #include <TSystem.h> | |
3 | #endif | |
4 | ||
5 | //--------------------------------------- | |
6 | Int_t getNStaves(AliITSUSegmentationPix* seg, double tilt, double r0, double minOvl); | |
7 | ||
8 | void CreateITSU() | |
9 | { | |
10 | // | |
11 | gSystem->Load("libITSUpgradeBase.so"); | |
12 | gSystem->Load("libITSUpgradeSim.so"); | |
13 | ||
14 | ||
15 | // build ITS upgrade detector | |
16 | // sensitive area 13x15mm (X,Z) with 20x20 micron pitch, 2mm dead zone on readout side and 50 micron guardring | |
17 | const double kSensThick = 18e-4; | |
18 | const double kPitchX = 20e-4; | |
19 | const double kPitchZ = 20e-4; | |
20 | const int kNRow = 650; | |
21 | const int kNCol = 750; | |
22 | const int kNChips = 2; | |
23 | const double kLrTick03 = 120e-4; // -> effective thickness for ~0.3%X layers | |
24 | const double kLrTick08 = 600e-4; // -> effective thickness for ~0.8%X layers | |
25 | // | |
26 | const double kReadOutEdge = 0.2; // width of the readout edge (passive bottom) | |
27 | const double kGuardRing = 50e-4; // width of passive area on left/right/top of the sensor | |
28 | // create segmentations: | |
29 | AliITSUSegmentationPix* seg0 = new AliITSUSegmentationPix(0, // segID (0:9) | |
30 | kNChips, // chips per module | |
31 | kNChips*kNCol, // ncols (total for module) | |
32 | kNRow, // nrows | |
33 | kPitchX, // default row pitch in cm | |
34 | kPitchZ, // default col pitch in cm | |
35 | kSensThick, // sensor thickness in cm | |
36 | -1, // no special left col between chips | |
37 | -1, // no special right col between chips | |
38 | kGuardRing, // left | |
39 | kGuardRing, // right | |
40 | kGuardRing, // top | |
41 | kReadOutEdge // bottom | |
42 | ); // see AliITSUSegmentationPix.h for extra options | |
43 | seg0->Store(AliITSUGeomTGeo::GetITSsegmentationFileName()); | |
44 | // | |
45 | AliITSUSegmentationPix* seg1 = new AliITSUSegmentationPix(1, // segID (0:9) | |
46 | kNChips, // chips per module | |
47 | kNChips*kNCol, // ncols (total for module) | |
48 | 2*kNRow, // nrows for oute layers | |
49 | kPitchX, // default row pitch in cm | |
50 | kPitchZ, // default col pitch in cm | |
51 | kSensThick, // sensor thickness in cm | |
52 | -1, // no special left col between chips | |
53 | -1, // no special right col between chips | |
54 | kGuardRing, // left | |
55 | kGuardRing, // right | |
56 | kReadOutEdge, // top !!! readout from both sides | |
57 | kReadOutEdge // bottom | |
58 | ); // see AliITSUSegmentationPix.h for extra options | |
59 | seg1->Store(AliITSUGeomTGeo::GetITSsegmentationFileName()); | |
60 | // | |
61 | seg0->Print(); | |
62 | seg1->Print(); | |
63 | // | |
64 | const double kMinOvl = 0.005; // require active zones overlap | |
65 | const double kPhi0 = 0.; // az.angle of 1st stave | |
66 | const double kTilt = -10.; // tilt in degrees | |
67 | double dzLr,rLr,ovlA,xActProj; | |
68 | AliITSUSegmentationPix* seg=0; | |
69 | int nStaveLr,nModPerStaveLr,idLr; | |
70 | // virtual void DefineLayerTurbo(const Int_t nlay, const Double_t r, const Double_t zlen, const Int_t nladd, const Int_t nmod, const Double_t width, | |
71 | // const Double_t tilt, const Double_t lthick = 0., const Double_t dthick = 0., const UInt_t detType=0); | |
72 | AliITSUv0 *ITS = new AliITSUv0("ITS Upgrade",7); | |
73 | ITS->SetStaveModel(AliITSUv0::kModel22); | |
74 | // | |
c7fde51a | 75 | const int kNWrapVol = 3; |
76 | const double wrpRMin[kNWrapVol] = { 2.05, 15.0, 32.0}; | |
77 | const double wrpRMax[kNWrapVol] = { 8.0, 27.0, 45.0}; | |
78 | const double wrpZSpan[kNWrapVol] = {28.0, 86.0, 152.0}; | |
79 | ITS->SetNWrapVolumes(kNWrapVol); // define wrapper volumes for layers | |
80 | for (int iw=0;iw<kNWrapVol;iw++) ITS->DefineWrapVolume(iw,wrpRMin[iw],wrpRMax[iw],wrpZSpan[iw]); | |
81 | // | |
43361342 | 82 | // INNER LAYERS |
83 | idLr = 0; | |
84 | rLr = 2.2; // 2.165? | |
85 | dzLr = 2*11.2; // min Z to cover | |
86 | seg = seg0; | |
87 | nModPerStaveLr = 1+dzLr/seg->Dz(); | |
88 | nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); | |
89 | ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID()); | |
90 | printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr); | |
91 | // | |
92 | idLr = 1; | |
93 | rLr = 2.8; // 2.77 ? | |
94 | dzLr = 2*12.1; | |
95 | seg = seg0; | |
96 | nModPerStaveLr = 1+dzLr/seg->Dz(); | |
97 | nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); | |
98 | ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID()); | |
99 | printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr); | |
100 | // | |
101 | idLr = 2; | |
102 | rLr = 3.6; // 3.58 ? | |
103 | dzLr = 2*13.4; | |
104 | seg = seg0; | |
105 | nModPerStaveLr = 1+dzLr/seg->Dz(); | |
106 | nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); | |
107 | ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID()); | |
108 | printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr); | |
109 | // | |
110 | // | |
111 | // MIDDLE LAYERS (double side readout sensors) | |
112 | idLr = 3; | |
113 | rLr = 20.0; | |
114 | dzLr = 2*39.0; | |
115 | seg = seg1; | |
116 | nModPerStaveLr = 1+dzLr/seg->Dz(); | |
117 | nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); | |
118 | ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID()); | |
119 | printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr); | |
120 | // | |
121 | idLr = 4; | |
122 | rLr = 22.0; | |
123 | dzLr = 2*41.8; | |
124 | seg = seg1; | |
125 | nModPerStaveLr = 1+dzLr/seg->Dz(); | |
126 | nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); | |
127 | ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID()); | |
128 | printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr); | |
129 | // | |
130 | // | |
131 | // OUTER LAYERS (double side readout sensors) | |
132 | idLr = 5; | |
133 | rLr = 40.0; | |
134 | dzLr = 2*71.2; | |
135 | seg = seg1; | |
136 | nModPerStaveLr = 1+dzLr/seg->Dz(); | |
137 | nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); | |
138 | ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID()); | |
139 | printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr); | |
140 | // | |
141 | idLr = 6; | |
142 | rLr = 43.0; | |
143 | dzLr = 2*74.3; | |
144 | seg = seg1; | |
145 | nModPerStaveLr = 1+dzLr/seg->Dz(); | |
146 | nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); | |
147 | ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID()); | |
148 | printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr); | |
149 | // | |
150 | } | |
151 | ||
152 | Int_t getNStaves(AliITSUSegmentationPix* seg, double tilt, double r0, double minOvl) | |
153 | { | |
154 | double dphi = (90.-tilt)*TMath::DegToRad(); | |
155 | double cs = TMath::Cos(dphi); | |
156 | double sn = TMath::Sin(dphi); | |
157 | double dx = seg->Dx(); | |
158 | double tL = -dx/2 + seg->GetGuardBot(); | |
159 | double tU = dx/2 - seg->GetGuardTop(); | |
160 | // | |
161 | double xL = r0 + cs*tL; | |
162 | double yL = sn*tL; | |
163 | double xU = r0 + cs*tU; | |
164 | double yU = sn*tU; | |
165 | double phiL = TMath::ATan2(yL,xL); | |
166 | double phiU = TMath::ATan2(yU,xU); | |
167 | double dphi = TMath::Abs(phiL-phiU); | |
168 | if (dphi>TMath::Pi()) dphi = TMath::Abs(dphi-TMath::Pi()*2); | |
169 | double span = dphi*r0; | |
170 | // | |
171 | double ov = -1; | |
172 | int nStaveLr = 1 + r0*TMath::Pi()*2/span; | |
173 | do { ov = 1.-r0*TMath::Pi()*2/nStaveLr/span; } while ( minOvl>=0 && ov<minOvl && nStaveLr++ ); | |
174 | printf("Recomend %2d staves for R=%5.2f, ActiveOvl=%5.2f\% (%6.f micron)\n",nStaveLr,r0,ov*100,ov*span*1e4); | |
175 | return nStaveLr; | |
176 | } |