diff --git a/graf3d/g3d/src/TMaterial.cxx b/graf3d/g3d/src/TMaterial.cxx index df28ac6d9fb043b4b281d11bdecf9f8080df3833..9476360d9aca60944d32e2c3524c7652d64672be 100644 --- a/graf3d/g3d/src/TMaterial.cxx +++ b/graf3d/g3d/src/TMaterial.cxx @@ -22,20 +22,22 @@ ClassImp(TMaterial) //______________________________________________________________________________ TMaterial::TMaterial() { -//*-*-*-*-*-*-*-*-*-*-*Material default constructor*-*-*-*-*-*-*-*-*-*-*-* -//*-* ============================ + // Material default constructor. - //do nothing + fA = 0; + fDensity = 0; + fInterLength = 0; + fNumber = 0; + fRadLength = 0; + fZ = 0; } - //______________________________________________________________________________ TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z, Float_t density) :TNamed(name,title), TAttFill(0,1) { -//*-*-*-*-*-*-*-*-*-*-*Material normal constructor*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* ============================ + // Material normal constructor. if (!gGeometry) gGeometry = new TGeometry("Geometry","Default Geometry"); fA = a; @@ -48,13 +50,11 @@ TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z, } - //______________________________________________________________________________ TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z, Float_t density, Float_t radl, Float_t inter) :TNamed(name,title), TAttFill(0,1) { -//*-*-*-*-*-*-*-*-*-*-*Material normal constructor*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* ============================ + // Material normal constructor. if (!gGeometry) gGeometry = new TGeometry("Geometry","Default Geometry"); fA = a; @@ -70,13 +70,13 @@ TMaterial::TMaterial(const char *name, const char *title, Float_t a, Float_t z, //______________________________________________________________________________ TMaterial::~TMaterial() { -//*-*-*-*-*-*-*-*-*-*-*Material default destructor*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* ============================ + // Material default destructor. if (gGeometry) gGeometry->GetListOfMaterials()->Remove(this); } + //______________________________________________________________________________ void TMaterial::Streamer(TBuffer &R__b) { diff --git a/graf3d/g3d/src/TMixture.cxx b/graf3d/g3d/src/TMixture.cxx index 37a5b8e1bd65bd91278086b796c6c2a06f0f0d69..50672e50ade10b237e4909a6d8f8c2bed4d858e0 100644 --- a/graf3d/g3d/src/TMixture.cxx +++ b/graf3d/g3d/src/TMixture.cxx @@ -19,40 +19,38 @@ ClassImp(TMixture) // Manages a detector mixture. See class TGeometry. // + //______________________________________________________________________________ TMixture::TMixture() { -//*-*-*-*-*-*-*-*-*-*-*Mixture default constructor*-*-*-*-*-*-*-*-*-*-*-* -//*-* ============================ + // Mixture default constructor. fAmixt = 0; fZmixt = 0; fWmixt = 0; - + fNmixt = 0; } + //______________________________________________________________________________ TMixture::TMixture(const char *name, const char *title, Int_t nmixt) :TMaterial(name,title,0,0,0) { -//*-*-*-*-*-*-*-*-*-*-*Mixture normal constructor*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* ============================ -//*-* -//*-* Defines mixture OR COMPOUND as composed by -//*-* the basic nmixt materials defined later by DefineElement. -//*-* -//*-* If nmixt > 0 then Wmixt contains the PROPORTION BY WEIGHTS -//*-* of each basic material in the mixture. -//*-* -//*-* If nmixt < 0 then Wmixt contains the number of atoms -//*-* of a given kind into the molecule of the COMPOUND -//*-* In this case, Wmixt is changed to relative weights. * -//*-* -//*-* nb : the radiation length is computed according -//*-* the EGS manual slac-210 uc-32 June-78 -//*-* formula 2-6-8 (37) -//*-* -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + // Mixture normal constructor + // + // Defines mixture OR COMPOUND as composed by + // the basic nmixt materials defined later by DefineElement. + // + // If nmixt > 0 then Wmixt contains the PROPORTION BY WEIGHTS + // of each basic material in the mixture. + // + // If nmixt < 0 then Wmixt contains the number of atoms + // of a given kind into the molecule of the COMPOUND + // In this case, Wmixt is changed to relative weights. + // + // nb : the radiation length is computed according + // the EGS manual slac-210 uc-32 June-78 + // formula 2-6-8 (37) if (nmixt == 0) { fAmixt = 0; @@ -73,8 +71,7 @@ TMixture::TMixture(const char *name, const char *title, Int_t nmixt) //______________________________________________________________________________ TMixture::~TMixture() { -//*-*-*-*-*-*-*-*-*-*-*Mixture default destructor*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* ============================ + // Mixture default destructor. delete [] fAmixt; delete [] fZmixt; @@ -84,11 +81,11 @@ TMixture::~TMixture() fWmixt = 0; } + //______________________________________________________________________________ void TMixture::DefineElement(Int_t n, Float_t a, Float_t z, Float_t w) { -//*-*-*-*-*-*-*-*-*-*-*Define one mixture element*-*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* ========================== + // Define one mixture element. if (n < 0 || n >= TMath::Abs(fNmixt)) return; fAmixt[n] = a; @@ -96,11 +93,12 @@ void TMixture::DefineElement(Int_t n, Float_t a, Float_t z, Float_t w) fWmixt[n] = w; } -//_______________________________________________________________________ + +//______________________________________________________________________________ void TMixture::Streamer(TBuffer &b) { -//*-*-*-*-*-*-*-*-*Stream a class object*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* ========================================= + // Stream a class object. + UInt_t R__s, R__c; if (b.IsReading()) { b.ReadVersion(&R__s, &R__c); @@ -125,4 +123,3 @@ void TMixture::Streamer(TBuffer &b) b.SetByteCount(R__c, kTRUE); } } - diff --git a/graf3d/g3d/src/TNode.cxx b/graf3d/g3d/src/TNode.cxx index bd9cb41c1e8b34df9f41225c4cd9ed2348dc9729..3d0cf84043581024e1a3f1348e66f86f9e6646c6 100644 --- a/graf3d/g3d/src/TNode.cxx +++ b/graf3d/g3d/src/TNode.cxx @@ -65,6 +65,7 @@ TNode::TNode() fShape = 0; fNodes = 0; fVisibility = 1; + fX = fY = fZ = 0; }