]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSv0.cxx
Strip units changed from 8x1 to 8x2 (T.Pocheptsov)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSv0.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15 /* $Id$ */
16
17 /* History of cvs commits:
18  *
19  * $Log$
20  * Revision 1.84  2006/12/20 16:56:43  kharlov
21  * Optional geometry without CPV
22  *
23  * Revision 1.83  2006/11/14 17:11:15  hristov
24  * Removing inheritances from TAttLine, TAttMarker and AliRndm in AliModule. The copy constructor and assignment operators are moved to the private part of the class and not implemented. The corresponding changes are propagated to the detectors
25  *
26  * Revision 1.82  2006/09/27 19:55:57  kharlov
27  * Alignment object with symbolic volume names are introduced
28  *
29  * Revision 1.81  2006/03/04 20:25:56  kharlov
30  * Set geom parameters from CDB
31  *
32  * Revision 1.80  2005/06/17 07:39:07  hristov
33  * Removing GetDebug and SetDebug from AliRun and AliModule. Using AliLog for the messages
34  *
35  * Revision 1.79  2005/05/28 14:19:05  schutz
36  * Compilation warnings fixed by T.P.
37  *
38  */
39
40 //_________________________________________________________________________
41 // Implementation version v0 of PHOS Manager class 
42 // An object of this class does not produce hits nor digits
43 // It is the one to use if you do not want to produce outputs in TREEH or TREED
44 //                  
45 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
46
47
48 // --- ROOT system ---
49
50 #include <TBRIK.h>
51 #include <TFolder.h>
52 #include <TGeometry.h>
53 #include <TNode.h>
54 #include <TROOT.h>
55 #include <TRandom.h>
56 #include <TTRD1.h>
57 #include <TTree.h>
58 #include <TVirtualMC.h>
59 #include <TGeoManager.h>
60
61 // --- Standard library ---
62
63 #include <string.h>
64 #include <stdlib.h>
65
66 // --- AliRoot header files ---
67
68 #include "AliConst.h"
69 #include "AliPHOSGeometry.h"
70 #include "AliPHOSLoader.h"
71 #include "AliPHOSv0.h"
72 #include "AliRun.h"
73 #include "AliLog.h"
74
75 ClassImp(AliPHOSv0)
76
77 //____________________________________________________________________________
78 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
79   AliPHOS(name,title)
80 {
81   // ctor : title is used to identify the layout
82   GetGeometry() ; 
83 }
84
85 //____________________________________________________________________________
86 void AliPHOSv0::BuildGeometry()
87 {
88   // Build the PHOS geometry for the ROOT display
89   //BEGIN_HTML
90   /*
91     <H2>
92      PHOS in ALICE displayed by root
93     </H2>
94     <UL>
95     <LI> All Views
96     <P>
97     <CENTER>
98     <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif"> 
99     </CENTER></P></LI>
100     <LI> Front View
101     <P>
102     <CENTER>
103     <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif"> 
104     </CENTER></P></LI>
105      <LI> 3D View 1
106     <P>
107     <CENTER>
108     <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif"> 
109     </CENTER></P></LI>
110     <LI> 3D View 2
111     <P>
112     <CENTER>
113     <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif"> 
114     </CENTER></P></LI>
115     </UL>
116   */
117   //END_HTML  
118   
119   this->BuildGeometryforEMC() ; 
120   this->BuildGeometryforCPV() ;
121   
122 }
123
124 //____________________________________________________________________________
125 void AliPHOSv0:: BuildGeometryforEMC(void)
126 {
127   // Build the PHOS-EMC geometry for the ROOT display
128   
129   const Int_t kColorPHOS = kRed ;
130   const Int_t kColorXTAL = kBlue ;
131   
132   Double_t const kRADDEG = 180.0 / TMath::Pi() ;
133   
134   AliPHOSGeometry * geom = GetGeometry() ; 
135   AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
136   Float_t * boxparams = emcg->GetEMCParams() ;
137
138   new TTRD1("OuterBox", "PHOS box", "void",boxparams[0],boxparams[1],boxparams[2], boxparams[3] );
139   
140   
141   // Crystals Box
142   
143   Float_t * cribox = emcg->GetInnerThermoHalfSize() ;  
144   new TBRIK( "CrystalsBox", "PHOS crystals box", "void", cribox[0], cribox[2], cribox[1] ) ;
145   
146   // position PHOS into ALICE
147   
148   Float_t r = geom->GetIPtoOuterCoverDistance() + boxparams[3] ;
149   Int_t number = 988 ; 
150   TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
151   
152   char * nodename = new char[20] ;  
153   char * rotname  = new char[20] ; 
154
155   new TRotMatrix("cribox", "cribox", 90, 0, 90, 90, 0, 0);  
156
157   for( Int_t i = 1; i <= geom->GetNModules(); i++ ) { 
158
159     Float_t angle = geom->GetPHOSAngle(i) ;
160     sprintf(rotname, "%s%d", "rot", number++) ;
161     new TRotMatrix(rotname, rotname, 90, angle, 0,  0,  90,  270 + angle);
162
163     top->cd();
164     sprintf(nodename,"%s%d", "Module", i) ;    
165     Float_t x =  r * TMath::Sin( angle / kRADDEG ) ;
166     Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
167     TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
168     outerboxnode->SetLineColor(kColorPHOS) ;
169     fNodes->Add(outerboxnode) ;
170     outerboxnode->cd() ; 
171
172     Float_t z = -boxparams[3] - geom->GetIPtoOuterCoverDistance() + 
173                  cribox[1] +  geom->GetIPtoCrystalSurface() ;
174     TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, 0, z) ;    
175     crystalsboxnode->SetLineColor(kColorXTAL) ; 
176     fNodes->Add(crystalsboxnode) ; 
177   }
178
179   delete[] rotname ;  
180   delete[] nodename ;
181 }
182
183
184 //____________________________________________________________________________
185 void AliPHOSv0:: BuildGeometryforCPV(void)
186 {
187   //  Build the PHOS-CPV geometry for the ROOT display
188   //  Author: Yuri Kharlov 11 September 2000
189   //
190   //BEGIN_HTML
191   /*
192     <H2>
193     CPV displayed by root
194     </H2>
195     <table width=700>
196
197     <tr>
198          <td>CPV perspective view</td>
199          <td>CPV front view      </td>
200     </tr>
201
202     <tr>
203          <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td>
204          <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td>
205     </tr>
206
207     </table>
208
209   */
210   //END_HTML  
211
212   const Double_t kRADDEG         = 180.0 / TMath::Pi() ;
213   const Int_t    kColorCPV       = kGreen ;
214   const Int_t    kColorFrame     = kYellow ;
215   const Int_t    kColorGassiplex = kRed;
216   const Int_t    kColorPCB       = kCyan;
217
218   AliPHOSGeometry * geom = GetGeometry() ; 
219
220   // Box for a full PHOS module
221
222   new TBRIK ("CPVBox", "CPV box", "void",                   geom->GetCPVBoxSize(0)/2,
223                                                             geom->GetCPVBoxSize(1)/2,
224                                                             geom->GetCPVBoxSize(2)/2 );
225   new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void",  geom->GetCPVFrameSize(0)/2,
226                                                             geom->GetCPVFrameSize(1)/2,
227                                                             geom->GetCPVBoxSize(2)/2 );
228   new TBRIK ("CPVFrameUD", "CPV frame Up-Down",    "void",  geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0),
229                                                             geom->GetCPVFrameSize(1)/2,
230                                                             geom->GetCPVFrameSize(2)/2);
231   new TBRIK ("CPVPCB",    "CPV PCB",               "void",  geom->GetCPVActiveSize(0)/2,
232                                                             geom->GetCPVTextoliteThickness()/2,
233                                                             geom->GetCPVActiveSize(1)/2);
234   new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB",  "void",  geom->GetGassiplexChipSize(0)/2,
235                                                             geom->GetGassiplexChipSize(1)/2,
236                                                             geom->GetGassiplexChipSize(2)/2);
237
238   // position CPV into ALICE
239
240   char * nodename = new char[25] ;
241   char * rotname  = new char[25] ;
242   
243   Float_t r = geom->GetIPtoCPVDistance() + geom->GetCPVBoxSize(1) / 2.0 ;
244   Int_t number = 988 ; 
245   TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
246
247   Int_t lastModule = 0 ;
248   lastModule = geom->GetNModules();
249   
250   for( Int_t i = 1; i <= lastModule; i++ ) { // the number of PHOS modules
251     
252     // One CPV module
253     
254     Float_t angle = geom->GetPHOSAngle(i) ;
255     sprintf(rotname, "%s%d", "rotg", number+i) ;
256     new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
257     top->cd();
258     sprintf(nodename, "%s%d", "CPVModule", i) ;    
259     Float_t x =  r * TMath::Sin( angle / kRADDEG ) ;
260     Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
261     Float_t z;
262     TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ;
263     cpvBoxNode->SetLineColor(kColorCPV) ;
264     fNodes->Add(cpvBoxNode) ;
265     cpvBoxNode->cd() ;
266
267     // inside each CPV box:
268
269     // Frame around CPV
270     Int_t j;
271     for (j=0; j<=1; j++) {
272       sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ;
273       x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
274       TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ;
275       cpvFrameNode->SetLineColor(kColorFrame) ;
276       fNodes->Add(cpvFrameNode) ;
277
278       sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ;
279       z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
280       cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ;
281       cpvFrameNode->SetLineColor(kColorFrame) ;
282       fNodes->Add(cpvFrameNode) ;
283     }
284
285     // 4 printed circuit boards
286     for (j=0; j<4; j++) {
287       sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ;
288       y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(j) + geom->GetCPVTextoliteThickness()/2;
289       TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ;
290       cpvPCBNode->SetLineColor(kColorPCB) ;
291       fNodes->Add(cpvPCBNode) ;
292     }
293
294     // Gassiplex chips
295     Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
296     Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ()   + 1);
297     y = geom->GetCPVFrameSize(1)/2           - geom->GetFTPosition(0) +
298         geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
299     for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
300       x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
301       for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
302         z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
303         sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ;
304         TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ;
305         cpvGassiplexNode->SetLineColor(kColorGassiplex) ;
306         fNodes->Add(cpvGassiplexNode) ;
307       }
308     }
309
310   } // PHOS modules
311  
312   delete[] rotname ;  
313   delete[] nodename ; 
314 }
315
316 //____________________________________________________________________________
317 void AliPHOSv0::CreateGeometry()
318 {
319   // Create the PHOS geometry for Geant
320
321   AliPHOSv0 *phostmp = dynamic_cast<AliPHOSv0*>(gAlice->GetModule("PHOS")) ;
322
323   if ( phostmp == NULL ) {
324     
325     fprintf(stderr, "PHOS detector not found!\n") ;
326     return;
327     
328   }
329
330   AliPHOSGeometry * geom = GetGeometry() ; 
331
332   // Get pointer to the array containing media indeces
333   Int_t *idtmed = fIdtmed->GetArray() - 699 ;
334
335   // Create a PHOS module.
336   
337   gMC->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ;        
338   
339   this->CreateGeometryforEMC() ; 
340
341   if (strstr(fTitle.Data(),"noCPV") == 0) 
342     this->CreateGeometryforCPV() ;
343   
344   this->CreateGeometryforSupport() ; 
345   
346   // --- Position  PHOS mdules in ALICE setup ---
347   
348   Int_t idrotm[99] ;
349   Int_t iXYZ,iAngle;
350   for (Int_t iModule = 0; iModule < geom->GetNModules(); iModule++ ) {
351     
352     Float_t angle[3][2];
353     for (iXYZ=0; iXYZ<3; iXYZ++)
354       for (iAngle=0; iAngle<2; iAngle++)
355         angle[iXYZ][iAngle] = geom->GetModuleAngle(iModule,iXYZ, iAngle);
356     AliMatrix(idrotm[iModule],
357               angle[0][0],angle[0][1],
358               angle[1][0],angle[1][1],
359               angle[2][0],angle[2][1]) ;
360     
361     Float_t pos[3];
362     for (iXYZ=0; iXYZ<3; iXYZ++)
363       pos[iXYZ] = geom->GetModuleCenter(iModule,iXYZ);
364     gMC->Gspos("PHOS", iModule+1, "ALIC", pos[0], pos[1], pos[2],
365                idrotm[iModule], "ONLY") ;
366   }
367
368 }
369
370 //____________________________________________________________________________
371 void AliPHOSv0::CreateGeometryforEMC()
372 {
373   // Create the PHOS-EMC geometry for GEANT
374   // Author: Dmitri Peressounko August 2001
375   // The used coordinate system: 
376   //   1. in Module: X along longer side, Y out of beam, Z along shorter side (along beam)
377   //   2. In Strip the same: X along longer side, Y out of beam, Z along shorter side (along beam)
378
379
380     //BEGIN_HTML
381   /*
382     <H2>
383     Geant3 geometry tree of PHOS-EMC in ALICE
384     </H2>
385     <P><CENTER>
386     <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif"> 
387     </CENTER><P>
388   */
389   //END_HTML  
390   
391   // Get pointer to the array containing media indexes
392   Int_t *idtmed = fIdtmed->GetArray() - 699 ;
393
394   AliPHOSGeometry * geom = GetGeometry() ; 
395   AliPHOSEMCAGeometry * emcg = geom->GetEMCAGeometry() ;
396
397   // ======= Define the strip ===============
398
399   gMC->Gsvolu("PSTR", "BOX ", idtmed[716], emcg->GetStripHalfSize(), 3) ;  //Made of stell
400    
401       // --- define air volume (cell of the honeycomb)
402       gMC->Gsvolu("PCEL", "BOX ", idtmed[798], emcg->GetAirCellHalfSize(), 3);
403
404       // --- define wrapped crystal and put it into AirCell
405
406       gMC->Gsvolu("PWRA", "BOX ", idtmed[702], emcg->GetWrappedHalfSize(), 3);
407       Float_t * pin = emcg->GetAPDHalfSize() ; 
408       Float_t * preamp = emcg->GetPreampHalfSize() ;
409       Float_t y = (emcg->GetAirGapLed()-2*pin[1]-2*preamp[1])/2;
410       gMC->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
411     
412       // --- Define crystall and put it into wrapped crystall ---
413       gMC->Gsvolu("PXTL", "BOX ", idtmed[699], emcg->GetCrystalHalfSize(), 3) ;
414       gMC->Gspos("PXTL", 1, "PWRA", 0.0, 0.0, 0.0, 0, "ONLY") ;
415       
416       // --- define APD/PIN preamp and put it into AirCell
417  
418       gMC->Gsvolu("PPIN", "BOX ", idtmed[705], emcg->GetAPDHalfSize(), 3) ;
419       Float_t * crystal = emcg->GetCrystalHalfSize() ;
420       y = crystal[1] + emcg->GetAirGapLed() /2 - preamp[1]; 
421       gMC->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;
422
423       gMC->Gsvolu("PREA", "BOX ", idtmed[711], emcg->GetPreampHalfSize(), 3) ;   // Here I assumed preamp
424                                                                                  // as a printed Circuit
425       y = crystal[1] + emcg->GetAirGapLed() /2 + pin[1]  ;                  // May it should be changed
426       gMC->Gspos("PREA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ;                    // to ceramics?
427    
428
429       // --- Fill strip with wrapped cristalls in Air Cells
430
431       Float_t* splate = emcg->GetSupportPlateHalfSize();  
432       y = -splate[1] ;
433       Float_t* acel = emcg->GetAirCellHalfSize() ;
434       Int_t icel ;
435
436       for(Int_t lev = 2, icel = 1; icel <= emcg->GetNCellsXInStrip()*emcg->GetNCellsZInStrip(); icel += 2, lev += 2){
437          Float_t x = (2*(lev / 2) - 1 - emcg->GetNCellsXInStrip())* acel[0] ;
438          Float_t z = acel[2];
439          gMC->Gspos("PCEL", icel, "PSTR", x, y, +z, 0, "ONLY") ;
440          gMC->Gspos("PCEL", icel + 1, "PSTR", x, y, -z, 0, "ONLY") ;
441       }
442
443       // --- define the support plate, hole in it and position it in strip ----
444       gMC->Gsvolu("PSUP", "BOX ", idtmed[701], emcg->GetSupportPlateHalfSize(), 3) ;
445
446       gMC->Gsvolu("PSHO", "BOX ", idtmed[798], emcg->GetSupportPlateInHalfSize(), 3) ;
447       Float_t z = emcg->GetSupportPlateThickness()/2 ;
448       gMC->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY") ;
449
450       y = acel[1] ;
451       gMC->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ;
452
453
454     // ========== Fill module with strips and put them into inner thermoinsulation=============
455       gMC->Gsvolu("PTII", "BOX ", idtmed[706], emcg->GetInnerThermoHalfSize(), 3) ;     
456
457       Float_t * inthermo = emcg->GetInnerThermoHalfSize() ;
458       Float_t * strip = emcg->GetStripHalfSize() ;
459       y = inthermo[1] - strip[1] ;
460       Int_t irow;
461       Int_t nr = 1 ;
462       Int_t icol ;
463
464       for(irow = 0; irow < emcg->GetNStripX(); irow ++){
465         Float_t x = (2*irow + 1 - emcg->GetNStripX())* strip[0] ;
466         for(icol = 0; icol < emcg->GetNStripZ(); icol ++){
467           z = (2*icol + 1 - emcg->GetNStripZ()) * strip[2] ;
468           gMC->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY") ;
469           nr++ ;
470         }
471       }
472           
473
474    // ------- define the air gap between thermoinsulation and cooler
475       gMC->Gsvolu("PAGA", "BOX ", idtmed[798], emcg->GetAirGapHalfSize(), 3) ;   
476       Float_t * agap = emcg->GetAirGapHalfSize() ;
477       y = agap[1] - inthermo[1]  ;
478       
479       gMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ;
480
481
482
483    // ------- define the Al passive cooler 
484       gMC->Gsvolu("PCOR", "BOX ", idtmed[701], emcg->GetCoolerHalfSize(), 3) ;   
485       Float_t * cooler = emcg->GetCoolerHalfSize() ;
486       y = cooler[1] - agap[1]  ;
487       
488       gMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ;
489
490    // ------- define the outer thermoinsulating cover
491       gMC->Gsvolu("PTIO", "TRD1", idtmed[706], emcg->GetOuterThermoParams(), 4) ;        
492       Float_t * outparams = emcg->GetOuterThermoParams() ; 
493
494       Int_t idrotm[99] ;
495       AliMatrix(idrotm[1], 90.0, 0.0, 0.0, 0.0, 90.0, 270.0) ;
496       // Frame in outer thermoinsulation and so on: z out of beam, y along beam, x across beam
497  
498       z = outparams[3] - cooler[1] ;
499       gMC->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ;
500        
501   // -------- Define the outer Aluminium cover -----
502       gMC->Gsvolu("PCOL", "TRD1", idtmed[701], emcg->GetAlCoverParams(), 4) ;        
503       Float_t * covparams = emcg->GetAlCoverParams() ; 
504       z = covparams[3] - outparams[3] ;
505       gMC->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
506
507  // --------- Define front fiberglass cover -----------
508       gMC->Gsvolu("PFGC", "BOX ", idtmed[717], emcg->GetFiberGlassHalfSize(), 3) ;  
509       z = - outparams[3] ;
510       gMC->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ;
511
512  //=============This is all with cold section==============
513
514
515       //------ Warm Section --------------
516       gMC->Gsvolu("PWAR", "BOX ", idtmed[701], emcg->GetWarmAlCoverHalfSize(), 3) ; 
517       Float_t * warmcov = emcg->GetWarmAlCoverHalfSize() ;
518
519       // --- Define the outer thermoinsulation ---
520       gMC->Gsvolu("PWTI", "BOX ", idtmed[706], emcg->GetWarmThermoHalfSize(), 3) ; 
521       Float_t * warmthermo = emcg->GetWarmThermoHalfSize() ;
522       z = -warmcov[2] + warmthermo[2] ;
523
524       gMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ;     
525
526       // --- Define cables area and put in it T-supports ---- 
527       gMC->Gsvolu("PCA1", "BOX ", idtmed[718], emcg->GetTCables1HalfSize(), 3) ; 
528       Float_t * cbox = emcg->GetTCables1HalfSize() ;
529
530       gMC->Gsvolu("PBE1", "BOX ", idtmed[701], emcg->GetTSupport1HalfSize(), 3) ;
531       Float_t * beams = emcg->GetTSupport1HalfSize() ;
532       Int_t isup ;
533       for(isup = 0; isup < emcg->GetNTSuppots(); isup++){
534         Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ;
535         gMC->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY") ;
536       }
537
538       z = -warmthermo[2] + cbox[2] ;
539       gMC->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;     
540
541       gMC->Gsvolu("PCA2", "BOX ", idtmed[718], emcg->GetTCables2HalfSize(), 3) ; 
542       Float_t * cbox2 = emcg->GetTCables2HalfSize() ;
543
544       gMC->Gsvolu("PBE2", "BOX ", idtmed[701], emcg->GetTSupport2HalfSize(), 3) ;
545       for(isup = 0; isup < emcg->GetNTSuppots(); isup++){
546         Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ;
547         gMC->Gspos("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY") ;
548       }
549
550       z = -warmthermo[2] + 2*cbox[2] + cbox2[2];
551       gMC->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ;     
552
553
554   // --- Define frame ---
555       gMC->Gsvolu("PFRX", "BOX ", idtmed[716], emcg->GetFrameXHalfSize(), 3) ; 
556       Float_t * posit = emcg->GetFrameXPosition() ;
557       gMC->Gspos("PFRX", 1, "PWTI", posit[0],  posit[1], posit[2], 0, "ONLY") ;
558       gMC->Gspos("PFRX", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
559
560       gMC->Gsvolu("PFRZ", "BOX ", idtmed[716], emcg->GetFrameZHalfSize(), 3) ; 
561       posit = emcg->GetFrameZPosition() ;
562       gMC->Gspos("PFRZ", 1, "PWTI", posit[0], posit[1],  posit[2], 0, "ONLY") ;
563       gMC->Gspos("PFRZ", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
564
565  // --- Define Fiber Glass support ---
566       gMC->Gsvolu("PFG1", "BOX ", idtmed[717], emcg->GetFGupXHalfSize(), 3) ; 
567       posit = emcg->GetFGupXPosition() ;
568       gMC->Gspos("PFG1", 1, "PWTI", posit[0],  posit[1], posit[2], 0, "ONLY") ;
569       gMC->Gspos("PFG1", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
570
571       gMC->Gsvolu("PFG2", "BOX ", idtmed[717], emcg->GetFGupZHalfSize(), 3) ; 
572       posit = emcg->GetFGupZPosition() ;
573       gMC->Gspos("PFG2", 1, "PWTI",  posit[0], posit[1], posit[2], 0, "ONLY") ;
574       gMC->Gspos("PFG2", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
575
576       gMC->Gsvolu("PFG3", "BOX ", idtmed[717], emcg->GetFGlowXHalfSize(), 3) ; 
577       posit = emcg->GetFGlowXPosition() ;
578       gMC->Gspos("PFG3", 1, "PWTI", posit[0],  posit[1], posit[2], 0, "ONLY") ;
579       gMC->Gspos("PFG3", 2, "PWTI", posit[0], -posit[1], posit[2], 0, "ONLY") ;
580
581       gMC->Gsvolu("PFG4", "BOX ", idtmed[717], emcg->GetFGlowZHalfSize(), 3) ; 
582       posit = emcg->GetFGlowZPosition() ;
583       gMC->Gspos("PFG4", 1, "PWTI",  posit[0], posit[1], posit[2], 0, "ONLY") ;
584       gMC->Gspos("PFG4", 2, "PWTI", -posit[0], posit[1], posit[2], 0, "ONLY") ;
585
586       // --- Define Air Gap for FEE electronics ----- 
587
588       gMC->Gsvolu("PAFE", "BOX ", idtmed[798], emcg->GetFEEAirHalfSize(), 3) ; 
589       posit = emcg->GetFEEAirPosition() ;
590       gMC->Gspos("PAFE", 1, "PWTI",  posit[0], posit[1], posit[2], 0, "ONLY") ;
591
592       // Define the EMC module volume and combine Cool and Warm sections
593
594       gMC->Gsvolu("PEMC", "TRD1", idtmed[798], emcg->GetEMCParams(), 4) ;        
595
596       z =  - warmcov[2] ;
597       gMC->Gspos("PCOL", 1, "PEMC",  0., 0., z, 0, "ONLY") ;
598       z = covparams[3] ;
599       gMC->Gspos("PWAR", 1, "PEMC",  0., 0., z, 0, "ONLY") ;
600
601
602       // Put created EMC geometry into PHOS volume
603       
604       z = geom->GetCPVBoxSize(1) / 2. ;
605       gMC->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ; 
606             
607 }
608
609 //____________________________________________________________________________
610 void AliPHOSv0::CreateGeometryforCPV()
611 {
612   // Create the PHOS-CPV geometry for GEANT
613   // Author: Yuri Kharlov 11 September 2000
614   //BEGIN_HTML
615   /*
616     <H2>
617     Geant3 geometry of PHOS-CPV in ALICE
618     </H2>
619     <table width=700>
620
621     <tr>
622          <td>CPV perspective view</td>
623          <td>CPV front view      </td>
624     </tr>
625
626     <tr>
627          <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td>
628          <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td>
629     </tr>
630
631     <tr>
632          <td>One CPV module, perspective view                            </td>
633          <td>One CPV module, front view (extended in vertical direction) </td>
634     </tr>
635
636     <tr>
637          <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td>
638          <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td>
639     </tr>
640
641     </table>
642
643     <H2>
644     Geant3 geometry tree of PHOS-CPV in ALICE
645     </H2>
646     <center>
647     <img height=300 width=290 src="../images/CPVtree.gif">
648     </center>
649   */
650   //END_HTML  
651
652   Float_t par[3], x,y,z;
653
654   // Get pointer to the array containing media indexes
655   Int_t *idtmed = fIdtmed->GetArray() - 699 ;
656
657   AliPHOSGeometry * geom = GetGeometry() ; 
658
659   // The box containing all CPV for one PHOS module filled with air 
660   par[0] = geom->GetCPVBoxSize(0) / 2.0 ;  
661   par[1] = geom->GetCPVBoxSize(1) / 2.0 ; 
662   par[2] = geom->GetCPVBoxSize(2) / 2.0 ;
663   gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ;
664
665   Float_t * emcParams = geom->GetEMCAGeometry()->GetEMCParams() ;
666   z = - emcParams[3] ;
667   Int_t rotm ;
668   AliMatrix(rotm, 90.,0., 0., 0., 90., 90.) ;
669
670   gMC->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ; 
671   
672   // Gassiplex board
673   
674   par[0] = geom->GetGassiplexChipSize(0)/2.;
675   par[1] = geom->GetGassiplexChipSize(1)/2.;
676   par[2] = geom->GetGassiplexChipSize(2)/2.;
677   gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3);
678   
679   // Cu+Ni foil covers Gassiplex board
680
681   par[1] = geom->GetCPVCuNiFoilThickness()/2;
682   gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3);
683   y      = -(geom->GetGassiplexChipSize(1)/2 - par[1]);
684   gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY");
685
686   // Position of the chip inside CPV
687
688   Float_t xStep = geom->GetCPVActiveSize(0) / (geom->GetNumberOfCPVChipsPhi() + 1);
689   Float_t zStep = geom->GetCPVActiveSize(1) / (geom->GetNumberOfCPVChipsZ()   + 1);
690   Int_t   copy  = 0;
691   y = geom->GetCPVFrameSize(1)/2           - geom->GetFTPosition(0) +
692     geom->GetCPVTextoliteThickness() / 2 + geom->GetGassiplexChipSize(1) / 2 + 0.1;
693   for (Int_t ix=0; ix<geom->GetNumberOfCPVChipsPhi(); ix++) {
694     x = xStep * (ix+1) - geom->GetCPVActiveSize(0)/2;
695     for (Int_t iz=0; iz<geom->GetNumberOfCPVChipsZ(); iz++) {
696       copy++;
697       z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2;
698       gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY");
699     }
700   }
701
702   // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni)
703   
704   par[0] = geom->GetCPVActiveSize(0)        / 2;
705   par[1] = geom->GetCPVTextoliteThickness() / 2;
706   par[2] = geom->GetCPVActiveSize(1)        / 2;
707   gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3);
708
709   // Argon gas volume
710
711   par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2;
712   gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3);
713
714   for (Int_t i=0; i<4; i++) {
715     y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2;
716     gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY");
717     if(i==1){
718       y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2;
719       gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY");
720     }
721   }
722
723   // Dummy sensitive plane in the middle of argone gas volume
724
725   par[1]=0.001;
726   gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3);
727   gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY");
728
729   // Cu+Ni foil covers textolite
730
731   par[1] = geom->GetCPVCuNiFoilThickness() / 2;
732   gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3);
733   y = geom->GetCPVTextoliteThickness()/2 - par[1];
734   gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY");
735
736   // Aluminum frame around CPV
737
738   par[0] = geom->GetCPVFrameSize(0)/2;
739   par[1] = geom->GetCPVFrameSize(1)/2;
740   par[2] = geom->GetCPVBoxSize(2)  /2;
741   gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3);
742
743   par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0);
744   par[1] = geom->GetCPVFrameSize(1)/2;
745   par[2] = geom->GetCPVFrameSize(2)/2;
746   gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3);
747
748   for (Int_t j=0; j<=1; j++) {
749     x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2;
750     gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY");
751     z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2;
752     gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY");
753   }
754
755 }
756
757
758 //____________________________________________________________________________
759 void AliPHOSv0::CreateGeometryforSupport()
760 {
761   // Create the PHOS' support geometry for GEANT
762     //BEGIN_HTML
763   /*
764     <H2>
765     Geant3 geometry of the PHOS's support
766     </H2>
767     <P><CENTER>
768     <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/PHOS_support.gif"> 
769     </CENTER><P>
770   */
771   //END_HTML  
772   
773   Float_t par[5], x0,y0,z0 ; 
774   Int_t   i,j,copy;
775
776   // Get pointer to the array containing media indexes
777   Int_t *idtmed = fIdtmed->GetArray() - 699 ;
778
779   AliPHOSGeometry * geom = GetGeometry() ; 
780
781   // --- Dummy box containing two rails on which PHOS support moves
782   // --- Put these rails to the bottom of the L3 magnet
783
784   par[0] =  geom->GetRailRoadSize(0) / 2.0 ;
785   par[1] =  geom->GetRailRoadSize(1) / 2.0 ;
786   par[2] =  geom->GetRailRoadSize(2) / 2.0 ;
787   gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ;
788
789   y0     = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ;
790   gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ; 
791
792   // --- Dummy box containing one rail
793
794   par[0] =  geom->GetRailOuterSize(0) / 2.0 ;
795   par[1] =  geom->GetRailOuterSize(1) / 2.0 ;
796   par[2] =  geom->GetRailOuterSize(2) / 2.0 ;
797   gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ;
798
799   for (i=0; i<2; i++) {
800     x0     = (2*i-1) * geom->GetDistanceBetwRails()  / 2.0 ;
801     gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ; 
802   }
803
804   // --- Upper and bottom steel parts of the rail
805
806   par[0] =  geom->GetRailPart1(0) / 2.0 ;
807   par[1] =  geom->GetRailPart1(1) / 2.0 ;
808   par[2] =  geom->GetRailPart1(2) / 2.0 ;
809   gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ;
810
811   y0     = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1))  / 2.0 ;
812   gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
813   y0     =   (geom->GetRailOuterSize(1) - geom->GetRailPart1(1))  / 2.0 - geom->GetRailPart3(1);
814   gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ;
815
816   // --- The middle vertical steel parts of the rail
817
818   par[0] =  geom->GetRailPart2(0) / 2.0 ;
819   par[1] =  geom->GetRailPart2(1) / 2.0 ;
820   par[2] =  geom->GetRailPart2(2) / 2.0 ;
821   gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ;
822
823   y0     =   - geom->GetRailPart3(1) / 2.0 ;
824   gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; 
825
826   // --- The most upper steel parts of the rail
827
828   par[0] =  geom->GetRailPart3(0) / 2.0 ;
829   par[1] =  geom->GetRailPart3(1) / 2.0 ;
830   par[2] =  geom->GetRailPart3(2) / 2.0 ;
831   gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ;
832
833   y0     =   (geom->GetRailOuterSize(1) - geom->GetRailPart3(1))  / 2.0 ;
834   gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; 
835
836   // --- The wall of the cradle
837   // --- The wall is empty: steel thin walls and air inside
838
839   par[1] =  TMath::Sqrt(TMath::Power((geom->GetIPtoCPVDistance() + geom->GetOuterBoxSize(3)),2) +
840                         TMath::Power((geom->GetOuterBoxSize(1)/2),2))+10. ;
841   par[0] =  par[1] - geom->GetCradleWall(1) ;
842   par[2] =  geom->GetCradleWall(2) / 2.0 ;
843   par[3] =  geom->GetCradleWall(3) ;
844   par[4] =  geom->GetCradleWall(4) ;
845   gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ;
846
847   par[0] +=  geom->GetCradleWallThickness() ;
848   par[1] -=  geom->GetCradleWallThickness() ;
849   par[2] -=  geom->GetCradleWallThickness() ;
850   gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ;
851   gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ; 
852
853   for (i=0; i<2; i++) {
854     z0 = (2*i-1) * (geom->GetOuterBoxSize(2) + geom->GetCradleWall(2) )/ 2.0  ;
855         gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ; 
856   }
857
858   // --- The "wheels" of the cradle
859   
860   par[0] = geom->GetCradleWheel(0) / 2;
861   par[1] = geom->GetCradleWheel(1) / 2;
862   par[2] = geom->GetCradleWheel(2) / 2;
863   gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ;
864
865   y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) -
866          geom->GetCradleWheel(1)/2) ;
867   for (i=0; i<2; i++) {
868     z0 = (2*i-1) * ((geom->GetOuterBoxSize(2) + geom->GetCradleWheel(2))/ 2.0 +
869                     geom->GetCradleWall(2));
870     for (j=0; j<2; j++) {
871       copy = 2*i + j;
872       x0 = (2*j-1) * geom->GetDistanceBetwRails()  / 2.0 ;
873       gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ; 
874     }
875   }
876
877 }
878
879 //_____________________________________________________________________________
880 void AliPHOSv0::AddAlignableVolumes() const
881 {
882   //
883   // Create entries for alignable volumes associating the symbolic volume
884   // name with the corresponding volume path. Needs to be syncronized with
885   // eventual changes in the geometry
886   // Alignable volumes are:
887   // 1) PHOS modules as a whole
888   // 2) Cradle
889   // 3) Cradle wheels
890   // 4) Strip units (group of 2x8 crystals)
891
892   TString volpath, symname;
893
894   // Alignable modules
895   // Volume path /ALIC_1/PHOS_<i> => symbolic name /PHOS/Module<i>, <i>=1,2,3,4,5
896
897   TString physModulePath="/ALIC_1/PHOS_";
898   TString symbModuleName="PHOS/Module";
899   Int_t nModules = GetGeometry()->GetNModules();
900
901   for(Int_t iModule=1; iModule<=nModules; iModule++){
902     volpath = physModulePath;
903     volpath += iModule;
904     symname = symbModuleName;
905     symname += iModule;
906     gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data());
907   }
908
909   // Alignable cradle walls
910   // Volume path /ALIC_1/PCRA_<i> => symbolic name /PHOS/Cradle<i>, <i>=0,1
911
912   TString physCradlePath="/ALIC_1/PCRA_";
913   TString symbCradleName="PHOS/Cradle";
914   Int_t nCradles = 2;
915
916   for(Int_t iCradle=0; iCradle<nCradles; iCradle++){
917     volpath = physCradlePath;
918     volpath += iCradle;
919     symname = symbCradleName;
920     symname += iCradle;
921     gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data());
922   }
923
924   // Alignable wheels
925   // Volume path /ALIC_1/PWHE_<i> => symbolic name /PHOS/Wheel<i>, i=0,1,2,3
926
927   TString physWheelPath="/ALIC_1/PWHE_";
928   TString symbWheelName="PHOS/Wheel";
929   Int_t nWheels = 4;
930
931   for(Int_t iWheel=0; iWheel<nWheels; iWheel++){
932     volpath = physWheelPath;
933     volpath += iWheel;
934     symname = symbWheelName;
935     symname += iWheel;
936     gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data());
937   }
938
939   //Physical strip path is a combination of: physModulePath + module number + 
940   //physStripPath + strip number == ALIC_1/PHOS_N/..../PSTR_M
941   const Int_t nStripsX = GetGeometry()->GetEMCAGeometry()->GetNStripX();
942   const Int_t nStripsZ = GetGeometry()->GetEMCAGeometry()->GetNStripZ();
943   TString partialPhysStripName(100);
944   TString fullPhysStripName(100);
945   TString partialSymbStripName(100);
946   TString fullSymbStripName(100);
947
948   for(Int_t module = 1; module <= nModules; ++module){
949     partialPhysStripName  = physModulePath;
950     partialPhysStripName += module;
951     partialPhysStripName += "/PEMC_1/PCOL_1/PTIO_1/PCOR_1/PAGA_1/PTII_1/PSTR_";
952
953     partialSymbStripName  = symbModuleName;
954     partialSymbStripName += module;
955     partialSymbStripName += "/Strip_";
956
957     for(Int_t i = 0, ind1D = 1; i < nStripsX; ++i){//ind1D starts from 1 (PSTR_1...PSTR_224...)
958       for(Int_t j = 0; j < nStripsZ; ++j, ++ind1D){
959          fullPhysStripName = partialPhysStripName;
960          fullPhysStripName += ind1D;
961          
962          fullSymbStripName  = partialSymbStripName;
963          fullSymbStripName += i;//ind1D;
964          fullSymbStripName += '_';
965          fullSymbStripName += j;
966
967          gGeoManager->SetAlignableEntry(fullSymbStripName.Data(), fullPhysStripName.Data());
968       }
969     }
970   }
971 }
972
973 //____________________________________________________________________________
974 Float_t AliPHOSv0::ZMin(void) const
975 {
976   // Overall dimension of the PHOS (min)
977
978   AliPHOSGeometry * geom = GetGeometry() ; 
979
980   return -geom->GetOuterBoxSize(2)/2.;
981 }
982
983 //____________________________________________________________________________
984 Float_t AliPHOSv0::ZMax(void) const
985 {
986   // Overall dimension of the PHOS (max)
987
988   AliPHOSGeometry * geom = GetGeometry() ; 
989
990   return  geom->GetOuterBoxSize(2)/2.;
991 }
992
993 //____________________________________________________________________________
994 void AliPHOSv0::Init(void)
995 {
996   // Just prints an information message
997   
998   Int_t i;
999
1000   if(AliLog::GetGlobalDebugLevel()>0) {
1001     TString st ; 
1002     for(i=0;i<35;i++) 
1003       st += "*";
1004     Info("Init", "%s", st.Data()) ;  
1005     // Here the PHOS initialisation code (if any!)
1006     
1007     AliPHOSGeometry * geom = GetGeometry() ; 
1008
1009     if (geom!=0)  
1010       Info("Init", "AliPHOS%s: PHOS geometry intialized for %s", Version().Data(), geom->GetName()) ;
1011     else
1012       Info("Init", "AliPHOS%s: PHOS geometry initialization failed !", Version().Data()) ;       
1013
1014     Info("Init", "%s", st.Data()) ;  
1015   }
1016 }