Geant4基础知识课题.docVIP

  • 26
  • 0
  • 约2.08万字
  • 约 25页
  • 2016-08-05 发布于湖北
  • 举报
Geant4基础知识 G4模拟粒子过程: 建立一次模拟,在 G4 中称为一次Run;Run 建立后,需要对几何结构、物理过程进行初始化;初始化完成后就开始模拟过程了,首先发射一个粒子。在G4 中,发射一个(或一系列)粒子到所有次级粒子死亡的过程成为一次 Event。而每次发射的初始粒子则有粒子发射器进行控制。而在每一个event过程中,粒子与材料反应后会可能生成多个次级粒子,每个粒子都会有一条径 迹,称之为 track;而每一个粒子(初始的或次级的)的径迹又是由很多步组成的,称之为step。 G4模拟的基本算法: A Run Start - 初始化物理模型/几何模型- An Event Start - 调用粒子发射器发射粒子 - A Track Start - A Step Start - A Step End - Next Step Start - …… - All Step End - A Track End - Next Track Start - …… - All Track End - An Event End - Next Event Start - …… - All Event End(All Primaries Shot) - A Run End - Next Run Start - …… 1) main()中应该包括的内容 Geant4是一个探测器模拟工具, 但它对于某个特定的模拟程序没有固定的main()函数, 用户在建立模拟程序的过程中需要提供自己的main()函数. 一个最基本的main()函数需要包括以下几个方面: G4RunManager(模拟整个过程) G4VUserDetectorConstruction(定义探测器材料, 几何形状, 灵敏区和读出方案) G4VUserPhysicsList(定义粒子种类和物理过程, 还有截断参数) G4VUserPrimaryGeneratorAction(定义了源粒子的种类, 能量, 出射方向等) 一个最简单的main()函数如下: #include G4RunManager.hh #include G4UImanager.hh #include ExN01DetectorConstruction.hh #include ExN01PhysicsList.hh #include ExN01PrimaryGeneratorAction.hh int main() { // Construct the default run manager G4RunManager* runManager = new G4RunManager; // set mandatory initialization classes runManager-SetUserInitialization(new ExN01DetectorConstruction); runManager-SetUserInitialization(new ExN01PhysicsList); // set mandatory user action class runManager-SetUserAction(new ExN01PrimaryGeneratorAction); // Initia

文档评论(0)

1亿VIP精品文档

相关文档