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 // Layout EMC + PPSD has name GPS2
21 // Layout EMC + CPV has name IHEP
22 // An object of this class does not produce hits nor digits
23 // It is the one to use if you do not want to produce outputs in TREEH or TREED
25 //*-- Author: Yves Schutz (SUBATECH)
28 // --- ROOT system ---
33 #include "TGeometry.h"
36 // --- Standard library ---
41 #include <strstream.h>
43 // --- AliRoot header files ---
45 #include "AliPHOSv0.h"
52 //____________________________________________________________________________
53 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
56 // ctor : title is used to identify the layout
57 // GPS2 = 5 modules (EMC + PPSD)
59 // gets an instance of the geometry parameters class
61 if (strcmp(GetTitle(),"") != 0 )
62 fGeom = AliPHOSGeometry::GetInstance(GetTitle(), "") ;
66 //____________________________________________________________________________
67 void AliPHOSv0::BuildGeometry()
69 // Build the PHOS geometry for the ROOT display
73 PHOS in ALICE displayed by root
79 <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
84 <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
89 <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
94 <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
100 this->BuildGeometryforPHOS() ;
101 if ( ( strcmp(fGeom->GetName(), "GPS2" ) == 0 ) )
102 this->BuildGeometryforPPSD() ;
103 else if ( ( strcmp(fGeom->GetName(), "IHEP" ) == 0 ) )
104 this->BuildGeometryforCPV() ;
106 cout << "AliPHOSv0::BuildGeometry : no charged particle identification system installed" << endl;
110 //____________________________________________________________________________
111 void AliPHOSv0:: BuildGeometryforPHOS(void)
113 // Build the PHOS-EMC geometry for the ROOT display
115 const Int_t kColorPHOS = kRed ;
116 const Int_t kColorXTAL = kBlue ;
118 Double_t const kRADDEG = 180.0 / kPI ;
120 new TBRIK( "OuterBox", "PHOS box", "void", fGeom->GetOuterBoxSize(0)/2,
121 fGeom->GetOuterBoxSize(1)/2,
122 fGeom->GetOuterBoxSize(2)/2 );
124 // Textolit Wall box, position inside PHOS
126 new TBRIK( "TextolitBox", "PHOS Textolit box ", "void", fGeom->GetTextolitBoxSize(0)/2,
127 fGeom->GetTextolitBoxSize(1)/2,
128 fGeom->GetTextolitBoxSize(2)/2);
130 // Polystyrene Foam Plate
132 new TBRIK( "UpperFoamPlate", "PHOS Upper foam plate", "void", fGeom->GetTextolitBoxSize(0)/2,
133 fGeom->GetSecondUpperPlateThickness()/2,
134 fGeom->GetTextolitBoxSize(2)/2 ) ;
138 new TBRIK( "AirFilledBox", "PHOS air filled box", "void", fGeom->GetAirFilledBoxSize(0)/2,
139 fGeom->GetAirFilledBoxSize(1)/2,
140 fGeom->GetAirFilledBoxSize(2)/2 );
144 Float_t xtlX = fGeom->GetCrystalSize(0) ;
145 Float_t xtlY = fGeom->GetCrystalSize(1) ;
146 Float_t xtlZ = fGeom->GetCrystalSize(2) ;
148 Float_t xl = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ;
149 Float_t yl = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0
150 + fGeom->GetModuleBoxThickness() / 2.0 ;
151 Float_t zl = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ;
153 new TBRIK( "CrystalsBox", "PHOS crystals box", "void", xl, yl, zl ) ;
155 // position PHOS into ALICE
157 Float_t r = fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1) / 2.0 ;
159 Float_t pphi = TMath::ATan( fGeom->GetOuterBoxSize(0) / ( 2.0 * fGeom->GetIPtoOuterCoverDistance() ) ) ;
161 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
163 char * nodename = new char[20] ;
164 char * rotname = new char[20] ;
166 for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) {
167 Float_t angle = pphi * 2 * ( i - fGeom->GetNModules() / 2.0 - 0.5 ) ;
168 sprintf(rotname, "%s%d", "rot", number++) ;
169 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
171 sprintf(nodename,"%s%d", "Module", i) ;
172 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
173 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
174 TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
175 outerboxnode->SetLineColor(kColorPHOS) ;
176 fNodes->Add(outerboxnode) ;
178 // now inside the outer box the textolit box
179 y = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ;
180 sprintf(nodename,"%s%d", "TexBox", i) ;
181 TNode * textolitboxnode = new TNode(nodename, nodename, "TextolitBox", 0, y, 0) ;
182 textolitboxnode->SetLineColor(kColorPHOS) ;
183 fNodes->Add(textolitboxnode) ;
184 // upper foam plate inside outre box
186 sprintf(nodename, "%s%d", "UFPlate", i) ;
187 y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ;
188 TNode * upperfoamplatenode = new TNode(nodename, nodename, "UpperFoamPlate", 0, y, 0) ;
189 upperfoamplatenode->SetLineColor(kColorPHOS) ;
190 fNodes->Add(upperfoamplatenode) ;
191 // air filled box inside textolit box (not drawn)
192 textolitboxnode->cd();
193 y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ;
194 sprintf(nodename, "%s%d", "AFBox", i) ;
195 TNode * airfilledboxnode = new TNode(nodename, nodename, "AirFilledBox", 0, y, 0) ;
196 fNodes->Add(airfilledboxnode) ;
197 // crystals box inside air filled box
198 airfilledboxnode->cd() ;
199 y = fGeom->GetAirFilledBoxSize(1) / 2.0 - yl
200 - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness()
201 - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ;
202 sprintf(nodename, "%s%d", "XTBox", i) ;
203 TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, y, 0) ;
204 crystalsboxnode->SetLineColor(kColorXTAL) ;
205 fNodes->Add(crystalsboxnode) ;
212 //____________________________________________________________________________
213 void AliPHOSv0:: BuildGeometryforPPSD(void)
215 // Build the PHOS-PPSD geometry for the ROOT display
219 PPSD displayed by root
222 <LI> Zoom on PPSD: Front View
225 <IMG Align=BOTTOM ALT="PPSD Front View" SRC="../images/AliPHOSv0PPSDFrontView.gif">
227 <LI> Zoom on PPSD: Perspective View
230 <IMG Align=BOTTOM ALT="PPSD Prespective View" SRC="../images/AliPHOSv0PPSDPerspectiveView.gif">
235 Double_t const kRADDEG = 180.0 / kPI ;
237 const Int_t kColorPHOS = kRed ;
238 const Int_t kColorPPSD = kGreen ;
239 const Int_t kColorGas = kBlue ;
240 const Int_t kColorAir = kYellow ;
242 // Box for a full PHOS module
244 new TBRIK( "PPSDBox", "PPSD box", "void", fGeom->GetCPVBoxSize(0)/2,
245 fGeom->GetCPVBoxSize(1)/2,
246 fGeom->GetCPVBoxSize(2)/2 );
248 // Box containing one micromegas module
250 new TBRIK( "PPSDModule", "PPSD module", "void", fGeom->GetPPSDModuleSize(0)/2,
251 fGeom->GetPPSDModuleSize(1)/2,
252 fGeom->GetPPSDModuleSize(2)/2 );
255 new TBRIK ( "TopLid", "Micromegas top lid", "void", fGeom->GetPPSDModuleSize(0)/2,
256 fGeom->GetLidThickness()/2,
257 fGeom->GetPPSDModuleSize(2)/2 ) ;
258 // composite panel (top and bottom)
260 new TBRIK ( "TopPanel", "Composite top panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
261 fGeom->GetCompositeThickness()/2,
262 ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
264 new TBRIK ( "BottomPanel", "Composite bottom panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
265 fGeom->GetCompositeThickness()/2,
266 ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
267 // gas gap (conversion and avalanche)
269 new TBRIK ( "GasGap", "gas gap", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
270 ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() )/2,
271 ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
275 new TBRIK ( "Anode", "Anode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
276 fGeom->GetAnodeThickness()/2,
277 ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
279 new TBRIK ( "Cathode", "Cathode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
280 fGeom->GetCathodeThickness()/2,
281 ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
284 new TBRIK ( "PCBoard", "Printed Circuit", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
285 fGeom->GetPCThickness()/2,
286 ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
287 // Gap between Lead and top micromegas
289 new TBRIK ( "LeadToM", "Air Gap top", "void", fGeom->GetCPVBoxSize(0)/2,
290 fGeom->GetMicro1ToLeadGap()/2,
291 fGeom->GetCPVBoxSize(2)/2 ) ;
293 // Gap between Lead and bottom micromegas
295 new TBRIK ( "MToLead", "Air Gap bottom", "void", fGeom->GetCPVBoxSize(0)/2,
296 fGeom->GetLeadToMicro2Gap()/2,
297 fGeom->GetCPVBoxSize(2)/2 ) ;
300 new TBRIK ( "Lead", "Lead converter", "void", fGeom->GetCPVBoxSize(0)/2,
301 fGeom->GetLeadConverterThickness()/2,
302 fGeom->GetCPVBoxSize(2)/2 ) ;
304 // position PPSD into ALICE
306 char * nodename = new char[20] ;
307 char * rotname = new char[20] ;
309 Float_t r = fGeom->GetIPtoTopLidDistance() + fGeom->GetCPVBoxSize(1) / 2.0 ;
311 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
313 for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { // the number of PHOS modules
314 Float_t angle = fGeom->GetPHOSAngle(i) ;
315 sprintf(rotname, "%s%d", "rotg", number++) ;
316 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
318 sprintf(nodename, "%s%d", "Moduleg", i) ;
319 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
320 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
321 TNode * ppsdboxnode = new TNode(nodename , nodename ,"PPSDBox", x, y, 0, rotname ) ;
322 ppsdboxnode->SetLineColor(kColorPPSD) ;
323 fNodes->Add(ppsdboxnode) ;
325 // inside the PPSD box:
326 // 1. fNumberOfModulesPhi x fNumberOfModulesZ top micromegas
327 x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ;
329 for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module
330 Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ;
332 for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module
333 y = ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ;
334 sprintf(nodename, "%s%d%d%d", "Mic1", i, iphi, iz) ;
335 micro1node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ;
336 micro1node->SetLineColor(kColorPPSD) ;
337 fNodes->Add(micro1node) ;
338 // inside top micromegas
341 y = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ;
342 sprintf(nodename, "%s%d%d%d", "Lid", i, iphi, iz) ;
343 TNode * toplidnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ;
344 toplidnode->SetLineColor(kColorPPSD) ;
345 fNodes->Add(toplidnode) ;
346 // b. composite panel
347 y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
348 sprintf(nodename, "%s%d%d%d", "CompU", i, iphi, iz) ;
349 TNode * compupnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ;
350 compupnode->SetLineColor(kColorPPSD) ;
351 fNodes->Add(compupnode) ;
353 y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ;
354 sprintf(nodename, "%s%d%d%d", "Ano", i, iphi, iz) ;
355 TNode * anodenode = new TNode(nodename, nodename, "Anode", 0, y, 0) ;
356 anodenode->SetLineColor(kColorPHOS) ;
357 fNodes->Add(anodenode) ;
359 y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ;
360 sprintf(nodename, "%s%d%d%d", "GGap", i, iphi, iz) ;
361 TNode * ggapnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ;
362 ggapnode->SetLineColor(kColorGas) ;
363 fNodes->Add(ggapnode) ;
365 y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ;
366 sprintf(nodename, "%s%d%d%d", "Cathode", i, iphi, iz) ;
367 TNode * cathodenode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ;
368 cathodenode->SetLineColor(kColorPHOS) ;
369 fNodes->Add(cathodenode) ;
370 // g. printed circuit
371 y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ;
372 sprintf(nodename, "%s%d%d%d", "PC", i, iphi, iz) ;
373 TNode * pcnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ;
374 pcnode->SetLineColor(kColorPPSD) ;
375 fNodes->Add(pcnode) ;
376 // h. composite panel
377 y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
378 sprintf(nodename, "%s%d%d%d", "CompDown", i, iphi, iz) ;
379 TNode * compdownnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ;
380 compdownnode->SetLineColor(kColorPPSD) ;
381 fNodes->Add(compdownnode) ;
382 z = z - fGeom->GetPPSDModuleSize(2) ;
384 } // end of Z module loop
385 x = x - fGeom->GetPPSDModuleSize(0) ;
387 } // end of phi module loop
391 y = ( fGeom->GetCPVBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ;
392 sprintf(nodename, "%s%d", "GapUp", i) ;
393 TNode * gapupnode = new TNode(nodename, nodename, "LeadToM", 0, y, 0) ;
394 gapupnode->SetLineColor(kColorAir) ;
395 fNodes->Add(gapupnode) ;
397 y = y - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ;
398 sprintf(nodename, "%s%d", "LeadC", i) ;
399 TNode * leadcnode = new TNode(nodename, nodename, "Lead", 0, y, 0) ;
400 leadcnode->SetLineColor(kColorPPSD) ;
401 fNodes->Add(leadcnode) ;
403 y = y - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ;
404 sprintf(nodename, "%s%d", "GapDown", i) ;
405 TNode * gapdownnode = new TNode(nodename, nodename, "MToLead", 0, y, 0) ;
406 gapdownnode->SetLineColor(kColorAir) ;
407 fNodes->Add(gapdownnode) ;
408 // 5. fNumberOfModulesPhi x fNumberOfModulesZ bottom micromegas
409 x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. - fGeom->GetPhiDisplacement() ;
411 for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) {
412 Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. - fGeom->GetZDisplacement() ;;
414 for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) {
415 y = - ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ;
416 sprintf(nodename, "%s%d%d%d", "Mic2", i, iphi, iz) ;
417 micro2node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ;
418 micro2node->SetLineColor(kColorPPSD) ;
419 fNodes->Add(micro2node) ;
420 // inside bottom micromegas
423 y = ( fGeom->GetMicromegas2Thickness() - fGeom->GetLidThickness() ) / 2. ;
424 sprintf(nodename, "%s%d", "Lidb", i) ;
425 TNode * toplidbnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ;
426 toplidbnode->SetLineColor(kColorPPSD) ;
427 fNodes->Add(toplidbnode) ;
428 // b. composite panel
429 y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
430 sprintf(nodename, "%s%d", "CompUb", i) ;
431 TNode * compupbnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ;
432 compupbnode->SetLineColor(kColorPPSD) ;
433 fNodes->Add(compupbnode) ;
435 y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ;
436 sprintf(nodename, "%s%d", "Anob", i) ;
437 TNode * anodebnode = new TNode(nodename, nodename, "Anode", 0, y, 0) ;
438 anodebnode->SetLineColor(kColorPPSD) ;
439 fNodes->Add(anodebnode) ;
441 y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ;
442 sprintf(nodename, "%s%d", "GGapb", i) ;
443 TNode * ggapbnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ;
444 ggapbnode->SetLineColor(kColorGas) ;
445 fNodes->Add(ggapbnode) ;
447 y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ;
448 sprintf(nodename, "%s%d", "Cathodeb", i) ;
449 TNode * cathodebnode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ;
450 cathodebnode->SetLineColor(kColorPPSD) ;
451 fNodes->Add(cathodebnode) ;
452 // g. printed circuit
453 y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ;
454 sprintf(nodename, "%s%d", "PCb", i) ;
455 TNode * pcbnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ;
456 pcbnode->SetLineColor(kColorPPSD) ;
457 fNodes->Add(pcbnode) ;
459 y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
460 sprintf(nodename, "%s%d", "CompDownb", i) ;
461 TNode * compdownbnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ;
462 compdownbnode->SetLineColor(kColorPPSD) ;
463 fNodes->Add(compdownbnode) ;
464 z = z - fGeom->GetPPSDModuleSize(2) ;
466 } // end of Z module loop
467 x = x - fGeom->GetPPSDModuleSize(0) ;
469 } // end of phi module loop
478 //____________________________________________________________________________
479 void AliPHOSv0:: BuildGeometryforCPV(void)
481 // Build the PHOS-CPV geometry for the ROOT display
482 // Author: Yuri Kharlov 11 September 2000
487 CPV displayed by root
492 <td>CPV perspective view</td>
493 <td>CPV front view </td>
497 <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td>
498 <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td>
506 const Double_t kRADDEG = 180.0 / kPI ;
507 const Int_t kColorCPV = kGreen ;
508 const Int_t kColorFrame = kYellow ;
509 const Int_t kColorGassiplex = kRed;
510 const Int_t kColorPCB = kCyan;
512 // Box for a full PHOS module
514 new TBRIK ("CPVBox", "CPV box", "void", fGeom->GetCPVBoxSize(0)/2,
515 fGeom->GetCPVBoxSize(1)/2,
516 fGeom->GetCPVBoxSize(2)/2 );
517 new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", fGeom->GetCPVFrameSize(0)/2,
518 fGeom->GetCPVFrameSize(1)/2,
519 fGeom->GetCPVBoxSize(2)/2 );
520 new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", fGeom->GetCPVBoxSize(0)/2 - fGeom->GetCPVFrameSize(0),
521 fGeom->GetCPVFrameSize(1)/2,
522 fGeom->GetCPVFrameSize(2)/2);
523 new TBRIK ("CPVPCB", "CPV PCB", "void", fGeom->GetCPVActiveSize(0)/2,
524 fGeom->GetCPVTextoliteThickness()/2,
525 fGeom->GetCPVActiveSize(1)/2);
526 new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", fGeom->GetGassiplexChipSize(0)/2,
527 fGeom->GetGassiplexChipSize(1)/2,
528 fGeom->GetGassiplexChipSize(2)/2);
530 // position CPV into ALICE
532 char * nodename = new char[25] ;
533 char * rotname = new char[25] ;
535 Float_t r = fGeom->GetIPtoCPVDistance() + fGeom->GetCPVBoxSize(1) / 2.0 ;
537 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
538 for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { // the number of PHOS modules
542 Float_t angle = fGeom->GetPHOSAngle(i) ;
543 sprintf(rotname, "%s%d", "rotg", number++) ;
544 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
546 sprintf(nodename, "%s%d", "CPVModule", i) ;
547 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
548 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
550 TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ;
551 cpvBoxNode->SetLineColor(kColorCPV) ;
552 fNodes->Add(cpvBoxNode) ;
555 // inside each CPV box:
559 for (j=0; j<=1; j++) {
560 sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ;
561 x = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(0) - fGeom->GetCPVFrameSize(0)) / 2;
562 TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ;
563 cpvFrameNode->SetLineColor(kColorFrame) ;
564 fNodes->Add(cpvFrameNode) ;
566 sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ;
567 z = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(2) - fGeom->GetCPVFrameSize(2)) / 2;
568 cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ;
569 cpvFrameNode->SetLineColor(kColorFrame) ;
570 fNodes->Add(cpvFrameNode) ;
573 // 4 printed circuit boards
574 for (j=0; j<4; j++) {
575 sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ;
576 y = fGeom->GetCPVFrameSize(1) / 2 - fGeom->GetFTPosition(j) + fGeom->GetCPVTextoliteThickness()/2;
577 TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ;
578 cpvPCBNode->SetLineColor(kColorPCB) ;
579 fNodes->Add(cpvPCBNode) ;
583 Float_t xStep = fGeom->GetCPVActiveSize(0) / (fGeom->GetNumberOfCPVChipsPhi() + 1);
584 Float_t zStep = fGeom->GetCPVActiveSize(1) / (fGeom->GetNumberOfCPVChipsZ() + 1);
585 y = fGeom->GetCPVFrameSize(1)/2 - fGeom->GetFTPosition(0) +
586 fGeom->GetCPVTextoliteThickness() / 2 + fGeom->GetGassiplexChipSize(1) / 2 + 0.1;
587 for (Int_t ix=0; ix<fGeom->GetNumberOfCPVChipsPhi(); ix++) {
588 x = xStep * (ix+1) - fGeom->GetCPVActiveSize(0)/2;
589 for (Int_t iz=0; iz<fGeom->GetNumberOfCPVChipsZ(); iz++) {
590 z = zStep * (iz+1) - fGeom->GetCPVActiveSize(1)/2;
591 sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ;
592 TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ;
593 cpvGassiplexNode->SetLineColor(kColorGassiplex) ;
594 fNodes->Add(cpvGassiplexNode) ;
604 //____________________________________________________________________________
605 void AliPHOSv0::CreateGeometry()
607 // Create the PHOS geometry for Geant
609 AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ;
611 if ( phostmp == NULL ) {
613 fprintf(stderr, "PHOS detector not found!\n") ;
617 // Get pointer to the array containing media indeces
618 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
621 bigbox[0] = fGeom->GetOuterBoxSize(0) / 2.0 ;
622 bigbox[1] = ( fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) / 2.0 ;
623 bigbox[2] = fGeom->GetOuterBoxSize(2) / 2.0 ;
625 gMC->Gsvolu("PHOS", "BOX ", idtmed[798], bigbox, 3) ;
627 this->CreateGeometryforPHOS() ;
628 if ( strcmp( fGeom->GetName(), "GPS2") == 0 )
629 this->CreateGeometryforPPSD() ;
630 else if ( strcmp( fGeom->GetName(), "IHEP") == 0 )
631 this->CreateGeometryforCPV() ;
633 cout << "AliPHOSv0::CreateGeometry : no charged particle identification system installed" << endl;
634 this->CreateGeometryforSupport() ;
636 // --- Position PHOS mdules in ALICE setup ---
639 Double_t const kRADDEG = 180.0 / kPI ;
641 for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) {
643 Float_t angle = fGeom->GetPHOSAngle(i) ;
644 AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ;
646 Float_t r = fGeom->GetIPtoOuterCoverDistance() + ( fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) / 2.0 ;
648 Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
649 Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
651 gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ;
657 //____________________________________________________________________________
658 void AliPHOSv0::CreateGeometryforPHOS()
660 // Create the PHOS-EMC geometry for GEANT
664 Geant3 geometry tree of PHOS-EMC in ALICE
667 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif">
672 // Get pointer to the array containing media indexes
673 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
676 // --- Define PHOS box volume, fPUFPill with thermo insulating foam ---
677 // --- Foam Thermo Insulating outer cover dimensions ---
678 // --- Put it in bigbox = PHOS
681 dphos[0] = fGeom->GetOuterBoxSize(0) / 2.0 ;
682 dphos[1] = fGeom->GetOuterBoxSize(1) / 2.0 ;
683 dphos[2] = fGeom->GetOuterBoxSize(2) / 2.0 ;
685 gMC->Gsvolu("EMCA", "BOX ", idtmed[706], dphos, 3) ;
687 Float_t yO = - fGeom->GetCPVBoxSize(1) / 2.0 ;
689 gMC->Gspos("EMCA", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ;
692 // --- Define Textolit Wall box, position inside EMCA ---
693 // --- Textolit Wall box dimentions ---
697 dptxw[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ;
698 dptxw[1] = fGeom->GetTextolitBoxSize(1) / 2.0 ;
699 dptxw[2] = fGeom->GetTextolitBoxSize(2) / 2.0 ;
701 gMC->Gsvolu("PTXW", "BOX ", idtmed[707], dptxw, 3);
703 yO = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ;
705 gMC->Gspos("PTXW", 1, "EMCA", 0.0, yO, 0.0, 0, "ONLY") ;
708 // --- Define Upper Polystyrene Foam Plate, place inside PTXW ---
709 // --- immediately below Foam Thermo Insulation Upper plate ---
711 // --- Upper Polystyrene Foam plate thickness ---
714 dpufp[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ;
715 dpufp[1] = fGeom->GetSecondUpperPlateThickness() / 2. ;
716 dpufp[2] = fGeom->GetTextolitBoxSize(2) /2.0 ;
718 gMC->Gsvolu("PUFP", "BOX ", idtmed[703], dpufp, 3) ;
720 yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ;
722 gMC->Gspos("PUFP", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ;
725 // --- Define air-filled box, place inside PTXW ---
726 // --- Inner AIR volume dimensions ---
730 dpair[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ;
731 dpair[1] = fGeom->GetAirFilledBoxSize(1) / 2.0 ;
732 dpair[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ;
734 gMC->Gsvolu("PAIR", "BOX ", idtmed[798], dpair, 3) ;
736 yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ;
738 gMC->Gspos("PAIR", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ;
740 // --- Dimensions of PbWO4 crystal ---
742 Float_t xtlX = fGeom->GetCrystalSize(0) ;
743 Float_t xtlY = fGeom->GetCrystalSize(1) ;
744 Float_t xtlZ = fGeom->GetCrystalSize(2) ;
747 dptcb[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ;
748 dptcb[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0
749 + fGeom->GetModuleBoxThickness() / 2.0 ;
750 dptcb[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ;
752 gMC->Gsvolu("PTCB", "BOX ", idtmed[706], dptcb, 3) ;
754 yO = fGeom->GetAirFilledBoxSize(1) / 2.0 - dptcb[1]
755 - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness()
756 - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ;
758 gMC->Gspos("PTCB", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
761 // --- Define Crystal BLock filled with air, position it inside PTCB ---
764 dpcbl[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ;
765 dpcbl[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ;
766 dpcbl[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ;
768 gMC->Gsvolu("PCBL", "BOX ", idtmed[798], dpcbl, 3) ;
770 // --- Divide PCBL in X (phi) and Z directions --
771 gMC->Gsdvn("PROW", "PCBL", Int_t (fGeom->GetNPhi()), 1) ;
772 gMC->Gsdvn("PCEL", "PROW", Int_t (fGeom->GetNZ()), 3) ;
774 yO = -fGeom->GetModuleBoxThickness() / 2.0 ;
776 gMC->Gspos("PCBL", 1, "PTCB", 0.0, yO, 0.0, 0, "ONLY") ;
779 // --- Define STeel (actually, it's titanium) Cover volume, place inside PCEL
782 dpstc[0] = ( xtlX + 2 * fGeom->GetCrystalWrapThickness() ) / 2.0 ;
783 dpstc[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ;
784 dpstc[2] = ( xtlZ + 2 * fGeom->GetCrystalWrapThickness() + 2 * fGeom->GetCrystalHolderThickness() ) / 2.0 ;
786 gMC->Gsvolu("PSTC", "BOX ", idtmed[704], dpstc, 3) ;
788 gMC->Gspos("PSTC", 1, "PCEL", 0.0, 0.0, 0.0, 0, "ONLY") ;
791 // --- Define Tyvek volume, place inside PSTC ---
794 dppap[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ;
795 dppap[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ;
796 dppap[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ;
798 gMC->Gsvolu("PPAP", "BOX ", idtmed[702], dppap, 3) ;
800 yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0
801 - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ;
803 gMC->Gspos("PPAP", 1, "PSTC", 0.0, yO, 0.0, 0, "ONLY") ;
806 // --- Define PbWO4 crystal volume, place inside PPAP ---
809 dpxtl[0] = xtlX / 2.0 ;
810 dpxtl[1] = xtlY / 2.0 ;
811 dpxtl[2] = xtlZ / 2.0 ;
813 gMC->Gsvolu("PXTL", "BOX ", idtmed[699], dpxtl, 3) ;
815 yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 - xtlY / 2.0 - fGeom->GetCrystalWrapThickness() ;
817 gMC->Gspos("PXTL", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ;
820 // --- Define crystal support volume, place inside PPAP ---
823 dpsup[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ;
824 dpsup[1] = fGeom->GetCrystalSupportHeight() / 2.0 ;
825 dpsup[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ;
827 gMC->Gsvolu("PSUP", "BOX ", idtmed[798], dpsup, 3) ;
829 yO = fGeom->GetCrystalSupportHeight() / 2.0 - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ;
831 gMC->Gspos("PSUP", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ;
834 // --- Define PIN-diode volume and position it inside crystal support ---
835 // --- right behind PbWO4 crystal
837 // --- PIN-diode dimensions ---
841 dppin[0] = fGeom->GetPinDiodeSize(0) / 2.0 ;
842 dppin[1] = fGeom->GetPinDiodeSize(1) / 2.0 ;
843 dppin[2] = fGeom->GetPinDiodeSize(2) / 2.0 ;
845 gMC->Gsvolu("PPIN", "BOX ", idtmed[705], dppin, 3) ;
847 yO = fGeom->GetCrystalSupportHeight() / 2.0 - fGeom->GetPinDiodeSize(1) / 2.0 ;
849 gMC->Gspos("PPIN", 1, "PSUP", 0.0, yO, 0.0, 0, "ONLY") ;
852 // --- Define Upper Cooling Panel, place it on top of PTCB ---
854 // --- Upper Cooling Plate thickness ---
856 dpucp[0] = dptcb[0] ;
857 dpucp[1] = fGeom->GetUpperCoolingPlateThickness() ;
858 dpucp[2] = dptcb[2] ;
860 gMC->Gsvolu("PUCP", "BOX ", idtmed[701], dpucp,3) ;
862 yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetUpperCoolingPlateThickness() ) / 2.
863 - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness()
864 - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() - fGeom->GetUpperCoolingPlateThickness() ) ;
866 gMC->Gspos("PUCP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
869 // --- Define Al Support Plate, position it inside PAIR ---
870 // --- right beneath PTCB ---
871 // --- Al Support Plate thickness ---
874 dpasp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ;
875 dpasp[1] = fGeom->GetSupportPlateThickness() / 2.0 ;
876 dpasp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ;
878 gMC->Gsvolu("PASP", "BOX ", idtmed[701], dpasp, 3) ;
880 yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetSupportPlateThickness() ) / 2.
881 - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance()
882 - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 ) ;
884 gMC->Gspos("PASP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
887 // --- Define Thermo Insulating Plate, position it inside PAIR ---
888 // --- right beneath PASP ---
889 // --- Lower Thermo Insulating Plate thickness ---
892 dptip[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ;
893 dptip[1] = fGeom->GetLowerThermoPlateThickness() / 2.0 ;
894 dptip[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ;
896 gMC->Gsvolu("PTIP", "BOX ", idtmed[706], dptip, 3) ;
898 yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerThermoPlateThickness() ) / 2.
899 - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness()
900 - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness() ) ;
902 gMC->Gspos("PTIP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
905 // --- Define Textolit Plate, position it inside PAIR ---
906 // --- right beneath PTIP ---
907 // --- Lower Textolit Plate thickness ---
910 dptxp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ;
911 dptxp[1] = fGeom->GetLowerTextolitPlateThickness() / 2.0 ;
912 dptxp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ;
914 gMC->Gsvolu("PTXP", "BOX ", idtmed[707], dptxp, 3) ;
916 yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerTextolitPlateThickness() ) / 2.
917 - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness()
918 - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness()
919 + fGeom->GetLowerThermoPlateThickness() ) ;
921 gMC->Gspos("PTXP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
925 //____________________________________________________________________________
926 void AliPHOSv0::CreateGeometryforPPSD()
928 // Create the PHOS-PPSD geometry for GEANT
932 Geant3 geometry tree of PHOS-PPSD in ALICE
935 <IMG Align=BOTTOM ALT="PPSD geant tree" SRC="../images/PPSDinAlice.gif">
940 // Get pointer to the array containing media indexes
941 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
943 // The box containing all ppsd's for one PHOS module filled with air
945 ppsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ;
946 ppsd[1] = fGeom->GetCPVBoxSize(1) / 2.0 ;
947 ppsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ;
949 gMC->Gsvolu("PPSD", "BOX ", idtmed[798], ppsd, 3) ;
951 Float_t yO = fGeom->GetOuterBoxSize(1) / 2.0 ;
953 gMC->Gspos("PPSD", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ;
955 // Now we build a micromegas module
956 // The box containing the whole module filled with epoxy (FR4)
959 mppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ;
960 mppsd[1] = fGeom->GetPPSDModuleSize(1) / 2.0 ;
961 mppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ;
963 gMC->Gsvolu("MPPS", "BOX ", idtmed[708], mppsd, 3) ;
966 // 1. The Top Lid made of epoxy (FR4)
969 tlppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ;
970 tlppsd[1] = fGeom->GetLidThickness() / 2.0 ;
971 tlppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ;
973 gMC->Gsvolu("TLPS", "BOX ", idtmed[708], tlppsd, 3) ;
975 Float_t y0 = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ;
977 gMC->Gspos("TLPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ;
979 // 2. the upper panel made of composite material
982 upppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
983 upppsd[1] = fGeom->GetCompositeThickness() / 2.0 ;
984 upppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
986 gMC->Gsvolu("UPPS", "BOX ", idtmed[709], upppsd, 3) ;
988 y0 = y0 - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
990 gMC->Gspos("UPPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ;
992 // 3. the anode made of Copper
995 anppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
996 anppsd[1] = fGeom->GetAnodeThickness() / 2.0 ;
997 anppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
999 gMC->Gsvolu("ANPS", "BOX ", idtmed[710], anppsd, 3) ;
1001 y0 = y0 - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ;
1003 gMC->Gspos("ANPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ;
1005 // 4. the conversion gap + avalanche gap filled with gas
1008 ggppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
1009 ggppsd[1] = ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2.0 ;
1010 ggppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
1012 gMC->Gsvolu("GGPS", "BOX ", idtmed[715], ggppsd, 3) ;
1014 // --- Divide GGPP in X (phi) and Z directions --
1015 gMC->Gsdvn("GROW", "GGPS", fGeom->GetNumberOfPadsPhi(), 1) ;
1016 gMC->Gsdvn("GCEL", "GROW", fGeom->GetNumberOfPadsZ() , 3) ;
1018 y0 = y0 - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ;
1020 gMC->Gspos("GGPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ;
1023 // 6. the cathode made of Copper
1026 cappsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
1027 cappsd[1] = fGeom->GetCathodeThickness() / 2.0 ;
1028 cappsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
1030 gMC->Gsvolu("CAPS", "BOX ", idtmed[710], cappsd, 3) ;
1032 y0 = y0 - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ;
1034 gMC->Gspos("CAPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ;
1036 // 7. the printed circuit made of G10
1039 pcppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2,.0 ;
1040 pcppsd[1] = fGeom->GetPCThickness() / 2.0 ;
1041 pcppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
1043 gMC->Gsvolu("PCPS", "BOX ", idtmed[711], cappsd, 3) ;
1045 y0 = y0 - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ;
1047 gMC->Gspos("PCPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ;
1049 // 8. the lower panel made of composite material
1052 lpppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
1053 lpppsd[1] = fGeom->GetCompositeThickness() / 2.0 ;
1054 lpppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ;
1056 gMC->Gsvolu("LPPS", "BOX ", idtmed[709], lpppsd, 3) ;
1058 y0 = y0 - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
1060 gMC->Gspos("LPPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ;
1062 // Position the fNumberOfModulesPhi x fNumberOfModulesZ modules (mppsd) inside PPSD to cover a PHOS module
1063 // the top and bottom one's (which are assumed identical) :
1065 Float_t yt = ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ;
1066 Float_t yb = - ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ;
1068 Int_t copyNumbertop = 0 ;
1069 Int_t copyNumberbot = fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() ;
1071 Float_t x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ;
1073 for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module
1074 Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ;
1076 for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module
1077 gMC->Gspos("MPPS", ++copyNumbertop, "PPSD", x, yt, z, 0, "ONLY") ;
1078 gMC->Gspos("MPPS", ++copyNumberbot, "PPSD", x, yb, z, 0, "ONLY") ;
1079 z = z - fGeom->GetPPSDModuleSize(2) ;
1080 } // end of Z module loop
1081 x = x - fGeom->GetPPSDModuleSize(0) ;
1082 } // end of phi module loop
1084 // The Lead converter between two air gaps
1088 uappsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ;
1089 uappsd[1] = fGeom->GetMicro1ToLeadGap() / 2.0 ;
1090 uappsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ;
1092 gMC->Gsvolu("UAPPSD", "BOX ", idtmed[798], uappsd, 3) ;
1094 y0 = ( fGeom->GetCPVBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ;
1096 gMC->Gspos("UAPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ;
1098 // 2. Lead converter
1101 lcppsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ;
1102 lcppsd[1] = fGeom->GetLeadConverterThickness() / 2.0 ;
1103 lcppsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ;
1105 gMC->Gsvolu("LCPPSD", "BOX ", idtmed[712], lcppsd, 3) ;
1107 y0 = y0 - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ;
1109 gMC->Gspos("LCPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ;
1114 lappsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ;
1115 lappsd[1] = fGeom->GetLeadToMicro2Gap() / 2.0 ;
1116 lappsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ;
1118 gMC->Gsvolu("LAPPSD", "BOX ", idtmed[798], lappsd, 3) ;
1120 y0 = y0 - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ;
1122 gMC->Gspos("LAPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ;
1127 //____________________________________________________________________________
1128 void AliPHOSv0::CreateGeometryforCPV()
1130 // Create the PHOS-CPV geometry for GEANT
1131 // Author: Yuri Kharlov 11 September 2000
1135 Geant3 geometry of PHOS-CPV in ALICE
1140 <td>CPV perspective view</td>
1141 <td>CPV front view </td>
1145 <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td>
1146 <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td>
1150 <td>One CPV module, perspective view </td>
1151 <td>One CPV module, front view (extended in vertical direction) </td>
1155 <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td>
1156 <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td>
1162 Geant3 geometry tree of PHOS-CPV in ALICE
1165 <img height=300 width=290 src="../images/CPVtree.gif">
1170 Float_t par[3], x,y,z;
1172 // Get pointer to the array containing media indexes
1173 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
1175 // The box containing all CPV for one PHOS module filled with air
1176 par[0] = fGeom->GetCPVBoxSize(0) / 2.0 ;
1177 par[1] = fGeom->GetCPVBoxSize(1) / 2.0 ;
1178 par[2] = fGeom->GetCPVBoxSize(2) / 2.0 ;
1179 gMC->Gsvolu("CPV ", "BOX ", idtmed[798], par, 3) ;
1181 y = fGeom->GetOuterBoxSize(1) / 2.0 ;
1182 gMC->Gspos("CPV ", 1, "PHOS", 0.0, y, 0.0, 0, "ONLY") ;
1186 par[0] = fGeom->GetGassiplexChipSize(0)/2.;
1187 par[1] = fGeom->GetGassiplexChipSize(1)/2.;
1188 par[2] = fGeom->GetGassiplexChipSize(2)/2.;
1189 gMC->Gsvolu("CPVC","BOX ",idtmed[707],par,3);
1191 // Cu+Ni foil covers Gassiplex board
1193 par[1] = fGeom->GetCPVCuNiFoilThickness()/2;
1194 gMC->Gsvolu("CPVD","BOX ",idtmed[710],par,3);
1195 y = -(fGeom->GetGassiplexChipSize(1)/2 - par[1]);
1196 gMC->Gspos("CPVD",1,"CPVC",0,y,0,0,"ONLY");
1198 // Position of the chip inside CPV
1200 Float_t xStep = fGeom->GetCPVActiveSize(0) / (fGeom->GetNumberOfCPVChipsPhi() + 1);
1201 Float_t zStep = fGeom->GetCPVActiveSize(1) / (fGeom->GetNumberOfCPVChipsZ() + 1);
1203 y = fGeom->GetCPVFrameSize(1)/2 - fGeom->GetFTPosition(0) +
1204 fGeom->GetCPVTextoliteThickness() / 2 + fGeom->GetGassiplexChipSize(1) / 2 + 0.1;
1205 for (Int_t ix=0; ix<fGeom->GetNumberOfCPVChipsPhi(); ix++) {
1206 x = xStep * (ix+1) - fGeom->GetCPVActiveSize(0)/2;
1207 for (Int_t iz=0; iz<fGeom->GetNumberOfCPVChipsZ(); iz++) {
1209 z = zStep * (iz+1) - fGeom->GetCPVActiveSize(1)/2;
1210 gMC->Gspos("CPVC",copy,"CPV",x,y,z,0,"ONLY");
1214 // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni)
1216 par[0] = fGeom->GetCPVActiveSize(0) / 2;
1217 par[1] = fGeom->GetCPVTextoliteThickness() / 2;
1218 par[2] = fGeom->GetCPVActiveSize(1) / 2;
1219 gMC->Gsvolu("CPVF","BOX ",idtmed[707],par,3);
1223 par[1] = (fGeom->GetFTPosition(2) - fGeom->GetFTPosition(1) - fGeom->GetCPVTextoliteThickness()) / 2;
1224 gMC->Gsvolu("CPVG","BOX ",idtmed[715],par,3);
1226 for (Int_t i=0; i<4; i++) {
1227 y = fGeom->GetCPVFrameSize(1) / 2 - fGeom->GetFTPosition(i) + fGeom->GetCPVTextoliteThickness()/2;
1228 gMC->Gspos("CPVF",i+1,"CPV",0,y,0,0,"ONLY");
1230 y-= (fGeom->GetFTPosition(2) - fGeom->GetFTPosition(1)) / 2;
1231 gMC->Gspos("CPVG",1,"CPV ",0,y,0,0,"ONLY");
1235 // Dummy sensitive plane in the middle of argone gas volume
1238 gMC->Gsvolu("CPVQ","BOX ",idtmed[715],par,3);
1239 gMC->Gspos ("CPVQ",1,"CPVG",0,0,0,0,"ONLY");
1241 // Cu+Ni foil covers textolite
1243 par[1] = fGeom->GetCPVCuNiFoilThickness() / 2;
1244 gMC->Gsvolu("CPV1","BOX ",idtmed[710],par,3);
1245 y = fGeom->GetCPVTextoliteThickness()/2 - par[1];
1246 gMC->Gspos ("CPV1",1,"CPVF",0,y,0,0,"ONLY");
1248 // Aluminum frame around CPV
1250 par[0] = fGeom->GetCPVFrameSize(0)/2;
1251 par[1] = fGeom->GetCPVFrameSize(1)/2;
1252 par[2] = fGeom->GetCPVBoxSize(2) /2;
1253 gMC->Gsvolu("CFR1","BOX ",idtmed[701],par,3);
1255 par[0] = fGeom->GetCPVBoxSize(0)/2 - fGeom->GetCPVFrameSize(0);
1256 par[1] = fGeom->GetCPVFrameSize(1)/2;
1257 par[2] = fGeom->GetCPVFrameSize(2)/2;
1258 gMC->Gsvolu("CFR2","BOX ",idtmed[701],par,3);
1260 for (Int_t j=0; j<=1; j++) {
1261 x = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(0) - fGeom->GetCPVFrameSize(0)) / 2;
1262 gMC->Gspos("CFR1",j+1,"CPV", x,0,0,0,"ONLY");
1263 z = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(2) - fGeom->GetCPVFrameSize(2)) / 2;
1264 gMC->Gspos("CFR2",j+1,"CPV",0, 0,z,0,"ONLY");
1270 //____________________________________________________________________________
1271 void AliPHOSv0::CreateGeometryforSupport()
1273 // Create the PHOS' support geometry for GEANT
1277 Geant3 geometry of the PHOS's support
1280 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif">
1285 Float_t par[5], x0,y0,z0 ;
1288 // Get pointer to the array containing media indexes
1289 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
1291 // --- Dummy box containing two rails on which PHOS support moves
1292 // --- Put these rails to the bottom of the L3 magnet
1294 par[0] = fGeom->GetRailRoadSize(0) / 2.0 ;
1295 par[1] = fGeom->GetRailRoadSize(1) / 2.0 ;
1296 par[2] = fGeom->GetRailRoadSize(2) / 2.0 ;
1297 gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ;
1299 y0 = -(fGeom->GetRailsDistanceFromIP() - fGeom->GetRailRoadSize(1) / 2.0) ;
1300 gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ;
1302 // --- Dummy box containing one rail
1304 par[0] = fGeom->GetRailOuterSize(0) / 2.0 ;
1305 par[1] = fGeom->GetRailOuterSize(1) / 2.0 ;
1306 par[2] = fGeom->GetRailOuterSize(2) / 2.0 ;
1307 gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ;
1309 for (i=0; i<2; i++) {
1310 x0 = (2*i-1) * fGeom->GetDistanceBetwRails() / 2.0 ;
1311 gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ;
1314 // --- Upper and bottom steel parts of the rail
1316 par[0] = fGeom->GetRailPart1(0) / 2.0 ;
1317 par[1] = fGeom->GetRailPart1(1) / 2.0 ;
1318 par[2] = fGeom->GetRailPart1(2) / 2.0 ;
1319 gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ;
1321 y0 = - (fGeom->GetRailOuterSize(1) - fGeom->GetRailPart1(1)) / 2.0 ;
1322 gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1323 y0 = (fGeom->GetRailOuterSize(1) - fGeom->GetRailPart1(1)) / 2.0 - fGeom->GetRailPart3(1);
1324 gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1326 // --- The middle vertical steel parts of the rail
1328 par[0] = fGeom->GetRailPart2(0) / 2.0 ;
1329 par[1] = fGeom->GetRailPart2(1) / 2.0 ;
1330 par[2] = fGeom->GetRailPart2(2) / 2.0 ;
1331 gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ;
1333 y0 = - fGeom->GetRailPart3(1) / 2.0 ;
1334 gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1336 // --- The most upper steel parts of the rail
1338 par[0] = fGeom->GetRailPart3(0) / 2.0 ;
1339 par[1] = fGeom->GetRailPart3(1) / 2.0 ;
1340 par[2] = fGeom->GetRailPart3(2) / 2.0 ;
1341 gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ;
1343 y0 = (fGeom->GetRailOuterSize(1) - fGeom->GetRailPart3(1)) / 2.0 ;
1344 gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1346 // --- The wall of the cradle
1347 // --- The wall is empty: steel thin walls and air inside
1349 par[1] = TMath::Sqrt(
1350 TMath::Power((fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1)),2) +
1351 TMath::Power((fGeom->GetOuterBoxSize(0)/2),2)) + 10.;
1352 par[0] = par[1] - fGeom->GetCradleWall(1) ;
1353 par[2] = fGeom->GetCradleWall(2) / 2.0 ;
1354 par[3] = fGeom->GetCradleWall(3) ;
1355 par[4] = fGeom->GetCradleWall(4) ;
1356 gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ;
1358 par[0] -= fGeom->GetCradleWallThickness() ;
1359 par[1] -= fGeom->GetCradleWallThickness() ;
1360 par[2] -= fGeom->GetCradleWallThickness() ;
1361 gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ;
1362 gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
1364 for (i=0; i<2; i++) {
1365 z0 = (2*i-1) * (fGeom->GetOuterBoxSize(2) + fGeom->GetCradleWall(2)) / 2.0 ;
1366 gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ;
1369 // --- The "wheels" of the cradle
1371 par[0] = fGeom->GetCradleWheel(0) / 2;
1372 par[1] = fGeom->GetCradleWheel(1) / 2;
1373 par[2] = fGeom->GetCradleWheel(2) / 2;
1374 gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ;
1376 y0 = -(fGeom->GetRailsDistanceFromIP() - fGeom->GetRailRoadSize(1) -
1377 fGeom->GetCradleWheel(1)/2) ;
1378 for (i=0; i<2; i++) {
1379 z0 = (2*i-1) * ((fGeom->GetOuterBoxSize(2) + fGeom->GetCradleWheel(2)) / 2.0 +
1380 fGeom->GetCradleWall(2));
1381 for (j=0; j<2; j++) {
1383 x0 = (2*j-1) * fGeom->GetDistanceBetwRails() / 2.0 ;
1384 gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ;
1390 //____________________________________________________________________________
1391 void AliPHOSv0::Init(void)
1393 // Just prints an information message
1398 for(i=0;i<35;i++) printf("*");
1399 printf(" PHOS_INIT ");
1400 for(i=0;i<35;i++) printf("*");
1403 // Here the PHOS initialisation code (if any!)
1406 cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << fGeom->GetName() << endl ;
1408 cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ;
1410 for(i=0;i<80;i++) printf("*");