1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 //_________________________________________________________________________
18 // Implementation version v0 of PHOS Manager class
19 // An object of this class does not produce hits nor digits
20 // It is the one to use if you do not want to produce outputs in TREEH or TREED
22 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
25 // --- ROOT system ---
29 #include <TGeometry.h>
35 #include <TVirtualMC.h>
37 // --- Standard library ---
42 // --- AliRoot header files ---
45 #include "AliPHOSGeometry.h"
46 #include "AliPHOSLoader.h"
47 #include "AliPHOSv0.h"
52 //____________________________________________________________________________
53 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
56 // ctor : title is used to identify the layout
60 //____________________________________________________________________________
61 void AliPHOSv0::BuildGeometry()
63 // Build the PHOS geometry for the ROOT display
67 PHOS in ALICE displayed by root
73 <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
78 <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
83 <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
88 <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
94 this->BuildGeometryforEMC() ;
95 this->BuildGeometryforCPV() ;
99 //____________________________________________________________________________
100 void AliPHOSv0:: BuildGeometryforEMC(void)
102 // Build the PHOS-EMC geometry for the ROOT display
104 const Int_t kColorPHOS = kRed ;
105 const Int_t kColorXTAL = kBlue ;
107 Double_t const kRADDEG = 180.0 / TMath::Pi() ;
109 AliPHOSGeometry * geom = GetGeometry() ;
110 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
111 Float_t * boxparams = emcg->GetEMCParams() ;
113 new TTRD1("OuterBox", "PHOS box", "void",boxparams[0],boxparams[1],boxparams[2], boxparams[3] );
118 Float_t * cribox = emcg->GetInnerThermoHalfSize() ;
119 new TBRIK( "CrystalsBox", "PHOS crystals box", "void", cribox[0], cribox[2], cribox[1] ) ;
121 // position PHOS into ALICE
123 Float_t r = geom->GetIPtoOuterCoverDistance() + boxparams[3] ;
125 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
127 char * nodename = new char[20] ;
128 char * rotname = new char[20] ;
130 new TRotMatrix("cribox", "cribox", 90, 0, 90, 90, 0, 0);
132 for( Int_t i = 1; i <= geom->GetNModules(); i++ ) {
134 Float_t angle = geom->GetPHOSAngle(i) ;
135 sprintf(rotname, "%s%d", "rot", number++) ;
136 new TRotMatrix(rotname, rotname, 90, angle, 0, 0, 90, 270 + angle);
139 sprintf(nodename,"%s%d", "Module", i) ;
140 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
141 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
142 TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
143 outerboxnode->SetLineColor(kColorPHOS) ;
144 fNodes->Add(outerboxnode) ;
147 Float_t z = -boxparams[3] - geom->GetIPtoOuterCoverDistance() +
148 cribox[1] + geom->GetIPtoCrystalSurface() ;
149 TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, 0, z) ;
150 crystalsboxnode->SetLineColor(kColorXTAL) ;
151 fNodes->Add(crystalsboxnode) ;
159 //____________________________________________________________________________
160 void AliPHOSv0:: BuildGeometryforCPV(void)
162 // Build the PHOS-CPV geometry for the ROOT display
163 // Author: Yuri Kharlov 11 September 2000
168 CPV displayed by root
173 <td>CPV perspective view</td>
174 <td>CPV front view </td>
178 <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td>
179 <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td>
187 const Double_t kRADDEG = 180.0 / TMath::Pi() ;
188 const Int_t kColorCPV = kGreen ;
189 const Int_t kColorFrame = kYellow ;
190 const Int_t kColorGassiplex = kRed;
191 const Int_t kColorPCB = kCyan;
193 AliPHOSGeometry * geom = GetGeometry() ;
195 // Box for a full PHOS module
197 new TBRIK ("CPVBox", "CPV box", "void", geom->GetCPVBoxSize(0)/2,
198 geom->GetCPVBoxSize(1)/2,
199 geom->GetCPVBoxSize(2)/2 );
200 new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", geom->GetCPVFrameSize(0)/2,
201 geom->GetCPVFrameSize(1)/2,
202 geom->GetCPVBoxSize(2)/2 );
203 new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0),
204 geom->GetCPVFrameSize(1)/2,
205 geom->GetCPVFrameSize(2)/2);
206 new TBRIK ("CPVPCB", "CPV PCB", "void", geom->GetCPVActiveSize(0)/2,
207 geom->GetCPVTextoliteThickness()/2,
208 geom->GetCPVActiveSize(1)/2);
209 new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", geom->GetGassiplexChipSize(0)/2,
210 geom->GetGassiplexChipSize(1)/2,
211 geom->GetGassiplexChipSize(2)/2);
213 // position CPV into ALICE
215 char * nodename = new char[25] ;
216 char * rotname = new char[25] ;
218 Float_t r = geom->GetIPtoCPVDistance() + geom->GetCPVBoxSize(1) / 2.0 ;
220 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
222 Int_t lastModule = 0 ;
223 lastModule = geom->GetNModules();
225 for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules
229 Float_t angle = geom->GetPHOSAngle(i) ;
230 sprintf(rotname, "%s%d", "rotg", number+i) ;
231 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
233 sprintf(nodename, "%s%d", "CPVModule", i) ;
234 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
235 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
237 TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ;
238 cpvBoxNode->SetLineColor(kColorCPV) ;
239 fNodes->Add(cpvBoxNode) ;
242 // inside each CPV box:
246 for (j=0; j<=1; j++) {
247 sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ;
248 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
249 TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ;
250 cpvFrameNode->SetLineColor(kColorFrame) ;
251 fNodes->Add(cpvFrameNode) ;
253 sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ;
254 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
255 cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ;
256 cpvFrameNode->SetLineColor(kColorFrame) ;
257 fNodes->Add(cpvFrameNode) ;
260 // 4 printed circuit boards
261 for (j=0; j<4; j++) {
262 sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ;
263 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(j) + geom->GetCPVTextoliteThickness()/2;
264 TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ;
265 cpvPCBNode->SetLineColor(kColorPCB) ;
266 fNodes->Add(cpvPCBNode) ;
270 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
271 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
272 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
273 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
274 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
275 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
276 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
277 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
278 sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ;
279 TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ;
280 cpvGassiplexNode->SetLineColor(kColorGassiplex) ;
281 fNodes->Add(cpvGassiplexNode) ;
291 //____________________________________________________________________________
292 void AliPHOSv0::CreateGeometry()
294 // Create the PHOS geometry for Geant
296 AliPHOSv0 *phostmp = dynamic_cast<AliPHOSv0*>(gAlice->GetModule("PHOS")) ;
298 if ( phostmp == NULL ) {
300 fprintf(stderr, "PHOS detector not found!\n") ;
305 AliPHOSGeometry * geom = GetGeometry() ;
307 // Get pointer to the array containing media indeces
308 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
310 // Create a PHOS module.
312 gMC->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ;
314 this->CreateGeometryforEMC() ;
316 this->CreateGeometryforCPV() ;
318 this->CreateGeometryforSupport() ;
320 // --- Position PHOS mdules in ALICE setup ---
323 Double_t const kRADDEG = 180.0 / TMath::Pi() ;
324 Float_t * phosParams = geom->GetPHOSParams() ;
326 Float_t r = geom->GetIPtoOuterCoverDistance() + phosParams[3] - geom->GetCPVBoxSize(1) ;
328 for( i = 1; i <= geom->GetNModules() ; i++ ) {
330 Float_t angle = geom->GetPHOSAngle(i) ;
331 AliMatrix(idrotm[i-1], 90.,angle, 0., 0., 90., 270. +angle) ;
333 Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
334 Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
336 gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ;
342 //____________________________________________________________________________
343 void AliPHOSv0::CreateGeometryforEMC()
345 // Create the PHOS-EMC geometry for GEANT
346 // Author: Dmitri Peressounko August 2001
347 // The used coordinate system:
348 // 1. in Module: X along longer side, Y out of beam, Z along shorter side (along beam)
349 // 2. In Strip the same: X along longer side, Y out of beam, Z along shorter side (along beam)
355 Geant3 geometry tree of PHOS-EMC in ALICE
358 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif">
363 // Get pointer to the array containing media indexes
364 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
366 AliPHOSGeometry * geom = GetGeometry() ;
367 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
369 // ======= Define the strip ===============
371 gMC->Gsvolu("PSTR", "BOX ", idtmed[716], emcg->GetStripHalfSize(), 3) ; //Made of stell
373 // --- define air volume (cell of the honeycomb)
374 gMC->Gsvolu("PCEL", "BOX ", idtmed[798], emcg->GetAirCellHalfSize(), 3);
376 // --- define wrapped crystal and put it into AirCell
378 gMC->Gsvolu("PWRA", "BOX ", idtmed[702], emcg->GetWrappedHalfSize(), 3);
379 Float_t * pin = emcg->GetAPDHalfSize() ;
380 Float_t * preamp = emcg->GetPreampHalfSize() ;
381 Float_t y = (emcg->GetAirGapLed()-2*pin[1]-2*preamp[1])/2;
382 gMC->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
384 // --- Define crystall and put it into wrapped crystall ---
385 gMC->Gsvolu("PXTL", "BOX ", idtmed[699], emcg->GetCrystalHalfSize(), 3) ;
386 gMC->Gspos("PXTL", 1, "PWRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
388 // --- define APD/PIN preamp and put it into AirCell
390 gMC->Gsvolu("PPIN", "BOX ", idtmed[705], emcg->GetAPDHalfSize(), 3) ;
391 Float_t * crystal = emcg->GetCrystalHalfSize() ;
392 y = crystal[1] + emcg->GetAirGapLed() /2 - preamp[1];
393 gMC->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
395 gMC->Gsvolu("PREA", "BOX ", idtmed[711], emcg->GetPreampHalfSize(), 3) ; // Here I assumed preamp
396 // as a printed Circuit
397 y = crystal[1] + emcg->GetAirGapLed() /2 + pin[1] ; // May it should be changed
398 gMC->Gspos("PREA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; // to ceramics?
401 // --- Fill strip with wrapped cristalls in Air Cells
403 Float_t* splate = emcg->GetSupportPlateHalfSize();
405 Float_t* acel = emcg->GetAirCellHalfSize() ;
407 for(icel = 1; icel <= emcg->GetNCellsInStrip(); icel++){
408 Float_t x = (2*icel - 1 - emcg->GetNCellsInStrip())* acel[0] ;
409 gMC->Gspos("PCEL", icel, "PSTR", x, y, 0.0, 0, "ONLY") ;
412 // --- define the support plate, hole in it and position it in strip ----
413 gMC->Gsvolu("PSUP", "BOX ", idtmed[701], emcg->GetSupportPlateHalfSize(), 3) ;
415 gMC->Gsvolu("PSHO", "BOX ", idtmed[798], emcg->GetSupportPlateInHalfSize(), 3) ;
416 Float_t z = emcg->GetSupportPlateThickness()/2 ;
417 gMC->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY") ;
420 gMC->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ;
423 // ========== Fill module with strips and put them into inner thermoinsulation=============
424 gMC->Gsvolu("PTII", "BOX ", idtmed[706], emcg->GetInnerThermoHalfSize(), 3) ;
426 Float_t * inthermo = emcg->GetInnerThermoHalfSize() ;
427 Float_t * strip = emcg->GetStripHalfSize() ;
428 y = inthermo[1] - strip[1] ;
433 for(irow = 0; irow < emcg->GetNStripX(); irow ++){
434 Float_t x = (2*irow + 1 - emcg->GetNStripX())* strip[0] ;
435 for(icol = 0; icol < emcg->GetNStripZ(); icol ++){
436 z = (2*icol + 1 - emcg->GetNStripZ()) * strip[2] ;
437 gMC->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY") ;
443 // ------- define the air gap between thermoinsulation and cooler
444 gMC->Gsvolu("PAGA", "BOX ", idtmed[798], emcg->GetAirGapHalfSize(), 3) ;
445 Float_t * agap = emcg->GetAirGapHalfSize() ;
446 y = agap[1] - inthermo[1] ;
448 gMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ;
452 // ------- define the Al passive cooler
453 gMC->Gsvolu("PCOR", "BOX ", idtmed[701], emcg->GetCoolerHalfSize(), 3) ;
454 Float_t * cooler = emcg->GetCoolerHalfSize() ;
455 y = cooler[1] - agap[1] ;
457 gMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ;
459 // ------- define the outer thermoinsulating cover
460 gMC->Gsvolu("PTIO", "TRD1", idtmed[706], emcg->GetOuterThermoParams(), 4) ;
461 Float_t * outparams = emcg->GetOuterThermoParams() ;
464 AliMatrix(idrotm[1], 90.0, 0.0, 0.0, 0.0, 90.0, 270.0) ;
465 // Frame in outer thermoinsulation and so on: z out of beam, y along beam, x across beam
467 z = outparams[3] - cooler[1] ;
468 gMC->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ;
470 // -------- Define the outer Aluminium cover -----
471 gMC->Gsvolu("PCOL", "TRD1", idtmed[701], emcg->GetAlCoverParams(), 4) ;
472 Float_t * covparams = emcg->GetAlCoverParams() ;
473 z = covparams[3] - outparams[3] ;
474 gMC->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
476 // --------- Define front fiberglass cover -----------
477 gMC->Gsvolu("PFGC", "BOX ", idtmed[717], emcg->GetFiberGlassHalfSize(), 3) ;
479 gMC->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
481 //=============This is all with cold section==============
484 //------ Warm Section --------------
485 gMC->Gsvolu("PWAR", "BOX ", idtmed[701], emcg->GetWarmAlCoverHalfSize(), 3) ;
486 Float_t * warmcov = emcg->GetWarmAlCoverHalfSize() ;
488 // --- Define the outer thermoinsulation ---
489 gMC->Gsvolu("PWTI", "BOX ", idtmed[706], emcg->GetWarmThermoHalfSize(), 3) ;
490 Float_t * warmthermo = emcg->GetWarmThermoHalfSize() ;
491 z = -warmcov[2] + warmthermo[2] ;
493 gMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ;
495 // --- Define cables area and put in it T-supports ----
496 gMC->Gsvolu("PCA1", "BOX ", idtmed[718], emcg->GetTCables1HalfSize(), 3) ;
497 Float_t * cbox = emcg->GetTCables1HalfSize() ;
499 gMC->Gsvolu("PBE1", "BOX ", idtmed[701], emcg->GetTSupport1HalfSize(), 3) ;
500 Float_t * beams = emcg->GetTSupport1HalfSize() ;
502 for(isup = 0; isup < emcg->GetNTSuppots(); isup++){
503 Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ;
504 gMC->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY") ;
507 z = -warmthermo[2] + cbox[2] ;
508 gMC->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
510 gMC->Gsvolu("PCA2", "BOX ", idtmed[718], emcg->GetTCables2HalfSize(), 3) ;
511 Float_t * cbox2 = emcg->GetTCables2HalfSize() ;
513 gMC->Gsvolu("PBE2", "BOX ", idtmed[701], emcg->GetTSupport2HalfSize(), 3) ;
514 for(isup = 0; isup < emcg->GetNTSuppots(); isup++){
515 Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ;
516 gMC->Gspos("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY") ;
519 z = -warmthermo[2] + 2*cbox[2] + cbox2[2];
520 gMC->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
523 // --- Define frame ---
524 gMC->Gsvolu("PFRX", "BOX ", idtmed[716], emcg->GetFrameXHalfSize(), 3) ;
525 Float_t * posit = emcg->GetFrameXPosition() ;
526 gMC->Gspos("PFRX", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
527 gMC->Gspos("PFRX", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
529 gMC->Gsvolu("PFRZ", "BOX ", idtmed[716], emcg->GetFrameZHalfSize(), 3) ;
530 posit = emcg->GetFrameZPosition() ;
531 gMC->Gspos("PFRZ", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
532 gMC->Gspos("PFRZ", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
534 // --- Define Fiber Glass support ---
535 gMC->Gsvolu("PFG1", "BOX ", idtmed[717], emcg->GetFGupXHalfSize(), 3) ;
536 posit = emcg->GetFGupXPosition() ;
537 gMC->Gspos("PFG1", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
538 gMC->Gspos("PFG1", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
540 gMC->Gsvolu("PFG2", "BOX ", idtmed[717], emcg->GetFGupZHalfSize(), 3) ;
541 posit = emcg->GetFGupZPosition() ;
542 gMC->Gspos("PFG2", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
543 gMC->Gspos("PFG2", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
545 gMC->Gsvolu("PFG3", "BOX ", idtmed[717], emcg->GetFGlowXHalfSize(), 3) ;
546 posit = emcg->GetFGlowXPosition() ;
547 gMC->Gspos("PFG3", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
548 gMC->Gspos("PFG3", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
550 gMC->Gsvolu("PFG4", "BOX ", idtmed[717], emcg->GetFGlowZHalfSize(), 3) ;
551 posit = emcg->GetFGlowZPosition() ;
552 gMC->Gspos("PFG4", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
553 gMC->Gspos("PFG4", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
555 // --- Define Air Gap for FEE electronics -----
557 gMC->Gsvolu("PAFE", "BOX ", idtmed[798], emcg->GetFEEAirHalfSize(), 3) ;
558 posit = emcg->GetFEEAirPosition() ;
559 gMC->Gspos("PAFE", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
561 // Define the EMC module volume and combine Cool and Warm sections
563 gMC->Gsvolu("PEMC", "TRD1", idtmed[798], emcg->GetEMCParams(), 4) ;
566 gMC->Gspos("PCOL", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
568 gMC->Gspos("PWAR", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
571 // Put created EMC geometry into PHOS volume
573 z = geom->GetCPVBoxSize(1) / 2. ;
574 gMC->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ;
578 //____________________________________________________________________________
579 void AliPHOSv0::CreateGeometryforCPV()
581 // Create the PHOS-CPV geometry for GEANT
582 // Author: Yuri Kharlov 11 September 2000
586 Geant3 geometry of PHOS-CPV in ALICE
591 <td>CPV perspective view</td>
592 <td>CPV front view </td>
596 <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td>
597 <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td>
601 <td>One CPV module, perspective view </td>
602 <td>One CPV module, front view (extended in vertical direction) </td>
606 <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td>
607 <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td>
613 Geant3 geometry tree of PHOS-CPV in ALICE
616 <img height=300 width=290 src="../images/CPVtree.gif">
621 Float_t par[3], x,y,z;
623 // Get pointer to the array containing media indexes
624 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
626 AliPHOSGeometry * geom = GetGeometry() ;
628 // The box containing all CPV for one PHOS module filled with air
629 par[0] = geom->GetCPVBoxSize(0) / 2.0 ;
630 par[1] = geom->GetCPVBoxSize(1) / 2.0 ;
631 par[2] = geom->GetCPVBoxSize(2) / 2.0 ;
632 gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ;
634 Float_t * emcParams = geom->GetEMCAGeometry()->GetEMCParams() ;
637 AliMatrix(rotm, 90.,0., 0., 0., 90., 90.) ;
639 gMC->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ;
643 par[0] = geom->GetGassiplexChipSize(0)/2.;
644 par[1] = geom->GetGassiplexChipSize(1)/2.;
645 par[2] = geom->GetGassiplexChipSize(2)/2.;
646 gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3);
648 // Cu+Ni foil covers Gassiplex board
650 par[1] = geom->GetCPVCuNiFoilThickness()/2;
651 gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3);
652 y = -(geom->GetGassiplexChipSize(1)/2 - par[1]);
653 gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY");
655 // Position of the chip inside CPV
657 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
658 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
660 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
661 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
662 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
663 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
664 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
666 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
667 gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY");
671 // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni)
673 par[0] = geom->GetCPVActiveSize(0) / 2;
674 par[1] = geom->GetCPVTextoliteThickness() / 2;
675 par[2] = geom->GetCPVActiveSize(1) / 2;
676 gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3);
680 par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2;
681 gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3);
683 for (Int_t i=0; i<4; i++) {
684 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2;
685 gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY");
687 y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2;
688 gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY");
692 // Dummy sensitive plane in the middle of argone gas volume
695 gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3);
696 gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY");
698 // Cu+Ni foil covers textolite
700 par[1] = geom->GetCPVCuNiFoilThickness() / 2;
701 gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3);
702 y = geom->GetCPVTextoliteThickness()/2 - par[1];
703 gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY");
705 // Aluminum frame around CPV
707 par[0] = geom->GetCPVFrameSize(0)/2;
708 par[1] = geom->GetCPVFrameSize(1)/2;
709 par[2] = geom->GetCPVBoxSize(2) /2;
710 gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3);
712 par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0);
713 par[1] = geom->GetCPVFrameSize(1)/2;
714 par[2] = geom->GetCPVFrameSize(2)/2;
715 gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3);
717 for (Int_t j=0; j<=1; j++) {
718 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
719 gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY");
720 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
721 gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY");
727 //____________________________________________________________________________
728 void AliPHOSv0::CreateGeometryforSupport()
730 // Create the PHOS' support geometry for GEANT
734 Geant3 geometry of the PHOS's support
737 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif">
742 Float_t par[5], x0,y0,z0 ;
745 // Get pointer to the array containing media indexes
746 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
748 AliPHOSGeometry * geom = GetGeometry() ;
750 // --- Dummy box containing two rails on which PHOS support moves
751 // --- Put these rails to the bottom of the L3 magnet
753 par[0] = geom->GetRailRoadSize(0) / 2.0 ;
754 par[1] = geom->GetRailRoadSize(1) / 2.0 ;
755 par[2] = geom->GetRailRoadSize(2) / 2.0 ;
756 gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ;
758 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ;
759 gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ;
761 // --- Dummy box containing one rail
763 par[0] = geom->GetRailOuterSize(0) / 2.0 ;
764 par[1] = geom->GetRailOuterSize(1) / 2.0 ;
765 par[2] = geom->GetRailOuterSize(2) / 2.0 ;
766 gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ;
768 for (i=0; i<2; i++) {
769 x0 = (2*i-1) * geom->GetDistanceBetwRails() / 2.0 ;
770 gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ;
773 // --- Upper and bottom steel parts of the rail
775 par[0] = geom->GetRailPart1(0) / 2.0 ;
776 par[1] = geom->GetRailPart1(1) / 2.0 ;
777 par[2] = geom->GetRailPart1(2) / 2.0 ;
778 gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ;
780 y0 = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 ;
781 gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
782 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 - geom->GetRailPart3(1);
783 gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
785 // --- The middle vertical steel parts of the rail
787 par[0] = geom->GetRailPart2(0) / 2.0 ;
788 par[1] = geom->GetRailPart2(1) / 2.0 ;
789 par[2] = geom->GetRailPart2(2) / 2.0 ;
790 gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ;
792 y0 = - geom->GetRailPart3(1) / 2.0 ;
793 gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
795 // --- The most upper steel parts of the rail
797 par[0] = geom->GetRailPart3(0) / 2.0 ;
798 par[1] = geom->GetRailPart3(1) / 2.0 ;
799 par[2] = geom->GetRailPart3(2) / 2.0 ;
800 gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ;
802 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart3(1)) / 2.0 ;
803 gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
805 // --- The wall of the cradle
806 // --- The wall is empty: steel thin walls and air inside
808 par[1] = TMath::Sqrt(TMath::Power((geom->GetIPtoCPVDistance() + geom->GetOuterBoxSize(3)),2) +
809 TMath::Power((geom->GetOuterBoxSize(1)/2),2))+10. ;
810 par[0] = par[1] - geom->GetCradleWall(1) ;
811 par[2] = geom->GetCradleWall(2) / 2.0 ;
812 par[3] = geom->GetCradleWall(3) ;
813 par[4] = geom->GetCradleWall(4) ;
814 gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ;
816 par[0] -= geom->GetCradleWallThickness() ;
817 par[1] -= geom->GetCradleWallThickness() ;
818 par[2] -= geom->GetCradleWallThickness() ;
819 gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ;
820 gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
822 for (i=0; i<2; i++) {
823 z0 = (2*i-1) * (geom->GetOuterBoxSize(2) + geom->GetCradleWall(2) )/ 2.0 ;
824 gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ;
827 // --- The "wheels" of the cradle
829 par[0] = geom->GetCradleWheel(0) / 2;
830 par[1] = geom->GetCradleWheel(1) / 2;
831 par[2] = geom->GetCradleWheel(2) / 2;
832 gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ;
834 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) -
835 geom->GetCradleWheel(1)/2) ;
836 for (i=0; i<2; i++) {
837 z0 = (2*i-1) * ((geom->GetOuterBoxSize(2) + geom->GetCradleWheel(2))/ 2.0 +
838 geom->GetCradleWall(2));
839 for (j=0; j<2; j++) {
841 x0 = (2*j-1) * geom->GetDistanceBetwRails() / 2.0 ;
842 gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ;
848 //____________________________________________________________________________
849 Float_t AliPHOSv0::ZMin(void) const
851 // Overall dimension of the PHOS (min)
853 AliPHOSGeometry * geom = GetGeometry() ;
855 return -geom->GetOuterBoxSize(2)/2.;
858 //____________________________________________________________________________
859 Float_t AliPHOSv0::ZMax(void) const
861 // Overall dimension of the PHOS (max)
863 AliPHOSGeometry * geom = GetGeometry() ;
865 return geom->GetOuterBoxSize(2)/2.;
868 //____________________________________________________________________________
869 void AliPHOSv0::Init(void)
871 // Just prints an information message
879 Info("Init", "%s", st.Data()) ;
880 // Here the PHOS initialisation code (if any!)
882 AliPHOSGeometry * geom = GetGeometry() ;
885 Info("Init", "AliPHOS%s: PHOS geometry intialized for %s", Version().Data(), geom->GetName()) ;
887 Info("Init", "AliPHOS%s: PHOS geometry initialization failed !", Version().Data()) ;
889 Info("Init", "%s", st.Data()) ;