]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding get material to AliModule
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Sep 1999 06:55:57 +0000 (06:55 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Sep 1999 06:55:57 +0000 (06:55 +0000)
STEER/AliModule.cxx
STEER/AliModule.h

index d7e95db2669047568af2be5cf13ce637fd65f5a3..56e1bb12db39e889c4a9260d47581541eacc03b8 100644 (file)
@@ -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,
index 7fa4bbe064123bac100ce6e316a46e2148ab06c1..7acfe5c2fb1347a0f07ceab4c7c927874782c33b 100644 (file)
@@ -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;