From 0afa509f4bf5b7b80c66e2dea527f44cd1bca138 Mon Sep 17 00:00:00 2001 From: fca Date: Tue, 14 Sep 1999 06:55:57 +0000 Subject: [PATCH] Adding get material to AliModule --- STEER/AliModule.cxx | 25 +++++++++++++++++++++++++ STEER/AliModule.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/STEER/AliModule.cxx b/STEER/AliModule.cxx index d7e95db2669..56e1bb12db3 100644 --- a/STEER/AliModule.cxx +++ b/STEER/AliModule.cxx @@ -158,6 +158,31 @@ 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, + Float_t &absl) +{ + // + // Store the parameters for a material + // + // imat the material index will be stored in (*fIdmate)[imat] + // name material name + // a atomic mass + // z atomic number + // dens density + // radl radiation length + // absl absorbtion length + // buf adress of an array user words + // 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); +} + //_____________________________________________________________________________ void AliModule::AliMixture(Int_t imat, const char *name, Float_t *a, diff --git a/STEER/AliModule.h b/STEER/AliModule.h index 7fa4bbe0641..7acfe5c2fb1 100644 --- a/STEER/AliModule.h +++ b/STEER/AliModule.h @@ -51,6 +51,8 @@ public: // Module composition virtual void AliMaterial(Int_t, const char*, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t* buf=0, Int_t nwbuf=0) const; + virtual void AliGetMaterial(Int_t, char*, Float_t&, Float_t&, Float_t&, + Float_t&, Float_t&); virtual void AliMixture(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) const; virtual void AliMedium(Int_t, const char*, Int_t, Int_t, Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t* ubuf=0, Int_t nbuf=0) const; -- 2.39.3