// --- 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"
ClassImp(AliPHOSv4)
+//____________________________________________________________________________
+AliPHOSv4::AliPHOSv4() : AliPHOS()
+{
+ // default ctor : initialize data member
+ fBigBoxX = 0. ;
+ fBigBoxY = 0. ;
+ fBigBoxZ = 0. ;
+ fFastRecParticles = 0 ;
+ fNRecParticles = 0 ;
+ fRan = 0 ;
+ fResPara1 = 0. ;
+ fResPara2 = 0. ;
+ fResPara3 = 0. ;
+ fPosParaA0 = 0. ;
+ fPosParaA1 = 0. ;
+ fPosParaB0 = 0. ;
+ fPosParaB1 = 0. ;
+ fPosParaB2 = 0. ;
+
+}
+
//____________________________________________________________________________
AliPHOSv4::AliPHOSv4(const char *name, const char *title):
AliPHOS(name,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) ) ;
{
// Create the geometry for GEANT
- AliPHOSv4 *phostmp = (AliPHOSv4*)gAlice->GetModule("PHOS") ;
+ AliPHOSv4 *phostmp = dynamic_cast<AliPHOSv4*>(gAlice->GetModule("PHOS")) ;
if ( phostmp == NULL ) {
}
//____________________________________________________________________________
-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