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