]>
Commit | Line | Data |
---|---|---|
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 | **************************************************************************/ | |
b2a60966 | 15 | /* $Id$ */ |
16 | ||
7b7c1533 | 17 | |
d15a28e7 | 18 | //_________________________________________________________________________ |
b2a60966 | 19 | // Implementation version v0 of PHOS Manager class |
5f20d3fb | 20 | // An object of this class does not produce hits nor digits |
21 | // It is the one to use if you do not want to produce outputs in TREEH or TREED | |
b2a60966 | 22 | // |
85218d13 | 23 | //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) |
b2a60966 | 24 | |
d2cf0e38 | 25 | |
fe4da5cc | 26 | // --- ROOT system --- |
d15a28e7 | 27 | |
fe4da5cc | 28 | #include "TBRIK.h" |
85218d13 | 29 | #include "TTRD1.h" |
fe4da5cc | 30 | #include "TNode.h" |
0869cea5 | 31 | #include "TRandom.h" |
94de3818 | 32 | #include "TGeometry.h" |
7367f709 | 33 | #include "TFolder.h" |
34 | #include "TROOT.h" | |
7b7c1533 | 35 | #include "TTree.h" |
fe4da5cc | 36 | |
81e92872 | 37 | |
d15a28e7 | 38 | // --- Standard library --- |
39 | ||
de9ec31b | 40 | #include <stdio.h> |
41 | #include <string.h> | |
42 | #include <stdlib.h> | |
43 | #include <strstream.h> | |
d15a28e7 | 44 | |
45 | // --- AliRoot header files --- | |
46 | ||
fe4da5cc | 47 | #include "AliPHOSv0.h" |
48 | #include "AliRun.h" | |
d15a28e7 | 49 | #include "AliConst.h" |
94de3818 | 50 | #include "AliMC.h" |
13add4de | 51 | #include "AliPHOSGeometry.h" |
7b7c1533 | 52 | #include "AliPHOSGetter.h" |
fe4da5cc | 53 | |
54 | ClassImp(AliPHOSv0) | |
55 | ||
d15a28e7 | 56 | //____________________________________________________________________________ |
57 | AliPHOSv0::AliPHOSv0(const char *name, const char *title): | |
58 | AliPHOS(name,title) | |
59 | { | |
b2a60966 | 60 | // ctor : title is used to identify the layout |
fe4da5cc | 61 | |
7a9d98f9 | 62 | // create the getter |
63 | AliPHOSGetter::GetInstance(gDirectory->GetName(), 0); | |
85218d13 | 64 | |
d15a28e7 | 65 | } |
66 | ||
d15a28e7 | 67 | //____________________________________________________________________________ |
68 | void AliPHOSv0::BuildGeometry() | |
fe4da5cc | 69 | { |
b2a60966 | 70 | // Build the PHOS geometry for the ROOT display |
71 | //BEGIN_HTML | |
72 | /* | |
73 | <H2> | |
74 | PHOS in ALICE displayed by root | |
75 | </H2> | |
76 | <UL> | |
77 | <LI> All Views | |
78 | <P> | |
79 | <CENTER> | |
80 | <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif"> | |
81 | </CENTER></P></LI> | |
82 | <LI> Front View | |
83 | <P> | |
84 | <CENTER> | |
85 | <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif"> | |
86 | </CENTER></P></LI> | |
87 | <LI> 3D View 1 | |
88 | <P> | |
89 | <CENTER> | |
90 | <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif"> | |
91 | </CENTER></P></LI> | |
92 | <LI> 3D View 2 | |
93 | <P> | |
94 | <CENTER> | |
95 | <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif"> | |
96 | </CENTER></P></LI> | |
97 | </UL> | |
98 | */ | |
99 | //END_HTML | |
7367f709 | 100 | |
85218d13 | 101 | this->BuildGeometryforEMC() ; |
102 | this->BuildGeometryforCPV() ; | |
103 | ||
fe4da5cc | 104 | } |
d15a28e7 | 105 | |
106 | //____________________________________________________________________________ | |
85218d13 | 107 | void AliPHOSv0:: BuildGeometryforEMC(void) |
d15a28e7 | 108 | { |
85218d13 | 109 | // Build the PHOS-EMC geometry for the ROOT display |
110 | ||
d15a28e7 | 111 | const Int_t kColorPHOS = kRed ; |
112 | const Int_t kColorXTAL = kBlue ; | |
85218d13 | 113 | |
92862013 | 114 | Double_t const kRADDEG = 180.0 / kPI ; |
85218d13 | 115 | |
7367f709 | 116 | AliPHOSGeometry * geom = GetGeometry() ; |
85218d13 | 117 | AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ; |
118 | Float_t * boxparams = emcg->GetEMCParams() ; | |
7367f709 | 119 | |
85218d13 | 120 | new TTRD1("OuterBox", "PHOS box", "void",boxparams[0],boxparams[1],boxparams[2], boxparams[3] ); |
121 | ||
d15a28e7 | 122 | |
d15a28e7 | 123 | // Crystals Box |
d15a28e7 | 124 | |
85218d13 | 125 | Float_t * cribox = emcg->GetInnerThermoHalfSize() ; |
126 | new TBRIK( "CrystalsBox", "PHOS crystals box", "void", cribox[0], cribox[2], cribox[1] ) ; | |
127 | ||
128 | // position PHOS into ALICE | |
129 | ||
130 | Float_t r = geom->GetIPtoOuterCoverDistance() + boxparams[3] ; | |
d15a28e7 | 131 | Int_t number = 988 ; |
92862013 | 132 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; |
85218d13 | 133 | |
d15a28e7 | 134 | char * nodename = new char[20] ; |
135 | char * rotname = new char[20] ; | |
136 | ||
85218d13 | 137 | new TRotMatrix("cribox", "cribox", 90, 0, 90, 90, 0, 0); |
d15a28e7 | 138 | |
85218d13 | 139 | for( Int_t i = 1; i <= geom->GetNModules(); i++ ) { |
d15a28e7 | 140 | |
7367f709 | 141 | Float_t angle = geom->GetPHOSAngle(i) ; |
85218d13 | 142 | sprintf(rotname, "%s%d", "rot", number++) ; |
143 | new TRotMatrix(rotname, rotname, 90, angle, 0, 0, 90, 270 + angle); | |
144 | ||
92862013 | 145 | top->cd(); |
85218d13 | 146 | sprintf(nodename,"%s%d", "Module", i) ; |
92862013 | 147 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; |
148 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; | |
85218d13 | 149 | TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ; |
150 | outerboxnode->SetLineColor(kColorPHOS) ; | |
151 | fNodes->Add(outerboxnode) ; | |
152 | outerboxnode->cd() ; | |
153 | ||
154 | Float_t z = -boxparams[3] - geom->GetIPtoOuterCoverDistance() + | |
155 | cribox[1] + geom->GetIPtoCrystalSurface() ; | |
156 | TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, 0, z) ; | |
157 | crystalsboxnode->SetLineColor(kColorXTAL) ; | |
158 | fNodes->Add(crystalsboxnode) ; | |
159 | } | |
31aa6d6c | 160 | |
85218d13 | 161 | delete[] rotname ; |
162 | delete[] nodename ; | |
fe4da5cc | 163 | } |
164 | ||
85218d13 | 165 | |
bacd0b23 | 166 | //____________________________________________________________________________ |
167 | void AliPHOSv0:: BuildGeometryforCPV(void) | |
168 | { | |
169 | // Build the PHOS-CPV geometry for the ROOT display | |
170 | // Author: Yuri Kharlov 11 September 2000 | |
171 | // | |
172 | //BEGIN_HTML | |
173 | /* | |
174 | <H2> | |
175 | CPV displayed by root | |
176 | </H2> | |
177 | <table width=700> | |
178 | ||
179 | <tr> | |
180 | <td>CPV perspective view</td> | |
181 | <td>CPV front view </td> | |
182 | </tr> | |
183 | ||
184 | <tr> | |
185 | <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td> | |
186 | <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td> | |
187 | </tr> | |
188 | ||
189 | </table> | |
190 | ||
191 | */ | |
192 | //END_HTML | |
193 | ||
194 | const Double_t kRADDEG = 180.0 / kPI ; | |
195 | const Int_t kColorCPV = kGreen ; | |
196 | const Int_t kColorFrame = kYellow ; | |
197 | const Int_t kColorGassiplex = kRed; | |
198 | const Int_t kColorPCB = kCyan; | |
199 | ||
7367f709 | 200 | AliPHOSGeometry * geom = GetGeometry() ; |
201 | ||
bacd0b23 | 202 | // Box for a full PHOS module |
203 | ||
7367f709 | 204 | new TBRIK ("CPVBox", "CPV box", "void", geom->GetCPVBoxSize(0)/2, |
205 | geom->GetCPVBoxSize(1)/2, | |
206 | geom->GetCPVBoxSize(2)/2 ); | |
207 | new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", geom->GetCPVFrameSize(0)/2, | |
208 | geom->GetCPVFrameSize(1)/2, | |
209 | geom->GetCPVBoxSize(2)/2 ); | |
210 | new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0), | |
211 | geom->GetCPVFrameSize(1)/2, | |
212 | geom->GetCPVFrameSize(2)/2); | |
213 | new TBRIK ("CPVPCB", "CPV PCB", "void", geom->GetCPVActiveSize(0)/2, | |
214 | geom->GetCPVTextoliteThickness()/2, | |
215 | geom->GetCPVActiveSize(1)/2); | |
216 | new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", geom->GetGassiplexChipSize(0)/2, | |
217 | geom->GetGassiplexChipSize(1)/2, | |
218 | geom->GetGassiplexChipSize(2)/2); | |
bacd0b23 | 219 | |
220 | // position CPV into ALICE | |
221 | ||
222 | char * nodename = new char[25] ; | |
223 | char * rotname = new char[25] ; | |
224 | ||
7367f709 | 225 | Float_t r = geom->GetIPtoCPVDistance() + geom->GetCPVBoxSize(1) / 2.0 ; |
bacd0b23 | 226 | Int_t number = 988 ; |
227 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; | |
ed4205d8 | 228 | |
229 | Int_t lastModule = 0 ; | |
85218d13 | 230 | lastModule = geom->GetNModules(); |
ed4205d8 | 231 | |
232 | for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules | |
85218d13 | 233 | |
bacd0b23 | 234 | // One CPV module |
85218d13 | 235 | |
7367f709 | 236 | Float_t angle = geom->GetPHOSAngle(i) ; |
ed4205d8 | 237 | sprintf(rotname, "%s%d", "rotg", number+i) ; |
bacd0b23 | 238 | new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); |
239 | top->cd(); | |
240 | sprintf(nodename, "%s%d", "CPVModule", i) ; | |
241 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; | |
242 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; | |
243 | Float_t z; | |
244 | TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ; | |
245 | cpvBoxNode->SetLineColor(kColorCPV) ; | |
246 | fNodes->Add(cpvBoxNode) ; | |
247 | cpvBoxNode->cd() ; | |
248 | ||
249 | // inside each CPV box: | |
250 | ||
251 | // Frame around CPV | |
cd461ab8 | 252 | Int_t j; |
253 | for (j=0; j<=1; j++) { | |
bacd0b23 | 254 | sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ; |
7367f709 | 255 | x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2; |
bacd0b23 | 256 | TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ; |
257 | cpvFrameNode->SetLineColor(kColorFrame) ; | |
258 | fNodes->Add(cpvFrameNode) ; | |
259 | ||
260 | sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ; | |
7367f709 | 261 | z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2; |
bacd0b23 | 262 | cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ; |
263 | cpvFrameNode->SetLineColor(kColorFrame) ; | |
264 | fNodes->Add(cpvFrameNode) ; | |
265 | } | |
266 | ||
267 | // 4 printed circuit boards | |
cd461ab8 | 268 | for (j=0; j<4; j++) { |
bacd0b23 | 269 | sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ; |
7367f709 | 270 | y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(j) + geom->GetCPVTextoliteThickness()/2; |
bacd0b23 | 271 | TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ; |
272 | cpvPCBNode->SetLineColor(kColorPCB) ; | |
273 | fNodes->Add(cpvPCBNode) ; | |
274 | } | |
275 | ||
276 | // Gassiplex chips | |
7367f709 | 277 | Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1); |
278 | Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1); | |
279 | y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) + | |
280 | geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1; | |
281 | for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) { | |
282 | x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2; | |
283 | for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) { | |
284 | z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2; | |
bacd0b23 | 285 | sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ; |
286 | TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ; | |
287 | cpvGassiplexNode->SetLineColor(kColorGassiplex) ; | |
288 | fNodes->Add(cpvGassiplexNode) ; | |
289 | } | |
290 | } | |
291 | ||
292 | } // PHOS modules | |
293 | ||
294 | delete[] rotname ; | |
295 | delete[] nodename ; | |
296 | } | |
297 | ||
d15a28e7 | 298 | //____________________________________________________________________________ |
fe4da5cc | 299 | void AliPHOSv0::CreateGeometry() |
300 | { | |
b2a60966 | 301 | // Create the PHOS geometry for Geant |
d15a28e7 | 302 | |
7a9d98f9 | 303 | AliPHOSv0 *phostmp = dynamic_cast<AliPHOSv0*>(gAlice->GetModule("PHOS")) ; |
d15a28e7 | 304 | |
92862013 | 305 | if ( phostmp == NULL ) { |
d15a28e7 | 306 | |
307 | fprintf(stderr, "PHOS detector not found!\n") ; | |
308 | return; | |
fe4da5cc | 309 | |
d15a28e7 | 310 | } |
7367f709 | 311 | |
312 | AliPHOSGeometry * geom = GetGeometry() ; | |
313 | ||
d15a28e7 | 314 | // Get pointer to the array containing media indeces |
92862013 | 315 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 | 316 | |
85218d13 | 317 | // Create a PHOS module. |
d15a28e7 | 318 | |
85218d13 | 319 | gMC->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ; |
d15a28e7 | 320 | |
85218d13 | 321 | this->CreateGeometryforEMC() ; |
ed4205d8 | 322 | |
85218d13 | 323 | this->CreateGeometryforCPV() ; |
324 | ||
b73f246d | 325 | this->CreateGeometryforSupport() ; |
d15a28e7 | 326 | |
327 | // --- Position PHOS mdules in ALICE setup --- | |
328 | ||
92862013 | 329 | Int_t idrotm[99] ; |
330 | Double_t const kRADDEG = 180.0 / kPI ; | |
85218d13 | 331 | Float_t * phosParams = geom->GetPHOSParams() ; |
d15a28e7 | 332 | |
ed4205d8 | 333 | Int_t i; |
85218d13 | 334 | for( i = 1; i <= geom->GetNModules() ; i++ ) { |
d15a28e7 | 335 | |
7367f709 | 336 | Float_t angle = geom->GetPHOSAngle(i) ; |
85218d13 | 337 | AliMatrix(idrotm[i-1], 90.,angle, 0., 0., 90., 270. +angle) ; |
338 | ||
339 | Float_t r = geom->GetIPtoOuterCoverDistance() + phosParams[3] ; | |
340 | ||
ed4205d8 | 341 | Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ; |
92862013 | 342 | Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ; |
85218d13 | 343 | |
92862013 | 344 | gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ; |
ed4205d8 | 345 | |
85218d13 | 346 | } |
ed4205d8 | 347 | |
fe4da5cc | 348 | } |
d15a28e7 | 349 | |
350 | //____________________________________________________________________________ | |
85218d13 | 351 | void AliPHOSv0::CreateGeometryforEMC() |
d15a28e7 | 352 | { |
b2a60966 | 353 | // Create the PHOS-EMC geometry for GEANT |
85218d13 | 354 | // Author: Dmitri Peressounko August 2001 |
355 | // The used coordinate system: | |
356 | // 1. in Module: X along longer side, Y out of beam, Z along shorter side (along beam) | |
357 | // 2. In Strip the same: X along longer side, Y out of beam, Z along shorter side (along beam) | |
358 | ||
359 | ||
b2a60966 | 360 | //BEGIN_HTML |
361 | /* | |
362 | <H2> | |
363 | Geant3 geometry tree of PHOS-EMC in ALICE | |
364 | </H2> | |
365 | <P><CENTER> | |
366 | <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif"> | |
367 | </CENTER><P> | |
368 | */ | |
369 | //END_HTML | |
370 | ||
371 | // Get pointer to the array containing media indexes | |
92862013 | 372 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 | 373 | |
7367f709 | 374 | AliPHOSGeometry * geom = GetGeometry() ; |
85218d13 | 375 | AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ; |
7367f709 | 376 | |
85218d13 | 377 | // ======= Define the strip =============== |
d15a28e7 | 378 | |
85218d13 | 379 | gMC->Gsvolu("PSTR", "BOX ", idtmed[716], emcg->GetStripHalfSize(), 3) ; //Made of stell |
d15a28e7 | 380 | |
85218d13 | 381 | // --- define air volume (cell of the honeycomb) |
382 | gMC->Gsvolu("PCEL", "BOX ", idtmed[798], emcg->GetAirCellHalfSize(), 3); | |
d15a28e7 | 383 | |
85218d13 | 384 | // --- define wrapped crystal and put it into AirCell |
d15a28e7 | 385 | |
85218d13 | 386 | gMC->Gsvolu("PWRA", "BOX ", idtmed[702], emcg->GetWrappedHalfSize(), 3); |
387 | Float_t * pin = emcg->GetAPDHalfSize() ; | |
388 | Float_t * preamp = emcg->GetPreampHalfSize() ; | |
389 | Float_t y = (emcg->GetAirGapLed()-2*pin[1]-2*preamp[1])/2; | |
390 | gMC->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; | |
391 | ||
392 | // --- Define crystall and put it into wrapped crystall --- | |
393 | gMC->Gsvolu("PXTL", "BOX ", idtmed[699], emcg->GetCrystalHalfSize(), 3) ; | |
394 | gMC->Gspos("PXTL", 1, "PWRA", 0.0, 0.0, 0.0, 0, "ONLY") ; | |
395 | ||
396 | // --- define APD/PIN preamp and put it into AirCell | |
fe4da5cc | 397 | |
85218d13 | 398 | gMC->Gsvolu("PPIN", "BOX ", idtmed[705], emcg->GetAPDHalfSize(), 3) ; |
399 | Float_t * crystal = emcg->GetCrystalHalfSize() ; | |
400 | y = crystal[1] + emcg->GetAirGapLed() /2 - preamp[1]; | |
401 | gMC->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; | |
402 | ||
403 | gMC->Gsvolu("PREA", "BOX ", idtmed[711], emcg->GetPreampHalfSize(), 3) ; // Here I assumed preamp | |
404 | // as a printed Circuit | |
405 | y = crystal[1] + emcg->GetAirGapLed() /2 + pin[1] ; // May it should be changed | |
406 | gMC->Gspos("PREA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; // to ceramics? | |
d15a28e7 | 407 | |
d15a28e7 | 408 | |
85218d13 | 409 | // --- Fill strip with wrapped cristalls in Air Cells |
b2a60966 | 410 | |
85218d13 | 411 | Float_t* splate = emcg->GetSupportPlateHalfSize(); |
412 | y = -splate[1] ; | |
413 | Float_t* acel = emcg->GetAirCellHalfSize() ; | |
414 | Int_t icel ; | |
415 | for(icel = 1; icel <= emcg->GetNCellsInStrip(); icel++){ | |
416 | Float_t x = (2*icel - 1 - emcg->GetNCellsInStrip())* acel[0] ; | |
417 | gMC->Gspos("PCEL", icel, "PSTR", x, y, 0.0, 0, "ONLY") ; | |
418 | } | |
7367f709 | 419 | |
85218d13 | 420 | // --- define the support plate, hole in it and position it in strip ---- |
421 | gMC->Gsvolu("PSUP", "BOX ", idtmed[701], emcg->GetSupportPlateHalfSize(), 3) ; | |
7367f709 | 422 | |
85218d13 | 423 | gMC->Gsvolu("PSHO", "BOX ", idtmed[798], emcg->GetSupportPlateInHalfSize(), 3) ; |
424 | Float_t z = emcg->GetSupportPlateThickness()/2 ; | |
425 | gMC->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY") ; | |
fe4da5cc | 426 | |
85218d13 | 427 | y = acel[1] ; |
428 | gMC->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ; | |
d15a28e7 | 429 | |
d15a28e7 | 430 | |
85218d13 | 431 | // ========== Fill module with strips and put them into inner thermoinsulation============= |
432 | gMC->Gsvolu("PTII", "BOX ", idtmed[706], emcg->GetInnerThermoHalfSize(), 3) ; | |
d15a28e7 | 433 | |
85218d13 | 434 | Float_t * inthermo = emcg->GetInnerThermoHalfSize() ; |
435 | Float_t * strip = emcg->GetStripHalfSize() ; | |
436 | y = inthermo[1] - strip[1] ; | |
437 | Int_t irow; | |
438 | Int_t nr = 1 ; | |
439 | Int_t icol ; | |
d15a28e7 | 440 | |
85218d13 | 441 | for(irow = 0; irow < emcg->GetNStripX(); irow ++){ |
442 | Float_t x = (2*irow + 1 - emcg->GetNStripX())* strip[0] ; | |
443 | for(icol = 0; icol < emcg->GetNStripZ(); icol ++){ | |
444 | z = (2*icol + 1 - emcg->GetNStripZ()) * strip[2] ; | |
445 | gMC->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY") ; | |
446 | nr++ ; | |
447 | } | |
448 | } | |
449 | ||
d15a28e7 | 450 | |
85218d13 | 451 | // ------- define the air gap between thermoinsulation and cooler |
452 | gMC->Gsvolu("PAGA", "BOX ", idtmed[798], emcg->GetAirGapHalfSize(), 3) ; | |
453 | Float_t * agap = emcg->GetAirGapHalfSize() ; | |
454 | y = agap[1] - inthermo[1] ; | |
455 | ||
456 | gMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ; | |
d15a28e7 | 457 | |
d15a28e7 | 458 | |
d15a28e7 | 459 | |
85218d13 | 460 | // ------- define the Al passive cooler |
461 | gMC->Gsvolu("PCOR", "BOX ", idtmed[701], emcg->GetCoolerHalfSize(), 3) ; | |
462 | Float_t * cooler = emcg->GetCoolerHalfSize() ; | |
463 | y = cooler[1] - agap[1] ; | |
464 | ||
465 | gMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ; | |
d15a28e7 | 466 | |
85218d13 | 467 | // ------- define the outer thermoinsulating cover |
468 | gMC->Gsvolu("PTIO", "TRD1", idtmed[706], emcg->GetOuterThermoParams(), 4) ; | |
469 | Float_t * outparams = emcg->GetOuterThermoParams() ; | |
d15a28e7 | 470 | |
85218d13 | 471 | Int_t idrotm[99] ; |
472 | AliMatrix(idrotm[1], 90.0, 0.0, 0.0, 0.0, 90.0, 270.0) ; | |
473 | // Frame in outer thermoinsulation and so on: z out of beam, y along beam, x across beam | |
d15a28e7 | 474 | |
85218d13 | 475 | z = outparams[3] - cooler[1] ; |
476 | gMC->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ; | |
477 | ||
478 | // -------- Define the outer Aluminium cover ----- | |
479 | gMC->Gsvolu("PCOL", "TRD1", idtmed[701], emcg->GetAlCoverParams(), 4) ; | |
480 | Float_t * covparams = emcg->GetAlCoverParams() ; | |
481 | z = covparams[3] - outparams[3] ; | |
482 | gMC->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ; | |
483 | ||
484 | // --------- Define front fiberglass cover ----------- | |
485 | gMC->Gsvolu("PFGC", "BOX ", idtmed[717], emcg->GetFiberGlassHalfSize(), 3) ; | |
486 | z = - outparams[3] ; | |
487 | gMC->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ; | |
488 | ||
489 | //=============This is all with cold section============== | |
490 | ||
491 | ||
492 | //------ Warm Section -------------- | |
493 | gMC->Gsvolu("PWAR", "BOX ", idtmed[701], emcg->GetWarmAlCoverHalfSize(), 3) ; | |
494 | Float_t * warmcov = emcg->GetWarmAlCoverHalfSize() ; | |
495 | ||
496 | // --- Define the outer thermoinsulation --- | |
497 | gMC->Gsvolu("PWTI", "BOX ", idtmed[706], emcg->GetWarmThermoHalfSize(), 3) ; | |
498 | Float_t * warmthermo = emcg->GetWarmThermoHalfSize() ; | |
499 | z = -warmcov[2] + warmthermo[2] ; | |
500 | ||
501 | gMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ; | |
502 | ||
503 | // --- Define cables area and put in it T-supports ---- | |
504 | gMC->Gsvolu("PCA1", "BOX ", idtmed[718], emcg->GetTCables1HalfSize(), 3) ; | |
505 | Float_t * cbox = emcg->GetTCables1HalfSize() ; | |
506 | ||
507 | gMC->Gsvolu("PBE1", "BOX ", idtmed[701], emcg->GetTSupport1HalfSize(), 3) ; | |
508 | Float_t * beams = emcg->GetTSupport1HalfSize() ; | |
509 | Int_t isup ; | |
510 | for(isup = 0; isup < emcg->GetNTSuppots(); isup++){ | |
511 | Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ; | |
512 | gMC->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY") ; | |
513 | } | |
d15a28e7 | 514 | |
85218d13 | 515 | z = -warmthermo[2] + cbox[2] ; |
516 | gMC->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ; | |
d15a28e7 | 517 | |
85218d13 | 518 | gMC->Gsvolu("PCA2", "BOX ", idtmed[718], emcg->GetTCables2HalfSize(), 3) ; |
519 | Float_t * cbox2 = emcg->GetTCables2HalfSize() ; | |
d15a28e7 | 520 | |
85218d13 | 521 | gMC->Gsvolu("PBE2", "BOX ", idtmed[701], emcg->GetTSupport2HalfSize(), 3) ; |
522 | for(isup = 0; isup < emcg->GetNTSuppots(); isup++){ | |
523 | Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ; | |
524 | gMC->Gspos("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY") ; | |
525 | } | |
d15a28e7 | 526 | |
85218d13 | 527 | z = -warmthermo[2] + 2*cbox[2] + cbox2[2]; |
528 | gMC->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ; | |
d15a28e7 | 529 | |
d15a28e7 | 530 | |
85218d13 | 531 | // --- Define frame --- |
532 | gMC->Gsvolu("PFRX", "BOX ", idtmed[716], emcg->GetFrameXHalfSize(), 3) ; | |
533 | Float_t * posit = emcg->GetFrameXPosition() ; | |
534 | gMC->Gspos("PFRX", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ; | |
535 | gMC->Gspos("PFRX", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ; | |
d15a28e7 | 536 | |
85218d13 | 537 | gMC->Gsvolu("PFRZ", "BOX ", idtmed[716], emcg->GetFrameZHalfSize(), 3) ; |
538 | posit = emcg->GetFrameZPosition() ; | |
539 | gMC->Gspos("PFRZ", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ; | |
540 | gMC->Gspos("PFRZ", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ; | |
d15a28e7 | 541 | |
85218d13 | 542 | // --- Define Fiber Glass support --- |
543 | gMC->Gsvolu("PFG1", "BOX ", idtmed[717], emcg->GetFGupXHalfSize(), 3) ; | |
544 | posit = emcg->GetFGupXPosition() ; | |
545 | gMC->Gspos("PFG1", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ; | |
546 | gMC->Gspos("PFG1", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ; | |
d15a28e7 | 547 | |
85218d13 | 548 | gMC->Gsvolu("PFG2", "BOX ", idtmed[717], emcg->GetFGupZHalfSize(), 3) ; |
549 | posit = emcg->GetFGupZPosition() ; | |
550 | gMC->Gspos("PFG2", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ; | |
551 | gMC->Gspos("PFG2", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ; | |
d15a28e7 | 552 | |
85218d13 | 553 | gMC->Gsvolu("PFG3", "BOX ", idtmed[717], emcg->GetFGlowXHalfSize(), 3) ; |
554 | posit = emcg->GetFGlowXPosition() ; | |
555 | gMC->Gspos("PFG3", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ; | |
556 | gMC->Gspos("PFG3", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ; | |
d15a28e7 | 557 | |
85218d13 | 558 | gMC->Gsvolu("PFG4", "BOX ", idtmed[717], emcg->GetFGlowZHalfSize(), 3) ; |
559 | posit = emcg->GetFGlowZPosition() ; | |
560 | gMC->Gspos("PFG4", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ; | |
561 | gMC->Gspos("PFG4", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ; | |
d15a28e7 | 562 | |
85218d13 | 563 | // --- Define Air Gap for FEE electronics ----- |
d15a28e7 | 564 | |
85218d13 | 565 | gMC->Gsvolu("PAFE", "BOX ", idtmed[798], emcg->GetFEEAirHalfSize(), 3) ; |
566 | posit = emcg->GetFEEAirPosition() ; | |
567 | gMC->Gspos("PAFE", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ; | |
d15a28e7 | 568 | |
85218d13 | 569 | // Define the EMC module volume and combine Cool and Warm sections |
d15a28e7 | 570 | |
85218d13 | 571 | gMC->Gsvolu("PEMC", "TRD1", idtmed[798], emcg->GetEMCParams(), 4) ; |
d15a28e7 | 572 | |
85218d13 | 573 | z = - warmcov[2] ; |
574 | gMC->Gspos("PCOL", 1, "PEMC", 0., 0., z, 0, "ONLY") ; | |
575 | z = covparams[3] ; | |
576 | gMC->Gspos("PWAR", 1, "PEMC", 0., 0., z, 0, "ONLY") ; | |
d15a28e7 | 577 | |
d15a28e7 | 578 | |
85218d13 | 579 | // Put created EMC geometry into PHOS volume |
580 | ||
581 | z = geom->GetCPVBoxSize(1) / 2. ; | |
582 | gMC->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ; | |
583 | ||
fe4da5cc | 584 | } |
585 | ||
bacd0b23 | 586 | //____________________________________________________________________________ |
587 | void AliPHOSv0::CreateGeometryforCPV() | |
588 | { | |
589 | // Create the PHOS-CPV geometry for GEANT | |
590 | // Author: Yuri Kharlov 11 September 2000 | |
bacd0b23 | 591 | //BEGIN_HTML |
592 | /* | |
593 | <H2> | |
594 | Geant3 geometry of PHOS-CPV in ALICE | |
595 | </H2> | |
596 | <table width=700> | |
597 | ||
598 | <tr> | |
599 | <td>CPV perspective view</td> | |
600 | <td>CPV front view </td> | |
601 | </tr> | |
602 | ||
603 | <tr> | |
604 | <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td> | |
605 | <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td> | |
606 | </tr> | |
607 | ||
608 | <tr> | |
609 | <td>One CPV module, perspective view </td> | |
610 | <td>One CPV module, front view (extended in vertical direction) </td> | |
611 | </tr> | |
612 | ||
613 | <tr> | |
614 | <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td> | |
615 | <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td> | |
616 | </tr> | |
617 | ||
618 | </table> | |
619 | ||
620 | <H2> | |
621 | Geant3 geometry tree of PHOS-CPV in ALICE | |
622 | </H2> | |
623 | <center> | |
624 | <img height=300 width=290 src="../images/CPVtree.gif"> | |
625 | </center> | |
626 | */ | |
627 | //END_HTML | |
628 | ||
629 | Float_t par[3], x,y,z; | |
630 | ||
631 | // Get pointer to the array containing media indexes | |
632 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; | |
7367f709 | 633 | |
634 | AliPHOSGeometry * geom = GetGeometry() ; | |
635 | ||
bacd0b23 | 636 | // The box containing all CPV for one PHOS module filled with air |
7367f709 | 637 | par[0] = geom->GetCPVBoxSize(0) / 2.0 ; |
638 | par[1] = geom->GetCPVBoxSize(1) / 2.0 ; | |
639 | par[2] = geom->GetCPVBoxSize(2) / 2.0 ; | |
13add4de | 640 | gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ; |
85218d13 | 641 | |
642 | Float_t * emcParams = geom->GetEMCAGeometry()->GetEMCParams() ; | |
643 | z = - emcParams[3] ; | |
644 | Int_t rotm ; | |
645 | AliMatrix(rotm, 90.,0., 0., 0., 90., 90.) ; | |
646 | ||
647 | gMC->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ; | |
bacd0b23 | 648 | |
649 | // Gassiplex board | |
650 | ||
7367f709 | 651 | par[0] = geom->GetGassiplexChipSize(0)/2.; |
652 | par[1] = geom->GetGassiplexChipSize(1)/2.; | |
653 | par[2] = geom->GetGassiplexChipSize(2)/2.; | |
13add4de | 654 | gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3); |
bacd0b23 | 655 | |
656 | // Cu+Ni foil covers Gassiplex board | |
657 | ||
7367f709 | 658 | par[1] = geom->GetCPVCuNiFoilThickness()/2; |
13add4de | 659 | gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3); |
7367f709 | 660 | y = -(geom->GetGassiplexChipSize(1)/2 - par[1]); |
13add4de | 661 | gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY"); |
bacd0b23 | 662 | |
663 | // Position of the chip inside CPV | |
664 | ||
7367f709 | 665 | Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1); |
666 | Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1); | |
bacd0b23 | 667 | Int_t copy = 0; |
7367f709 | 668 | y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) + |
669 | geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1; | |
670 | for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) { | |
671 | x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2; | |
672 | for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) { | |
bacd0b23 | 673 | copy++; |
7367f709 | 674 | z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2; |
13add4de | 675 | gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY"); |
bacd0b23 | 676 | } |
677 | } | |
678 | ||
679 | // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni) | |
680 | ||
7367f709 | 681 | par[0] = geom->GetCPVActiveSize(0) / 2; |
682 | par[1] = geom->GetCPVTextoliteThickness() / 2; | |
683 | par[2] = geom->GetCPVActiveSize(1) / 2; | |
13add4de | 684 | gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3); |
bacd0b23 | 685 | |
686 | // Argon gas volume | |
687 | ||
7367f709 | 688 | par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2; |
13add4de | 689 | gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3); |
bacd0b23 | 690 | |
691 | for (Int_t i=0; i<4; i++) { | |
7367f709 | 692 | y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2; |
13add4de | 693 | gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY"); |
bacd0b23 | 694 | if(i==1){ |
7367f709 | 695 | y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2; |
13add4de | 696 | gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY"); |
bacd0b23 | 697 | } |
698 | } | |
699 | ||
700 | // Dummy sensitive plane in the middle of argone gas volume | |
701 | ||
702 | par[1]=0.001; | |
13add4de | 703 | gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3); |
704 | gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY"); | |
bacd0b23 | 705 | |
706 | // Cu+Ni foil covers textolite | |
707 | ||
7367f709 | 708 | par[1] = geom->GetCPVCuNiFoilThickness() / 2; |
13add4de | 709 | gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3); |
7367f709 | 710 | y = geom->GetCPVTextoliteThickness()/2 - par[1]; |
13add4de | 711 | gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY"); |
bacd0b23 | 712 | |
713 | // Aluminum frame around CPV | |
714 | ||
7367f709 | 715 | par[0] = geom->GetCPVFrameSize(0)/2; |
716 | par[1] = geom->GetCPVFrameSize(1)/2; | |
717 | par[2] = geom->GetCPVBoxSize(2) /2; | |
13add4de | 718 | gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3); |
bacd0b23 | 719 | |
7367f709 | 720 | par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0); |
721 | par[1] = geom->GetCPVFrameSize(1)/2; | |
722 | par[2] = geom->GetCPVFrameSize(2)/2; | |
13add4de | 723 | gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3); |
bacd0b23 | 724 | |
725 | for (Int_t j=0; j<=1; j++) { | |
7367f709 | 726 | x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2; |
13add4de | 727 | gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY"); |
7367f709 | 728 | z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2; |
13add4de | 729 | gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY"); |
bacd0b23 | 730 | } |
731 | ||
732 | } | |
733 | ||
734 | ||
6a5795b4 | 735 | //____________________________________________________________________________ |
736 | void AliPHOSv0::CreateGeometryforSupport() | |
737 | { | |
738 | // Create the PHOS' support geometry for GEANT | |
739 | //BEGIN_HTML | |
740 | /* | |
741 | <H2> | |
742 | Geant3 geometry of the PHOS's support | |
743 | </H2> | |
744 | <P><CENTER> | |
745 | <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif"> | |
746 | </CENTER><P> | |
747 | */ | |
748 | //END_HTML | |
749 | ||
750 | Float_t par[5], x0,y0,z0 ; | |
751 | Int_t i,j,copy; | |
752 | ||
753 | // Get pointer to the array containing media indexes | |
754 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; | |
755 | ||
7367f709 | 756 | AliPHOSGeometry * geom = GetGeometry() ; |
757 | ||
6a5795b4 | 758 | // --- Dummy box containing two rails on which PHOS support moves |
759 | // --- Put these rails to the bottom of the L3 magnet | |
760 | ||
7367f709 | 761 | par[0] = geom->GetRailRoadSize(0) / 2.0 ; |
762 | par[1] = geom->GetRailRoadSize(1) / 2.0 ; | |
763 | par[2] = geom->GetRailRoadSize(2) / 2.0 ; | |
6a5795b4 | 764 | gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ; |
765 | ||
7367f709 | 766 | y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ; |
6a5795b4 | 767 | gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ; |
768 | ||
769 | // --- Dummy box containing one rail | |
770 | ||
7367f709 | 771 | par[0] = geom->GetRailOuterSize(0) / 2.0 ; |
772 | par[1] = geom->GetRailOuterSize(1) / 2.0 ; | |
773 | par[2] = geom->GetRailOuterSize(2) / 2.0 ; | |
6a5795b4 | 774 | gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ; |
775 | ||
776 | for (i=0; i<2; i++) { | |
7367f709 | 777 | x0 = (2*i-1) * geom->GetDistanceBetwRails() / 2.0 ; |
6a5795b4 | 778 | gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ; |
779 | } | |
780 | ||
781 | // --- Upper and bottom steel parts of the rail | |
782 | ||
7367f709 | 783 | par[0] = geom->GetRailPart1(0) / 2.0 ; |
784 | par[1] = geom->GetRailPart1(1) / 2.0 ; | |
785 | par[2] = geom->GetRailPart1(2) / 2.0 ; | |
6a5795b4 | 786 | gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ; |
787 | ||
7367f709 | 788 | y0 = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 ; |
6a5795b4 | 789 | gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
7367f709 | 790 | y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 - geom->GetRailPart3(1); |
6a5795b4 | 791 | gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
792 | ||
793 | // --- The middle vertical steel parts of the rail | |
794 | ||
7367f709 | 795 | par[0] = geom->GetRailPart2(0) / 2.0 ; |
796 | par[1] = geom->GetRailPart2(1) / 2.0 ; | |
797 | par[2] = geom->GetRailPart2(2) / 2.0 ; | |
6a5795b4 | 798 | gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ; |
799 | ||
7367f709 | 800 | y0 = - geom->GetRailPart3(1) / 2.0 ; |
6a5795b4 | 801 | gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
802 | ||
803 | // --- The most upper steel parts of the rail | |
804 | ||
7367f709 | 805 | par[0] = geom->GetRailPart3(0) / 2.0 ; |
806 | par[1] = geom->GetRailPart3(1) / 2.0 ; | |
807 | par[2] = geom->GetRailPart3(2) / 2.0 ; | |
6a5795b4 | 808 | gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ; |
809 | ||
7367f709 | 810 | y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart3(1)) / 2.0 ; |
6a5795b4 | 811 | gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; |
812 | ||
813 | // --- The wall of the cradle | |
814 | // --- The wall is empty: steel thin walls and air inside | |
815 | ||
85218d13 | 816 | par[1] = TMath::Sqrt(TMath::Power((geom->GetIPtoCPVDistance() + geom->GetOuterBoxSize(3)),2) + |
817 | TMath::Power((geom->GetOuterBoxSize(1)/2),2))+10. ; | |
7367f709 | 818 | par[0] = par[1] - geom->GetCradleWall(1) ; |
819 | par[2] = geom->GetCradleWall(2) / 2.0 ; | |
820 | par[3] = geom->GetCradleWall(3) ; | |
821 | par[4] = geom->GetCradleWall(4) ; | |
6a5795b4 | 822 | gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ; |
823 | ||
7367f709 | 824 | par[0] -= geom->GetCradleWallThickness() ; |
825 | par[1] -= geom->GetCradleWallThickness() ; | |
826 | par[2] -= geom->GetCradleWallThickness() ; | |
6a5795b4 | 827 | gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ; |
828 | gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ; | |
829 | ||
830 | for (i=0; i<2; i++) { | |
85218d13 | 831 | z0 = (2*i-1) * (geom->GetOuterBoxSize(2) + geom->GetCradleWall(2) )/ 2.0 ; |
832 | gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ; | |
6a5795b4 | 833 | } |
834 | ||
835 | // --- The "wheels" of the cradle | |
836 | ||
7367f709 | 837 | par[0] = geom->GetCradleWheel(0) / 2; |
838 | par[1] = geom->GetCradleWheel(1) / 2; | |
839 | par[2] = geom->GetCradleWheel(2) / 2; | |
6a5795b4 | 840 | gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ; |
841 | ||
7367f709 | 842 | y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) - |
843 | geom->GetCradleWheel(1)/2) ; | |
6a5795b4 | 844 | for (i=0; i<2; i++) { |
85218d13 | 845 | z0 = (2*i-1) * ((geom->GetOuterBoxSize(2) + geom->GetCradleWheel(2))/ 2.0 + |
7367f709 | 846 | geom->GetCradleWall(2)); |
6a5795b4 | 847 | for (j=0; j<2; j++) { |
848 | copy = 2*i + j; | |
7367f709 | 849 | x0 = (2*j-1) * geom->GetDistanceBetwRails() / 2.0 ; |
6a5795b4 | 850 | gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ; |
851 | } | |
852 | } | |
853 | ||
854 | } | |
855 | ||
ed4205d8 | 856 | //____________________________________________________________________________ |
857 | Float_t AliPHOSv0::ZMin(void) const | |
858 | { | |
859 | // Overall dimension of the PHOS (min) | |
7367f709 | 860 | |
861 | AliPHOSGeometry * geom = GetGeometry() ; | |
862 | ||
85218d13 | 863 | return -geom->GetOuterBoxSize(2)/2.; |
ed4205d8 | 864 | } |
865 | ||
866 | //____________________________________________________________________________ | |
867 | Float_t AliPHOSv0::ZMax(void) const | |
868 | { | |
869 | // Overall dimension of the PHOS (max) | |
7367f709 | 870 | |
871 | AliPHOSGeometry * geom = GetGeometry() ; | |
872 | ||
85218d13 | 873 | return geom->GetOuterBoxSize(2)/2.; |
ed4205d8 | 874 | } |
875 | ||
d15a28e7 | 876 | //____________________________________________________________________________ |
877 | void AliPHOSv0::Init(void) | |
878 | { | |
b2a60966 | 879 | // Just prints an information message |
880 | ||
d15a28e7 | 881 | Int_t i; |
882 | ||
9e1a0ddb | 883 | if(fDebug) { |
884 | printf("\n%s: ",ClassName()); | |
885 | for(i=0;i<35;i++) printf("*"); | |
886 | printf(" PHOS_INIT "); | |
887 | for(i=0;i<35;i++) printf("*"); | |
888 | printf("\n%s: ",ClassName()); | |
889 | ||
890 | ||
891 | // Here the PHOS initialisation code (if any!) | |
7367f709 | 892 | |
893 | AliPHOSGeometry * geom = GetGeometry() ; | |
894 | ||
895 | if (geom!=0) | |
896 | cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << geom->GetName() << endl ; | |
9e1a0ddb | 897 | else |
898 | cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ; | |
899 | ||
900 | for(i=0;i<80;i++) printf("*"); | |
901 | printf("\n"); | |
902 | } | |
d15a28e7 | 903 | } |
904 | ||
7b7c1533 | 905 |