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