change some comments
This commit is contained in:
parent
4f6b88b162
commit
29dd4efc5e
@ -48,7 +48,6 @@ int main(int argc, char** argv) {
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
// 根据模式,选择开始进行模拟,或打开GUI
|
||||
//
|
||||
if (!ui) {
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
|
@ -17,8 +17,7 @@ public:
|
||||
SteppingAction(EventAction* eventAction);
|
||||
~SteppingAction() override;
|
||||
|
||||
// method from the base class
|
||||
// 循环每个 step
|
||||
// 每个 step 调用一次
|
||||
void UserSteppingAction(const G4Step*) override;
|
||||
|
||||
private:
|
||||
|
@ -68,9 +68,9 @@ G4VPhysicalVolume* DetectorConstruction::Construct() {
|
||||
|
||||
new G4PVPlacement(0, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
logicEnv, // its logical volume
|
||||
"Envelope", // its name
|
||||
logicWorld, // 放置在 World 中
|
||||
logicEnv, // logical volume
|
||||
"Envelope", // name
|
||||
logicWorld, // Mother Logical Volumes,即 World
|
||||
false, // no boolean operation
|
||||
0, // copy number
|
||||
checkOverlaps); // overlaps checking
|
||||
@ -87,15 +87,15 @@ G4VPhysicalVolume* DetectorConstruction::Construct() {
|
||||
G4Cons* solidShape1 = new G4Cons("Shape1", shape1_rmina, shape1_rmaxa, shape1_rminb, shape1_rmaxb, shape1_hz,
|
||||
shape1_phimin, shape1_phimax);
|
||||
|
||||
G4LogicalVolume* logicShape1 = new G4LogicalVolume(solidShape1, // its solid
|
||||
shape1_mat, // its material
|
||||
"Shape1"); // its name
|
||||
G4LogicalVolume* logicShape1 = new G4LogicalVolume(solidShape1, // solid
|
||||
shape1_mat, // material
|
||||
"Shape1"); // name
|
||||
|
||||
new G4PVPlacement(0, // no rotation
|
||||
pos1, // at position
|
||||
logicShape1, // its logical volume
|
||||
"Shape1", // its name
|
||||
logicEnv, // its mother volume
|
||||
logicShape1, // logical volume
|
||||
"Shape1", // name
|
||||
logicEnv, // mother volume
|
||||
false, // no boolean operation
|
||||
0, // copy number
|
||||
checkOverlaps); // overlaps checking
|
||||
@ -108,19 +108,19 @@ G4VPhysicalVolume* DetectorConstruction::Construct() {
|
||||
G4double shape2_dxa = 12 * cm, shape2_dxb = 12 * cm;
|
||||
G4double shape2_dya = 10 * cm, shape2_dyb = 16 * cm;
|
||||
G4double shape2_dz = 6 * cm;
|
||||
G4Trd* solidShape2 = new G4Trd("Shape2", // its name
|
||||
G4Trd* solidShape2 = new G4Trd("Shape2", // name
|
||||
0.5 * shape2_dxa, 0.5 * shape2_dxb, 0.5 * shape2_dya, 0.5 * shape2_dyb,
|
||||
0.5 * shape2_dz); // its size
|
||||
0.5 * shape2_dz); // size
|
||||
|
||||
G4LogicalVolume* logicShape2 = new G4LogicalVolume(solidShape2, // its solid
|
||||
shape2_mat, // its material
|
||||
"Shape2"); // its name
|
||||
G4LogicalVolume* logicShape2 = new G4LogicalVolume(solidShape2, // solid
|
||||
shape2_mat, // material
|
||||
"Shape2"); // name
|
||||
|
||||
new G4PVPlacement(0, // no rotation
|
||||
pos2, // at position
|
||||
logicShape2, // its logical volume
|
||||
"Shape2", // its name
|
||||
logicEnv, // its mother volume
|
||||
logicShape2, // logical volume
|
||||
"Shape2", // name
|
||||
logicEnv, // mother volume
|
||||
false, // no boolean operation
|
||||
0, // copy number
|
||||
checkOverlaps); // overlaps checking
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
namespace B1 {
|
||||
|
||||
// 初始化 fEventAction,即获取到当前 Event 所在的 Run
|
||||
EventAction::EventAction(RunAction* runAction) : fRunAction(runAction) {}
|
||||
|
||||
EventAction::~EventAction() {}
|
||||
|
@ -9,12 +9,14 @@
|
||||
|
||||
namespace B1 {
|
||||
|
||||
SteppingAction::SteppingAction(EventAction* eventAction) : fEventAction(eventAction) {} // 初始化 eventAction 类
|
||||
// 初始化 fEventAction,即获取到当前 Step 所在的 Event
|
||||
SteppingAction::SteppingAction(EventAction* eventAction) : fEventAction(eventAction) {}
|
||||
|
||||
SteppingAction::~SteppingAction() {}
|
||||
|
||||
// 每个 step 调用一次
|
||||
void SteppingAction::UserSteppingAction(const G4Step* step) {
|
||||
// 这段代码的目的是获得 Shape2 所代表的 Logical Volume
|
||||
if (!fScoringVolume) {
|
||||
const DetectorConstruction* detConstruction =
|
||||
static_cast<const DetectorConstruction*>(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
|
||||
|
Loading…
Reference in New Issue
Block a user