部門 > Geant4 > ある場所のMaterialやPhysicalVolumeを調べる

「部門/Geant4/ある場所のMaterialやPhysicalVolumeを調べる」の編集履歴(バックアップ)一覧に戻る

部門/Geant4/ある場所のMaterialやPhysicalVolumeを調べる - (2013/02/13 (水) 20:59:22) のソース

[[FAQ.4.  Tracks and steps>http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/FAQ/html/ch01s04.html]]
でできそうだが...

GetMaterialがG4ThreeVectorに対しては使えなくて、G4StepPointに対してなのでこれがどういうクラスなのか分からないといけない。

PhysicalVolumeに対してなら
#highlight(c++){{G4Material *check_mat = test_phys->GetMaterial();
G4String check_str = check_mat->GetName();
G4cout<<check_str<<G4endl;}}
とかできる。