]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/STEER/AliModule.cxx
Removed unused variables. Initial value for centrality fixed.
[u/mrichter/AliRoot.git] / STEER / STEER / AliModule.cxx
index 5974f7ab08f5fa4774c04caef2d152429d76e194..3adb748719659b56e21d21fa9a001a7d8684c7d7 100644 (file)
 #include "AliMC.h"
 #include "AliSimulation.h"
 #include "AliRawDataHeader.h"
+#include "AliDigitizationInput.h"
 
 #include "AliDAQ.h"
 
+using std::endl;
+using std::cout;
+using std::fstream;
+using std::ios;
+using std::ostream;
 ClassImp(AliModule)
  
 Float_t AliModule::fgDensityFactor = 1.0;
@@ -69,7 +75,8 @@ AliModule::AliModule():
   fEnable(1),
   fMaxIterTrackRef(0),
   fCurrentIterTrackRef(0),
-  fRunLoader(0)
+  fRunLoader(0),
+  fDigInput(0)
 {
   //
   // Default constructor for the AliModule class
@@ -87,7 +94,8 @@ AliModule::AliModule(const char* name,const char *title):
   fEnable(1),
   fMaxIterTrackRef(0),
   fCurrentIterTrackRef(0),
-  fRunLoader(0)
+  fRunLoader(0),
+  fDigInput(0)
 {
   //
   // Normal constructor invoked by all Modules.
@@ -168,7 +176,7 @@ void AliModule::AliMaterial(Int_t imat, const char* name, Float_t a,
     (*fIdmate)[imat]=kmat;
   }
 }
-  
+
 //_______________________________________________________________________
 void AliModule::AliGetMaterial(Int_t imat, char* name, Float_t &a, 
                                Float_t &z, Float_t &dens, Float_t &radl,
@@ -188,12 +196,20 @@ void AliModule::AliGetMaterial(Int_t imat, char* name, Float_t &a,
   // nwbuf       number of user words
   //
 
-  Float_t buf[10];
-  Int_t nwbuf, kmat;
-  kmat=(*fIdmate)[imat];
-  gMC->Gfmate(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
+  Int_t kmat=(*fIdmate)[imat];
+  TString sname;
+  TArrayD par;
+  Double_t da, dz, ddens, dradl, dabsl;
+  gMC->GetMaterial(kmat, sname, da, dz, ddens, dradl, dabsl, par);
+
+  const char* chname = sname.Data();
+  strncpy(name, chname, strlen(chname)+1);
+  a = da;
+  z = dz;
+  dens = ddens;
+  radl = dradl;
+  absl = dabsl;
 }
-  
 
 //_______________________________________________________________________
 void AliModule::AliMixture(Int_t imat, const char *name, Float_t *a,