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 **************************************************************************/
18 //_________________________________________________________________________
19 // Implementation version v0 of PHOS Manager class
20 // An object of this class does not produce hits nor digits
21 // It is the one to use if you do not want to produce outputs in TREEH or TREED
23 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
26 // --- ROOT system ---
32 #include "TGeometry.h"
38 // --- Standard library ---
43 #include <strstream.h>
45 // --- AliRoot header files ---
47 #include "AliPHOSv0.h"
51 #include "AliPHOSGeometry.h"
52 #include "AliPHOSGetter.h"
56 //____________________________________________________________________________
57 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
60 // ctor : title is used to identify the layout
62 // create the geometry parameters object
63 // and post it to a folder (Post retrieves the correct geometry)
64 AliPHOSGetter::GetInstance(gDirectory->GetName(), 0)->PostGeometry() ;
68 //____________________________________________________________________________
69 void AliPHOSv0::BuildGeometry()
71 // Build the PHOS geometry for the ROOT display
75 PHOS in ALICE displayed by root
81 <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
86 <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
91 <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
96 <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
102 this->BuildGeometryforEMC() ;
103 this->BuildGeometryforCPV() ;
107 //____________________________________________________________________________
108 void AliPHOSv0:: BuildGeometryforEMC(void)
110 // Build the PHOS-EMC geometry for the ROOT display
112 const Int_t kColorPHOS = kRed ;
113 const Int_t kColorXTAL = kBlue ;
115 Double_t const kRADDEG = 180.0 / kPI ;
117 AliPHOSGeometry * geom = GetGeometry() ;
118 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
119 Float_t * boxparams = emcg->GetEMCParams() ;
121 new TTRD1("OuterBox", "PHOS box", "void",boxparams[0],boxparams[1],boxparams[2], boxparams[3] );
126 Float_t * cribox = emcg->GetInnerThermoHalfSize() ;
127 new TBRIK( "CrystalsBox", "PHOS crystals box", "void", cribox[0], cribox[2], cribox[1] ) ;
129 // position PHOS into ALICE
131 Float_t r = geom->GetIPtoOuterCoverDistance() + boxparams[3] ;
133 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
135 char * nodename = new char[20] ;
136 char * rotname = new char[20] ;
138 new TRotMatrix("cribox", "cribox", 90, 0, 90, 90, 0, 0);
140 for( Int_t i = 1; i <= geom->GetNModules(); i++ ) {
142 Float_t angle = geom->GetPHOSAngle(i) ;
143 sprintf(rotname, "%s%d", "rot", number++) ;
144 new TRotMatrix(rotname, rotname, 90, angle, 0, 0, 90, 270 + angle);
147 sprintf(nodename,"%s%d", "Module", i) ;
148 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
149 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
150 TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
151 outerboxnode->SetLineColor(kColorPHOS) ;
152 fNodes->Add(outerboxnode) ;
155 Float_t z = -boxparams[3] - geom->GetIPtoOuterCoverDistance() +
156 cribox[1] + geom->GetIPtoCrystalSurface() ;
157 TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, 0, z) ;
158 crystalsboxnode->SetLineColor(kColorXTAL) ;
159 fNodes->Add(crystalsboxnode) ;
167 //____________________________________________________________________________
168 void AliPHOSv0:: BuildGeometryforCPV(void)
170 // Build the PHOS-CPV geometry for the ROOT display
171 // Author: Yuri Kharlov 11 September 2000
176 CPV displayed by root
181 <td>CPV perspective view</td>
182 <td>CPV front view </td>
186 <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td>
187 <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td>
195 const Double_t kRADDEG = 180.0 / kPI ;
196 const Int_t kColorCPV = kGreen ;
197 const Int_t kColorFrame = kYellow ;
198 const Int_t kColorGassiplex = kRed;
199 const Int_t kColorPCB = kCyan;
201 AliPHOSGeometry * geom = GetGeometry() ;
203 // Box for a full PHOS module
205 new TBRIK ("CPVBox", "CPV box", "void", geom->GetCPVBoxSize(0)/2,
206 geom->GetCPVBoxSize(1)/2,
207 geom->GetCPVBoxSize(2)/2 );
208 new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", geom->GetCPVFrameSize(0)/2,
209 geom->GetCPVFrameSize(1)/2,
210 geom->GetCPVBoxSize(2)/2 );
211 new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0),
212 geom->GetCPVFrameSize(1)/2,
213 geom->GetCPVFrameSize(2)/2);
214 new TBRIK ("CPVPCB", "CPV PCB", "void", geom->GetCPVActiveSize(0)/2,
215 geom->GetCPVTextoliteThickness()/2,
216 geom->GetCPVActiveSize(1)/2);
217 new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", geom->GetGassiplexChipSize(0)/2,
218 geom->GetGassiplexChipSize(1)/2,
219 geom->GetGassiplexChipSize(2)/2);
221 // position CPV into ALICE
223 char * nodename = new char[25] ;
224 char * rotname = new char[25] ;
226 Float_t r = geom->GetIPtoCPVDistance() + geom->GetCPVBoxSize(1) / 2.0 ;
228 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
230 Int_t lastModule = 0 ;
231 lastModule = geom->GetNModules();
233 for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules
237 Float_t angle = geom->GetPHOSAngle(i) ;
238 sprintf(rotname, "%s%d", "rotg", number+i) ;
239 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
241 sprintf(nodename, "%s%d", "CPVModule", i) ;
242 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
243 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
245 TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ;
246 cpvBoxNode->SetLineColor(kColorCPV) ;
247 fNodes->Add(cpvBoxNode) ;
250 // inside each CPV box:
254 for (j=0; j<=1; j++) {
255 sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ;
256 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
257 TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ;
258 cpvFrameNode->SetLineColor(kColorFrame) ;
259 fNodes->Add(cpvFrameNode) ;
261 sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ;
262 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
263 cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ;
264 cpvFrameNode->SetLineColor(kColorFrame) ;
265 fNodes->Add(cpvFrameNode) ;
268 // 4 printed circuit boards
269 for (j=0; j<4; j++) {
270 sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ;
271 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(j) + geom->GetCPVTextoliteThickness()/2;
272 TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ;
273 cpvPCBNode->SetLineColor(kColorPCB) ;
274 fNodes->Add(cpvPCBNode) ;
278 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
279 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
280 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
281 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
282 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
283 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
284 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
285 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
286 sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ;
287 TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ;
288 cpvGassiplexNode->SetLineColor(kColorGassiplex) ;
289 fNodes->Add(cpvGassiplexNode) ;
299 //____________________________________________________________________________
300 void AliPHOSv0::CreateGeometry()
302 // Create the PHOS geometry for Geant
304 AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ;
306 if ( phostmp == NULL ) {
308 fprintf(stderr, "PHOS detector not found!\n") ;
313 AliPHOSGeometry * geom = GetGeometry() ;
315 // Get pointer to the array containing media indeces
316 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
318 // Create a PHOS module.
320 gMC->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ;
322 this->CreateGeometryforEMC() ;
324 this->CreateGeometryforCPV() ;
326 this->CreateGeometryforSupport() ;
328 // --- Position PHOS mdules in ALICE setup ---
331 Double_t const kRADDEG = 180.0 / kPI ;
332 Float_t * phosParams = geom->GetPHOSParams() ;
335 for( i = 1; i <= geom->GetNModules() ; i++ ) {
337 Float_t angle = geom->GetPHOSAngle(i) ;
338 AliMatrix(idrotm[i-1], 90.,angle, 0., 0., 90., 270. +angle) ;
340 Float_t r = geom->GetIPtoOuterCoverDistance() + phosParams[3] ;
342 Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
343 Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
345 gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ;
351 //____________________________________________________________________________
352 void AliPHOSv0::CreateGeometryforEMC()
354 // Create the PHOS-EMC geometry for GEANT
355 // Author: Dmitri Peressounko August 2001
356 // The used coordinate system:
357 // 1. in Module: X along longer side, Y out of beam, Z along shorter side (along beam)
358 // 2. In Strip the same: X along longer side, Y out of beam, Z along shorter side (along beam)
364 Geant3 geometry tree of PHOS-EMC in ALICE
367 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif">
372 // Get pointer to the array containing media indexes
373 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
375 AliPHOSGeometry * geom = GetGeometry() ;
376 AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
378 // ======= Define the strip ===============
380 gMC->Gsvolu("PSTR", "BOX ", idtmed[716], emcg->GetStripHalfSize(), 3) ; //Made of stell
382 // --- define air volume (cell of the honeycomb)
383 gMC->Gsvolu("PCEL", "BOX ", idtmed[798], emcg->GetAirCellHalfSize(), 3);
385 // --- define wrapped crystal and put it into AirCell
387 gMC->Gsvolu("PWRA", "BOX ", idtmed[702], emcg->GetWrappedHalfSize(), 3);
388 Float_t * pin = emcg->GetAPDHalfSize() ;
389 Float_t * preamp = emcg->GetPreampHalfSize() ;
390 Float_t y = (emcg->GetAirGapLed()-2*pin[1]-2*preamp[1])/2;
391 gMC->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
393 // --- Define crystall and put it into wrapped crystall ---
394 gMC->Gsvolu("PXTL", "BOX ", idtmed[699], emcg->GetCrystalHalfSize(), 3) ;
395 gMC->Gspos("PXTL", 1, "PWRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
397 // --- define APD/PIN preamp and put it into AirCell
399 gMC->Gsvolu("PPIN", "BOX ", idtmed[705], emcg->GetAPDHalfSize(), 3) ;
400 Float_t * crystal = emcg->GetCrystalHalfSize() ;
401 y = crystal[1] + emcg->GetAirGapLed() /2 - preamp[1];
402 gMC->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
404 gMC->Gsvolu("PREA", "BOX ", idtmed[711], emcg->GetPreampHalfSize(), 3) ; // Here I assumed preamp
405 // as a printed Circuit
406 y = crystal[1] + emcg->GetAirGapLed() /2 + pin[1] ; // May it should be changed
407 gMC->Gspos("PREA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; // to ceramics?
410 // --- Fill strip with wrapped cristalls in Air Cells
412 Float_t* splate = emcg->GetSupportPlateHalfSize();
414 Float_t* acel = emcg->GetAirCellHalfSize() ;
416 for(icel = 1; icel <= emcg->GetNCellsInStrip(); icel++){
417 Float_t x = (2*icel - 1 - emcg->GetNCellsInStrip())* acel[0] ;
418 gMC->Gspos("PCEL", icel, "PSTR", x, y, 0.0, 0, "ONLY") ;
421 // --- define the support plate, hole in it and position it in strip ----
422 gMC->Gsvolu("PSUP", "BOX ", idtmed[701], emcg->GetSupportPlateHalfSize(), 3) ;
424 gMC->Gsvolu("PSHO", "BOX ", idtmed[798], emcg->GetSupportPlateInHalfSize(), 3) ;
425 Float_t z = emcg->GetSupportPlateThickness()/2 ;
426 gMC->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY") ;
429 gMC->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ;
432 // ========== Fill module with strips and put them into inner thermoinsulation=============
433 gMC->Gsvolu("PTII", "BOX ", idtmed[706], emcg->GetInnerThermoHalfSize(), 3) ;
435 Float_t * inthermo = emcg->GetInnerThermoHalfSize() ;
436 Float_t * strip = emcg->GetStripHalfSize() ;
437 y = inthermo[1] - strip[1] ;
442 for(irow = 0; irow < emcg->GetNStripX(); irow ++){
443 Float_t x = (2*irow + 1 - emcg->GetNStripX())* strip[0] ;
444 for(icol = 0; icol < emcg->GetNStripZ(); icol ++){
445 z = (2*icol + 1 - emcg->GetNStripZ()) * strip[2] ;
446 gMC->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY") ;
452 // ------- define the air gap between thermoinsulation and cooler
453 gMC->Gsvolu("PAGA", "BOX ", idtmed[798], emcg->GetAirGapHalfSize(), 3) ;
454 Float_t * agap = emcg->GetAirGapHalfSize() ;
455 y = agap[1] - inthermo[1] ;
457 gMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ;
461 // ------- define the Al passive cooler
462 gMC->Gsvolu("PCOR", "BOX ", idtmed[701], emcg->GetCoolerHalfSize(), 3) ;
463 Float_t * cooler = emcg->GetCoolerHalfSize() ;
464 y = cooler[1] - agap[1] ;
466 gMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ;
468 // ------- define the outer thermoinsulating cover
469 gMC->Gsvolu("PTIO", "TRD1", idtmed[706], emcg->GetOuterThermoParams(), 4) ;
470 Float_t * outparams = emcg->GetOuterThermoParams() ;
473 AliMatrix(idrotm[1], 90.0, 0.0, 0.0, 0.0, 90.0, 270.0) ;
474 // Frame in outer thermoinsulation and so on: z out of beam, y along beam, x across beam
476 z = outparams[3] - cooler[1] ;
477 gMC->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ;
479 // -------- Define the outer Aluminium cover -----
480 gMC->Gsvolu("PCOL", "TRD1", idtmed[701], emcg->GetAlCoverParams(), 4) ;
481 Float_t * covparams = emcg->GetAlCoverParams() ;
482 z = covparams[3] - outparams[3] ;
483 gMC->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
485 // --------- Define front fiberglass cover -----------
486 gMC->Gsvolu("PFGC", "BOX ", idtmed[717], emcg->GetFiberGlassHalfSize(), 3) ;
488 gMC->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
490 //=============This is all with cold section==============
493 //------ Warm Section --------------
494 gMC->Gsvolu("PWAR", "BOX ", idtmed[701], emcg->GetWarmAlCoverHalfSize(), 3) ;
495 Float_t * warmcov = emcg->GetWarmAlCoverHalfSize() ;
497 // --- Define the outer thermoinsulation ---
498 gMC->Gsvolu("PWTI", "BOX ", idtmed[706], emcg->GetWarmThermoHalfSize(), 3) ;
499 Float_t * warmthermo = emcg->GetWarmThermoHalfSize() ;
500 z = -warmcov[2] + warmthermo[2] ;
502 gMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ;
504 // --- Define cables area and put in it T-supports ----
505 gMC->Gsvolu("PCA1", "BOX ", idtmed[718], emcg->GetTCables1HalfSize(), 3) ;
506 Float_t * cbox = emcg->GetTCables1HalfSize() ;
508 gMC->Gsvolu("PBE1", "BOX ", idtmed[701], emcg->GetTSupport1HalfSize(), 3) ;
509 Float_t * beams = emcg->GetTSupport1HalfSize() ;
511 for(isup = 0; isup < emcg->GetNTSuppots(); isup++){
512 Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ;
513 gMC->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY") ;
516 z = -warmthermo[2] + cbox[2] ;
517 gMC->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
519 gMC->Gsvolu("PCA2", "BOX ", idtmed[718], emcg->GetTCables2HalfSize(), 3) ;
520 Float_t * cbox2 = emcg->GetTCables2HalfSize() ;
522 gMC->Gsvolu("PBE2", "BOX ", idtmed[701], emcg->GetTSupport2HalfSize(), 3) ;
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("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY") ;
528 z = -warmthermo[2] + 2*cbox[2] + cbox2[2];
529 gMC->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;
532 // --- Define frame ---
533 gMC->Gsvolu("PFRX", "BOX ", idtmed[716], emcg->GetFrameXHalfSize(), 3) ;
534 Float_t * posit = emcg->GetFrameXPosition() ;
535 gMC->Gspos("PFRX", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
536 gMC->Gspos("PFRX", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
538 gMC->Gsvolu("PFRZ", "BOX ", idtmed[716], emcg->GetFrameZHalfSize(), 3) ;
539 posit = emcg->GetFrameZPosition() ;
540 gMC->Gspos("PFRZ", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
541 gMC->Gspos("PFRZ", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
543 // --- Define Fiber Glass support ---
544 gMC->Gsvolu("PFG1", "BOX ", idtmed[717], emcg->GetFGupXHalfSize(), 3) ;
545 posit = emcg->GetFGupXPosition() ;
546 gMC->Gspos("PFG1", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
547 gMC->Gspos("PFG1", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
549 gMC->Gsvolu("PFG2", "BOX ", idtmed[717], emcg->GetFGupZHalfSize(), 3) ;
550 posit = emcg->GetFGupZPosition() ;
551 gMC->Gspos("PFG2", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
552 gMC->Gspos("PFG2", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
554 gMC->Gsvolu("PFG3", "BOX ", idtmed[717], emcg->GetFGlowXHalfSize(), 3) ;
555 posit = emcg->GetFGlowXPosition() ;
556 gMC->Gspos("PFG3", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
557 gMC->Gspos("PFG3", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
559 gMC->Gsvolu("PFG4", "BOX ", idtmed[717], emcg->GetFGlowZHalfSize(), 3) ;
560 posit = emcg->GetFGlowZPosition() ;
561 gMC->Gspos("PFG4", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
562 gMC->Gspos("PFG4", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
564 // --- Define Air Gap for FEE electronics -----
566 gMC->Gsvolu("PAFE", "BOX ", idtmed[798], emcg->GetFEEAirHalfSize(), 3) ;
567 posit = emcg->GetFEEAirPosition() ;
568 gMC->Gspos("PAFE", 1, "PWTI", posit[0], posit[1], posit[2], 0, "ONLY") ;
570 // Define the EMC module volume and combine Cool and Warm sections
572 gMC->Gsvolu("PEMC", "TRD1", idtmed[798], emcg->GetEMCParams(), 4) ;
575 gMC->Gspos("PCOL", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
577 gMC->Gspos("PWAR", 1, "PEMC", 0., 0., z, 0, "ONLY") ;
580 // Put created EMC geometry into PHOS volume
582 z = geom->GetCPVBoxSize(1) / 2. ;
583 gMC->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ;
587 //____________________________________________________________________________
588 void AliPHOSv0::CreateGeometryforCPV()
590 // Create the PHOS-CPV geometry for GEANT
591 // Author: Yuri Kharlov 11 September 2000
595 Geant3 geometry of PHOS-CPV in ALICE
600 <td>CPV perspective view</td>
601 <td>CPV front view </td>
605 <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td>
606 <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td>
610 <td>One CPV module, perspective view </td>
611 <td>One CPV module, front view (extended in vertical direction) </td>
615 <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td>
616 <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td>
622 Geant3 geometry tree of PHOS-CPV in ALICE
625 <img height=300 width=290 src="../images/CPVtree.gif">
630 Float_t par[3], x,y,z;
632 // Get pointer to the array containing media indexes
633 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
635 AliPHOSGeometry * geom = GetGeometry() ;
637 // The box containing all CPV for one PHOS module filled with air
638 par[0] = geom->GetCPVBoxSize(0) / 2.0 ;
639 par[1] = geom->GetCPVBoxSize(1) / 2.0 ;
640 par[2] = geom->GetCPVBoxSize(2) / 2.0 ;
641 gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ;
643 Float_t * emcParams = geom->GetEMCAGeometry()->GetEMCParams() ;
646 AliMatrix(rotm, 90.,0., 0., 0., 90., 90.) ;
648 gMC->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ;
652 par[0] = geom->GetGassiplexChipSize(0)/2.;
653 par[1] = geom->GetGassiplexChipSize(1)/2.;
654 par[2] = geom->GetGassiplexChipSize(2)/2.;
655 gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3);
657 // Cu+Ni foil covers Gassiplex board
659 par[1] = geom->GetCPVCuNiFoilThickness()/2;
660 gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3);
661 y = -(geom->GetGassiplexChipSize(1)/2 - par[1]);
662 gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY");
664 // Position of the chip inside CPV
666 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
667 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
669 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
670 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
671 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
672 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
673 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
675 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
676 gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY");
680 // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni)
682 par[0] = geom->GetCPVActiveSize(0) / 2;
683 par[1] = geom->GetCPVTextoliteThickness() / 2;
684 par[2] = geom->GetCPVActiveSize(1) / 2;
685 gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3);
689 par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2;
690 gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3);
692 for (Int_t i=0; i<4; i++) {
693 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2;
694 gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY");
696 y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2;
697 gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY");
701 // Dummy sensitive plane in the middle of argone gas volume
704 gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3);
705 gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY");
707 // Cu+Ni foil covers textolite
709 par[1] = geom->GetCPVCuNiFoilThickness() / 2;
710 gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3);
711 y = geom->GetCPVTextoliteThickness()/2 - par[1];
712 gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY");
714 // Aluminum frame around CPV
716 par[0] = geom->GetCPVFrameSize(0)/2;
717 par[1] = geom->GetCPVFrameSize(1)/2;
718 par[2] = geom->GetCPVBoxSize(2) /2;
719 gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3);
721 par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0);
722 par[1] = geom->GetCPVFrameSize(1)/2;
723 par[2] = geom->GetCPVFrameSize(2)/2;
724 gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3);
726 for (Int_t j=0; j<=1; j++) {
727 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
728 gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY");
729 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
730 gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY");
736 //____________________________________________________________________________
737 void AliPHOSv0::CreateGeometryforSupport()
739 // Create the PHOS' support geometry for GEANT
743 Geant3 geometry of the PHOS's support
746 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif">
751 Float_t par[5], x0,y0,z0 ;
754 // Get pointer to the array containing media indexes
755 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
757 AliPHOSGeometry * geom = GetGeometry() ;
759 // --- Dummy box containing two rails on which PHOS support moves
760 // --- Put these rails to the bottom of the L3 magnet
762 par[0] = geom->GetRailRoadSize(0) / 2.0 ;
763 par[1] = geom->GetRailRoadSize(1) / 2.0 ;
764 par[2] = geom->GetRailRoadSize(2) / 2.0 ;
765 gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ;
767 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ;
768 gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ;
770 // --- Dummy box containing one rail
772 par[0] = geom->GetRailOuterSize(0) / 2.0 ;
773 par[1] = geom->GetRailOuterSize(1) / 2.0 ;
774 par[2] = geom->GetRailOuterSize(2) / 2.0 ;
775 gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ;
777 for (i=0; i<2; i++) {
778 x0 = (2*i-1) * geom->GetDistanceBetwRails() / 2.0 ;
779 gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ;
782 // --- Upper and bottom steel parts of the rail
784 par[0] = geom->GetRailPart1(0) / 2.0 ;
785 par[1] = geom->GetRailPart1(1) / 2.0 ;
786 par[2] = geom->GetRailPart1(2) / 2.0 ;
787 gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ;
789 y0 = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 ;
790 gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
791 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 - geom->GetRailPart3(1);
792 gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
794 // --- The middle vertical steel parts of the rail
796 par[0] = geom->GetRailPart2(0) / 2.0 ;
797 par[1] = geom->GetRailPart2(1) / 2.0 ;
798 par[2] = geom->GetRailPart2(2) / 2.0 ;
799 gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ;
801 y0 = - geom->GetRailPart3(1) / 2.0 ;
802 gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
804 // --- The most upper steel parts of the rail
806 par[0] = geom->GetRailPart3(0) / 2.0 ;
807 par[1] = geom->GetRailPart3(1) / 2.0 ;
808 par[2] = geom->GetRailPart3(2) / 2.0 ;
809 gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ;
811 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart3(1)) / 2.0 ;
812 gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
814 // --- The wall of the cradle
815 // --- The wall is empty: steel thin walls and air inside
817 par[1] = TMath::Sqrt(TMath::Power((geom->GetIPtoCPVDistance() + geom->GetOuterBoxSize(3)),2) +
818 TMath::Power((geom->GetOuterBoxSize(1)/2),2))+10. ;
819 par[0] = par[1] - geom->GetCradleWall(1) ;
820 par[2] = geom->GetCradleWall(2) / 2.0 ;
821 par[3] = geom->GetCradleWall(3) ;
822 par[4] = geom->GetCradleWall(4) ;
823 gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ;
825 par[0] -= geom->GetCradleWallThickness() ;
826 par[1] -= geom->GetCradleWallThickness() ;
827 par[2] -= geom->GetCradleWallThickness() ;
828 gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ;
829 gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
831 for (i=0; i<2; i++) {
832 z0 = (2*i-1) * (geom->GetOuterBoxSize(2) + geom->GetCradleWall(2) )/ 2.0 ;
833 gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ;
836 // --- The "wheels" of the cradle
838 par[0] = geom->GetCradleWheel(0) / 2;
839 par[1] = geom->GetCradleWheel(1) / 2;
840 par[2] = geom->GetCradleWheel(2) / 2;
841 gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ;
843 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) -
844 geom->GetCradleWheel(1)/2) ;
845 for (i=0; i<2; i++) {
846 z0 = (2*i-1) * ((geom->GetOuterBoxSize(2) + geom->GetCradleWheel(2))/ 2.0 +
847 geom->GetCradleWall(2));
848 for (j=0; j<2; j++) {
850 x0 = (2*j-1) * geom->GetDistanceBetwRails() / 2.0 ;
851 gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ;
857 //____________________________________________________________________________
858 Float_t AliPHOSv0::ZMin(void) const
860 // Overall dimension of the PHOS (min)
862 AliPHOSGeometry * geom = GetGeometry() ;
864 return -geom->GetOuterBoxSize(2)/2.;
867 //____________________________________________________________________________
868 Float_t AliPHOSv0::ZMax(void) const
870 // Overall dimension of the PHOS (max)
872 AliPHOSGeometry * geom = GetGeometry() ;
874 return geom->GetOuterBoxSize(2)/2.;
877 //____________________________________________________________________________
878 void AliPHOSv0::Init(void)
880 // Just prints an information message
885 printf("\n%s: ",ClassName());
886 for(i=0;i<35;i++) printf("*");
887 printf(" PHOS_INIT ");
888 for(i=0;i<35;i++) printf("*");
889 printf("\n%s: ",ClassName());
892 // Here the PHOS initialisation code (if any!)
894 AliPHOSGeometry * geom = GetGeometry() ;
897 cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << geom->GetName() << endl ;
899 cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ;
901 for(i=0;i<80;i++) printf("*");