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"
38 // --- Standard library ---
43 #include <strstream.h>
45 // --- AliRoot header files ---
47 #include "AliPHOSv0.h"
51 #include "AliPHOSGeometry.h"
55 //____________________________________________________________________________
56 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
59 // ctor : title is used to identify the layout
60 // GPS2 = 5 modules (EMC + PPSD)
61 // IHEP = 5 modules (EMC + CPV)
62 // MIXT = 4 modules (EMC + CPV) and 1 module (EMC + PPSD)
64 // create the geometry parameters object
65 // it will posted to a folder
67 if (strcmp(GetTitle(),"") != 0 )
68 fGeom = AliPHOSGeometry::GetInstance(GetTitle(), "") ;
72 //____________________________________________________________________________
73 void AliPHOSv0::BuildGeometry()
75 // Build the PHOS geometry for the ROOT display
79 PHOS in ALICE displayed by root
85 <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
90 <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
95 <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
100 <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
106 AliPHOSGeometry * geom = GetGeometry() ;
108 this->BuildGeometryforPHOS() ;
109 if (strcmp(geom->GetName(),"GPS2") == 0)
110 this->BuildGeometryforPPSD() ;
111 else if (strcmp(geom->GetName(),"IHEP") == 0)
112 this->BuildGeometryforCPV() ;
113 else if (strcmp(geom->GetName(),"MIXT") == 0) {
114 this->BuildGeometryforPPSD() ;
115 this->BuildGeometryforCPV() ;
118 cout << "AliPHOSv0::BuildGeometry : no charged particle identification system installed: "
119 << "Geometry name = " << geom->GetName() << endl;
123 //____________________________________________________________________________
124 void AliPHOSv0:: BuildGeometryforPHOS(void)
126 // Build the PHOS-EMC geometry for the ROOT display
128 const Int_t kColorPHOS = kRed ;
129 const Int_t kColorXTAL = kBlue ;
131 Double_t const kRADDEG = 180.0 / kPI ;
133 AliPHOSGeometry * geom = GetGeometry() ;
135 new TBRIK( "OuterBox", "PHOS box", "void", geom->GetOuterBoxSize(0)/2,
136 geom->GetOuterBoxSize(1)/2,
137 geom->GetOuterBoxSize(2)/2 );
139 // Textolit Wall box, position inside PHOS
141 new TBRIK( "TextolitBox", "PHOS Textolit box ", "void", geom->GetTextolitBoxSize(0)/2,
142 geom->GetTextolitBoxSize(1)/2,
143 geom->GetTextolitBoxSize(2)/2);
145 // Polystyrene Foam Plate
147 new TBRIK( "UpperFoamPlate", "PHOS Upper foam plate", "void", geom->GetTextolitBoxSize(0)/2,
148 geom->GetSecondUpperPlateThickness()/2,
149 geom->GetTextolitBoxSize(2)/2 ) ;
153 new TBRIK( "AirFilledBox", "PHOS air filled box", "void", geom->GetAirFilledBoxSize(0)/2,
154 geom->GetAirFilledBoxSize(1)/2,
155 geom->GetAirFilledBoxSize(2)/2 );
159 Float_t xtlX = geom->GetCrystalSize(0) ;
160 Float_t xtlY = geom->GetCrystalSize(1) ;
161 Float_t xtlZ = geom->GetCrystalSize(2) ;
163 Float_t xl = geom->GetNPhi() * ( xtlX + 2 * geom->GetGapBetweenCrystals() ) / 2.0 + geom->GetModuleBoxThickness() ;
164 Float_t yl = ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() + geom->GetCrystalHolderThickness() ) / 2.0
165 + geom->GetModuleBoxThickness() / 2.0 ;
166 Float_t zl = geom->GetNZ() * ( xtlZ + 2 * geom->GetGapBetweenCrystals() ) / 2.0 + geom->GetModuleBoxThickness() ;
168 new TBRIK( "CrystalsBox", "PHOS crystals box", "void", xl, yl, zl ) ;
170 // position PHOS into ALICE
172 Float_t r = geom->GetIPtoOuterCoverDistance() + geom->GetOuterBoxSize(1) / 2.0 ;
174 Float_t pphi = TMath::ATan( geom->GetOuterBoxSize(0) / ( 2.0 * geom->GetIPtoOuterCoverDistance() ) ) ;
176 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
178 char * nodename = new char[20] ;
179 char * rotname = new char[20] ;
181 for( Int_t i = 1; i <= geom->GetNModules(); i++ ) {
182 Float_t angle = pphi * 2 * ( i - geom->GetNModules() / 2.0 - 0.5 ) ;
183 sprintf(rotname, "%s%d", "rot", number++) ;
184 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
186 sprintf(nodename,"%s%d", "Module", i) ;
187 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
188 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
189 TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
190 outerboxnode->SetLineColor(kColorPHOS) ;
191 fNodes->Add(outerboxnode) ;
193 // now inside the outer box the textolit box
194 y = ( geom->GetOuterBoxThickness(1) - geom->GetUpperPlateThickness() ) / 2. ;
195 sprintf(nodename,"%s%d", "TexBox", i) ;
196 TNode * textolitboxnode = new TNode(nodename, nodename, "TextolitBox", 0, y, 0) ;
197 textolitboxnode->SetLineColor(kColorPHOS) ;
198 fNodes->Add(textolitboxnode) ;
199 // upper foam plate inside outre box
201 sprintf(nodename, "%s%d", "UFPlate", i) ;
202 y = ( geom->GetTextolitBoxSize(1) - geom->GetSecondUpperPlateThickness() ) / 2.0 ;
203 TNode * upperfoamplatenode = new TNode(nodename, nodename, "UpperFoamPlate", 0, y, 0) ;
204 upperfoamplatenode->SetLineColor(kColorPHOS) ;
205 fNodes->Add(upperfoamplatenode) ;
206 // air filled box inside textolit box (not drawn)
207 textolitboxnode->cd();
208 y = ( geom->GetTextolitBoxSize(1) - geom->GetAirFilledBoxSize(1) ) / 2.0 - geom->GetSecondUpperPlateThickness() ;
209 sprintf(nodename, "%s%d", "AFBox", i) ;
210 TNode * airfilledboxnode = new TNode(nodename, nodename, "AirFilledBox", 0, y, 0) ;
211 fNodes->Add(airfilledboxnode) ;
212 // crystals box inside air filled box
213 airfilledboxnode->cd() ;
214 y = geom->GetAirFilledBoxSize(1) / 2.0 - yl
215 - ( geom->GetIPtoCrystalSurface() - geom->GetIPtoOuterCoverDistance() - geom->GetModuleBoxThickness()
216 - geom->GetUpperPlateThickness() - geom->GetSecondUpperPlateThickness() ) ;
217 sprintf(nodename, "%s%d", "XTBox", i) ;
218 TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, y, 0) ;
219 crystalsboxnode->SetLineColor(kColorXTAL) ;
220 fNodes->Add(crystalsboxnode) ;
227 //____________________________________________________________________________
228 void AliPHOSv0:: BuildGeometryforPPSD(void)
230 // Build the PHOS-PPSD geometry for the ROOT display
234 PPSD displayed by root
237 <LI> Zoom on PPSD: Front View
240 <IMG Align=BOTTOM ALT="PPSD Front View" SRC="../images/AliPHOSv0PPSDFrontView.gif">
242 <LI> Zoom on PPSD: Perspective View
245 <IMG Align=BOTTOM ALT="PPSD Prespective View" SRC="../images/AliPHOSv0PPSDPerspectiveView.gif">
250 Double_t const kRADDEG = 180.0 / kPI ;
252 const Int_t kColorPHOS = kRed ;
253 const Int_t kColorPPSD = kGreen ;
254 const Int_t kColorGas = kBlue ;
255 const Int_t kColorAir = kYellow ;
257 AliPHOSGeometry * geom = GetGeometry() ;
259 // Box for a full PHOS module
261 new TBRIK( "PPSDBox", "PPSD box", "void", geom->GetCPVBoxSize(0)/2,
262 geom->GetCPVBoxSize(1)/2,
263 geom->GetCPVBoxSize(2)/2 );
265 // Box containing one micromegas module
267 new TBRIK( "PPSDModule", "PPSD module", "void", geom->GetPPSDModuleSize(0)/2,
268 geom->GetPPSDModuleSize(1)/2,
269 geom->GetPPSDModuleSize(2)/2 );
272 new TBRIK ( "TopLid", "Micromegas top lid", "void", geom->GetPPSDModuleSize(0)/2,
273 geom->GetLidThickness()/2,
274 geom->GetPPSDModuleSize(2)/2 ) ;
275 // composite panel (top and bottom)
277 new TBRIK ( "TopPanel", "Composite top panel", "void", ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() )/2,
278 geom->GetCompositeThickness()/2,
279 ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() )/2 ) ;
281 new TBRIK ( "BottomPanel", "Composite bottom panel", "void", ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() )/2,
282 geom->GetCompositeThickness()/2,
283 ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() )/2 ) ;
284 // gas gap (conversion and avalanche)
286 new TBRIK ( "GasGap", "gas gap", "void", ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() )/2,
287 ( geom->GetConversionGap() + geom->GetAvalancheGap() )/2,
288 ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() )/2 ) ;
292 new TBRIK ( "Anode", "Anode", "void", ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() )/2,
293 geom->GetAnodeThickness()/2,
294 ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() )/2 ) ;
296 new TBRIK ( "Cathode", "Cathode", "void", ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() )/2,
297 geom->GetCathodeThickness()/2,
298 ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() )/2 ) ;
301 new TBRIK ( "PCBoard", "Printed Circuit", "void", ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() )/2,
302 geom->GetPCThickness()/2,
303 ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() )/2 ) ;
304 // Gap between Lead and top micromegas
306 new TBRIK ( "LeadToM", "Air Gap top", "void", geom->GetCPVBoxSize(0)/2,
307 geom->GetMicro1ToLeadGap()/2,
308 geom->GetCPVBoxSize(2)/2 ) ;
310 // Gap between Lead and bottom micromegas
312 new TBRIK ( "MToLead", "Air Gap bottom", "void", geom->GetCPVBoxSize(0)/2,
313 geom->GetLeadToMicro2Gap()/2,
314 geom->GetCPVBoxSize(2)/2 ) ;
317 new TBRIK ( "Lead", "Lead converter", "void", geom->GetCPVBoxSize(0)/2,
318 geom->GetLeadConverterThickness()/2,
319 geom->GetCPVBoxSize(2)/2 ) ;
321 // position PPSD into ALICE
323 char * nodename = new char[20] ;
324 char * rotname = new char[20] ;
326 Float_t r = geom->GetIPtoTopLidDistance() + geom->GetCPVBoxSize(1) / 2.0 ;
328 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
330 Int_t firstModule = 0 ;
331 if (strcmp(geom->GetName(),"GPS2") == 0)
333 else if (strcmp(geom->GetName(),"MIXT") == 0)
334 firstModule = geom->GetNModules() - geom->GetNPPSDModules() + 1;
336 for( Int_t i = firstModule; i <= geom->GetNModules(); i++ ) { // the number of PHOS modules
337 Float_t angle = geom->GetPHOSAngle(i) ;
338 sprintf(rotname, "%s%d", "rotg", number+i) ;
339 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
341 sprintf(nodename, "%s%d", "Moduleg", i) ;
342 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
343 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
344 TNode * ppsdboxnode = new TNode(nodename , nodename ,"PPSDBox", x, y, 0, rotname ) ;
345 ppsdboxnode->SetLineColor(kColorPPSD) ;
346 fNodes->Add(ppsdboxnode) ;
348 // inside the PPSD box:
349 // 1. fNumberOfModulesPhi x fNumberOfModulesZ top micromegas
350 x = ( geom->GetCPVBoxSize(0) - geom->GetPPSDModuleSize(0) ) / 2. ;
352 for ( Int_t iphi = 1; iphi <= geom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module
353 Float_t z = ( geom->GetCPVBoxSize(2) - geom->GetPPSDModuleSize(2) ) / 2. ;
355 for ( Int_t iz = 1; iz <= geom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module
356 y = ( geom->GetCPVBoxSize(1) - geom->GetMicromegas1Thickness() ) / 2. ;
357 sprintf(nodename, "%s%d%d%d", "Mic1", i, iphi, iz) ;
358 micro1node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ;
359 micro1node->SetLineColor(kColorPPSD) ;
360 fNodes->Add(micro1node) ;
361 // inside top micromegas
364 y = ( geom->GetMicromegas1Thickness() - geom->GetLidThickness() ) / 2. ;
365 sprintf(nodename, "%s%d%d%d", "Lid", i, iphi, iz) ;
366 TNode * toplidnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ;
367 toplidnode->SetLineColor(kColorPPSD) ;
368 fNodes->Add(toplidnode) ;
369 // b. composite panel
370 y = y - geom->GetLidThickness() / 2. - geom->GetCompositeThickness() / 2. ;
371 sprintf(nodename, "%s%d%d%d", "CompU", i, iphi, iz) ;
372 TNode * compupnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ;
373 compupnode->SetLineColor(kColorPPSD) ;
374 fNodes->Add(compupnode) ;
376 y = y - geom->GetCompositeThickness() / 2. - geom->GetAnodeThickness() / 2. ;
377 sprintf(nodename, "%s%d%d%d", "Ano", i, iphi, iz) ;
378 TNode * anodenode = new TNode(nodename, nodename, "Anode", 0, y, 0) ;
379 anodenode->SetLineColor(kColorPHOS) ;
380 fNodes->Add(anodenode) ;
382 y = y - geom->GetAnodeThickness() / 2. - ( geom->GetConversionGap() + geom->GetAvalancheGap() ) / 2. ;
383 sprintf(nodename, "%s%d%d%d", "GGap", i, iphi, iz) ;
384 TNode * ggapnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ;
385 ggapnode->SetLineColor(kColorGas) ;
386 fNodes->Add(ggapnode) ;
388 y = y - ( geom->GetConversionGap() + geom->GetAvalancheGap() ) / 2. - geom->GetCathodeThickness() / 2. ;
389 sprintf(nodename, "%s%d%d%d", "Cathode", i, iphi, iz) ;
390 TNode * cathodenode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ;
391 cathodenode->SetLineColor(kColorPHOS) ;
392 fNodes->Add(cathodenode) ;
393 // g. printed circuit
394 y = y - geom->GetCathodeThickness() / 2. - geom->GetPCThickness() / 2. ;
395 sprintf(nodename, "%s%d%d%d", "PC", i, iphi, iz) ;
396 TNode * pcnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ;
397 pcnode->SetLineColor(kColorPPSD) ;
398 fNodes->Add(pcnode) ;
399 // h. composite panel
400 y = y - geom->GetPCThickness() / 2. - geom->GetCompositeThickness() / 2. ;
401 sprintf(nodename, "%s%d%d%d", "CompDown", i, iphi, iz) ;
402 TNode * compdownnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ;
403 compdownnode->SetLineColor(kColorPPSD) ;
404 fNodes->Add(compdownnode) ;
405 z = z - geom->GetPPSDModuleSize(2) ;
407 } // end of Z module loop
408 x = x - geom->GetPPSDModuleSize(0) ;
410 } // end of phi module loop
414 y = ( geom->GetCPVBoxSize(1) - 2 * geom->GetMicromegas1Thickness() - geom->GetMicro1ToLeadGap() ) / 2. ;
415 sprintf(nodename, "%s%d", "GapUp", i) ;
416 TNode * gapupnode = new TNode(nodename, nodename, "LeadToM", 0, y, 0) ;
417 gapupnode->SetLineColor(kColorAir) ;
418 fNodes->Add(gapupnode) ;
420 y = y - geom->GetMicro1ToLeadGap() / 2. - geom->GetLeadConverterThickness() / 2. ;
421 sprintf(nodename, "%s%d", "LeadC", i) ;
422 TNode * leadcnode = new TNode(nodename, nodename, "Lead", 0, y, 0) ;
423 leadcnode->SetLineColor(kColorPPSD) ;
424 fNodes->Add(leadcnode) ;
426 y = y - geom->GetLeadConverterThickness() / 2. - geom->GetLeadToMicro2Gap() / 2. ;
427 sprintf(nodename, "%s%d", "GapDown", i) ;
428 TNode * gapdownnode = new TNode(nodename, nodename, "MToLead", 0, y, 0) ;
429 gapdownnode->SetLineColor(kColorAir) ;
430 fNodes->Add(gapdownnode) ;
431 // 5. fNumberOfModulesPhi x fNumberOfModulesZ bottom micromegas
432 x = ( geom->GetCPVBoxSize(0) - geom->GetPPSDModuleSize(0) ) / 2. - geom->GetPhiDisplacement() ;
434 for ( Int_t iphi = 1; iphi <= geom->GetNumberOfModulesPhi(); iphi++ ) {
435 Float_t z = ( geom->GetCPVBoxSize(2) - geom->GetPPSDModuleSize(2) ) / 2. - geom->GetZDisplacement() ;;
437 for ( Int_t iz = 1; iz <= geom->GetNumberOfModulesZ(); iz++ ) {
438 y = - ( geom->GetCPVBoxSize(1) - geom->GetMicromegas2Thickness() ) / 2. ;
439 sprintf(nodename, "%s%d%d%d", "Mic2", i, iphi, iz) ;
440 micro2node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ;
441 micro2node->SetLineColor(kColorPPSD) ;
442 fNodes->Add(micro2node) ;
443 // inside bottom micromegas
446 y = ( geom->GetMicromegas2Thickness() - geom->GetLidThickness() ) / 2. ;
447 sprintf(nodename, "%s%d%d%d", "Lidb", i, iphi, iz) ;
448 TNode * toplidbnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ;
449 toplidbnode->SetLineColor(kColorPPSD) ;
450 fNodes->Add(toplidbnode) ;
451 // b. composite panel
452 y = y - geom->GetLidThickness() / 2. - geom->GetCompositeThickness() / 2. ;
453 sprintf(nodename, "%s%d%d%d", "CompUb", i, iphi, iz) ;
454 TNode * compupbnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ;
455 compupbnode->SetLineColor(kColorPPSD) ;
456 fNodes->Add(compupbnode) ;
458 y = y - geom->GetCompositeThickness() / 2. - geom->GetAnodeThickness() / 2. ;
459 sprintf(nodename, "%s%d%d%d", "Anob", i, iphi, iz) ;
460 TNode * anodebnode = new TNode(nodename, nodename, "Anode", 0, y, 0) ;
461 anodebnode->SetLineColor(kColorPPSD) ;
462 fNodes->Add(anodebnode) ;
464 y = y - geom->GetAnodeThickness() / 2. - ( geom->GetConversionGap() + geom->GetAvalancheGap() ) / 2. ;
465 sprintf(nodename, "%s%d%d%d", "GGapb", i, iphi, iz) ;
466 TNode * ggapbnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ;
467 ggapbnode->SetLineColor(kColorGas) ;
468 fNodes->Add(ggapbnode) ;
470 y = y - ( geom->GetConversionGap() + geom->GetAvalancheGap() ) / 2. - geom->GetCathodeThickness() / 2. ;
471 sprintf(nodename, "%s%d%d%d", "Cathodeb", i, iphi, iz) ;
472 TNode * cathodebnode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ;
473 cathodebnode->SetLineColor(kColorPPSD) ;
474 fNodes->Add(cathodebnode) ;
475 // g. printed circuit
476 y = y - geom->GetCathodeThickness() / 2. - geom->GetPCThickness() / 2. ;
477 sprintf(nodename, "%s%d%d%d", "PCb", i, iphi, iz) ;
478 TNode * pcbnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ;
479 pcbnode->SetLineColor(kColorPPSD) ;
480 fNodes->Add(pcbnode) ;
482 y = y - geom->GetPCThickness() / 2. - geom->GetCompositeThickness() / 2. ;
483 sprintf(nodename, "%s%d%d%d", "CompDownb", i, iphi, iz) ;
484 TNode * compdownbnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ;
485 compdownbnode->SetLineColor(kColorPPSD) ;
486 fNodes->Add(compdownbnode) ;
487 z = z - geom->GetPPSDModuleSize(2) ;
489 } // end of Z module loop
490 x = x - geom->GetPPSDModuleSize(0) ;
492 } // end of phi module loop
501 //____________________________________________________________________________
502 void AliPHOSv0:: BuildGeometryforCPV(void)
504 // Build the PHOS-CPV geometry for the ROOT display
505 // Author: Yuri Kharlov 11 September 2000
510 CPV displayed by root
515 <td>CPV perspective view</td>
516 <td>CPV front view </td>
520 <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td>
521 <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td>
529 const Double_t kRADDEG = 180.0 / kPI ;
530 const Int_t kColorCPV = kGreen ;
531 const Int_t kColorFrame = kYellow ;
532 const Int_t kColorGassiplex = kRed;
533 const Int_t kColorPCB = kCyan;
535 AliPHOSGeometry * geom = GetGeometry() ;
537 // Box for a full PHOS module
539 new TBRIK ("CPVBox", "CPV box", "void", geom->GetCPVBoxSize(0)/2,
540 geom->GetCPVBoxSize(1)/2,
541 geom->GetCPVBoxSize(2)/2 );
542 new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", geom->GetCPVFrameSize(0)/2,
543 geom->GetCPVFrameSize(1)/2,
544 geom->GetCPVBoxSize(2)/2 );
545 new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0),
546 geom->GetCPVFrameSize(1)/2,
547 geom->GetCPVFrameSize(2)/2);
548 new TBRIK ("CPVPCB", "CPV PCB", "void", geom->GetCPVActiveSize(0)/2,
549 geom->GetCPVTextoliteThickness()/2,
550 geom->GetCPVActiveSize(1)/2);
551 new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", geom->GetGassiplexChipSize(0)/2,
552 geom->GetGassiplexChipSize(1)/2,
553 geom->GetGassiplexChipSize(2)/2);
555 // position CPV into ALICE
557 char * nodename = new char[25] ;
558 char * rotname = new char[25] ;
560 Float_t r = geom->GetIPtoCPVDistance() + geom->GetCPVBoxSize(1) / 2.0 ;
562 TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
564 Int_t lastModule = 0 ;
565 if (strcmp(geom->GetName(),"IHEP") == 0)
566 lastModule = geom->GetNModules();
567 else if (strcmp(geom->GetName(),"MIXT") == 0)
568 lastModule = geom->GetNModules() - geom->GetNPPSDModules();
570 for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules
574 Float_t angle = geom->GetPHOSAngle(i) ;
575 sprintf(rotname, "%s%d", "rotg", number+i) ;
576 new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
578 sprintf(nodename, "%s%d", "CPVModule", i) ;
579 Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
580 Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
582 TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ;
583 cpvBoxNode->SetLineColor(kColorCPV) ;
584 fNodes->Add(cpvBoxNode) ;
587 // inside each CPV box:
591 for (j=0; j<=1; j++) {
592 sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ;
593 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
594 TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ;
595 cpvFrameNode->SetLineColor(kColorFrame) ;
596 fNodes->Add(cpvFrameNode) ;
598 sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ;
599 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
600 cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ;
601 cpvFrameNode->SetLineColor(kColorFrame) ;
602 fNodes->Add(cpvFrameNode) ;
605 // 4 printed circuit boards
606 for (j=0; j<4; j++) {
607 sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ;
608 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(j) + geom->GetCPVTextoliteThickness()/2;
609 TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ;
610 cpvPCBNode->SetLineColor(kColorPCB) ;
611 fNodes->Add(cpvPCBNode) ;
615 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
616 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
617 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
618 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
619 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
620 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
621 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
622 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
623 sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ;
624 TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ;
625 cpvGassiplexNode->SetLineColor(kColorGassiplex) ;
626 fNodes->Add(cpvGassiplexNode) ;
636 //____________________________________________________________________________
637 void AliPHOSv0::CreateGeometry()
639 // Create the PHOS geometry for Geant
641 AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ;
643 if ( phostmp == NULL ) {
645 fprintf(stderr, "PHOS detector not found!\n") ;
650 AliPHOSGeometry * geom = GetGeometry() ;
652 // Get pointer to the array containing media indeces
653 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
655 // Create a box a PHOS module.
656 // In case of MIXT geometry 2 different boxes are needed
659 bigbox[0] = geom->GetOuterBoxSize(0) / 2.0 ;
660 bigbox[1] = ( geom->GetOuterBoxSize(1) + geom->GetCPVBoxSize(1) ) / 2.0 ;
661 bigbox[2] = geom->GetOuterBoxSize(2) / 2.0 ;
663 gMC->Gsvolu("PHOS", "BOX ", idtmed[798], bigbox, 3) ;
665 if ( strcmp( geom->GetName(),"MIXT") == 0 && geom->GetNPPSDModules() > 0)
666 gMC->Gsvolu("PHO1", "BOX ", idtmed[798], bigbox, 3) ;
668 this->CreateGeometryforPHOS() ;
669 if ( strcmp( geom->GetName(), "GPS2") == 0 )
670 this->CreateGeometryforPPSD() ;
671 else if ( strcmp( geom->GetName(), "IHEP") == 0 )
672 this->CreateGeometryforCPV() ;
673 else if ( strcmp( geom->GetName(), "MIXT") == 0 ) {
674 this->CreateGeometryforPPSD() ;
675 this->CreateGeometryforCPV() ;
678 cout << "AliPHOSv0::CreateGeometry : no charged particle identification system installed" << endl;
680 this->CreateGeometryforSupport() ;
682 // --- Position PHOS mdules in ALICE setup ---
685 Double_t const kRADDEG = 180.0 / kPI ;
688 if (strcmp(geom->GetName(),"MIXT") == 0)
689 lastModule = geom->GetNModules() - geom->GetNPPSDModules();
691 lastModule = geom->GetNModules();
694 for( i = 1; i <= lastModule ; i++ ) {
696 Float_t angle = geom->GetPHOSAngle(i) ;
697 AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ;
699 Float_t r = geom->GetIPtoOuterCoverDistance() + ( geom->GetOuterBoxSize(1) + geom->GetCPVBoxSize(1) ) / 2.0 ;
701 Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
702 Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
704 gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ;
708 for( i = lastModule+1; i <= geom->GetNModules(); i++ ) {
710 Float_t angle = geom->GetPHOSAngle(i) ;
711 AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ;
713 Float_t r = geom->GetIPtoOuterCoverDistance() + ( geom->GetOuterBoxSize(1) + geom->GetCPVBoxSize(1) ) / 2.0 ;
715 Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
716 Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
718 gMC->Gspos("PHO1", i-lastModule, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ;
724 //____________________________________________________________________________
725 void AliPHOSv0::CreateGeometryforPHOS()
727 // Create the PHOS-EMC geometry for GEANT
731 Geant3 geometry tree of PHOS-EMC in ALICE
734 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif">
739 // Get pointer to the array containing media indexes
740 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
742 AliPHOSGeometry * geom = GetGeometry() ;
745 // --- Define PHOS box volume, fPUFPill with thermo insulating foam ---
746 // --- Foam Thermo Insulating outer cover dimensions ---
747 // --- Put it in bigbox = PHOS
750 dphos[0] = geom->GetOuterBoxSize(0) / 2.0 ;
751 dphos[1] = geom->GetOuterBoxSize(1) / 2.0 ;
752 dphos[2] = geom->GetOuterBoxSize(2) / 2.0 ;
754 gMC->Gsvolu("PEMC", "BOX ", idtmed[706], dphos, 3) ;
756 Float_t yO = - geom->GetCPVBoxSize(1) / 2.0 ;
758 gMC->Gspos("PEMC", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ;
759 if ( strcmp( geom->GetName(),"MIXT") == 0 && geom->GetNPPSDModules() > 0)
760 gMC->Gspos("PEMC", 1, "PHO1", 0.0, yO, 0.0, 0, "ONLY") ;
763 // --- Define Textolit Wall box, position inside PEMC ---
764 // --- Textolit Wall box dimentions ---
768 dptxw[0] = geom->GetTextolitBoxSize(0) / 2.0 ;
769 dptxw[1] = geom->GetTextolitBoxSize(1) / 2.0 ;
770 dptxw[2] = geom->GetTextolitBoxSize(2) / 2.0 ;
772 gMC->Gsvolu("PTXW", "BOX ", idtmed[707], dptxw, 3);
774 yO = ( geom->GetOuterBoxThickness(1) - geom->GetUpperPlateThickness() ) / 2. ;
776 gMC->Gspos("PTXW", 1, "PEMC", 0.0, yO, 0.0, 0, "ONLY") ;
779 // --- Define Upper Polystyrene Foam Plate, place inside PTXW ---
780 // --- immediately below Foam Thermo Insulation Upper plate ---
782 // --- Upper Polystyrene Foam plate thickness ---
785 dpufp[0] = geom->GetTextolitBoxSize(0) / 2.0 ;
786 dpufp[1] = geom->GetSecondUpperPlateThickness() / 2. ;
787 dpufp[2] = geom->GetTextolitBoxSize(2) /2.0 ;
789 gMC->Gsvolu("PUFP", "BOX ", idtmed[703], dpufp, 3) ;
791 yO = ( geom->GetTextolitBoxSize(1) - geom->GetSecondUpperPlateThickness() ) / 2.0 ;
793 gMC->Gspos("PUFP", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ;
796 // --- Define air-filled box, place inside PTXW ---
797 // --- Inner AIR volume dimensions ---
801 dpair[0] = geom->GetAirFilledBoxSize(0) / 2.0 ;
802 dpair[1] = geom->GetAirFilledBoxSize(1) / 2.0 ;
803 dpair[2] = geom->GetAirFilledBoxSize(2) / 2.0 ;
805 gMC->Gsvolu("PAIR", "BOX ", idtmed[798], dpair, 3) ;
807 yO = ( geom->GetTextolitBoxSize(1) - geom->GetAirFilledBoxSize(1) ) / 2.0 - geom->GetSecondUpperPlateThickness() ;
809 gMC->Gspos("PAIR", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ;
811 // --- Dimensions of PbWO4 crystal ---
813 Float_t xtlX = geom->GetCrystalSize(0) ;
814 Float_t xtlY = geom->GetCrystalSize(1) ;
815 Float_t xtlZ = geom->GetCrystalSize(2) ;
818 dptcb[0] = geom->GetNPhi() * ( xtlX + 2 * geom->GetGapBetweenCrystals() ) / 2.0 + geom->GetModuleBoxThickness() ;
819 dptcb[1] = ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() + geom->GetCrystalHolderThickness() ) / 2.0
820 + geom->GetModuleBoxThickness() / 2.0 ;
821 dptcb[2] = geom->GetNZ() * ( xtlZ + 2 * geom->GetGapBetweenCrystals() ) / 2.0 + geom->GetModuleBoxThickness() ;
823 gMC->Gsvolu("PTCB", "BOX ", idtmed[706], dptcb, 3) ;
825 yO = geom->GetAirFilledBoxSize(1) / 2.0 - dptcb[1]
826 - ( geom->GetIPtoCrystalSurface() - geom->GetIPtoOuterCoverDistance() - geom->GetModuleBoxThickness()
827 - geom->GetUpperPlateThickness() - geom->GetSecondUpperPlateThickness() ) ;
829 gMC->Gspos("PTCB", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
832 // --- Define Crystal BLock filled with air, position it inside PTCB ---
835 dpcbl[0] = geom->GetNPhi() * ( xtlX + 2 * geom->GetGapBetweenCrystals() ) / 2.0 ;
836 dpcbl[1] = ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() + geom->GetCrystalHolderThickness() ) / 2.0 ;
837 dpcbl[2] = geom->GetNZ() * ( xtlZ + 2 * geom->GetGapBetweenCrystals() ) / 2.0 ;
839 gMC->Gsvolu("PCBL", "BOX ", idtmed[798], dpcbl, 3) ;
841 // --- Divide PCBL in X (phi) and Z directions --
842 gMC->Gsdvn("PROW", "PCBL", Int_t (geom->GetNPhi()), 1) ;
843 gMC->Gsdvn("PCEL", "PROW", Int_t (geom->GetNZ()), 3) ;
845 yO = -geom->GetModuleBoxThickness() / 2.0 ;
847 gMC->Gspos("PCBL", 1, "PTCB", 0.0, yO, 0.0, 0, "ONLY") ;
850 // --- Define STeel (actually, it's titanium) Cover volume, place inside PCEL
853 dpstc[0] = ( xtlX + 2 * geom->GetCrystalWrapThickness() ) / 2.0 ;
854 dpstc[1] = ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() + geom->GetCrystalHolderThickness() ) / 2.0 ;
855 dpstc[2] = ( xtlZ + 2 * geom->GetCrystalWrapThickness() + 2 * geom->GetCrystalHolderThickness() ) / 2.0 ;
857 gMC->Gsvolu("PSTC", "BOX ", idtmed[704], dpstc, 3) ;
859 gMC->Gspos("PSTC", 1, "PCEL", 0.0, 0.0, 0.0, 0, "ONLY") ;
862 // --- Define Tyvek volume, place inside PSTC ---
865 dppap[0] = xtlX / 2.0 + geom->GetCrystalWrapThickness() ;
866 dppap[1] = ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() ) / 2.0 ;
867 dppap[2] = xtlZ / 2.0 + geom->GetCrystalWrapThickness() ;
869 gMC->Gsvolu("PPAP", "BOX ", idtmed[702], dppap, 3) ;
871 yO = ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() ) / 2.0
872 - ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() + geom->GetCrystalHolderThickness() ) / 2.0 ;
874 gMC->Gspos("PPAP", 1, "PSTC", 0.0, yO, 0.0, 0, "ONLY") ;
877 // --- Define PbWO4 crystal volume, place inside PPAP ---
880 dpxtl[0] = xtlX / 2.0 ;
881 dpxtl[1] = xtlY / 2.0 ;
882 dpxtl[2] = xtlZ / 2.0 ;
884 gMC->Gsvolu("PXTL", "BOX ", idtmed[699], dpxtl, 3) ;
886 yO = ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() ) / 2.0 - xtlY / 2.0 - geom->GetCrystalWrapThickness() ;
888 gMC->Gspos("PXTL", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ;
891 // --- Define crystal support volume, place inside PPAP ---
894 dpsup[0] = xtlX / 2.0 + geom->GetCrystalWrapThickness() ;
895 dpsup[1] = geom->GetCrystalSupportHeight() / 2.0 ;
896 dpsup[2] = xtlZ / 2.0 + geom->GetCrystalWrapThickness() ;
898 gMC->Gsvolu("PSUP", "BOX ", idtmed[798], dpsup, 3) ;
900 yO = geom->GetCrystalSupportHeight() / 2.0 - ( xtlY + geom->GetCrystalSupportHeight() + geom->GetCrystalWrapThickness() ) / 2.0 ;
902 gMC->Gspos("PSUP", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ;
905 // --- Define PIN-diode volume and position it inside crystal support ---
906 // --- right behind PbWO4 crystal
908 // --- PIN-diode dimensions ---
912 dppin[0] = geom->GetPinDiodeSize(0) / 2.0 ;
913 dppin[1] = geom->GetPinDiodeSize(1) / 2.0 ;
914 dppin[2] = geom->GetPinDiodeSize(2) / 2.0 ;
916 gMC->Gsvolu("PPIN", "BOX ", idtmed[705], dppin, 3) ;
918 yO = geom->GetCrystalSupportHeight() / 2.0 - geom->GetPinDiodeSize(1) / 2.0 ;
920 gMC->Gspos("PPIN", 1, "PSUP", 0.0, yO, 0.0, 0, "ONLY") ;
923 // --- Define Upper Cooling Panel, place it on top of PTCB ---
925 // --- Upper Cooling Plate thickness ---
927 dpucp[0] = dptcb[0] ;
928 dpucp[1] = geom->GetUpperCoolingPlateThickness() ;
929 dpucp[2] = dptcb[2] ;
931 gMC->Gsvolu("PUCP", "BOX ", idtmed[701], dpucp,3) ;
933 yO = geom->GetAirFilledBoxSize(1) / 2.
934 -( geom->GetIPtoCrystalSurface() - geom->GetIPtoOuterCoverDistance() - geom->GetModuleBoxThickness()
935 -geom->GetUpperPlateThickness() - geom->GetSecondUpperPlateThickness() - geom->GetUpperCoolingPlateThickness() ) ;
937 gMC->Gspos("PUCP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
940 // --- Define Al Support Plate, position it inside PAIR ---
941 // --- right beneath PTCB ---
942 // --- Al Support Plate thickness ---
945 dpasp[0] = geom->GetAirFilledBoxSize(0) / 2.0 ;
946 dpasp[1] = geom->GetSupportPlateThickness() / 2.0 ;
947 dpasp[2] = geom->GetAirFilledBoxSize(2) / 2.0 ;
949 gMC->Gsvolu("PASP", "BOX ", idtmed[701], dpasp, 3) ;
951 yO = ( geom->GetAirFilledBoxSize(1) - geom->GetSupportPlateThickness() ) / 2.
952 - ( geom->GetIPtoCrystalSurface() - geom->GetIPtoOuterCoverDistance()
953 - geom->GetUpperPlateThickness() - geom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 ) ;
955 gMC->Gspos("PASP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
958 // --- Define Thermo Insulating Plate, position it inside PAIR ---
959 // --- right beneath PASP ---
960 // --- Lower Thermo Insulating Plate thickness ---
963 dptip[0] = geom->GetAirFilledBoxSize(0) / 2.0 ;
964 dptip[1] = geom->GetLowerThermoPlateThickness() / 2.0 ;
965 dptip[2] = geom->GetAirFilledBoxSize(2) / 2.0 ;
967 gMC->Gsvolu("PTIP", "BOX ", idtmed[706], dptip, 3) ;
969 yO = ( geom->GetAirFilledBoxSize(1) - geom->GetLowerThermoPlateThickness() ) / 2.
970 - ( geom->GetIPtoCrystalSurface() - geom->GetIPtoOuterCoverDistance() - geom->GetUpperPlateThickness()
971 - geom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + geom->GetSupportPlateThickness() ) ;
973 gMC->Gspos("PTIP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
976 // --- Define Textolit Plate, position it inside PAIR ---
977 // --- right beneath PTIP ---
978 // --- Lower Textolit Plate thickness ---
981 dptxp[0] = geom->GetAirFilledBoxSize(0) / 2.0 ;
982 dptxp[1] = geom->GetLowerTextolitPlateThickness() / 2.0 ;
983 dptxp[2] = geom->GetAirFilledBoxSize(2) / 2.0 ;
985 gMC->Gsvolu("PTXP", "BOX ", idtmed[707], dptxp, 3) ;
987 yO = ( geom->GetAirFilledBoxSize(1) - geom->GetLowerTextolitPlateThickness() ) / 2.
988 - ( geom->GetIPtoCrystalSurface() - geom->GetIPtoOuterCoverDistance() - geom->GetUpperPlateThickness()
989 - geom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + geom->GetSupportPlateThickness()
990 + geom->GetLowerThermoPlateThickness() ) ;
992 gMC->Gspos("PTXP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ;
996 //____________________________________________________________________________
997 void AliPHOSv0::CreateGeometryforPPSD()
999 // Create the PHOS-PPSD geometry for GEANT
1003 Geant3 geometry tree of PHOS-PPSD in ALICE
1006 <IMG Align=BOTTOM ALT="PPSD geant tree" SRC="../images/PPSDinAlice.gif">
1011 // Get pointer to the array containing media indexes
1012 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
1014 AliPHOSGeometry * geom = GetGeometry() ;
1016 // The box containing all ppsd's for one PHOS module filled with air
1018 ppsd[0] = geom->GetCPVBoxSize(0) / 2.0 ;
1019 ppsd[1] = geom->GetCPVBoxSize(1) / 2.0 ;
1020 ppsd[2] = geom->GetCPVBoxSize(2) / 2.0 ;
1022 gMC->Gsvolu("PPSD", "BOX ", idtmed[798], ppsd, 3) ;
1024 Float_t yO = geom->GetOuterBoxSize(1) / 2.0 ;
1026 if ( strcmp( geom->GetName(),"MIXT") == 0 && geom->GetNPPSDModules() > 0)
1027 gMC->Gspos("PPSD", 1, "PHO1", 0.0, yO, 0.0, 0, "ONLY") ;
1029 gMC->Gspos("PPSD", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ;
1031 // Now we build a micromegas module
1032 // The box containing the whole module filled with epoxy (FR4)
1035 mppsd[0] = geom->GetPPSDModuleSize(0) / 2.0 ;
1036 mppsd[1] = geom->GetPPSDModuleSize(1) / 2.0 ;
1037 mppsd[2] = geom->GetPPSDModuleSize(2) / 2.0 ;
1039 gMC->Gsvolu("PMPP", "BOX ", idtmed[708], mppsd, 3) ;
1042 // 1. The Top Lid made of epoxy (FR4)
1045 tlppsd[0] = geom->GetPPSDModuleSize(0) / 2.0 ;
1046 tlppsd[1] = geom->GetLidThickness() / 2.0 ;
1047 tlppsd[2] = geom->GetPPSDModuleSize(2) / 2.0 ;
1049 gMC->Gsvolu("PTLP", "BOX ", idtmed[708], tlppsd, 3) ;
1051 Float_t y0 = ( geom->GetMicromegas1Thickness() - geom->GetLidThickness() ) / 2. ;
1053 gMC->Gspos("PTLP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ;
1055 // 2. the upper panel made of composite material
1058 upppsd[0] = ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1059 upppsd[1] = geom->GetCompositeThickness() / 2.0 ;
1060 upppsd[2] = ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1062 gMC->Gsvolu("PUPP", "BOX ", idtmed[709], upppsd, 3) ;
1064 y0 = y0 - geom->GetLidThickness() / 2. - geom->GetCompositeThickness() / 2. ;
1066 gMC->Gspos("PUPP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ;
1068 // 3. the anode made of Copper
1071 anppsd[0] = ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1072 anppsd[1] = geom->GetAnodeThickness() / 2.0 ;
1073 anppsd[2] = ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1075 gMC->Gsvolu("PANP", "BOX ", idtmed[710], anppsd, 3) ;
1077 y0 = y0 - geom->GetCompositeThickness() / 2. - geom->GetAnodeThickness() / 2. ;
1079 gMC->Gspos("PANP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ;
1081 // 4. the conversion gap + avalanche gap filled with gas
1084 ggppsd[0] = ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1085 ggppsd[1] = ( geom->GetConversionGap() + geom->GetAvalancheGap() ) / 2.0 ;
1086 ggppsd[2] = ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1088 gMC->Gsvolu("PGGP", "BOX ", idtmed[715], ggppsd, 3) ;
1090 // --- Divide GGPP in X (phi) and Z directions --
1091 gMC->Gsdvn("PPRO", "PGGP", geom->GetNumberOfPadsPhi(), 1) ;
1092 gMC->Gsdvn("PPCE", "PPRO", geom->GetNumberOfPadsZ() , 3) ;
1094 y0 = y0 - geom->GetAnodeThickness() / 2. - ( geom->GetConversionGap() + geom->GetAvalancheGap() ) / 2. ;
1096 gMC->Gspos("PGGP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ;
1099 // 6. the cathode made of Copper
1102 cappsd[0] = ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1103 cappsd[1] = geom->GetCathodeThickness() / 2.0 ;
1104 cappsd[2] = ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1106 gMC->Gsvolu("PCAP", "BOX ", idtmed[710], cappsd, 3) ;
1108 y0 = y0 - ( geom->GetConversionGap() + geom->GetAvalancheGap() ) / 2. - geom->GetCathodeThickness() / 2. ;
1110 gMC->Gspos("PCAP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ;
1112 // 7. the printed circuit made of G10
1115 pcppsd[0] = ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() ) / 2,.0 ;
1116 pcppsd[1] = geom->GetPCThickness() / 2.0 ;
1117 pcppsd[2] = ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1119 gMC->Gsvolu("PCPS", "BOX ", idtmed[711], cappsd, 3) ;
1121 y0 = y0 - geom->GetCathodeThickness() / 2. - geom->GetPCThickness() / 2. ;
1123 gMC->Gspos("PCPS", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ;
1125 // 8. the lower panel made of composite material
1128 lpppsd[0] = ( geom->GetPPSDModuleSize(0) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1129 lpppsd[1] = geom->GetCompositeThickness() / 2.0 ;
1130 lpppsd[2] = ( geom->GetPPSDModuleSize(2) - geom->GetMicromegasWallThickness() ) / 2.0 ;
1132 gMC->Gsvolu("PLPP", "BOX ", idtmed[709], lpppsd, 3) ;
1134 y0 = y0 - geom->GetPCThickness() / 2. - geom->GetCompositeThickness() / 2. ;
1136 gMC->Gspos("PLPP", 1, "PMPP", 0.0, y0, 0.0, 0, "ONLY") ;
1138 // Position the fNumberOfModulesPhi x fNumberOfModulesZ modules (mppsd) inside PPSD to cover a PHOS module
1139 // the top and bottom one's (which are assumed identical) :
1141 Float_t yt = ( geom->GetCPVBoxSize(1) - geom->GetMicromegas1Thickness() ) / 2. ;
1142 Float_t yb = - ( geom->GetCPVBoxSize(1) - geom->GetMicromegas2Thickness() ) / 2. ;
1144 Int_t copyNumbertop = 0 ;
1145 Int_t copyNumberbot = geom->GetNumberOfModulesPhi() * geom->GetNumberOfModulesZ() ;
1147 Float_t x = ( geom->GetCPVBoxSize(0) - geom->GetPPSDModuleSize(0) ) / 2. ;
1149 for ( Int_t iphi = 1; iphi <= geom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module
1150 Float_t z = ( geom->GetCPVBoxSize(2) - geom->GetPPSDModuleSize(2) ) / 2. ;
1152 for ( Int_t iz = 1; iz <= geom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module
1153 gMC->Gspos("PMPP", ++copyNumbertop, "PPSD", x, yt, z, 0, "ONLY") ;
1154 gMC->Gspos("PMPP", ++copyNumberbot, "PPSD", x, yb, z, 0, "ONLY") ;
1155 z = z - geom->GetPPSDModuleSize(2) ;
1156 } // end of Z module loop
1157 x = x - geom->GetPPSDModuleSize(0) ;
1158 } // end of phi module loop
1160 // The Lead converter between two air gaps
1164 uappsd[0] = geom->GetCPVBoxSize(0) / 2.0 ;
1165 uappsd[1] = geom->GetMicro1ToLeadGap() / 2.0 ;
1166 uappsd[2] = geom->GetCPVBoxSize(2) / 2.0 ;
1168 gMC->Gsvolu("PUAPPS", "BOX ", idtmed[798], uappsd, 3) ;
1170 y0 = ( geom->GetCPVBoxSize(1) - 2 * geom->GetMicromegas1Thickness() - geom->GetMicro1ToLeadGap() ) / 2. ;
1172 gMC->Gspos("PUAPPS", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ;
1174 // 2. Lead converter
1177 lcppsd[0] = geom->GetCPVBoxSize(0) / 2.0 ;
1178 lcppsd[1] = geom->GetLeadConverterThickness() / 2.0 ;
1179 lcppsd[2] = geom->GetCPVBoxSize(2) / 2.0 ;
1181 gMC->Gsvolu("PLCPPS", "BOX ", idtmed[712], lcppsd, 3) ;
1183 y0 = y0 - geom->GetMicro1ToLeadGap() / 2. - geom->GetLeadConverterThickness() / 2. ;
1185 gMC->Gspos("PLCPPS", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ;
1190 lappsd[0] = geom->GetCPVBoxSize(0) / 2.0 ;
1191 lappsd[1] = geom->GetLeadToMicro2Gap() / 2.0 ;
1192 lappsd[2] = geom->GetCPVBoxSize(2) / 2.0 ;
1194 gMC->Gsvolu("PLAPPS", "BOX ", idtmed[798], lappsd, 3) ;
1196 y0 = y0 - geom->GetLeadConverterThickness() / 2. - geom->GetLeadToMicro2Gap() / 2. ;
1198 gMC->Gspos("PLAPPS", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ;
1203 //____________________________________________________________________________
1204 void AliPHOSv0::CreateGeometryforCPV()
1206 // Create the PHOS-CPV geometry for GEANT
1207 // Author: Yuri Kharlov 11 September 2000
1211 Geant3 geometry of PHOS-CPV in ALICE
1216 <td>CPV perspective view</td>
1217 <td>CPV front view </td>
1221 <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td>
1222 <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td>
1226 <td>One CPV module, perspective view </td>
1227 <td>One CPV module, front view (extended in vertical direction) </td>
1231 <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td>
1232 <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td>
1238 Geant3 geometry tree of PHOS-CPV in ALICE
1241 <img height=300 width=290 src="../images/CPVtree.gif">
1246 Float_t par[3], x,y,z;
1248 // Get pointer to the array containing media indexes
1249 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
1251 AliPHOSGeometry * geom = GetGeometry() ;
1253 // The box containing all CPV for one PHOS module filled with air
1254 par[0] = geom->GetCPVBoxSize(0) / 2.0 ;
1255 par[1] = geom->GetCPVBoxSize(1) / 2.0 ;
1256 par[2] = geom->GetCPVBoxSize(2) / 2.0 ;
1257 gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ;
1259 y = geom->GetOuterBoxSize(1) / 2.0 ;
1260 gMC->Gspos("PCPV", 1, "PHOS", 0.0, y, 0.0, 0, "ONLY") ;
1264 par[0] = geom->GetGassiplexChipSize(0)/2.;
1265 par[1] = geom->GetGassiplexChipSize(1)/2.;
1266 par[2] = geom->GetGassiplexChipSize(2)/2.;
1267 gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3);
1269 // Cu+Ni foil covers Gassiplex board
1271 par[1] = geom->GetCPVCuNiFoilThickness()/2;
1272 gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3);
1273 y = -(geom->GetGassiplexChipSize(1)/2 - par[1]);
1274 gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY");
1276 // Position of the chip inside CPV
1278 Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
1279 Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ() + 1);
1281 y = geom->GetCPVFrameSize(1)/2 - geom->GetFTPosition(0) +
1282 geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
1283 for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
1284 x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
1285 for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
1287 z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
1288 gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY");
1292 // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni)
1294 par[0] = geom->GetCPVActiveSize(0) / 2;
1295 par[1] = geom->GetCPVTextoliteThickness() / 2;
1296 par[2] = geom->GetCPVActiveSize(1) / 2;
1297 gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3);
1301 par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2;
1302 gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3);
1304 for (Int_t i=0; i<4; i++) {
1305 y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2;
1306 gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY");
1308 y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2;
1309 gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY");
1313 // Dummy sensitive plane in the middle of argone gas volume
1316 gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3);
1317 gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY");
1319 // Cu+Ni foil covers textolite
1321 par[1] = geom->GetCPVCuNiFoilThickness() / 2;
1322 gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3);
1323 y = geom->GetCPVTextoliteThickness()/2 - par[1];
1324 gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY");
1326 // Aluminum frame around CPV
1328 par[0] = geom->GetCPVFrameSize(0)/2;
1329 par[1] = geom->GetCPVFrameSize(1)/2;
1330 par[2] = geom->GetCPVBoxSize(2) /2;
1331 gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3);
1333 par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0);
1334 par[1] = geom->GetCPVFrameSize(1)/2;
1335 par[2] = geom->GetCPVFrameSize(2)/2;
1336 gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3);
1338 for (Int_t j=0; j<=1; j++) {
1339 x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
1340 gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY");
1341 z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
1342 gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY");
1348 //____________________________________________________________________________
1349 void AliPHOSv0::CreateGeometryforSupport()
1351 // Create the PHOS' support geometry for GEANT
1355 Geant3 geometry of the PHOS's support
1358 <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif">
1363 Float_t par[5], x0,y0,z0 ;
1366 // Get pointer to the array containing media indexes
1367 Int_t *idtmed = fIdtmed->GetArray() - 699 ;
1369 AliPHOSGeometry * geom = GetGeometry() ;
1371 // --- Dummy box containing two rails on which PHOS support moves
1372 // --- Put these rails to the bottom of the L3 magnet
1374 par[0] = geom->GetRailRoadSize(0) / 2.0 ;
1375 par[1] = geom->GetRailRoadSize(1) / 2.0 ;
1376 par[2] = geom->GetRailRoadSize(2) / 2.0 ;
1377 gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ;
1379 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ;
1380 gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ;
1382 // --- Dummy box containing one rail
1384 par[0] = geom->GetRailOuterSize(0) / 2.0 ;
1385 par[1] = geom->GetRailOuterSize(1) / 2.0 ;
1386 par[2] = geom->GetRailOuterSize(2) / 2.0 ;
1387 gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ;
1389 for (i=0; i<2; i++) {
1390 x0 = (2*i-1) * geom->GetDistanceBetwRails() / 2.0 ;
1391 gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ;
1394 // --- Upper and bottom steel parts of the rail
1396 par[0] = geom->GetRailPart1(0) / 2.0 ;
1397 par[1] = geom->GetRailPart1(1) / 2.0 ;
1398 par[2] = geom->GetRailPart1(2) / 2.0 ;
1399 gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ;
1401 y0 = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 ;
1402 gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1403 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 - geom->GetRailPart3(1);
1404 gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1406 // --- The middle vertical steel parts of the rail
1408 par[0] = geom->GetRailPart2(0) / 2.0 ;
1409 par[1] = geom->GetRailPart2(1) / 2.0 ;
1410 par[2] = geom->GetRailPart2(2) / 2.0 ;
1411 gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ;
1413 y0 = - geom->GetRailPart3(1) / 2.0 ;
1414 gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1416 // --- The most upper steel parts of the rail
1418 par[0] = geom->GetRailPart3(0) / 2.0 ;
1419 par[1] = geom->GetRailPart3(1) / 2.0 ;
1420 par[2] = geom->GetRailPart3(2) / 2.0 ;
1421 gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ;
1423 y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart3(1)) / 2.0 ;
1424 gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
1426 // --- The wall of the cradle
1427 // --- The wall is empty: steel thin walls and air inside
1429 par[1] = TMath::Sqrt(
1430 TMath::Power((geom->GetIPtoOuterCoverDistance() + geom->GetOuterBoxSize(1)),2) +
1431 TMath::Power((geom->GetOuterBoxSize(0)/2),2)) + 10.;
1432 par[0] = par[1] - geom->GetCradleWall(1) ;
1433 par[2] = geom->GetCradleWall(2) / 2.0 ;
1434 par[3] = geom->GetCradleWall(3) ;
1435 par[4] = geom->GetCradleWall(4) ;
1436 gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ;
1438 par[0] -= geom->GetCradleWallThickness() ;
1439 par[1] -= geom->GetCradleWallThickness() ;
1440 par[2] -= geom->GetCradleWallThickness() ;
1441 gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ;
1442 gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
1444 for (i=0; i<2; i++) {
1445 z0 = (2*i-1) * (geom->GetOuterBoxSize(2) + geom->GetCradleWall(2)) / 2.0 ;
1446 gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ;
1449 // --- The "wheels" of the cradle
1451 par[0] = geom->GetCradleWheel(0) / 2;
1452 par[1] = geom->GetCradleWheel(1) / 2;
1453 par[2] = geom->GetCradleWheel(2) / 2;
1454 gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ;
1456 y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) -
1457 geom->GetCradleWheel(1)/2) ;
1458 for (i=0; i<2; i++) {
1459 z0 = (2*i-1) * ((geom->GetOuterBoxSize(2) + geom->GetCradleWheel(2)) / 2.0 +
1460 geom->GetCradleWall(2));
1461 for (j=0; j<2; j++) {
1463 x0 = (2*j-1) * geom->GetDistanceBetwRails() / 2.0 ;
1464 gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ;
1470 //____________________________________________________________________________
1471 Float_t AliPHOSv0::ZMin(void) const
1473 // Overall dimension of the PHOS (min)
1474 // Take it twice more than the PHOS module size
1476 AliPHOSGeometry * geom = GetGeometry() ;
1478 return -geom->GetOuterBoxSize(2);
1481 //____________________________________________________________________________
1482 Float_t AliPHOSv0::ZMax(void) const
1484 // Overall dimension of the PHOS (max)
1485 // Take it twice more than the PHOS module size
1487 AliPHOSGeometry * geom = GetGeometry() ;
1489 return geom->GetOuterBoxSize(2);
1492 //____________________________________________________________________________
1493 void AliPHOSv0::Init(void)
1495 // Just prints an information message
1500 printf("\n%s: ",ClassName());
1501 for(i=0;i<35;i++) printf("*");
1502 printf(" PHOS_INIT ");
1503 for(i=0;i<35;i++) printf("*");
1504 printf("\n%s: ",ClassName());
1507 // Here the PHOS initialisation code (if any!)
1509 AliPHOSGeometry * geom = GetGeometry() ;
1512 cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << geom->GetName() << endl ;
1514 cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ;
1516 for(i=0;i<80;i++) printf("*");