Message: Re: G4NistManager::ConstructNewGasMaterial() not working? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: G4NistManager::ConstructNewGasMaterial() not working? 

Forum: Geometry
Re: Warning G4NistManager::ConstructNewGasMaterial() not working? (J Martin-Albo)
Re: Question Re: G4NistManager::ConstructNewGasMaterial() not working? (Vladimir Ivanchenko)
Date: 13 Oct, 2012
From: J Martin-Albo <J Martin-Albo>

Hi,

The method below returns a pointer to a new material based on another one fetched from the G4 NIST database:

G4Material* MaterialsList::GXe(G4double pressure, G4double temperature)
{
  G4String name = "GXe";

  G4Material* mat = G4Material::GetMaterial(name, false);

  if (mat == 0) {
    G4NistManager* nist = G4NistManager::Instance();
    mat = nist->ConstructNewGasMaterial(name,"G4_Xe",temperature,pressure);
  }

  return mat;
}

In Geant4.9.5, the resulting material (named "GXe") behaves as if it were the original one ("G4_Xe").

Best, J M-A

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Question: Re: G4NistManager::ConstructNewGasMaterial() not working?   (Vladimir Ivanchenko - 15 Oct, 2012)
 Add Message Add Message
to: "Re: G4NistManager::ConstructNewGasMaterial() not working?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]