+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+*/
+
///////////////////////////////////////////////////////////////////////////////
// //
// Base class for ALICE modules. Both sensitive modules (Modules) and //
// //
//Begin_Html
/*
-<img src="gif/AliModuleClass.gif">
+<img src="picts/AliModuleClass.gif">
*/
//End_Html
// //
//
// Get the Module numeric ID
Int_t id = gAlice->GetModuleID(name);
- if (id < 0) {
- // Unknown Module !
- Warning("AliRun::Ctor","ERROR Unknown Module: %s\n",name);
+ if (id>=0) {
+ // Module already added !
+ Warning("Ctor","Module: %s already present at %d\n",name,id);
return;
}
//
// Add this Module to the list of Modules
- gAlice->Modules()->AddAtAndExpand(this,id);
+ gAlice->Modules()->Add(this);
//
//
SetMarkerColor(3);
// nwbuf number of user words
//
Int_t kmat;
- AliMC::GetMC()->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
+ gMC->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
(*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,
// wmat array of concentrations
//
Int_t kmat;
- AliMC::GetMC()->Mixture(kmat, name, a, z, dens, nlmat, wmat);
+ gMC->Mixture(kmat, name, a, z, dens, nlmat, wmat);
(*fIdmate)[imat]=kmat;
}
// = 3 constant magnetic field along z
//
Int_t kmed;
- Int_t *idtmed = gAlice->Idtmed();
- AliMC::GetMC()->Medium(kmed,name, (*fIdmate)[nmat], isvol, ifield, fieldm,
+ gMC->Medium(kmed,name, (*fIdmate)[nmat], isvol, ifield, fieldm,
tmaxfd, stemax, deemax, epsil, stmin, ubuf, nbuf);
- idtmed[numed-1]=kmed;
+ (*fIdtmed)[numed]=kmed;
}
//_____________________________________________________________________________
// theta3 polar angle for axis III
// phi3 azimuthal angle for axis III
//
- AliMC::GetMC()->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
+ gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
}
//_____________________________________________________________________________