4c039060 |
1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
3 | * * |
4 | * Author: The ALICE Off-line Project. * |
5 | * Contributors are mentioned in the code where appropriate. * |
6 | * * |
7 | * Permission to use, copy, modify and distribute this software and its * |
8 | * documentation strictly for non-commercial purposes is hereby granted * |
9 | * without fee, provided that the above copyright notice appears in all * |
10 | * copies and that both the copyright notice and this permission notice * |
11 | * appear in the supporting documentation. The authors make no claims * |
12 | * about the suitability of this software for any purpose. It is * |
13 | * provided "as is" without express or implied warranty. * |
14 | **************************************************************************/ |
15 | |
b2a60966 |
16 | /* $Id$ */ |
17 | |
d15a28e7 |
18 | //_________________________________________________________________________ |
b2a60966 |
19 | // Implementation version v0 of PHOS Manager class |
20 | // Layout EMC + PPSD has name GPS2 |
a3dfe79c |
21 | // Layout EMC + CPV has name IHEP |
5f20d3fb |
22 | // An object of this class does not produce hits nor digits |
23 | // It is the one to use if you do not want to produce outputs in TREEH or TREED |
b2a60966 |
24 | // |
25 | //*-- Author: Yves Schutz (SUBATECH) |
26 | |
d2cf0e38 |
27 | |
fe4da5cc |
28 | // --- ROOT system --- |
d15a28e7 |
29 | |
fe4da5cc |
30 | #include "TBRIK.h" |
31 | #include "TNode.h" |
0869cea5 |
32 | #include "TRandom.h" |
94de3818 |
33 | #include "TGeometry.h" |
fe4da5cc |
34 | |
81e92872 |
35 | |
d15a28e7 |
36 | // --- Standard library --- |
37 | |
de9ec31b |
38 | #include <stdio.h> |
39 | #include <string.h> |
40 | #include <stdlib.h> |
41 | #include <strstream.h> |
d15a28e7 |
42 | |
43 | // --- AliRoot header files --- |
44 | |
fe4da5cc |
45 | #include "AliPHOSv0.h" |
46 | #include "AliRun.h" |
d15a28e7 |
47 | #include "AliConst.h" |
94de3818 |
48 | #include "AliMC.h" |
13add4de |
49 | #include "AliPHOSGeometry.h" |
fe4da5cc |
50 | |
51 | ClassImp(AliPHOSv0) |
52 | |
d15a28e7 |
53 | //____________________________________________________________________________ |
54 | AliPHOSv0::AliPHOSv0(const char *name, const char *title): |
55 | AliPHOS(name,title) |
56 | { |
b2a60966 |
57 | // ctor : title is used to identify the layout |
ed4205d8 |
58 | // GPS2 = 5 modules (EMC + PPSD) |
59 | // IHEP = 5 modules (EMC + CPV) |
60 | // MIXT = 4 modules (EMC + CPV) and 1 module (EMC + PPSD) |
fe4da5cc |
61 | |
d15a28e7 |
62 | // gets an instance of the geometry parameters class |
e04976bd |
63 | |
64 | if (strcmp(GetTitle(),"") != 0 ) |
65 | fGeom = AliPHOSGeometry::GetInstance(GetTitle(), "") ; |
66 | |
d15a28e7 |
67 | } |
68 | |
d15a28e7 |
69 | //____________________________________________________________________________ |
70 | void AliPHOSv0::BuildGeometry() |
fe4da5cc |
71 | { |
b2a60966 |
72 | // Build the PHOS geometry for the ROOT display |
73 | //BEGIN_HTML |
74 | /* |
75 | <H2> |
76 | PHOS in ALICE displayed by root |
77 | </H2> |
78 | <UL> |
79 | <LI> All Views |
80 | <P> |
81 | <CENTER> |
82 | <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif"> |
83 | </CENTER></P></LI> |
84 | <LI> Front View |
85 | <P> |
86 | <CENTER> |
87 | <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif"> |
88 | </CENTER></P></LI> |
89 | <LI> 3D View 1 |
90 | <P> |
91 | <CENTER> |
92 | <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif"> |
93 | </CENTER></P></LI> |
94 | <LI> 3D View 2 |
95 | <P> |
96 | <CENTER> |
97 | <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif"> |
98 | </CENTER></P></LI> |
99 | </UL> |
100 | */ |
101 | //END_HTML |
d15a28e7 |
102 | |
103 | this->BuildGeometryforPHOS() ; |
ed4205d8 |
104 | if (strcmp(fGeom->GetName(),"GPS2") == 0) |
d15a28e7 |
105 | this->BuildGeometryforPPSD() ; |
ed4205d8 |
106 | else if (strcmp(fGeom->GetName(),"IHEP") == 0) |
bacd0b23 |
107 | this->BuildGeometryforCPV() ; |
ed4205d8 |
108 | else if (strcmp(fGeom->GetName(),"MIXT") == 0) { |
109 | this->BuildGeometryforPPSD() ; |
110 | this->BuildGeometryforCPV() ; |
111 | } |
d15a28e7 |
112 | else |
ed4205d8 |
113 | cout << "AliPHOSv0::BuildGeometry : no charged particle identification system installed: " |
114 | << "Geometry name = " << fGeom->GetName() << endl; |
d15a28e7 |
115 | |
fe4da5cc |
116 | } |
d15a28e7 |
117 | |
118 | //____________________________________________________________________________ |
119 | void AliPHOSv0:: BuildGeometryforPHOS(void) |
120 | { |
b2a60966 |
121 | // Build the PHOS-EMC geometry for the ROOT display |
d15a28e7 |
122 | |
123 | const Int_t kColorPHOS = kRed ; |
124 | const Int_t kColorXTAL = kBlue ; |
125 | |
92862013 |
126 | Double_t const kRADDEG = 180.0 / kPI ; |
d15a28e7 |
127 | |
128 | new TBRIK( "OuterBox", "PHOS box", "void", fGeom->GetOuterBoxSize(0)/2, |
129 | fGeom->GetOuterBoxSize(1)/2, |
130 | fGeom->GetOuterBoxSize(2)/2 ); |
131 | |
132 | // Textolit Wall box, position inside PHOS |
133 | |
134 | new TBRIK( "TextolitBox", "PHOS Textolit box ", "void", fGeom->GetTextolitBoxSize(0)/2, |
135 | fGeom->GetTextolitBoxSize(1)/2, |
136 | fGeom->GetTextolitBoxSize(2)/2); |
137 | |
138 | // Polystyrene Foam Plate |
139 | |
140 | new TBRIK( "UpperFoamPlate", "PHOS Upper foam plate", "void", fGeom->GetTextolitBoxSize(0)/2, |
141 | fGeom->GetSecondUpperPlateThickness()/2, |
142 | fGeom->GetTextolitBoxSize(2)/2 ) ; |
143 | |
144 | // Air Filled Box |
fe4da5cc |
145 | |
d15a28e7 |
146 | new TBRIK( "AirFilledBox", "PHOS air filled box", "void", fGeom->GetAirFilledBoxSize(0)/2, |
147 | fGeom->GetAirFilledBoxSize(1)/2, |
148 | fGeom->GetAirFilledBoxSize(2)/2 ); |
149 | |
150 | // Crystals Box |
151 | |
92862013 |
152 | Float_t xtlX = fGeom->GetCrystalSize(0) ; |
153 | Float_t xtlY = fGeom->GetCrystalSize(1) ; |
154 | Float_t xtlZ = fGeom->GetCrystalSize(2) ; |
d15a28e7 |
155 | |
92862013 |
156 | Float_t xl = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; |
157 | Float_t yl = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 |
d15a28e7 |
158 | + fGeom->GetModuleBoxThickness() / 2.0 ; |
92862013 |
159 | Float_t zl = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; |
d15a28e7 |
160 | |
92862013 |
161 | new TBRIK( "CrystalsBox", "PHOS crystals box", "void", xl, yl, zl ) ; |
d15a28e7 |
162 | |
163 | // position PHOS into ALICE |
164 | |
92862013 |
165 | Float_t r = fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1) / 2.0 ; |
d15a28e7 |
166 | Int_t number = 988 ; |
167 | Float_t pphi = TMath::ATan( fGeom->GetOuterBoxSize(0) / ( 2.0 * fGeom->GetIPtoOuterCoverDistance() ) ) ; |
92862013 |
168 | pphi *= kRADDEG ; |
169 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; |
d15a28e7 |
170 | |
171 | char * nodename = new char[20] ; |
172 | char * rotname = new char[20] ; |
173 | |
174 | for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { |
175 | Float_t angle = pphi * 2 * ( i - fGeom->GetNModules() / 2.0 - 0.5 ) ; |
176 | sprintf(rotname, "%s%d", "rot", number++) ; |
177 | new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); |
92862013 |
178 | top->cd(); |
d15a28e7 |
179 | sprintf(nodename,"%s%d", "Module", i) ; |
92862013 |
180 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; |
181 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; |
182 | TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ; |
183 | outerboxnode->SetLineColor(kColorPHOS) ; |
184 | fNodes->Add(outerboxnode) ; |
185 | outerboxnode->cd() ; |
d15a28e7 |
186 | // now inside the outer box the textolit box |
92862013 |
187 | y = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; |
d15a28e7 |
188 | sprintf(nodename,"%s%d", "TexBox", i) ; |
92862013 |
189 | TNode * textolitboxnode = new TNode(nodename, nodename, "TextolitBox", 0, y, 0) ; |
190 | textolitboxnode->SetLineColor(kColorPHOS) ; |
191 | fNodes->Add(textolitboxnode) ; |
d15a28e7 |
192 | // upper foam plate inside outre box |
92862013 |
193 | outerboxnode->cd() ; |
d15a28e7 |
194 | sprintf(nodename, "%s%d", "UFPlate", i) ; |
92862013 |
195 | y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; |
196 | TNode * upperfoamplatenode = new TNode(nodename, nodename, "UpperFoamPlate", 0, y, 0) ; |
197 | upperfoamplatenode->SetLineColor(kColorPHOS) ; |
198 | fNodes->Add(upperfoamplatenode) ; |
d15a28e7 |
199 | // air filled box inside textolit box (not drawn) |
92862013 |
200 | textolitboxnode->cd(); |
201 | y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; |
d15a28e7 |
202 | sprintf(nodename, "%s%d", "AFBox", i) ; |
92862013 |
203 | TNode * airfilledboxnode = new TNode(nodename, nodename, "AirFilledBox", 0, y, 0) ; |
204 | fNodes->Add(airfilledboxnode) ; |
d15a28e7 |
205 | // crystals box inside air filled box |
92862013 |
206 | airfilledboxnode->cd() ; |
207 | y = fGeom->GetAirFilledBoxSize(1) / 2.0 - yl |
d15a28e7 |
208 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() |
209 | - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ; |
210 | sprintf(nodename, "%s%d", "XTBox", i) ; |
92862013 |
211 | TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, y, 0) ; |
212 | crystalsboxnode->SetLineColor(kColorXTAL) ; |
213 | fNodes->Add(crystalsboxnode) ; |
d15a28e7 |
214 | } |
b27d82c8 |
215 | |
216 | delete[] rotname ; |
217 | delete[] nodename ; |
d15a28e7 |
218 | } |
219 | |
220 | //____________________________________________________________________________ |
221 | void AliPHOSv0:: BuildGeometryforPPSD(void) |
fe4da5cc |
222 | { |
b2a60966 |
223 | // Build the PHOS-PPSD geometry for the ROOT display |
224 | //BEGIN_HTML |
225 | /* |
226 | <H2> |
227 | PPSD displayed by root |
228 | </H2> |
229 | <UL> |
230 | <LI> Zoom on PPSD: Front View |
231 | <P> |
232 | <CENTER> |
233 | <IMG Align=BOTTOM ALT="PPSD Front View" SRC="../images/AliPHOSv0PPSDFrontView.gif"> |
234 | </CENTER></P></LI> |
235 | <LI> Zoom on PPSD: Perspective View |
236 | <P> |
237 | <CENTER> |
238 | <IMG Align=BOTTOM ALT="PPSD Prespective View" SRC="../images/AliPHOSv0PPSDPerspectiveView.gif"> |
239 | </CENTER></P></LI> |
240 | </UL> |
241 | */ |
242 | //END_HTML |
92862013 |
243 | Double_t const kRADDEG = 180.0 / kPI ; |
d15a28e7 |
244 | |
245 | const Int_t kColorPHOS = kRed ; |
246 | const Int_t kColorPPSD = kGreen ; |
247 | const Int_t kColorGas = kBlue ; |
248 | const Int_t kColorAir = kYellow ; |
249 | |
250 | // Box for a full PHOS module |
251 | |
bacd0b23 |
252 | new TBRIK( "PPSDBox", "PPSD box", "void", fGeom->GetCPVBoxSize(0)/2, |
253 | fGeom->GetCPVBoxSize(1)/2, |
254 | fGeom->GetCPVBoxSize(2)/2 ); |
d15a28e7 |
255 | |
256 | // Box containing one micromegas module |
257 | |
258 | new TBRIK( "PPSDModule", "PPSD module", "void", fGeom->GetPPSDModuleSize(0)/2, |
259 | fGeom->GetPPSDModuleSize(1)/2, |
260 | fGeom->GetPPSDModuleSize(2)/2 ); |
261 | // top lid |
262 | |
263 | new TBRIK ( "TopLid", "Micromegas top lid", "void", fGeom->GetPPSDModuleSize(0)/2, |
264 | fGeom->GetLidThickness()/2, |
265 | fGeom->GetPPSDModuleSize(2)/2 ) ; |
266 | // composite panel (top and bottom) |
267 | |
268 | new TBRIK ( "TopPanel", "Composite top panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, |
269 | fGeom->GetCompositeThickness()/2, |
270 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; |
271 | |
272 | new TBRIK ( "BottomPanel", "Composite bottom panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, |
273 | fGeom->GetCompositeThickness()/2, |
274 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; |
275 | // gas gap (conversion and avalanche) |
276 | |
277 | new TBRIK ( "GasGap", "gas gap", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, |
278 | ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() )/2, |
279 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; |
280 | |
281 | // anode and cathode |
282 | |
283 | new TBRIK ( "Anode", "Anode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, |
284 | fGeom->GetAnodeThickness()/2, |
285 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; |
286 | |
287 | new TBRIK ( "Cathode", "Cathode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, |
288 | fGeom->GetCathodeThickness()/2, |
289 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; |
290 | // PC |
291 | |
292 | new TBRIK ( "PCBoard", "Printed Circuit", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, |
293 | fGeom->GetPCThickness()/2, |
294 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; |
295 | // Gap between Lead and top micromegas |
296 | |
bacd0b23 |
297 | new TBRIK ( "LeadToM", "Air Gap top", "void", fGeom->GetCPVBoxSize(0)/2, |
d15a28e7 |
298 | fGeom->GetMicro1ToLeadGap()/2, |
bacd0b23 |
299 | fGeom->GetCPVBoxSize(2)/2 ) ; |
d15a28e7 |
300 | |
301 | // Gap between Lead and bottom micromegas |
302 | |
bacd0b23 |
303 | new TBRIK ( "MToLead", "Air Gap bottom", "void", fGeom->GetCPVBoxSize(0)/2, |
d15a28e7 |
304 | fGeom->GetLeadToMicro2Gap()/2, |
bacd0b23 |
305 | fGeom->GetCPVBoxSize(2)/2 ) ; |
d15a28e7 |
306 | // Lead converter |
307 | |
bacd0b23 |
308 | new TBRIK ( "Lead", "Lead converter", "void", fGeom->GetCPVBoxSize(0)/2, |
d15a28e7 |
309 | fGeom->GetLeadConverterThickness()/2, |
bacd0b23 |
310 | fGeom->GetCPVBoxSize(2)/2 ) ; |
d15a28e7 |
311 | |
312 | // position PPSD into ALICE |
313 | |
314 | char * nodename = new char[20] ; |
315 | char * rotname = new char[20] ; |
316 | |
bacd0b23 |
317 | Float_t r = fGeom->GetIPtoTopLidDistance() + fGeom->GetCPVBoxSize(1) / 2.0 ; |
d15a28e7 |
318 | Int_t number = 988 ; |
92862013 |
319 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; |
d15a28e7 |
320 | |
ed4205d8 |
321 | Int_t firstModule = 0 ; |
322 | if (strcmp(fGeom->GetName(),"GPS2") == 0) |
323 | firstModule = 1; |
324 | else if (strcmp(fGeom->GetName(),"MIXT") == 0) |
325 | firstModule = fGeom->GetNModules() - fGeom->GetNPPSDModules() + 1; |
326 | |
327 | for( Int_t i = firstModule; i <= fGeom->GetNModules(); i++ ) { // the number of PHOS modules |
d15a28e7 |
328 | Float_t angle = fGeom->GetPHOSAngle(i) ; |
ed4205d8 |
329 | sprintf(rotname, "%s%d", "rotg", number+i) ; |
d15a28e7 |
330 | new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); |
92862013 |
331 | top->cd(); |
d15a28e7 |
332 | sprintf(nodename, "%s%d", "Moduleg", i) ; |
92862013 |
333 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; |
334 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; |
335 | TNode * ppsdboxnode = new TNode(nodename , nodename ,"PPSDBox", x, y, 0, rotname ) ; |
336 | ppsdboxnode->SetLineColor(kColorPPSD) ; |
337 | fNodes->Add(ppsdboxnode) ; |
338 | ppsdboxnode->cd() ; |
d15a28e7 |
339 | // inside the PPSD box: |
340 | // 1. fNumberOfModulesPhi x fNumberOfModulesZ top micromegas |
bacd0b23 |
341 | x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; |
31aa6d6c |
342 | { |
343 | for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module |
bacd0b23 |
344 | Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; |
31aa6d6c |
345 | TNode * micro1node ; |
346 | for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module |
bacd0b23 |
347 | y = ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; |
31aa6d6c |
348 | sprintf(nodename, "%s%d%d%d", "Mic1", i, iphi, iz) ; |
349 | micro1node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ; |
350 | micro1node->SetLineColor(kColorPPSD) ; |
351 | fNodes->Add(micro1node) ; |
352 | // inside top micromegas |
353 | micro1node->cd() ; |
354 | // a. top lid |
355 | y = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; |
356 | sprintf(nodename, "%s%d%d%d", "Lid", i, iphi, iz) ; |
357 | TNode * toplidnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ; |
358 | toplidnode->SetLineColor(kColorPPSD) ; |
359 | fNodes->Add(toplidnode) ; |
360 | // b. composite panel |
361 | y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
362 | sprintf(nodename, "%s%d%d%d", "CompU", i, iphi, iz) ; |
363 | TNode * compupnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ; |
364 | compupnode->SetLineColor(kColorPPSD) ; |
365 | fNodes->Add(compupnode) ; |
366 | // c. anode |
367 | y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; |
368 | sprintf(nodename, "%s%d%d%d", "Ano", i, iphi, iz) ; |
369 | TNode * anodenode = new TNode(nodename, nodename, "Anode", 0, y, 0) ; |
370 | anodenode->SetLineColor(kColorPHOS) ; |
371 | fNodes->Add(anodenode) ; |
372 | // d. gas |
373 | y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; |
374 | sprintf(nodename, "%s%d%d%d", "GGap", i, iphi, iz) ; |
375 | TNode * ggapnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ; |
376 | ggapnode->SetLineColor(kColorGas) ; |
377 | fNodes->Add(ggapnode) ; |
d15a28e7 |
378 | // f. cathode |
31aa6d6c |
379 | y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; |
380 | sprintf(nodename, "%s%d%d%d", "Cathode", i, iphi, iz) ; |
381 | TNode * cathodenode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ; |
382 | cathodenode->SetLineColor(kColorPHOS) ; |
383 | fNodes->Add(cathodenode) ; |
384 | // g. printed circuit |
385 | y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; |
386 | sprintf(nodename, "%s%d%d%d", "PC", i, iphi, iz) ; |
387 | TNode * pcnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ; |
388 | pcnode->SetLineColor(kColorPPSD) ; |
389 | fNodes->Add(pcnode) ; |
390 | // h. composite panel |
391 | y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
392 | sprintf(nodename, "%s%d%d%d", "CompDown", i, iphi, iz) ; |
393 | TNode * compdownnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ; |
394 | compdownnode->SetLineColor(kColorPPSD) ; |
395 | fNodes->Add(compdownnode) ; |
396 | z = z - fGeom->GetPPSDModuleSize(2) ; |
397 | ppsdboxnode->cd() ; |
398 | } // end of Z module loop |
399 | x = x - fGeom->GetPPSDModuleSize(0) ; |
92862013 |
400 | ppsdboxnode->cd() ; |
31aa6d6c |
401 | } // end of phi module loop |
402 | } |
d15a28e7 |
403 | // 2. air gap |
92862013 |
404 | ppsdboxnode->cd() ; |
bacd0b23 |
405 | y = ( fGeom->GetCPVBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; |
d15a28e7 |
406 | sprintf(nodename, "%s%d", "GapUp", i) ; |
92862013 |
407 | TNode * gapupnode = new TNode(nodename, nodename, "LeadToM", 0, y, 0) ; |
408 | gapupnode->SetLineColor(kColorAir) ; |
409 | fNodes->Add(gapupnode) ; |
d15a28e7 |
410 | // 3. lead converter |
92862013 |
411 | y = y - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; |
d15a28e7 |
412 | sprintf(nodename, "%s%d", "LeadC", i) ; |
92862013 |
413 | TNode * leadcnode = new TNode(nodename, nodename, "Lead", 0, y, 0) ; |
414 | leadcnode->SetLineColor(kColorPPSD) ; |
415 | fNodes->Add(leadcnode) ; |
d15a28e7 |
416 | // 4. air gap |
92862013 |
417 | y = y - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; |
d15a28e7 |
418 | sprintf(nodename, "%s%d", "GapDown", i) ; |
92862013 |
419 | TNode * gapdownnode = new TNode(nodename, nodename, "MToLead", 0, y, 0) ; |
420 | gapdownnode->SetLineColor(kColorAir) ; |
421 | fNodes->Add(gapdownnode) ; |
d15a28e7 |
422 | // 5. fNumberOfModulesPhi x fNumberOfModulesZ bottom micromegas |
bacd0b23 |
423 | x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. - fGeom->GetPhiDisplacement() ; |
31aa6d6c |
424 | { |
425 | for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { |
bacd0b23 |
426 | Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. - fGeom->GetZDisplacement() ;; |
31aa6d6c |
427 | TNode * micro2node ; |
428 | for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { |
bacd0b23 |
429 | y = - ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; |
31aa6d6c |
430 | sprintf(nodename, "%s%d%d%d", "Mic2", i, iphi, iz) ; |
431 | micro2node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ; |
432 | micro2node->SetLineColor(kColorPPSD) ; |
433 | fNodes->Add(micro2node) ; |
434 | // inside bottom micromegas |
435 | micro2node->cd() ; |
d15a28e7 |
436 | // a. top lid |
92862013 |
437 | y = ( fGeom->GetMicromegas2Thickness() - fGeom->GetLidThickness() ) / 2. ; |
d15a28e7 |
438 | sprintf(nodename, "%s%d", "Lidb", i) ; |
92862013 |
439 | TNode * toplidbnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ; |
440 | toplidbnode->SetLineColor(kColorPPSD) ; |
441 | fNodes->Add(toplidbnode) ; |
d15a28e7 |
442 | // b. composite panel |
92862013 |
443 | y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 |
444 | sprintf(nodename, "%s%d", "CompUb", i) ; |
92862013 |
445 | TNode * compupbnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ; |
446 | compupbnode->SetLineColor(kColorPPSD) ; |
447 | fNodes->Add(compupbnode) ; |
d15a28e7 |
448 | // c. anode |
92862013 |
449 | y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; |
d15a28e7 |
450 | sprintf(nodename, "%s%d", "Anob", i) ; |
92862013 |
451 | TNode * anodebnode = new TNode(nodename, nodename, "Anode", 0, y, 0) ; |
452 | anodebnode->SetLineColor(kColorPPSD) ; |
453 | fNodes->Add(anodebnode) ; |
d15a28e7 |
454 | // d. conversion gas |
92862013 |
455 | y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; |
d15a28e7 |
456 | sprintf(nodename, "%s%d", "GGapb", i) ; |
92862013 |
457 | TNode * ggapbnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ; |
458 | ggapbnode->SetLineColor(kColorGas) ; |
459 | fNodes->Add(ggapbnode) ; |
d15a28e7 |
460 | // f. cathode |
92862013 |
461 | y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; |
d15a28e7 |
462 | sprintf(nodename, "%s%d", "Cathodeb", i) ; |
92862013 |
463 | TNode * cathodebnode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ; |
464 | cathodebnode->SetLineColor(kColorPPSD) ; |
465 | fNodes->Add(cathodebnode) ; |
d15a28e7 |
466 | // g. printed circuit |
92862013 |
467 | y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; |
d15a28e7 |
468 | sprintf(nodename, "%s%d", "PCb", i) ; |
92862013 |
469 | TNode * pcbnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ; |
470 | pcbnode->SetLineColor(kColorPPSD) ; |
471 | fNodes->Add(pcbnode) ; |
d15a28e7 |
472 | // h. composite pane |
92862013 |
473 | y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 |
474 | sprintf(nodename, "%s%d", "CompDownb", i) ; |
92862013 |
475 | TNode * compdownbnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ; |
476 | compdownbnode->SetLineColor(kColorPPSD) ; |
477 | fNodes->Add(compdownbnode) ; |
478 | z = z - fGeom->GetPPSDModuleSize(2) ; |
479 | ppsdboxnode->cd() ; |
d15a28e7 |
480 | } // end of Z module loop |
92862013 |
481 | x = x - fGeom->GetPPSDModuleSize(0) ; |
482 | ppsdboxnode->cd() ; |
31aa6d6c |
483 | } // end of phi module loop |
484 | } |
485 | } // PHOS modules |
486 | |
e126816e |
487 | delete[] rotname ; |
488 | delete[] nodename ; |
31aa6d6c |
489 | |
fe4da5cc |
490 | } |
491 | |
bacd0b23 |
492 | //____________________________________________________________________________ |
493 | void AliPHOSv0:: BuildGeometryforCPV(void) |
494 | { |
495 | // Build the PHOS-CPV geometry for the ROOT display |
496 | // Author: Yuri Kharlov 11 September 2000 |
497 | // |
498 | //BEGIN_HTML |
499 | /* |
500 | <H2> |
501 | CPV displayed by root |
502 | </H2> |
503 | <table width=700> |
504 | |
505 | <tr> |
506 | <td>CPV perspective view</td> |
507 | <td>CPV front view </td> |
508 | </tr> |
509 | |
510 | <tr> |
511 | <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td> |
512 | <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td> |
513 | </tr> |
514 | |
515 | </table> |
516 | |
517 | */ |
518 | //END_HTML |
519 | |
520 | const Double_t kRADDEG = 180.0 / kPI ; |
521 | const Int_t kColorCPV = kGreen ; |
522 | const Int_t kColorFrame = kYellow ; |
523 | const Int_t kColorGassiplex = kRed; |
524 | const Int_t kColorPCB = kCyan; |
525 | |
526 | // Box for a full PHOS module |
527 | |
528 | new TBRIK ("CPVBox", "CPV box", "void", fGeom->GetCPVBoxSize(0)/2, |
529 | fGeom->GetCPVBoxSize(1)/2, |
530 | fGeom->GetCPVBoxSize(2)/2 ); |
531 | new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", fGeom->GetCPVFrameSize(0)/2, |
532 | fGeom->GetCPVFrameSize(1)/2, |
533 | fGeom->GetCPVBoxSize(2)/2 ); |
534 | new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", fGeom->GetCPVBoxSize(0)/2 - fGeom->GetCPVFrameSize(0), |
535 | fGeom->GetCPVFrameSize(1)/2, |
536 | fGeom->GetCPVFrameSize(2)/2); |
537 | new TBRIK ("CPVPCB", "CPV PCB", "void", fGeom->GetCPVActiveSize(0)/2, |
538 | fGeom->GetCPVTextoliteThickness()/2, |
539 | fGeom->GetCPVActiveSize(1)/2); |
540 | new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", fGeom->GetGassiplexChipSize(0)/2, |
541 | fGeom->GetGassiplexChipSize(1)/2, |
542 | fGeom->GetGassiplexChipSize(2)/2); |
543 | |
544 | // position CPV into ALICE |
545 | |
546 | char * nodename = new char[25] ; |
547 | char * rotname = new char[25] ; |
548 | |
549 | Float_t r = fGeom->GetIPtoCPVDistance() + fGeom->GetCPVBoxSize(1) / 2.0 ; |
550 | Int_t number = 988 ; |
551 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; |
ed4205d8 |
552 | |
553 | Int_t lastModule = 0 ; |
554 | if (strcmp(fGeom->GetName(),"IHEP") == 0) |
555 | lastModule = fGeom->GetNModules(); |
556 | else if (strcmp(fGeom->GetName(),"MIXT") == 0) |
557 | lastModule = fGeom->GetNModules() - fGeom->GetNPPSDModules(); |
558 | |
559 | for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules |
bacd0b23 |
560 | |
561 | // One CPV module |
562 | |
563 | Float_t angle = fGeom->GetPHOSAngle(i) ; |
ed4205d8 |
564 | sprintf(rotname, "%s%d", "rotg", number+i) ; |
bacd0b23 |
565 | new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); |
566 | top->cd(); |
567 | sprintf(nodename, "%s%d", "CPVModule", i) ; |
568 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; |
569 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; |
570 | Float_t z; |
571 | TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ; |
572 | cpvBoxNode->SetLineColor(kColorCPV) ; |
573 | fNodes->Add(cpvBoxNode) ; |
574 | cpvBoxNode->cd() ; |
575 | |
576 | // inside each CPV box: |
577 | |
578 | // Frame around CPV |
cd461ab8 |
579 | Int_t j; |
580 | for (j=0; j<=1; j++) { |
bacd0b23 |
581 | sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ; |
582 | x = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(0) - fGeom->GetCPVFrameSize(0)) / 2; |
583 | TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ; |
584 | cpvFrameNode->SetLineColor(kColorFrame) ; |
585 | fNodes->Add(cpvFrameNode) ; |
586 | |
587 | sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ; |
588 | z = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(2) - fGeom->GetCPVFrameSize(2)) / 2; |
589 | cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ; |
590 | cpvFrameNode->SetLineColor(kColorFrame) ; |
591 | fNodes->Add(cpvFrameNode) ; |
592 | } |
593 | |
594 | // 4 printed circuit boards |
cd461ab8 |
595 | for (j=0; j<4; j++) { |
bacd0b23 |
596 | sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ; |
597 | y = fGeom->GetCPVFrameSize(1) / 2 - fGeom->GetFTPosition(j) + fGeom->GetCPVTextoliteThickness()/2; |
598 | TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ; |
599 | cpvPCBNode->SetLineColor(kColorPCB) ; |
600 | fNodes->Add(cpvPCBNode) ; |
601 | } |
602 | |
603 | // Gassiplex chips |
604 | Float_t xStep = fGeom->GetCPVActiveSize(0) / (fGeom->GetNumberOfCPVChipsPhi() + 1); |
605 | Float_t zStep = fGeom->GetCPVActiveSize(1) / (fGeom->GetNumberOfCPVChipsZ() + 1); |
606 | y = fGeom->GetCPVFrameSize(1)/2 - fGeom->GetFTPosition(0) + |
607 | fGeom->GetCPVTextoliteThickness() / 2 + fGeom->GetGassiplexChipSize(1) / 2 + 0.1; |
608 | for (Int_t ix=0; ix<fGeom->GetNumberOfCPVChipsPhi(); ix++) { |
609 | x = xStep * (ix+1) - fGeom->GetCPVActiveSize(0)/2; |
610 | for (Int_t iz=0; iz<fGeom->GetNumberOfCPVChipsZ(); iz++) { |
611 | z = zStep * (iz+1) - fGeom->GetCPVActiveSize(1)/2; |
612 | sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ; |
613 | TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ; |
614 | cpvGassiplexNode->SetLineColor(kColorGassiplex) ; |
615 | fNodes->Add(cpvGassiplexNode) ; |
616 | } |
617 | } |
618 | |
619 | } // PHOS modules |
620 | |
621 | delete[] rotname ; |
622 | delete[] nodename ; |
623 | } |
624 | |
d15a28e7 |
625 | //____________________________________________________________________________ |
fe4da5cc |
626 | void AliPHOSv0::CreateGeometry() |
627 | { |
b2a60966 |
628 | // Create the PHOS geometry for Geant |
d15a28e7 |
629 | |
92862013 |
630 | AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ; |
d15a28e7 |
631 | |
92862013 |
632 | if ( phostmp == NULL ) { |
d15a28e7 |
633 | |
634 | fprintf(stderr, "PHOS detector not found!\n") ; |
635 | return; |
fe4da5cc |
636 | |
d15a28e7 |
637 | } |
d15a28e7 |
638 | // Get pointer to the array containing media indeces |
92862013 |
639 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 |
640 | |
ed4205d8 |
641 | // Create a box a PHOS module. |
642 | // In case of MIXT geometry 2 different boxes are needed |
643 | |
92862013 |
644 | Float_t bigbox[3] ; |
645 | bigbox[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; |
bacd0b23 |
646 | bigbox[1] = ( fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) / 2.0 ; |
92862013 |
647 | bigbox[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; |
d15a28e7 |
648 | |
ed4205d8 |
649 | gMC->Gsvolu("PHOS", "BOX ", idtmed[798], bigbox, 3) ; |
650 | |
651 | if ( strcmp( fGeom->GetName(),"MIXT") == 0 && fGeom->GetNPPSDModules() > 0) |
652 | gMC->Gsvolu("PHO1", "BOX ", idtmed[798], bigbox, 3) ; |
d15a28e7 |
653 | |
ed4205d8 |
654 | this->CreateGeometryforPHOS() ; |
bacd0b23 |
655 | if ( strcmp( fGeom->GetName(), "GPS2") == 0 ) |
d15a28e7 |
656 | this->CreateGeometryforPPSD() ; |
bacd0b23 |
657 | else if ( strcmp( fGeom->GetName(), "IHEP") == 0 ) |
658 | this->CreateGeometryforCPV() ; |
ed4205d8 |
659 | else if ( strcmp( fGeom->GetName(), "MIXT") == 0 ) { |
660 | this->CreateGeometryforPPSD() ; |
661 | this->CreateGeometryforCPV() ; |
662 | } |
d15a28e7 |
663 | else |
664 | cout << "AliPHOSv0::CreateGeometry : no charged particle identification system installed" << endl; |
ed4205d8 |
665 | |
b73f246d |
666 | this->CreateGeometryforSupport() ; |
d15a28e7 |
667 | |
668 | // --- Position PHOS mdules in ALICE setup --- |
669 | |
92862013 |
670 | Int_t idrotm[99] ; |
671 | Double_t const kRADDEG = 180.0 / kPI ; |
d15a28e7 |
672 | |
ed4205d8 |
673 | Int_t lastModule; |
674 | if (strcmp(fGeom->GetName(),"MIXT") == 0) |
675 | lastModule = fGeom->GetNModules() - fGeom->GetNPPSDModules(); |
676 | else |
677 | lastModule = fGeom->GetNModules(); |
678 | |
679 | Int_t i; |
680 | for( i = 1; i <= lastModule ; i++ ) { |
d15a28e7 |
681 | |
682 | Float_t angle = fGeom->GetPHOSAngle(i) ; |
92862013 |
683 | AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ; |
d15a28e7 |
684 | |
bacd0b23 |
685 | Float_t r = fGeom->GetIPtoOuterCoverDistance() + ( fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) / 2.0 ; |
d15a28e7 |
686 | |
ed4205d8 |
687 | Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ; |
92862013 |
688 | Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ; |
d15a28e7 |
689 | |
92862013 |
690 | gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ; |
d15a28e7 |
691 | |
692 | } // for GetNModules |
693 | |
ed4205d8 |
694 | for( i = lastModule+1; i <= fGeom->GetNModules(); i++ ) { |
695 | |
696 | Float_t angle = fGeom->GetPHOSAngle(i) ; |
697 | AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ; |
698 | |
699 | Float_t r = fGeom->GetIPtoOuterCoverDistance() + ( fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) / 2.0 ; |
700 | |
701 | Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ; |
702 | Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ; |
703 | |
704 | gMC->Gspos("PHO1", i-lastModule, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ; |
705 | |
706 | } // for GetNModules |
707 | |
fe4da5cc |
708 | } |
d15a28e7 |
709 | |
710 | //____________________________________________________________________________ |
711 | void AliPHOSv0::CreateGeometryforPHOS() |
712 | { |
b2a60966 |
713 | // Create the PHOS-EMC geometry for GEANT |
714 | //BEGIN_HTML |
715 | /* |
716 | <H2> |
717 | Geant3 geometry tree of PHOS-EMC in ALICE |
718 | </H2> |
719 | <P><CENTER> |
720 | <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif"> |
721 | </CENTER><P> |
722 | */ |
723 | //END_HTML |
724 | |
725 | // Get pointer to the array containing media indexes |
92862013 |
726 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 |
727 | |
728 | // --- |
729 | // --- Define PHOS box volume, fPUFPill with thermo insulating foam --- |
730 | // --- Foam Thermo Insulating outer cover dimensions --- |
92862013 |
731 | // --- Put it in bigbox = PHOS |
d15a28e7 |
732 | |
92862013 |
733 | Float_t dphos[3] ; |
734 | dphos[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; |
735 | dphos[1] = fGeom->GetOuterBoxSize(1) / 2.0 ; |
736 | dphos[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; |
d15a28e7 |
737 | |
13add4de |
738 | gMC->Gsvolu("PEMC", "BOX ", idtmed[706], dphos, 3) ; |
d15a28e7 |
739 | |
bacd0b23 |
740 | Float_t yO = - fGeom->GetCPVBoxSize(1) / 2.0 ; |
d15a28e7 |
741 | |
13add4de |
742 | gMC->Gspos("PEMC", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ; |
ed4205d8 |
743 | if ( strcmp( fGeom->GetName(),"MIXT") == 0 && fGeom->GetNPPSDModules() > 0) |
13add4de |
744 | gMC->Gspos("PEMC", 1, "PHO1", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
745 | |
746 | // --- |
13add4de |
747 | // --- Define Textolit Wall box, position inside PEMC --- |
d15a28e7 |
748 | // --- Textolit Wall box dimentions --- |
749 | |
750 | |
92862013 |
751 | Float_t dptxw[3]; |
752 | dptxw[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; |
753 | dptxw[1] = fGeom->GetTextolitBoxSize(1) / 2.0 ; |
754 | dptxw[2] = fGeom->GetTextolitBoxSize(2) / 2.0 ; |
d15a28e7 |
755 | |
92862013 |
756 | gMC->Gsvolu("PTXW", "BOX ", idtmed[707], dptxw, 3); |
d15a28e7 |
757 | |
92862013 |
758 | yO = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; |
d15a28e7 |
759 | |
13add4de |
760 | gMC->Gspos("PTXW", 1, "PEMC", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
761 | |
762 | // --- |
763 | // --- Define Upper Polystyrene Foam Plate, place inside PTXW --- |
764 | // --- immediately below Foam Thermo Insulation Upper plate --- |
765 | |
766 | // --- Upper Polystyrene Foam plate thickness --- |
767 | |
92862013 |
768 | Float_t dpufp[3] ; |
769 | dpufp[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; |
770 | dpufp[1] = fGeom->GetSecondUpperPlateThickness() / 2. ; |
771 | dpufp[2] = fGeom->GetTextolitBoxSize(2) /2.0 ; |
d15a28e7 |
772 | |
92862013 |
773 | gMC->Gsvolu("PUFP", "BOX ", idtmed[703], dpufp, 3) ; |
d15a28e7 |
774 | |
92862013 |
775 | yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; |
d15a28e7 |
776 | |
92862013 |
777 | gMC->Gspos("PUFP", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
778 | |
779 | // --- |
780 | // --- Define air-filled box, place inside PTXW --- |
781 | // --- Inner AIR volume dimensions --- |
fe4da5cc |
782 | |
d15a28e7 |
783 | |
92862013 |
784 | Float_t dpair[3] ; |
785 | dpair[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; |
786 | dpair[1] = fGeom->GetAirFilledBoxSize(1) / 2.0 ; |
787 | dpair[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; |
d15a28e7 |
788 | |
92862013 |
789 | gMC->Gsvolu("PAIR", "BOX ", idtmed[798], dpair, 3) ; |
d15a28e7 |
790 | |
92862013 |
791 | yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; |
d15a28e7 |
792 | |
92862013 |
793 | gMC->Gspos("PAIR", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
794 | |
795 | // --- Dimensions of PbWO4 crystal --- |
796 | |
92862013 |
797 | Float_t xtlX = fGeom->GetCrystalSize(0) ; |
798 | Float_t xtlY = fGeom->GetCrystalSize(1) ; |
799 | Float_t xtlZ = fGeom->GetCrystalSize(2) ; |
d15a28e7 |
800 | |
92862013 |
801 | Float_t dptcb[3] ; |
802 | dptcb[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; |
803 | dptcb[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 |
d15a28e7 |
804 | + fGeom->GetModuleBoxThickness() / 2.0 ; |
92862013 |
805 | dptcb[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; |
d15a28e7 |
806 | |
92862013 |
807 | gMC->Gsvolu("PTCB", "BOX ", idtmed[706], dptcb, 3) ; |
d15a28e7 |
808 | |
92862013 |
809 | yO = fGeom->GetAirFilledBoxSize(1) / 2.0 - dptcb[1] |
d15a28e7 |
810 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() |
811 | - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ; |
812 | |
92862013 |
813 | gMC->Gspos("PTCB", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
814 | |
815 | // --- |
816 | // --- Define Crystal BLock filled with air, position it inside PTCB --- |
92862013 |
817 | Float_t dpcbl[3] ; |
d15a28e7 |
818 | |
92862013 |
819 | dpcbl[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; |
820 | dpcbl[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; |
821 | dpcbl[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; |
d15a28e7 |
822 | |
92862013 |
823 | gMC->Gsvolu("PCBL", "BOX ", idtmed[798], dpcbl, 3) ; |
d15a28e7 |
824 | |
825 | // --- Divide PCBL in X (phi) and Z directions -- |
826 | gMC->Gsdvn("PROW", "PCBL", Int_t (fGeom->GetNPhi()), 1) ; |
827 | gMC->Gsdvn("PCEL", "PROW", Int_t (fGeom->GetNZ()), 3) ; |
828 | |
92862013 |
829 | yO = -fGeom->GetModuleBoxThickness() / 2.0 ; |
d15a28e7 |
830 | |
92862013 |
831 | gMC->Gspos("PCBL", 1, "PTCB", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
832 | |
833 | // --- |
834 | // --- Define STeel (actually, it's titanium) Cover volume, place inside PCEL |
92862013 |
835 | Float_t dpstc[3] ; |
d15a28e7 |
836 | |
92862013 |
837 | dpstc[0] = ( xtlX + 2 * fGeom->GetCrystalWrapThickness() ) / 2.0 ; |
838 | dpstc[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; |
839 | dpstc[2] = ( xtlZ + 2 * fGeom->GetCrystalWrapThickness() + 2 * fGeom->GetCrystalHolderThickness() ) / 2.0 ; |
d15a28e7 |
840 | |
92862013 |
841 | gMC->Gsvolu("PSTC", "BOX ", idtmed[704], dpstc, 3) ; |
d15a28e7 |
842 | |
843 | gMC->Gspos("PSTC", 1, "PCEL", 0.0, 0.0, 0.0, 0, "ONLY") ; |
844 | |
845 | // --- |
846 | // --- Define Tyvek volume, place inside PSTC --- |
92862013 |
847 | Float_t dppap[3] ; |
d15a28e7 |
848 | |
92862013 |
849 | dppap[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ; |
850 | dppap[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; |
851 | dppap[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ; |
d15a28e7 |
852 | |
92862013 |
853 | gMC->Gsvolu("PPAP", "BOX ", idtmed[702], dppap, 3) ; |
d15a28e7 |
854 | |
92862013 |
855 | yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 |
856 | - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; |
d15a28e7 |
857 | |
92862013 |
858 | gMC->Gspos("PPAP", 1, "PSTC", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
859 | |
860 | // --- |
861 | // --- Define PbWO4 crystal volume, place inside PPAP --- |
92862013 |
862 | Float_t dpxtl[3] ; |
d15a28e7 |
863 | |
92862013 |
864 | dpxtl[0] = xtlX / 2.0 ; |
865 | dpxtl[1] = xtlY / 2.0 ; |
866 | dpxtl[2] = xtlZ / 2.0 ; |
d15a28e7 |
867 | |
92862013 |
868 | gMC->Gsvolu("PXTL", "BOX ", idtmed[699], dpxtl, 3) ; |
d15a28e7 |
869 | |
92862013 |
870 | yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 - xtlY / 2.0 - fGeom->GetCrystalWrapThickness() ; |
d15a28e7 |
871 | |
92862013 |
872 | gMC->Gspos("PXTL", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
873 | |
874 | // --- |
875 | // --- Define crystal support volume, place inside PPAP --- |
92862013 |
876 | Float_t dpsup[3] ; |
d15a28e7 |
877 | |
92862013 |
878 | dpsup[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ; |
879 | dpsup[1] = fGeom->GetCrystalSupportHeight() / 2.0 ; |
880 | dpsup[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ; |
d15a28e7 |
881 | |
92862013 |
882 | gMC->Gsvolu("PSUP", "BOX ", idtmed[798], dpsup, 3) ; |
d15a28e7 |
883 | |
92862013 |
884 | yO = fGeom->GetCrystalSupportHeight() / 2.0 - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; |
d15a28e7 |
885 | |
92862013 |
886 | gMC->Gspos("PSUP", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
887 | |
888 | // --- |
889 | // --- Define PIN-diode volume and position it inside crystal support --- |
890 | // --- right behind PbWO4 crystal |
891 | |
892 | // --- PIN-diode dimensions --- |
893 | |
894 | |
92862013 |
895 | Float_t dppin[3] ; |
896 | dppin[0] = fGeom->GetPinDiodeSize(0) / 2.0 ; |
897 | dppin[1] = fGeom->GetPinDiodeSize(1) / 2.0 ; |
898 | dppin[2] = fGeom->GetPinDiodeSize(2) / 2.0 ; |
d15a28e7 |
899 | |
92862013 |
900 | gMC->Gsvolu("PPIN", "BOX ", idtmed[705], dppin, 3) ; |
d15a28e7 |
901 | |
92862013 |
902 | yO = fGeom->GetCrystalSupportHeight() / 2.0 - fGeom->GetPinDiodeSize(1) / 2.0 ; |
d15a28e7 |
903 | |
92862013 |
904 | gMC->Gspos("PPIN", 1, "PSUP", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
905 | |
906 | // --- |
907 | // --- Define Upper Cooling Panel, place it on top of PTCB --- |
92862013 |
908 | Float_t dpucp[3] ; |
d15a28e7 |
909 | // --- Upper Cooling Plate thickness --- |
910 | |
92862013 |
911 | dpucp[0] = dptcb[0] ; |
912 | dpucp[1] = fGeom->GetUpperCoolingPlateThickness() ; |
913 | dpucp[2] = dptcb[2] ; |
d15a28e7 |
914 | |
92862013 |
915 | gMC->Gsvolu("PUCP", "BOX ", idtmed[701], dpucp,3) ; |
d15a28e7 |
916 | |
6ffe346e |
917 | yO = fGeom->GetAirFilledBoxSize(1) / 2. |
918 | -( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() |
919 | -fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() - fGeom->GetUpperCoolingPlateThickness() ) ; |
d15a28e7 |
920 | |
92862013 |
921 | gMC->Gspos("PUCP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
922 | |
923 | // --- |
924 | // --- Define Al Support Plate, position it inside PAIR --- |
925 | // --- right beneath PTCB --- |
926 | // --- Al Support Plate thickness --- |
927 | |
92862013 |
928 | Float_t dpasp[3] ; |
929 | dpasp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; |
930 | dpasp[1] = fGeom->GetSupportPlateThickness() / 2.0 ; |
931 | dpasp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; |
d15a28e7 |
932 | |
92862013 |
933 | gMC->Gsvolu("PASP", "BOX ", idtmed[701], dpasp, 3) ; |
d15a28e7 |
934 | |
92862013 |
935 | yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetSupportPlateThickness() ) / 2. |
d15a28e7 |
936 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() |
92862013 |
937 | - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 ) ; |
d15a28e7 |
938 | |
92862013 |
939 | gMC->Gspos("PASP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
940 | |
941 | // --- |
942 | // --- Define Thermo Insulating Plate, position it inside PAIR --- |
943 | // --- right beneath PASP --- |
944 | // --- Lower Thermo Insulating Plate thickness --- |
945 | |
92862013 |
946 | Float_t dptip[3] ; |
947 | dptip[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; |
948 | dptip[1] = fGeom->GetLowerThermoPlateThickness() / 2.0 ; |
949 | dptip[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; |
d15a28e7 |
950 | |
92862013 |
951 | gMC->Gsvolu("PTIP", "BOX ", idtmed[706], dptip, 3) ; |
d15a28e7 |
952 | |
92862013 |
953 | yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerThermoPlateThickness() ) / 2. |
d15a28e7 |
954 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness() |
92862013 |
955 | - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness() ) ; |
d15a28e7 |
956 | |
92862013 |
957 | gMC->Gspos("PTIP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
958 | |
959 | // --- |
960 | // --- Define Textolit Plate, position it inside PAIR --- |
961 | // --- right beneath PTIP --- |
962 | // --- Lower Textolit Plate thickness --- |
963 | |
92862013 |
964 | Float_t dptxp[3] ; |
965 | dptxp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; |
966 | dptxp[1] = fGeom->GetLowerTextolitPlateThickness() / 2.0 ; |
967 | dptxp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; |
d15a28e7 |
968 | |
92862013 |
969 | gMC->Gsvolu("PTXP", "BOX ", idtmed[707], dptxp, 3) ; |
d15a28e7 |
970 | |
92862013 |
971 | yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerTextolitPlateThickness() ) / 2. |
d15a28e7 |
972 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness() |
92862013 |
973 | - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness() |
d15a28e7 |
974 | + fGeom->GetLowerThermoPlateThickness() ) ; |
975 | |
92862013 |
976 | gMC->Gspos("PTXP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
977 | |
978 | } |
979 | |
980 | //____________________________________________________________________________ |
981 | void AliPHOSv0::CreateGeometryforPPSD() |
fe4da5cc |
982 | { |
b2a60966 |
983 | // Create the PHOS-PPSD geometry for GEANT |
b2a60966 |
984 | //BEGIN_HTML |
985 | /* |
986 | <H2> |
987 | Geant3 geometry tree of PHOS-PPSD in ALICE |
988 | </H2> |
989 | <P><CENTER> |
990 | <IMG Align=BOTTOM ALT="PPSD geant tree" SRC="../images/PPSDinAlice.gif"> |
991 | </CENTER><P> |
992 | */ |
993 | //END_HTML |
994 | |
995 | // Get pointer to the array containing media indexes |
92862013 |
996 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 |
997 | |
92862013 |
998 | // The box containing all ppsd's for one PHOS module filled with air |
999 | Float_t ppsd[3] ; |
bacd0b23 |
1000 | ppsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
1001 | ppsd[1] = fGeom->GetCPVBoxSize(1) / 2.0 ; |
1002 | ppsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
fe4da5cc |
1003 | |
92862013 |
1004 | gMC->Gsvolu("PPSD", "BOX ", idtmed[798], ppsd, 3) ; |
d15a28e7 |
1005 | |
92862013 |
1006 | Float_t yO = fGeom->GetOuterBoxSize(1) / 2.0 ; |
d15a28e7 |
1007 | |
ed4205d8 |
1008 | if ( strcmp( fGeom->GetName(),"MIXT") == 0 && fGeom->GetNPPSDModules() > 0) |
1009 | gMC->Gspos("PPSD", 1, "PHO1", 0.0, yO, 0.0, 0, "ONLY") ; |
1010 | else |
1011 | gMC->Gspos("PPSD", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 |
1012 | |
1013 | // Now we build a micromegas module |
1014 | // The box containing the whole module filled with epoxy (FR4) |
1015 | |
92862013 |
1016 | Float_t mppsd[3] ; |
1017 | mppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; |
1018 | mppsd[1] = fGeom->GetPPSDModuleSize(1) / 2.0 ; |
1019 | mppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; |
d15a28e7 |
1020 | |
13add4de |
1021 | gMC->Gsvolu("PMPP", "BOX ", idtmed[708], mppsd, 3) ; |
d15a28e7 |
1022 | |
92862013 |
1023 | // Inside mppsd : |
d15a28e7 |
1024 | // 1. The Top Lid made of epoxy (FR4) |
1025 | |
92862013 |
1026 | Float_t tlppsd[3] ; |
1027 | tlppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; |
1028 | tlppsd[1] = fGeom->GetLidThickness() / 2.0 ; |
1029 | tlppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; |
d15a28e7 |
1030 | |
13add4de |
1031 | gMC->Gsvolu("PTLP", "BOX ", idtmed[708], tlppsd, 3) ; |
d15a28e7 |
1032 | |
92862013 |
1033 | Float_t y0 = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; |
d15a28e7 |
1034 | |
13add4de |
1035 | gMC->Gspos("PTLP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1036 | |
1037 | // 2. the upper panel made of composite material |
1038 | |
92862013 |
1039 | Float_t upppsd[3] ; |
1040 | upppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
1041 | upppsd[1] = fGeom->GetCompositeThickness() / 2.0 ; |
1042 | upppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
d15a28e7 |
1043 | |
13add4de |
1044 | gMC->Gsvolu("PUPP", "BOX ", idtmed[709], upppsd, 3) ; |
d15a28e7 |
1045 | |
92862013 |
1046 | y0 = y0 - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 |
1047 | |
13add4de |
1048 | gMC->Gspos("PUPP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1049 | |
1050 | // 3. the anode made of Copper |
1051 | |
92862013 |
1052 | Float_t anppsd[3] ; |
1053 | anppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
1054 | anppsd[1] = fGeom->GetAnodeThickness() / 2.0 ; |
1055 | anppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
d15a28e7 |
1056 | |
13add4de |
1057 | gMC->Gsvolu("PANP", "BOX ", idtmed[710], anppsd, 3) ; |
d15a28e7 |
1058 | |
92862013 |
1059 | y0 = y0 - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; |
d15a28e7 |
1060 | |
13add4de |
1061 | gMC->Gspos("PANP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1062 | |
1063 | // 4. the conversion gap + avalanche gap filled with gas |
1064 | |
92862013 |
1065 | Float_t ggppsd[3] ; |
1066 | ggppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
1067 | ggppsd[1] = ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2.0 ; |
1068 | ggppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
d15a28e7 |
1069 | |
13add4de |
1070 | gMC->Gsvolu("PGGP", "BOX ", idtmed[715], ggppsd, 3) ; |
d15a28e7 |
1071 | |
1072 | // --- Divide GGPP in X (phi) and Z directions -- |
dc999bc0 |
1073 | gMC->Gsdvn("PPRO", "PGGP", fGeom->GetNumberOfPadsPhi(), 1) ; |
1074 | gMC->Gsdvn("PPCE", "PPRO", fGeom->GetNumberOfPadsZ() , 3) ; |
d15a28e7 |
1075 | |
92862013 |
1076 | y0 = y0 - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; |
d15a28e7 |
1077 | |
13add4de |
1078 | gMC->Gspos("PGGP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1079 | |
1080 | |
1081 | // 6. the cathode made of Copper |
1082 | |
92862013 |
1083 | Float_t cappsd[3] ; |
1084 | cappsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
1085 | cappsd[1] = fGeom->GetCathodeThickness() / 2.0 ; |
1086 | cappsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
d15a28e7 |
1087 | |
13add4de |
1088 | gMC->Gsvolu("PCAP", "BOX ", idtmed[710], cappsd, 3) ; |
d15a28e7 |
1089 | |
39544c2e |
1090 | y0 = y0 - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; |
d15a28e7 |
1091 | |
13add4de |
1092 | gMC->Gspos("PCAP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1093 | |
1094 | // 7. the printed circuit made of G10 |
1095 | |
92862013 |
1096 | Float_t pcppsd[3] ; |
1097 | pcppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2,.0 ; |
1098 | pcppsd[1] = fGeom->GetPCThickness() / 2.0 ; |
1099 | pcppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
d15a28e7 |
1100 | |
92862013 |
1101 | gMC->Gsvolu("PCPS", "BOX ", idtmed[711], cappsd, 3) ; |
d15a28e7 |
1102 | |
92862013 |
1103 | y0 = y0 - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; |
d15a28e7 |
1104 | |
13add4de |
1105 | gMC->Gspos("PCPS", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1106 | |
1107 | // 8. the lower panel made of composite material |
1108 | |
92862013 |
1109 | Float_t lpppsd[3] ; |
1110 | lpppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
1111 | lpppsd[1] = fGeom->GetCompositeThickness() / 2.0 ; |
1112 | lpppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; |
d15a28e7 |
1113 | |
13add4de |
1114 | gMC->Gsvolu("PLPP", "BOX ", idtmed[709], lpppsd, 3) ; |
d15a28e7 |
1115 | |
92862013 |
1116 | y0 = y0 - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 |
1117 | |
13add4de |
1118 | gMC->Gspos("PLPP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1119 | |
92862013 |
1120 | // Position the fNumberOfModulesPhi x fNumberOfModulesZ modules (mppsd) inside PPSD to cover a PHOS module |
d15a28e7 |
1121 | // the top and bottom one's (which are assumed identical) : |
1122 | |
bacd0b23 |
1123 | Float_t yt = ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; |
1124 | Float_t yb = - ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; |
d15a28e7 |
1125 | |
92862013 |
1126 | Int_t copyNumbertop = 0 ; |
1127 | Int_t copyNumberbot = fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() ; |
d15a28e7 |
1128 | |
bacd0b23 |
1129 | Float_t x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; |
d15a28e7 |
1130 | |
1131 | for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module |
bacd0b23 |
1132 | Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; |
d15a28e7 |
1133 | |
1134 | for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module |
13add4de |
1135 | gMC->Gspos("PMPP", ++copyNumbertop, "PPSD", x, yt, z, 0, "ONLY") ; |
1136 | gMC->Gspos("PMPP", ++copyNumberbot, "PPSD", x, yb, z, 0, "ONLY") ; |
92862013 |
1137 | z = z - fGeom->GetPPSDModuleSize(2) ; |
d15a28e7 |
1138 | } // end of Z module loop |
92862013 |
1139 | x = x - fGeom->GetPPSDModuleSize(0) ; |
d15a28e7 |
1140 | } // end of phi module loop |
1141 | |
1142 | // The Lead converter between two air gaps |
1143 | // 1. Upper air gap |
1144 | |
92862013 |
1145 | Float_t uappsd[3] ; |
bacd0b23 |
1146 | uappsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
92862013 |
1147 | uappsd[1] = fGeom->GetMicro1ToLeadGap() / 2.0 ; |
bacd0b23 |
1148 | uappsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
d15a28e7 |
1149 | |
13add4de |
1150 | gMC->Gsvolu("PUAPPS", "BOX ", idtmed[798], uappsd, 3) ; |
d15a28e7 |
1151 | |
bacd0b23 |
1152 | y0 = ( fGeom->GetCPVBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; |
d15a28e7 |
1153 | |
13add4de |
1154 | gMC->Gspos("PUAPPS", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1155 | |
1156 | // 2. Lead converter |
1157 | |
92862013 |
1158 | Float_t lcppsd[3] ; |
bacd0b23 |
1159 | lcppsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
92862013 |
1160 | lcppsd[1] = fGeom->GetLeadConverterThickness() / 2.0 ; |
bacd0b23 |
1161 | lcppsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
d15a28e7 |
1162 | |
13add4de |
1163 | gMC->Gsvolu("PLCPPS", "BOX ", idtmed[712], lcppsd, 3) ; |
d15a28e7 |
1164 | |
92862013 |
1165 | y0 = y0 - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; |
d15a28e7 |
1166 | |
13add4de |
1167 | gMC->Gspos("PLCPPS", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1168 | |
1169 | // 3. Lower air gap |
1170 | |
92862013 |
1171 | Float_t lappsd[3] ; |
bacd0b23 |
1172 | lappsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
92862013 |
1173 | lappsd[1] = fGeom->GetLeadToMicro2Gap() / 2.0 ; |
bacd0b23 |
1174 | lappsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
d15a28e7 |
1175 | |
13add4de |
1176 | gMC->Gsvolu("PLAPPS", "BOX ", idtmed[798], lappsd, 3) ; |
fe4da5cc |
1177 | |
92862013 |
1178 | y0 = y0 - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; |
d15a28e7 |
1179 | |
13add4de |
1180 | gMC->Gspos("PLAPPS", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 |
1181 | |
fe4da5cc |
1182 | } |
1183 | |
d15a28e7 |
1184 | |
bacd0b23 |
1185 | //____________________________________________________________________________ |
1186 | void AliPHOSv0::CreateGeometryforCPV() |
1187 | { |
1188 | // Create the PHOS-CPV geometry for GEANT |
1189 | // Author: Yuri Kharlov 11 September 2000 |
bacd0b23 |
1190 | //BEGIN_HTML |
1191 | /* |
1192 | <H2> |
1193 | Geant3 geometry of PHOS-CPV in ALICE |
1194 | </H2> |
1195 | <table width=700> |
1196 | |
1197 | <tr> |
1198 | <td>CPV perspective view</td> |
1199 | <td>CPV front view </td> |
1200 | </tr> |
1201 | |
1202 | <tr> |
1203 | <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td> |
1204 | <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td> |
1205 | </tr> |
1206 | |
1207 | <tr> |
1208 | <td>One CPV module, perspective view </td> |
1209 | <td>One CPV module, front view (extended in vertical direction) </td> |
1210 | </tr> |
1211 | |
1212 | <tr> |
1213 | <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td> |
1214 | <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td> |
1215 | </tr> |
1216 | |
1217 | </table> |
1218 | |
1219 | <H2> |
1220 | Geant3 geometry tree of PHOS-CPV in ALICE |
1221 | </H2> |
1222 | <center> |
1223 | <img height=300 width=290 src="../images/CPVtree.gif"> |
1224 | </center> |
1225 | */ |
1226 | //END_HTML |
1227 | |
1228 | Float_t par[3], x,y,z; |
1229 | |
1230 | // Get pointer to the array containing media indexes |
1231 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
1232 | |
1233 | // The box containing all CPV for one PHOS module filled with air |
1234 | par[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
1235 | par[1] = fGeom->GetCPVBoxSize(1) / 2.0 ; |
1236 | par[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
13add4de |
1237 | gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ; |
bacd0b23 |
1238 | |
1239 | y = fGeom->GetOuterBoxSize(1) / 2.0 ; |
13add4de |
1240 | gMC->Gspos("PCPV", 1, "PHOS", 0.0, y, 0.0, 0, "ONLY") ; |
bacd0b23 |
1241 | |
1242 | // Gassiplex board |
1243 | |
1244 | par[0] = fGeom->GetGassiplexChipSize(0)/2.; |
1245 | par[1] = fGeom->GetGassiplexChipSize(1)/2.; |
1246 | par[2] = fGeom->GetGassiplexChipSize(2)/2.; |
13add4de |
1247 | gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3); |
bacd0b23 |
1248 | |
1249 | // Cu+Ni foil covers Gassiplex board |
1250 | |
1251 | par[1] = fGeom->GetCPVCuNiFoilThickness()/2; |
13add4de |
1252 | gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3); |
bacd0b23 |
1253 | y = -(fGeom->GetGassiplexChipSize(1)/2 - par[1]); |
13add4de |
1254 | gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY"); |
bacd0b23 |
1255 | |
1256 | // Position of the chip inside CPV |
1257 | |
1258 | Float_t xStep = fGeom->GetCPVActiveSize(0) / (fGeom->GetNumberOfCPVChipsPhi() + 1); |
1259 | Float_t zStep = fGeom->GetCPVActiveSize(1) / (fGeom->GetNumberOfCPVChipsZ() + 1); |
1260 | Int_t copy = 0; |
1261 | y = fGeom->GetCPVFrameSize(1)/2 - fGeom->GetFTPosition(0) + |
1262 | fGeom->GetCPVTextoliteThickness() / 2 + fGeom->GetGassiplexChipSize(1) / 2 + 0.1; |
1263 | for (Int_t ix=0; ix<fGeom->GetNumberOfCPVChipsPhi(); ix++) { |
1264 | x = xStep * (ix+1) - fGeom->GetCPVActiveSize(0)/2; |
1265 | for (Int_t iz=0; iz<fGeom->GetNumberOfCPVChipsZ(); iz++) { |
1266 | copy++; |
1267 | z = zStep * (iz+1) - fGeom->GetCPVActiveSize(1)/2; |
13add4de |
1268 | gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY"); |
bacd0b23 |
1269 | } |
1270 | } |
1271 | |
1272 | // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni) |
1273 | |
1274 | par[0] = fGeom->GetCPVActiveSize(0) / 2; |
1275 | par[1] = fGeom->GetCPVTextoliteThickness() / 2; |
1276 | par[2] = fGeom->GetCPVActiveSize(1) / 2; |
13add4de |
1277 | gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3); |
bacd0b23 |
1278 | |
1279 | // Argon gas volume |
1280 | |
1281 | par[1] = (fGeom->GetFTPosition(2) - fGeom->GetFTPosition(1) - fGeom->GetCPVTextoliteThickness()) / 2; |
13add4de |
1282 | gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3); |
bacd0b23 |
1283 | |
1284 | for (Int_t i=0; i<4; i++) { |
1285 | y = fGeom->GetCPVFrameSize(1) / 2 - fGeom->GetFTPosition(i) + fGeom->GetCPVTextoliteThickness()/2; |
13add4de |
1286 | gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY"); |
bacd0b23 |
1287 | if(i==1){ |
1288 | y-= (fGeom->GetFTPosition(2) - fGeom->GetFTPosition(1)) / 2; |
13add4de |
1289 | gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY"); |
bacd0b23 |
1290 | } |
1291 | } |
1292 | |
1293 | // Dummy sensitive plane in the middle of argone gas volume |
1294 | |
1295 | par[1]=0.001; |
13add4de |
1296 | gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3); |
1297 | gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY"); |
bacd0b23 |
1298 | |
1299 | // Cu+Ni foil covers textolite |
1300 | |
1301 | par[1] = fGeom->GetCPVCuNiFoilThickness() / 2; |
13add4de |
1302 | gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3); |
bacd0b23 |
1303 | y = fGeom->GetCPVTextoliteThickness()/2 - par[1]; |
13add4de |
1304 | gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY"); |
bacd0b23 |
1305 | |
1306 | // Aluminum frame around CPV |
1307 | |
1308 | par[0] = fGeom->GetCPVFrameSize(0)/2; |
1309 | par[1] = fGeom->GetCPVFrameSize(1)/2; |
1310 | par[2] = fGeom->GetCPVBoxSize(2) /2; |
13add4de |
1311 | gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3); |
bacd0b23 |
1312 | |
1313 | par[0] = fGeom->GetCPVBoxSize(0)/2 - fGeom->GetCPVFrameSize(0); |
1314 | par[1] = fGeom->GetCPVFrameSize(1)/2; |
1315 | par[2] = fGeom->GetCPVFrameSize(2)/2; |
13add4de |
1316 | gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3); |
bacd0b23 |
1317 | |
1318 | for (Int_t j=0; j<=1; j++) { |
1319 | x = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(0) - fGeom->GetCPVFrameSize(0)) / 2; |
13add4de |
1320 | gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY"); |
bacd0b23 |
1321 | z = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(2) - fGeom->GetCPVFrameSize(2)) / 2; |
13add4de |
1322 | gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY"); |
bacd0b23 |
1323 | } |
1324 | |
1325 | } |
1326 | |
1327 | |
6a5795b4 |
1328 | //____________________________________________________________________________ |
1329 | void AliPHOSv0::CreateGeometryforSupport() |
1330 | { |
1331 | // Create the PHOS' support geometry for GEANT |
1332 | //BEGIN_HTML |
1333 | /* |
1334 | <H2> |
1335 | Geant3 geometry of the PHOS's support |
1336 | </H2> |
1337 | <P><CENTER> |
1338 | <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif"> |
1339 | </CENTER><P> |
1340 | */ |
1341 | //END_HTML |
1342 | |
1343 | Float_t par[5], x0,y0,z0 ; |
1344 | Int_t i,j,copy; |
1345 | |
1346 | // Get pointer to the array containing media indexes |
1347 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
1348 | |
1349 | // --- Dummy box containing two rails on which PHOS support moves |
1350 | // --- Put these rails to the bottom of the L3 magnet |
1351 | |
1352 | par[0] = fGeom->GetRailRoadSize(0) / 2.0 ; |
1353 | par[1] = fGeom->GetRailRoadSize(1) / 2.0 ; |
1354 | par[2] = fGeom->GetRailRoadSize(2) / 2.0 ; |
1355 | gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ; |
1356 | |
1357 | y0 = -(fGeom->GetRailsDistanceFromIP() - fGeom->GetRailRoadSize(1) / 2.0) ; |
1358 | gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ; |
1359 | |
1360 | // --- Dummy box containing one rail |
1361 | |
1362 | par[0] = fGeom->GetRailOuterSize(0) / 2.0 ; |
1363 | par[1] = fGeom->GetRailOuterSize(1) / 2.0 ; |
1364 | par[2] = fGeom->GetRailOuterSize(2) / 2.0 ; |
1365 | gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ; |
1366 | |
1367 | for (i=0; i<2; i++) { |
1368 | x0 = (2*i-1) * fGeom->GetDistanceBetwRails() / 2.0 ; |
1369 | gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ; |
1370 | } |
1371 | |
1372 | // --- Upper and bottom steel parts of the rail |
1373 | |
1374 | par[0] = fGeom->GetRailPart1(0) / 2.0 ; |
1375 | par[1] = fGeom->GetRailPart1(1) / 2.0 ; |
1376 | par[2] = fGeom->GetRailPart1(2) / 2.0 ; |
1377 | gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ; |
1378 | |
1379 | y0 = - (fGeom->GetRailOuterSize(1) - fGeom->GetRailPart1(1)) / 2.0 ; |
1380 | gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
1381 | y0 = (fGeom->GetRailOuterSize(1) - fGeom->GetRailPart1(1)) / 2.0 - fGeom->GetRailPart3(1); |
1382 | gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
1383 | |
1384 | // --- The middle vertical steel parts of the rail |
1385 | |
1386 | par[0] = fGeom->GetRailPart2(0) / 2.0 ; |
1387 | par[1] = fGeom->GetRailPart2(1) / 2.0 ; |
1388 | par[2] = fGeom->GetRailPart2(2) / 2.0 ; |
1389 | gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ; |
1390 | |
1391 | y0 = - fGeom->GetRailPart3(1) / 2.0 ; |
1392 | gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
1393 | |
1394 | // --- The most upper steel parts of the rail |
1395 | |
1396 | par[0] = fGeom->GetRailPart3(0) / 2.0 ; |
1397 | par[1] = fGeom->GetRailPart3(1) / 2.0 ; |
1398 | par[2] = fGeom->GetRailPart3(2) / 2.0 ; |
1399 | gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ; |
1400 | |
1401 | y0 = (fGeom->GetRailOuterSize(1) - fGeom->GetRailPart3(1)) / 2.0 ; |
1402 | gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
1403 | |
1404 | // --- The wall of the cradle |
1405 | // --- The wall is empty: steel thin walls and air inside |
1406 | |
1407 | par[1] = TMath::Sqrt( |
1408 | TMath::Power((fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1)),2) + |
1409 | TMath::Power((fGeom->GetOuterBoxSize(0)/2),2)) + 10.; |
1410 | par[0] = par[1] - fGeom->GetCradleWall(1) ; |
1411 | par[2] = fGeom->GetCradleWall(2) / 2.0 ; |
1412 | par[3] = fGeom->GetCradleWall(3) ; |
1413 | par[4] = fGeom->GetCradleWall(4) ; |
1414 | gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ; |
1415 | |
1416 | par[0] -= fGeom->GetCradleWallThickness() ; |
1417 | par[1] -= fGeom->GetCradleWallThickness() ; |
1418 | par[2] -= fGeom->GetCradleWallThickness() ; |
1419 | gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ; |
1420 | gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ; |
1421 | |
1422 | for (i=0; i<2; i++) { |
1423 | z0 = (2*i-1) * (fGeom->GetOuterBoxSize(2) + fGeom->GetCradleWall(2)) / 2.0 ; |
1424 | gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ; |
1425 | } |
1426 | |
1427 | // --- The "wheels" of the cradle |
1428 | |
1429 | par[0] = fGeom->GetCradleWheel(0) / 2; |
1430 | par[1] = fGeom->GetCradleWheel(1) / 2; |
1431 | par[2] = fGeom->GetCradleWheel(2) / 2; |
1432 | gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ; |
1433 | |
1434 | y0 = -(fGeom->GetRailsDistanceFromIP() - fGeom->GetRailRoadSize(1) - |
1435 | fGeom->GetCradleWheel(1)/2) ; |
1436 | for (i=0; i<2; i++) { |
1437 | z0 = (2*i-1) * ((fGeom->GetOuterBoxSize(2) + fGeom->GetCradleWheel(2)) / 2.0 + |
1438 | fGeom->GetCradleWall(2)); |
1439 | for (j=0; j<2; j++) { |
1440 | copy = 2*i + j; |
1441 | x0 = (2*j-1) * fGeom->GetDistanceBetwRails() / 2.0 ; |
1442 | gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ; |
1443 | } |
1444 | } |
1445 | |
1446 | } |
1447 | |
ed4205d8 |
1448 | //____________________________________________________________________________ |
1449 | Float_t AliPHOSv0::ZMin(void) const |
1450 | { |
1451 | // Overall dimension of the PHOS (min) |
1452 | // Take it twice more than the PHOS module size |
1453 | return -fGeom->GetOuterBoxSize(2); |
1454 | } |
1455 | |
1456 | //____________________________________________________________________________ |
1457 | Float_t AliPHOSv0::ZMax(void) const |
1458 | { |
1459 | // Overall dimension of the PHOS (max) |
1460 | // Take it twice more than the PHOS module size |
1461 | return fGeom->GetOuterBoxSize(2); |
1462 | } |
1463 | |
d15a28e7 |
1464 | //____________________________________________________________________________ |
1465 | void AliPHOSv0::Init(void) |
1466 | { |
b2a60966 |
1467 | // Just prints an information message |
1468 | |
d15a28e7 |
1469 | Int_t i; |
1470 | |
1471 | printf("\n"); |
1472 | for(i=0;i<35;i++) printf("*"); |
1473 | printf(" PHOS_INIT "); |
1474 | for(i=0;i<35;i++) printf("*"); |
1475 | printf("\n"); |
1476 | |
1477 | // Here the PHOS initialisation code (if any!) |
1478 | |
e04976bd |
1479 | if (fGeom!=0) |
1480 | cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << fGeom->GetName() << endl ; |
1481 | else |
1482 | cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ; |
1483 | |
d15a28e7 |
1484 | for(i=0;i<80;i++) printf("*"); |
1485 | printf("\n"); |
1486 | |
1487 | } |
1488 | |