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 /* History of cvs commits:
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
23 * Revision 1.79 2005/05/28 14:19:05 schutz
24 * Compilation warnings fixed by T.P.
28 //_________________________________________________________________________
29 // Implementation version v0 of PHOS Manager class
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
33 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
36 // --- ROOT system ---
40 #include <TGeometry.h>
46 #include <TVirtualMC.h>
48 // --- Standard library ---
53 // --- AliRoot header files ---
56 #include "AliPHOSGeometry.h"
57 #include "AliPHOSLoader.h"
58 #include "AliPHOSv0.h"
64 //____________________________________________________________________________
65 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
68 // ctor : title is used to identify the layout
72 //____________________________________________________________________________
73 void AliPHOSv0::Copy(TObject & phos) const
79 //____________________________________________________________________________
80 void AliPHOSv0::BuildGeometry()
82 // Build the PHOS geometry for the ROOT display
86 PHOS in ALICE displayed by root
92 <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
97 <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
102 <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
107 <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
113 this->BuildGeometryforEMC() ;
114 this->BuildGeometryforCPV() ;
118 //____________________________________________________________________________
119 void AliPHOSv0:: BuildGeometryforEMC(void)
121 // Build the PHOS-EMC geometry for the ROOT display
123 const Int_t kColorPHOS = kRed ;
124 const Int_t kColorXTAL = kBlue ;
126 Double_t const kRADDEG = 180.0 / TMath::Pi() ;
128 AliPHOSGeometry * geom = GetGeometry() ;
129 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
130 Float_t * boxparams = emcg->GetEMCParams() ;
132 new TTRD1("OuterBox", "PHOS box", "void",boxparams[0],boxparams[1],boxparams[2], boxparams[3] );
137 Float_t * cribox = emcg->GetInnerThermoHalfSize() ;
138 new TBRIK( "CrystalsBox", "PHOS crystals box", "void", cribox[0], cribox[2], cribox[1] ) ;
140 // position PHOS into ALICE
142 Float_t r = geom->GetIPtoOuterCoverDistance() + boxparams[3] ;
144 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
146 char * nodename = new char[20] ;
147 char * rotname = new char[20] ;
149 new TRotMatrix("cribox", "cribox", 90, 0, 90, 90, 0, 0);
151 for( Int_t i = 1; i <= geom->GetNModules(); i++ ) {
153 Float_t angle = geom->GetPHOSAngle(i) ;
154 sprintf(rotname, "%s%d", "rot", number++) ;
155 new TRotMatrix(rotname, rotname, 90, angle, 0, 0, 90, 270 + angle);
158 sprintf(nodename,"%s%d", "Module", i) ;
159 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
160 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
161 TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
162 outerboxnode->SetLineColor(kColorPHOS) ;
163 fNodes->Add(outerboxnode) ;
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) ;
178 //____________________________________________________________________________
179 void AliPHOSv0:: BuildGeometryforCPV(void)
181 // Build the PHOS-CPV geometry for the ROOT display
182 // Author: Yuri Kharlov 11 September 2000
187 CPV displayed by root
192 <td>CPV perspective view</td>
193 <td>CPV front view </td>
197 <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td>
198 <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td>
206 const Double_t kRADDEG = 180.0 / TMath::Pi() ;
207 const Int_t kColorCPV = kGreen ;
208 const Int_t kColorFrame = kYellow ;
209 const Int_t kColorGassiplex = kRed;
210 const Int_t kColorPCB = kCyan;
212 AliPHOSGeometry * geom = GetGeometry() ;
214 // Box for a full PHOS module
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);
232 // position CPV into ALICE
234 char * nodename = new char[25] ;
235 char * rotname = new char[25] ;
237 Float_t r = geom->GetIPtoCPVDistance() + geom->GetCPVBoxSize(1) / 2.0 ;
239 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
241 Int_t lastModule = 0 ;
242 lastModule = geom->GetNModules();
244 for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules
248 Float_t angle = geom->GetPHOSAngle(i) ;
249 sprintf(rotname, "%s%d", "rotg", number+i) ;
250 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
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 ) ;
256 TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ;
257 cpvBoxNode->SetLineColor(kColorCPV) ;
258 fNodes->Add(cpvBoxNode) ;
261 // inside each CPV box:
265 for (j=0; j<=1; j++) {
266 sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ;
267 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
268 TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ;
269 cpvFrameNode->SetLineColor(kColorFrame) ;
270 fNodes->Add(cpvFrameNode) ;
272 sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ;
273 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
274 cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ;
275 cpvFrameNode->SetLineColor(kColorFrame) ;
276 fNodes->Add(cpvFrameNode) ;
279 // 4 printed circuit boards
280 for (j=0; j<4; j++) {
281 sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ;
282 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(j) + geom->GetCPVTextoliteThickness()/2;
283 TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ;
284 cpvPCBNode->SetLineColor(kColorPCB) ;
285 fNodes->Add(cpvPCBNode) ;
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;
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) ;
310 //____________________________________________________________________________
311 void AliPHOSv0::CreateGeometry()
313 // Create the PHOS geometry for Geant
315 AliPHOSv0 *phostmp = dynamic_cast<AliPHOSv0*>(gAlice->GetModule("PHOS")) ;
317 if ( phostmp == NULL ) {
319 fprintf(stderr, "PHOS detector not found!\n") ;
324 AliPHOSGeometry * geom = GetGeometry() ;
326 // Get pointer to the array containing media indeces
327 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
329 // Create a PHOS module.
331 gMC->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ;
333 this->CreateGeometryforEMC() ;
335 this->CreateGeometryforCPV() ;
337 this->CreateGeometryforSupport() ;
339 // --- Position PHOS mdules in ALICE setup ---
343 for (Int_t iModule = 0; iModule < geom->GetNModules(); iModule++ ) {
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]) ;
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") ;
363 //____________________________________________________________________________
364 void AliPHOSv0::CreateGeometryforEMC()
366 // Create the PHOS-EMC geometry for GEANT
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)
376 Geant3 geometry tree of PHOS-EMC in ALICE
379 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif">
384 // Get pointer to the array containing media indexes
385 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
387 AliPHOSGeometry * geom = GetGeometry() ;
388 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
390 // ======= Define the strip ===============
392 gMC->Gsvolu("PSTR", "BOX ", idtmed[716], emcg->GetStripHalfSize(), 3) ; //Made of stell
394 // --- define air volume (cell of the honeycomb)
395 gMC->Gsvolu("PCEL", "BOX ", idtmed[798], emcg->GetAirCellHalfSize(), 3);
397 // --- define wrapped crystal and put it into AirCell
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") ;
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") ;
409 // --- define APD/PIN preamp and put it into AirCell
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") ;
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?
422 // --- Fill strip with wrapped cristalls in Air Cells
424 Float_t* splate = emcg->GetSupportPlateHalfSize();
426 Float_t* acel = emcg->GetAirCellHalfSize() ;
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") ;
433 // --- define the support plate, hole in it and position it in strip ----
434 gMC->Gsvolu("PSUP", "BOX ", idtmed[701], emcg->GetSupportPlateHalfSize(), 3) ;
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") ;
441 gMC->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ;
444 // ========== Fill module with strips and put them into inner thermoinsulation=============
445 gMC->Gsvolu("PTII", "BOX ", idtmed[706], emcg->GetInnerThermoHalfSize(), 3) ;
447 Float_t * inthermo = emcg->GetInnerThermoHalfSize() ;
448 Float_t * strip = emcg->GetStripHalfSize() ;
449 y = inthermo[1] - strip[1] ;
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") ;
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] ;
469 gMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ;
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] ;
478 gMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ;
480 // ------- define the outer thermoinsulating cover
481 gMC->Gsvolu("PTIO", "TRD1", idtmed[706], emcg->GetOuterThermoParams(), 4) ;
482 Float_t * outparams = emcg->GetOuterThermoParams() ;
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
488 z = outparams[3] - cooler[1] ;
489 gMC->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ;
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") ;
497 // --------- Define front fiberglass cover -----------
498 gMC->Gsvolu("PFGC", "BOX ", idtmed[717], emcg->GetFiberGlassHalfSize(), 3) ;
500 gMC->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
502 //=============This is all with cold section==============
505 //------ Warm Section --------------
506 gMC->Gsvolu("PWAR", "BOX ", idtmed[701], emcg->GetWarmAlCoverHalfSize(), 3) ;
507 Float_t * warmcov = emcg->GetWarmAlCoverHalfSize() ;
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] ;
514 gMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ;
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() ;
520 gMC->Gsvolu("PBE1", "BOX ", idtmed[701], emcg->GetTSupport1HalfSize(), 3) ;
521 Float_t * beams = emcg->GetTSupport1HalfSize() ;
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") ;
528 z = -warmthermo[2] + cbox[2] ;
529 gMC->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
531 gMC->Gsvolu("PCA2", "BOX ", idtmed[718], emcg->GetTCables2HalfSize(), 3) ;
532 Float_t * cbox2 = emcg->GetTCables2HalfSize() ;
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") ;
540 z = -warmthermo[2] + 2*cbox[2] + cbox2[2];
541 gMC->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
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") ;
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") ;
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") ;
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") ;
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") ;
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") ;
576 // --- Define Air Gap for FEE electronics -----
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") ;
582 // Define the EMC module volume and combine Cool and Warm sections
584 gMC->Gsvolu("PEMC", "TRD1", idtmed[798], emcg->GetEMCParams(), 4) ;
587 gMC->Gspos("PCOL", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
589 gMC->Gspos("PWAR", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
592 // Put created EMC geometry into PHOS volume
594 z = geom->GetCPVBoxSize(1) / 2. ;
595 gMC->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ;
599 //____________________________________________________________________________
600 void AliPHOSv0::CreateGeometryforCPV()
602 // Create the PHOS-CPV geometry for GEANT
603 // Author: Yuri Kharlov 11 September 2000
607 Geant3 geometry of PHOS-CPV in ALICE
612 <td>CPV perspective view</td>
613 <td>CPV front view </td>
617 <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td>
618 <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td>
622 <td>One CPV module, perspective view </td>
623 <td>One CPV module, front view (extended in vertical direction) </td>
627 <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td>
628 <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td>
634 Geant3 geometry tree of PHOS-CPV in ALICE
637 <img height=300 width=290 src="../images/CPVtree.gif">
642 Float_t par[3], x,y,z;
644 // Get pointer to the array containing media indexes
645 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
647 AliPHOSGeometry * geom = GetGeometry() ;
649 // The box containing all CPV for one PHOS module filled with air
650 par[0] = geom->GetCPVBoxSize(0) / 2.0 ;
651 par[1] = geom->GetCPVBoxSize(1) / 2.0 ;
652 par[2] = geom->GetCPVBoxSize(2) / 2.0 ;
653 gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ;
655 Float_t * emcParams = geom->GetEMCAGeometry()->GetEMCParams() ;
658 AliMatrix(rotm, 90.,0., 0., 0., 90., 90.) ;
660 gMC->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ;
664 par[0] = geom->GetGassiplexChipSize(0)/2.;
665 par[1] = geom->GetGassiplexChipSize(1)/2.;
666 par[2] = geom->GetGassiplexChipSize(2)/2.;
667 gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3);
669 // Cu+Ni foil covers Gassiplex board
671 par[1] = geom->GetCPVCuNiFoilThickness()/2;
672 gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3);
673 y = -(geom->GetGassiplexChipSize(1)/2 - par[1]);
674 gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY");
676 // Position of the chip inside CPV
678 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
679 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
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++) {
687 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
688 gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY");
692 // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni)
694 par[0] = geom->GetCPVActiveSize(0) / 2;
695 par[1] = geom->GetCPVTextoliteThickness() / 2;
696 par[2] = geom->GetCPVActiveSize(1) / 2;
697 gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3);
701 par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2;
702 gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3);
704 for (Int_t i=0; i<4; i++) {
705 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2;
706 gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY");
708 y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2;
709 gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY");
713 // Dummy sensitive plane in the middle of argone gas volume
716 gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3);
717 gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY");
719 // Cu+Ni foil covers textolite
721 par[1] = geom->GetCPVCuNiFoilThickness() / 2;
722 gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3);
723 y = geom->GetCPVTextoliteThickness()/2 - par[1];
724 gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY");
726 // Aluminum frame around CPV
728 par[0] = geom->GetCPVFrameSize(0)/2;
729 par[1] = geom->GetCPVFrameSize(1)/2;
730 par[2] = geom->GetCPVBoxSize(2) /2;
731 gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3);
733 par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0);
734 par[1] = geom->GetCPVFrameSize(1)/2;
735 par[2] = geom->GetCPVFrameSize(2)/2;
736 gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3);
738 for (Int_t j=0; j<=1; j++) {
739 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
740 gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY");
741 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
742 gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY");
748 //____________________________________________________________________________
749 void AliPHOSv0::CreateGeometryforSupport()
751 // Create the PHOS' support geometry for GEANT
755 Geant3 geometry of the PHOS's support
758 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif">
763 Float_t par[5], x0,y0,z0 ;
766 // Get pointer to the array containing media indexes
767 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
769 AliPHOSGeometry * geom = GetGeometry() ;
771 // --- Dummy box containing two rails on which PHOS support moves
772 // --- Put these rails to the bottom of the L3 magnet
774 par[0] = geom->GetRailRoadSize(0) / 2.0 ;
775 par[1] = geom->GetRailRoadSize(1) / 2.0 ;
776 par[2] = geom->GetRailRoadSize(2) / 2.0 ;
777 gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ;
779 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ;
780 gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ;
782 // --- Dummy box containing one rail
784 par[0] = geom->GetRailOuterSize(0) / 2.0 ;
785 par[1] = geom->GetRailOuterSize(1) / 2.0 ;
786 par[2] = geom->GetRailOuterSize(2) / 2.0 ;
787 gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ;
789 for (i=0; i<2; i++) {
790 x0 = (2*i-1) * geom->GetDistanceBetwRails() / 2.0 ;
791 gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ;
794 // --- Upper and bottom steel parts of the rail
796 par[0] = geom->GetRailPart1(0) / 2.0 ;
797 par[1] = geom->GetRailPart1(1) / 2.0 ;
798 par[2] = geom->GetRailPart1(2) / 2.0 ;
799 gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ;
801 y0 = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 ;
802 gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
803 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 - geom->GetRailPart3(1);
804 gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
806 // --- The middle vertical steel parts of the rail
808 par[0] = geom->GetRailPart2(0) / 2.0 ;
809 par[1] = geom->GetRailPart2(1) / 2.0 ;
810 par[2] = geom->GetRailPart2(2) / 2.0 ;
811 gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ;
813 y0 = - geom->GetRailPart3(1) / 2.0 ;
814 gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
816 // --- The most upper steel parts of the rail
818 par[0] = geom->GetRailPart3(0) / 2.0 ;
819 par[1] = geom->GetRailPart3(1) / 2.0 ;
820 par[2] = geom->GetRailPart3(2) / 2.0 ;
821 gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ;
823 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart3(1)) / 2.0 ;
824 gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
826 // --- The wall of the cradle
827 // --- The wall is empty: steel thin walls and air inside
829 par[1] = TMath::Sqrt(TMath::Power((geom->GetIPtoCPVDistance() + geom->GetOuterBoxSize(3)),2) +
830 TMath::Power((geom->GetOuterBoxSize(1)/2),2))+10. ;
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) ;
835 gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ;
837 par[0] += geom->GetCradleWallThickness() ;
838 par[1] -= geom->GetCradleWallThickness() ;
839 par[2] -= geom->GetCradleWallThickness() ;
840 gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ;
841 gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
843 for (i=0; i<2; i++) {
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") ;
848 // --- The "wheels" of the cradle
850 par[0] = geom->GetCradleWheel(0) / 2;
851 par[1] = geom->GetCradleWheel(1) / 2;
852 par[2] = geom->GetCradleWheel(2) / 2;
853 gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ;
855 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) -
856 geom->GetCradleWheel(1)/2) ;
857 for (i=0; i<2; i++) {
858 z0 = (2*i-1) * ((geom->GetOuterBoxSize(2) + geom->GetCradleWheel(2))/ 2.0 +
859 geom->GetCradleWall(2));
860 for (j=0; j<2; j++) {
862 x0 = (2*j-1) * geom->GetDistanceBetwRails() / 2.0 ;
863 gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ;
869 //____________________________________________________________________________
870 Float_t AliPHOSv0::ZMin(void) const
872 // Overall dimension of the PHOS (min)
874 AliPHOSGeometry * geom = GetGeometry() ;
876 return -geom->GetOuterBoxSize(2)/2.;
879 //____________________________________________________________________________
880 Float_t AliPHOSv0::ZMax(void) const
882 // Overall dimension of the PHOS (max)
884 AliPHOSGeometry * geom = GetGeometry() ;
886 return geom->GetOuterBoxSize(2)/2.;
889 //____________________________________________________________________________
890 void AliPHOSv0::Init(void)
892 // Just prints an information message
896 if(AliLog::GetGlobalDebugLevel()>0) {
900 Info("Init", "%s", st.Data()) ;
901 // Here the PHOS initialisation code (if any!)
903 AliPHOSGeometry * geom = GetGeometry() ;
906 Info("Init", "AliPHOS%s: PHOS geometry intialized for %s", Version().Data(), geom->GetName()) ;
908 Info("Init", "AliPHOS%s: PHOS geometry initialization failed !", Version().Data()) ;
910 Info("Init", "%s", st.Data()) ;