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.79 2005/05/28 14:19:05 schutz
21 * Compilation warnings fixed by T.P.
25 //_________________________________________________________________________
26 // Implementation version v0 of PHOS Manager class
27 // An object of this class does not produce hits nor digits
28 // It is the one to use if you do not want to produce outputs in TREEH or TREED
30 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
33 // --- ROOT system ---
37 #include <TGeometry.h>
43 #include <TVirtualMC.h>
45 // --- Standard library ---
50 // --- AliRoot header files ---
53 #include "AliPHOSGeometry.h"
54 #include "AliPHOSLoader.h"
55 #include "AliPHOSv0.h"
61 //____________________________________________________________________________
62 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
65 // ctor : title is used to identify the layout
69 //____________________________________________________________________________
70 void AliPHOSv0::Copy(TObject & phos) const
76 //____________________________________________________________________________
77 void AliPHOSv0::BuildGeometry()
79 // Build the PHOS geometry for the ROOT display
83 PHOS in ALICE displayed by root
89 <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
94 <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
99 <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
104 <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
110 this->BuildGeometryforEMC() ;
111 this->BuildGeometryforCPV() ;
115 //____________________________________________________________________________
116 void AliPHOSv0:: BuildGeometryforEMC(void)
118 // Build the PHOS-EMC geometry for the ROOT display
120 const Int_t kColorPHOS = kRed ;
121 const Int_t kColorXTAL = kBlue ;
123 Double_t const kRADDEG = 180.0 / TMath::Pi() ;
125 AliPHOSGeometry * geom = GetGeometry() ;
126 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
127 Float_t * boxparams = emcg->GetEMCParams() ;
129 new TTRD1("OuterBox", "PHOS box", "void",boxparams[0],boxparams[1],boxparams[2], boxparams[3] );
134 Float_t * cribox = emcg->GetInnerThermoHalfSize() ;
135 new TBRIK( "CrystalsBox", "PHOS crystals box", "void", cribox[0], cribox[2], cribox[1] ) ;
137 // position PHOS into ALICE
139 Float_t r = geom->GetIPtoOuterCoverDistance() + boxparams[3] ;
141 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
143 char * nodename = new char[20] ;
144 char * rotname = new char[20] ;
146 new TRotMatrix("cribox", "cribox", 90, 0, 90, 90, 0, 0);
148 for( Int_t i = 1; i <= geom->GetNModules(); i++ ) {
150 Float_t angle = geom->GetPHOSAngle(i) ;
151 sprintf(rotname, "%s%d", "rot", number++) ;
152 new TRotMatrix(rotname, rotname, 90, angle, 0, 0, 90, 270 + angle);
155 sprintf(nodename,"%s%d", "Module", i) ;
156 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
157 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
158 TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
159 outerboxnode->SetLineColor(kColorPHOS) ;
160 fNodes->Add(outerboxnode) ;
163 Float_t z = -boxparams[3] - geom->GetIPtoOuterCoverDistance() +
164 cribox[1] + geom->GetIPtoCrystalSurface() ;
165 TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, 0, z) ;
166 crystalsboxnode->SetLineColor(kColorXTAL) ;
167 fNodes->Add(crystalsboxnode) ;
175 //____________________________________________________________________________
176 void AliPHOSv0:: BuildGeometryforCPV(void)
178 // Build the PHOS-CPV geometry for the ROOT display
179 // Author: Yuri Kharlov 11 September 2000
184 CPV displayed by root
189 <td>CPV perspective view</td>
190 <td>CPV front view </td>
194 <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td>
195 <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td>
203 const Double_t kRADDEG = 180.0 / TMath::Pi() ;
204 const Int_t kColorCPV = kGreen ;
205 const Int_t kColorFrame = kYellow ;
206 const Int_t kColorGassiplex = kRed;
207 const Int_t kColorPCB = kCyan;
209 AliPHOSGeometry * geom = GetGeometry() ;
211 // Box for a full PHOS module
213 new TBRIK ("CPVBox", "CPV box", "void", geom->GetCPVBoxSize(0)/2,
214 geom->GetCPVBoxSize(1)/2,
215 geom->GetCPVBoxSize(2)/2 );
216 new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", geom->GetCPVFrameSize(0)/2,
217 geom->GetCPVFrameSize(1)/2,
218 geom->GetCPVBoxSize(2)/2 );
219 new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0),
220 geom->GetCPVFrameSize(1)/2,
221 geom->GetCPVFrameSize(2)/2);
222 new TBRIK ("CPVPCB", "CPV PCB", "void", geom->GetCPVActiveSize(0)/2,
223 geom->GetCPVTextoliteThickness()/2,
224 geom->GetCPVActiveSize(1)/2);
225 new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", geom->GetGassiplexChipSize(0)/2,
226 geom->GetGassiplexChipSize(1)/2,
227 geom->GetGassiplexChipSize(2)/2);
229 // position CPV into ALICE
231 char * nodename = new char[25] ;
232 char * rotname = new char[25] ;
234 Float_t r = geom->GetIPtoCPVDistance() + geom->GetCPVBoxSize(1) / 2.0 ;
236 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
238 Int_t lastModule = 0 ;
239 lastModule = geom->GetNModules();
241 for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules
245 Float_t angle = geom->GetPHOSAngle(i) ;
246 sprintf(rotname, "%s%d", "rotg", number+i) ;
247 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
249 sprintf(nodename, "%s%d", "CPVModule", i) ;
250 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
251 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
253 TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ;
254 cpvBoxNode->SetLineColor(kColorCPV) ;
255 fNodes->Add(cpvBoxNode) ;
258 // inside each CPV box:
262 for (j=0; j<=1; j++) {
263 sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ;
264 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
265 TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ;
266 cpvFrameNode->SetLineColor(kColorFrame) ;
267 fNodes->Add(cpvFrameNode) ;
269 sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ;
270 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
271 cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ;
272 cpvFrameNode->SetLineColor(kColorFrame) ;
273 fNodes->Add(cpvFrameNode) ;
276 // 4 printed circuit boards
277 for (j=0; j<4; j++) {
278 sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ;
279 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(j) + geom->GetCPVTextoliteThickness()/2;
280 TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ;
281 cpvPCBNode->SetLineColor(kColorPCB) ;
282 fNodes->Add(cpvPCBNode) ;
286 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
287 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
288 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
289 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
290 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
291 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
292 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
293 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
294 sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ;
295 TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ;
296 cpvGassiplexNode->SetLineColor(kColorGassiplex) ;
297 fNodes->Add(cpvGassiplexNode) ;
307 //____________________________________________________________________________
308 void AliPHOSv0::CreateGeometry()
310 // Create the PHOS geometry for Geant
312 AliPHOSv0 *phostmp = dynamic_cast<AliPHOSv0*>(gAlice->GetModule("PHOS")) ;
314 if ( phostmp == NULL ) {
316 fprintf(stderr, "PHOS detector not found!\n") ;
321 AliPHOSGeometry * geom = GetGeometry() ;
323 // Get pointer to the array containing media indeces
324 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
326 // Create a PHOS module.
328 gMC->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ;
330 this->CreateGeometryforEMC() ;
332 this->CreateGeometryforCPV() ;
334 this->CreateGeometryforSupport() ;
336 // --- Position PHOS mdules in ALICE setup ---
339 Double_t const kRADDEG = 180.0 / TMath::Pi() ;
340 Float_t * phosParams = geom->GetPHOSParams() ;
342 Float_t r = geom->GetIPtoOuterCoverDistance() + phosParams[3] - geom->GetCPVBoxSize(1) ;
344 for( i = 1; i <= geom->GetNModules() ; i++ ) {
346 Float_t angle = geom->GetPHOSAngle(i) ;
347 AliMatrix(idrotm[i-1], 90.,angle, 0., 0., 90., 270. +angle) ;
349 Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
350 Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
352 gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ;
358 //____________________________________________________________________________
359 void AliPHOSv0::CreateGeometryforEMC()
361 // Create the PHOS-EMC geometry for GEANT
362 // Author: Dmitri Peressounko August 2001
363 // The used coordinate system:
364 // 1. in Module: X along longer side, Y out of beam, Z along shorter side (along beam)
365 // 2. In Strip the same: X along longer side, Y out of beam, Z along shorter side (along beam)
371 Geant3 geometry tree of PHOS-EMC in ALICE
374 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif">
379 // Get pointer to the array containing media indexes
380 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
382 AliPHOSGeometry * geom = GetGeometry() ;
383 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
385 // ======= Define the strip ===============
387 gMC->Gsvolu("PSTR", "BOX ", idtmed[716], emcg->GetStripHalfSize(), 3) ; //Made of stell
389 // --- define air volume (cell of the honeycomb)
390 gMC->Gsvolu("PCEL", "BOX ", idtmed[798], emcg->GetAirCellHalfSize(), 3);
392 // --- define wrapped crystal and put it into AirCell
394 gMC->Gsvolu("PWRA", "BOX ", idtmed[702], emcg->GetWrappedHalfSize(), 3);
395 Float_t * pin = emcg->GetAPDHalfSize() ;
396 Float_t * preamp = emcg->GetPreampHalfSize() ;
397 Float_t y = (emcg->GetAirGapLed()-2*pin[1]-2*preamp[1])/2;
398 gMC->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
400 // --- Define crystall and put it into wrapped crystall ---
401 gMC->Gsvolu("PXTL", "BOX ", idtmed[699], emcg->GetCrystalHalfSize(), 3) ;
402 gMC->Gspos("PXTL", 1, "PWRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
404 // --- define APD/PIN preamp and put it into AirCell
406 gMC->Gsvolu("PPIN", "BOX ", idtmed[705], emcg->GetAPDHalfSize(), 3) ;
407 Float_t * crystal = emcg->GetCrystalHalfSize() ;
408 y = crystal[1] + emcg->GetAirGapLed() /2 - preamp[1];
409 gMC->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
411 gMC->Gsvolu("PREA", "BOX ", idtmed[711], emcg->GetPreampHalfSize(), 3) ; // Here I assumed preamp
412 // as a printed Circuit
413 y = crystal[1] + emcg->GetAirGapLed() /2 + pin[1] ; // May it should be changed
414 gMC->Gspos("PREA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; // to ceramics?
417 // --- Fill strip with wrapped cristalls in Air Cells
419 Float_t* splate = emcg->GetSupportPlateHalfSize();
421 Float_t* acel = emcg->GetAirCellHalfSize() ;
423 for(icel = 1; icel <= emcg->GetNCellsInStrip(); icel++){
424 Float_t x = (2*icel - 1 - emcg->GetNCellsInStrip())* acel[0] ;
425 gMC->Gspos("PCEL", icel, "PSTR", x, y, 0.0, 0, "ONLY") ;
428 // --- define the support plate, hole in it and position it in strip ----
429 gMC->Gsvolu("PSUP", "BOX ", idtmed[701], emcg->GetSupportPlateHalfSize(), 3) ;
431 gMC->Gsvolu("PSHO", "BOX ", idtmed[798], emcg->GetSupportPlateInHalfSize(), 3) ;
432 Float_t z = emcg->GetSupportPlateThickness()/2 ;
433 gMC->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY") ;
436 gMC->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ;
439 // ========== Fill module with strips and put them into inner thermoinsulation=============
440 gMC->Gsvolu("PTII", "BOX ", idtmed[706], emcg->GetInnerThermoHalfSize(), 3) ;
442 Float_t * inthermo = emcg->GetInnerThermoHalfSize() ;
443 Float_t * strip = emcg->GetStripHalfSize() ;
444 y = inthermo[1] - strip[1] ;
449 for(irow = 0; irow < emcg->GetNStripX(); irow ++){
450 Float_t x = (2*irow + 1 - emcg->GetNStripX())* strip[0] ;
451 for(icol = 0; icol < emcg->GetNStripZ(); icol ++){
452 z = (2*icol + 1 - emcg->GetNStripZ()) * strip[2] ;
453 gMC->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY") ;
459 // ------- define the air gap between thermoinsulation and cooler
460 gMC->Gsvolu("PAGA", "BOX ", idtmed[798], emcg->GetAirGapHalfSize(), 3) ;
461 Float_t * agap = emcg->GetAirGapHalfSize() ;
462 y = agap[1] - inthermo[1] ;
464 gMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ;
468 // ------- define the Al passive cooler
469 gMC->Gsvolu("PCOR", "BOX ", idtmed[701], emcg->GetCoolerHalfSize(), 3) ;
470 Float_t * cooler = emcg->GetCoolerHalfSize() ;
471 y = cooler[1] - agap[1] ;
473 gMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ;
475 // ------- define the outer thermoinsulating cover
476 gMC->Gsvolu("PTIO", "TRD1", idtmed[706], emcg->GetOuterThermoParams(), 4) ;
477 Float_t * outparams = emcg->GetOuterThermoParams() ;
480 AliMatrix(idrotm[1], 90.0, 0.0, 0.0, 0.0, 90.0, 270.0) ;
481 // Frame in outer thermoinsulation and so on: z out of beam, y along beam, x across beam
483 z = outparams[3] - cooler[1] ;
484 gMC->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ;
486 // -------- Define the outer Aluminium cover -----
487 gMC->Gsvolu("PCOL", "TRD1", idtmed[701], emcg->GetAlCoverParams(), 4) ;
488 Float_t * covparams = emcg->GetAlCoverParams() ;
489 z = covparams[3] - outparams[3] ;
490 gMC->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
492 // --------- Define front fiberglass cover -----------
493 gMC->Gsvolu("PFGC", "BOX ", idtmed[717], emcg->GetFiberGlassHalfSize(), 3) ;
495 gMC->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
497 //=============This is all with cold section==============
500 //------ Warm Section --------------
501 gMC->Gsvolu("PWAR", "BOX ", idtmed[701], emcg->GetWarmAlCoverHalfSize(), 3) ;
502 Float_t * warmcov = emcg->GetWarmAlCoverHalfSize() ;
504 // --- Define the outer thermoinsulation ---
505 gMC->Gsvolu("PWTI", "BOX ", idtmed[706], emcg->GetWarmThermoHalfSize(), 3) ;
506 Float_t * warmthermo = emcg->GetWarmThermoHalfSize() ;
507 z = -warmcov[2] + warmthermo[2] ;
509 gMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ;
511 // --- Define cables area and put in it T-supports ----
512 gMC->Gsvolu("PCA1", "BOX ", idtmed[718], emcg->GetTCables1HalfSize(), 3) ;
513 Float_t * cbox = emcg->GetTCables1HalfSize() ;
515 gMC->Gsvolu("PBE1", "BOX ", idtmed[701], emcg->GetTSupport1HalfSize(), 3) ;
516 Float_t * beams = emcg->GetTSupport1HalfSize() ;
518 for(isup = 0; isup < emcg->GetNTSuppots(); isup++){
519 Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ;
520 gMC->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY") ;
523 z = -warmthermo[2] + cbox[2] ;
524 gMC->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
526 gMC->Gsvolu("PCA2", "BOX ", idtmed[718], emcg->GetTCables2HalfSize(), 3) ;
527 Float_t * cbox2 = emcg->GetTCables2HalfSize() ;
529 gMC->Gsvolu("PBE2", "BOX ", idtmed[701], emcg->GetTSupport2HalfSize(), 3) ;
530 for(isup = 0; isup < emcg->GetNTSuppots(); isup++){
531 Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ;
532 gMC->Gspos("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY") ;
535 z = -warmthermo[2] + 2*cbox[2] + cbox2[2];
536 gMC->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
539 // --- Define frame ---
540 gMC->Gsvolu("PFRX", "BOX ", idtmed[716], emcg->GetFrameXHalfSize(), 3) ;
541 Float_t * posit = emcg->GetFrameXPosition() ;
542 gMC->Gspos("PFRX", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
543 gMC->Gspos("PFRX", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
545 gMC->Gsvolu("PFRZ", "BOX ", idtmed[716], emcg->GetFrameZHalfSize(), 3) ;
546 posit = emcg->GetFrameZPosition() ;
547 gMC->Gspos("PFRZ", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
548 gMC->Gspos("PFRZ", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
550 // --- Define Fiber Glass support ---
551 gMC->Gsvolu("PFG1", "BOX ", idtmed[717], emcg->GetFGupXHalfSize(), 3) ;
552 posit = emcg->GetFGupXPosition() ;
553 gMC->Gspos("PFG1", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
554 gMC->Gspos("PFG1", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
556 gMC->Gsvolu("PFG2", "BOX ", idtmed[717], emcg->GetFGupZHalfSize(), 3) ;
557 posit = emcg->GetFGupZPosition() ;
558 gMC->Gspos("PFG2", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
559 gMC->Gspos("PFG2", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
561 gMC->Gsvolu("PFG3", "BOX ", idtmed[717], emcg->GetFGlowXHalfSize(), 3) ;
562 posit = emcg->GetFGlowXPosition() ;
563 gMC->Gspos("PFG3", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
564 gMC->Gspos("PFG3", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
566 gMC->Gsvolu("PFG4", "BOX ", idtmed[717], emcg->GetFGlowZHalfSize(), 3) ;
567 posit = emcg->GetFGlowZPosition() ;
568 gMC->Gspos("PFG4", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
569 gMC->Gspos("PFG4", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
571 // --- Define Air Gap for FEE electronics -----
573 gMC->Gsvolu("PAFE", "BOX ", idtmed[798], emcg->GetFEEAirHalfSize(), 3) ;
574 posit = emcg->GetFEEAirPosition() ;
575 gMC->Gspos("PAFE", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
577 // Define the EMC module volume and combine Cool and Warm sections
579 gMC->Gsvolu("PEMC", "TRD1", idtmed[798], emcg->GetEMCParams(), 4) ;
582 gMC->Gspos("PCOL", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
584 gMC->Gspos("PWAR", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
587 // Put created EMC geometry into PHOS volume
589 z = geom->GetCPVBoxSize(1) / 2. ;
590 gMC->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ;
594 //____________________________________________________________________________
595 void AliPHOSv0::CreateGeometryforCPV()
597 // Create the PHOS-CPV geometry for GEANT
598 // Author: Yuri Kharlov 11 September 2000
602 Geant3 geometry of PHOS-CPV in ALICE
607 <td>CPV perspective view</td>
608 <td>CPV front view </td>
612 <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td>
613 <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td>
617 <td>One CPV module, perspective view </td>
618 <td>One CPV module, front view (extended in vertical direction) </td>
622 <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td>
623 <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td>
629 Geant3 geometry tree of PHOS-CPV in ALICE
632 <img height=300 width=290 src="../images/CPVtree.gif">
637 Float_t par[3], x,y,z;
639 // Get pointer to the array containing media indexes
640 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
642 AliPHOSGeometry * geom = GetGeometry() ;
644 // The box containing all CPV for one PHOS module filled with air
645 par[0] = geom->GetCPVBoxSize(0) / 2.0 ;
646 par[1] = geom->GetCPVBoxSize(1) / 2.0 ;
647 par[2] = geom->GetCPVBoxSize(2) / 2.0 ;
648 gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ;
650 Float_t * emcParams = geom->GetEMCAGeometry()->GetEMCParams() ;
653 AliMatrix(rotm, 90.,0., 0., 0., 90., 90.) ;
655 gMC->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ;
659 par[0] = geom->GetGassiplexChipSize(0)/2.;
660 par[1] = geom->GetGassiplexChipSize(1)/2.;
661 par[2] = geom->GetGassiplexChipSize(2)/2.;
662 gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3);
664 // Cu+Ni foil covers Gassiplex board
666 par[1] = geom->GetCPVCuNiFoilThickness()/2;
667 gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3);
668 y = -(geom->GetGassiplexChipSize(1)/2 - par[1]);
669 gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY");
671 // Position of the chip inside CPV
673 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
674 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
676 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
677 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
678 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
679 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
680 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
682 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
683 gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY");
687 // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni)
689 par[0] = geom->GetCPVActiveSize(0) / 2;
690 par[1] = geom->GetCPVTextoliteThickness() / 2;
691 par[2] = geom->GetCPVActiveSize(1) / 2;
692 gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3);
696 par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2;
697 gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3);
699 for (Int_t i=0; i<4; i++) {
700 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2;
701 gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY");
703 y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2;
704 gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY");
708 // Dummy sensitive plane in the middle of argone gas volume
711 gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3);
712 gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY");
714 // Cu+Ni foil covers textolite
716 par[1] = geom->GetCPVCuNiFoilThickness() / 2;
717 gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3);
718 y = geom->GetCPVTextoliteThickness()/2 - par[1];
719 gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY");
721 // Aluminum frame around CPV
723 par[0] = geom->GetCPVFrameSize(0)/2;
724 par[1] = geom->GetCPVFrameSize(1)/2;
725 par[2] = geom->GetCPVBoxSize(2) /2;
726 gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3);
728 par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0);
729 par[1] = geom->GetCPVFrameSize(1)/2;
730 par[2] = geom->GetCPVFrameSize(2)/2;
731 gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3);
733 for (Int_t j=0; j<=1; j++) {
734 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
735 gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY");
736 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
737 gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY");
743 //____________________________________________________________________________
744 void AliPHOSv0::CreateGeometryforSupport()
746 // Create the PHOS' support geometry for GEANT
750 Geant3 geometry of the PHOS's support
753 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif">
758 Float_t par[5], x0,y0,z0 ;
761 // Get pointer to the array containing media indexes
762 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
764 AliPHOSGeometry * geom = GetGeometry() ;
766 // --- Dummy box containing two rails on which PHOS support moves
767 // --- Put these rails to the bottom of the L3 magnet
769 par[0] = geom->GetRailRoadSize(0) / 2.0 ;
770 par[1] = geom->GetRailRoadSize(1) / 2.0 ;
771 par[2] = geom->GetRailRoadSize(2) / 2.0 ;
772 gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ;
774 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ;
775 gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ;
777 // --- Dummy box containing one rail
779 par[0] = geom->GetRailOuterSize(0) / 2.0 ;
780 par[1] = geom->GetRailOuterSize(1) / 2.0 ;
781 par[2] = geom->GetRailOuterSize(2) / 2.0 ;
782 gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ;
784 for (i=0; i<2; i++) {
785 x0 = (2*i-1) * geom->GetDistanceBetwRails() / 2.0 ;
786 gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ;
789 // --- Upper and bottom steel parts of the rail
791 par[0] = geom->GetRailPart1(0) / 2.0 ;
792 par[1] = geom->GetRailPart1(1) / 2.0 ;
793 par[2] = geom->GetRailPart1(2) / 2.0 ;
794 gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ;
796 y0 = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 ;
797 gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
798 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 - geom->GetRailPart3(1);
799 gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
801 // --- The middle vertical steel parts of the rail
803 par[0] = geom->GetRailPart2(0) / 2.0 ;
804 par[1] = geom->GetRailPart2(1) / 2.0 ;
805 par[2] = geom->GetRailPart2(2) / 2.0 ;
806 gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ;
808 y0 = - geom->GetRailPart3(1) / 2.0 ;
809 gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
811 // --- The most upper steel parts of the rail
813 par[0] = geom->GetRailPart3(0) / 2.0 ;
814 par[1] = geom->GetRailPart3(1) / 2.0 ;
815 par[2] = geom->GetRailPart3(2) / 2.0 ;
816 gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ;
818 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart3(1)) / 2.0 ;
819 gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
821 // --- The wall of the cradle
822 // --- The wall is empty: steel thin walls and air inside
824 par[1] = TMath::Sqrt(TMath::Power((geom->GetIPtoCPVDistance() + geom->GetOuterBoxSize(3)),2) +
825 TMath::Power((geom->GetOuterBoxSize(1)/2),2))+10. ;
826 par[0] = par[1] - geom->GetCradleWall(1) ;
827 par[2] = geom->GetCradleWall(2) / 2.0 ;
828 par[3] = geom->GetCradleWall(3) ;
829 par[4] = geom->GetCradleWall(4) ;
830 gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ;
832 par[0] += geom->GetCradleWallThickness() ;
833 par[1] -= geom->GetCradleWallThickness() ;
834 par[2] -= geom->GetCradleWallThickness() ;
835 gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ;
836 gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
838 for (i=0; i<2; i++) {
839 z0 = (2*i-1) * (geom->GetOuterBoxSize(2) + geom->GetCradleWall(2) )/ 2.0 ;
840 gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ;
843 // --- The "wheels" of the cradle
845 par[0] = geom->GetCradleWheel(0) / 2;
846 par[1] = geom->GetCradleWheel(1) / 2;
847 par[2] = geom->GetCradleWheel(2) / 2;
848 gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ;
850 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) -
851 geom->GetCradleWheel(1)/2) ;
852 for (i=0; i<2; i++) {
853 z0 = (2*i-1) * ((geom->GetOuterBoxSize(2) + geom->GetCradleWheel(2))/ 2.0 +
854 geom->GetCradleWall(2));
855 for (j=0; j<2; j++) {
857 x0 = (2*j-1) * geom->GetDistanceBetwRails() / 2.0 ;
858 gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ;
864 //____________________________________________________________________________
865 Float_t AliPHOSv0::ZMin(void) const
867 // Overall dimension of the PHOS (min)
869 AliPHOSGeometry * geom = GetGeometry() ;
871 return -geom->GetOuterBoxSize(2)/2.;
874 //____________________________________________________________________________
875 Float_t AliPHOSv0::ZMax(void) const
877 // Overall dimension of the PHOS (max)
879 AliPHOSGeometry * geom = GetGeometry() ;
881 return geom->GetOuterBoxSize(2)/2.;
884 //____________________________________________________________________________
885 void AliPHOSv0::Init(void)
887 // Just prints an information message
891 if(AliLog::GetGlobalDebugLevel()>0) {
895 Info("Init", "%s", st.Data()) ;
896 // Here the PHOS initialisation code (if any!)
898 AliPHOSGeometry * geom = GetGeometry() ;
901 Info("Init", "AliPHOS%s: PHOS geometry intialized for %s", Version().Data(), geom->GetName()) ;
903 Info("Init", "AliPHOS%s: PHOS geometry initialization failed !", Version().Data()) ;
905 Info("Init", "%s", st.Data()) ;