Python3: GetMaterial from G4NistManager

Dear experts,

I’m trying to use a HEP material (lAr) in a python3 code, but it seems that I cannot manage to do it in the correct way. Based on the example given at:

the c++ implementation is done this way:

#include "globals.hh"
#include "G4Material.hh"
#include "G4NistManager.hh"

int main() {
  G4NistManager* man = G4NistManager::Instance();
  // HEP materials
  G4Material* PbWO4  = man->FindOrBuildMaterial("G4_PbWO4");
  G4Material* lAr    = man->FindOrBuildMaterial("G4_lAr");

I’ve found some g4py examples for previous G4 releases, such that:

import g4py.NISTmaterials
LAr = G4Material("liquidArgon", 18., 39.95*g/mole, 1.390*g/cm3)

but none for the v10. What would be the correct way to use this in python3?

Cheers, Gustavo

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.