]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSv4.cxx
Removing unused variables
[u/mrichter/AliRoot.git] / PHOS / AliPHOSv4.cxx
index cac1555d7d7f089c1dd52b41d349db7bcdbf0ac4..e486ad2e2d63d272e91abf24d8d67b2ff2e04454 100644 (file)
 
 // --- Standard library ---
 
-#include <stdio.h>
-
 // --- AliRoot header files ---
 #include "AliPHOSFastRecParticle.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSv4.h"
+#include "AliPHOSGetter.h"
 #include "AliRun.h"
 #include "AliConst.h"
 #include "AliMC.h"
@@ -74,10 +73,10 @@ AliPHOSv4::AliPHOSv4(const char *name, const char *title):
 {
   // ctor
 
-  // gets an instance of the geometry parameters class  
-  if (strcmp(GetTitle(),"") != 0 ) 
-    fGeom = AliPHOSGeometry::GetInstance(GetTitle(), "") ; 
-     
+  
+  // create the geometry parameters object  
+  // and post it to a folder (Post retrieves the correct geometry)
+  AliPHOSGetter::GetInstance(gDirectory->GetName(), 0)->PostGeometry() ;    
     
     SetBigBox(0, GetGeometry()->GetOuterBoxSize(0) ) ;
     SetBigBox(1, GetGeometry()->GetOuterBoxSize(1) + GetGeometry()->GetCPVBoxSize(1) ) ; 
@@ -179,7 +178,7 @@ void AliPHOSv4::CreateGeometry()
 {
   // Create the geometry for GEANT
   
-  AliPHOSv4 *phostmp = (AliPHOSv4*)gAlice->GetModule("PHOS") ;
+  AliPHOSv4 *phostmp = dynamic_cast<AliPHOSv4*>(gAlice->GetModule("PHOS")) ;
   
   if ( phostmp == NULL ) {
     
@@ -470,7 +469,7 @@ Double_t AliPHOSv4::SigmaE(Double_t energy)
 }
 
 //____________________________________________________________________________
-Double_t AliPHOSv4::SigmaP(Double_t energy, Int_t incidence)
+Double_t AliPHOSv4::SigmaP(Double_t energy, Double_t incidence)
 {
   // Calculates the energy dependent position resolution