GSI Forum - RDF feed https://forum.gsi.de/index.php TGeoMixture SetIndex function https://forum.gsi.de/index.phpindex.php?t=rview&goto=11729&th=3098#msg_11729
there is a function called "SetIndex()" in TGeoMixture class.
What does this index mean?

For example if I define a number of media for the detector geometry (an example for Fused Sil medium follows), what should these indices for each of my medium mean?
Should they be unique? Where are they later used?

// Mixture: FusedSil
nel = 2;
density = 2.200000;
TGeoMixture* FusedSil = new TGeoMixture("FusedSil", nel,density);
aa = 28.090000; z = 14.000000; w = 0.467475; // SI
FusedSil->DefineElement(0,aa,z,w);
aa = 15.999400; z = 8.000000; w = 0.532525; // O
FusedSil->DefineElement(1,aa,z,w);
FusedSil->SetIndex(0);
// Medium: FusedSil
numed = 1; // medium number
par = 1.000000; // isvol
par = 1.000000; // ifield
par = 20.000000; // fieldm
par = -1.000000; // tmaxfd
par = -1.000000; // stemax
par = -1.000000; // deemax
par = 0.001000; // epsil
par = -1.000000; // stmin
TGeoMedium *FusedSil_m = new TGeoMedium("FusedSil", numed,FusedSil, par);

Thank you]]>
Maria Patsyuk 2011-05-02T13:37:00-00:00
Re: TGeoMixture SetIndex function https://forum.gsi.de/index.phpindex.php?t=rview&goto=11740&th=3098#msg_11740
You do not need to set this index, at the end of geometry constructiona SetIndexAll() method will be called (internally, you do not need to call it), this method take care that each material or mixture has a unique index.

regards