]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSv0.cxx
AliITSgeom taken from AliITSLoader
[u/mrichter/AliRoot.git] / PHOS / AliPHOSv0.cxx
index 3ab2ce4693da1c0dd943ddd3771ce49e3fd59822..39f488925c081e0d13ae5d378993185b247a3850 100644 (file)
  **************************************************************************/
 /* $Id$ */
 
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.80  2005/06/17 07:39:07  hristov
+ * Removing GetDebug and SetDebug from AliRun and AliModule. Using AliLog for the messages
+ *
+ * Revision 1.79  2005/05/28 14:19:05  schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
 //_________________________________________________________________________
 // Implementation version v0 of PHOS Manager class 
 // An object of this class does not produce hits nor digits
@@ -46,6 +57,7 @@
 #include "AliPHOSLoader.h"
 #include "AliPHOSv0.h"
 #include "AliRun.h"
+#include "AliLog.h"
 
 ClassImp(AliPHOSv0)
 
@@ -57,6 +69,13 @@ AliPHOSv0::AliPHOSv0(const char *name, const char *title):
   GetGeometry() ; 
 }
 
+//____________________________________________________________________________
+void AliPHOSv0::Copy(TObject & phos) const
+{
+  TObject::Copy(phos) ; 
+  AliPHOS::Copy(phos) ; 
+}
+
 //____________________________________________________________________________
 void AliPHOSv0::BuildGeometry()
 {
@@ -320,22 +339,24 @@ void AliPHOSv0::CreateGeometry()
   // --- Position  PHOS mdules in ALICE setup ---
   
   Int_t idrotm[99] ;
-  Double_t const kRADDEG = 180.0 / TMath::Pi() ;
-  Float_t * phosParams = geom->GetPHOSParams() ;
-
-  Float_t r = geom->GetIPtoOuterCoverDistance() + phosParams[3] - geom->GetCPVBoxSize(1) ;
-  Int_t i;
-  for( i = 1; i <= geom->GetNModules()  ; i++ ) {
-    
-    Float_t angle = geom->GetPHOSAngle(i) ;
-    AliMatrix(idrotm[i-1], 90.,angle, 0., 0., 90., 270. +angle) ;
-    
-    Float_t xP1 =  r * TMath::Sin( angle / kRADDEG ) ;
-    Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
+  Int_t iXYZ,iAngle;
+  for (Int_t iModule = 0; iModule < geom->GetNModules(); iModule++ ) {
     
-    gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ;
+    Float_t angle[3][2];
+    for (iXYZ=0; iXYZ<3; iXYZ++)
+      for (iAngle=0; iAngle<2; iAngle++)
+       angle[iXYZ][iAngle] = geom->GetModuleAngle(iModule,iXYZ, iAngle);
+    AliMatrix(idrotm[iModule],
+             angle[0][0],angle[0][1],
+             angle[1][0],angle[1][1],
+             angle[2][0],angle[2][1]) ;
     
-  } 
+    Float_t pos[3];
+    for (iXYZ=0; iXYZ<3; iXYZ++)
+      pos[iXYZ] = geom->GetModuleCenter(iModule,iXYZ);
+    gMC->Gspos("PHOS", iModule+1, "ALIC", pos[0], pos[1], pos[2],
+              idrotm[iModule], "ONLY") ;
+  }
 
 }
 
@@ -872,7 +893,7 @@ void AliPHOSv0::Init(void)
   
   Int_t i;
 
-  if(fDebug) {
+  if(AliLog::GetGlobalDebugLevel()>0) {
     TString st ; 
     for(i=0;i<35;i++) 
       st += "*";