Cumulated dose is smaller for a larger object (in exampleB1)?

Geant4 Version: 11.2.2
Operating System: MacOS Sonoma 14.2
Compiler/Version: clang-1500.1.0.2.5
CMake Version: 3.29.5


I am new to Geant4 and am using exampleB1 for calculation. The following is how I set the object

G4VPhysicalVolume* DetectorConstruction::Construct()
{
  // Get nist material manager
  G4NistManager* nist = G4NistManager::Instance();

  // Envelope parameters
  //
  G4double env_sizeX = 20*cm, env_sizeY = 20*cm, env_sizeZ = 20*cm;
  // G4double env_sizeXY = 100*cm, env_sizeZ = 100*cm;
  G4Material* env_mat = nist->FindOrBuildMaterial("G4_AIR");

  // Option to switch on/off checking of volumes overlaps
  //
  G4bool checkOverlaps = true;

  //
  // World
  //
  G4double world_sizeX  = 2*env_sizeX;
  G4double world_sizeY  = 2*env_sizeY;
  G4double world_sizeZ  = 2*env_sizeZ;
  G4Material* world_mat = nist->FindOrBuildMaterial("G4_AIR");

  G4Box* solidWorld =
    new G4Box("World",                       //its name
       0.5*world_sizeX, 0.5*world_sizeY, 0.5*world_sizeZ);     //its size

  G4LogicalVolume* logicWorld =
    new G4LogicalVolume(solidWorld,          //its solid
                        world_mat,           //its material
                        "World");            //its name

  G4VPhysicalVolume* physWorld =
    new G4PVPlacement(0,                     //no rotation
                      G4ThreeVector(),       //at (0,0,0)
                      logicWorld,            //its logical volume
                      "World",               //its name
                      0,                     //its mother  volume
                      false,                 //no boolean operation
                      0,                     //copy number
                      checkOverlaps);        //overlaps checking

  //
  // Envelope
  //
  G4Box* solidEnv =
    new G4Box("Envelope",                    //its name
        env_sizeX, env_sizeY, env_sizeZ); //its size

  G4LogicalVolume* logicEnv =
    new G4LogicalVolume(solidEnv,            //its solid
                        env_mat,             //its material
                        "Envelope");         //its name

  new G4PVPlacement(0,                       //no rotation
                    G4ThreeVector(),         //at (0,0,0)
                    logicEnv,                //its logical volume
                    "Envelope",              //its name
                    logicWorld,              //its mother  volume
                    false,                   //no boolean operation
                    0,                       //copy number
                    checkOverlaps);          //overlaps checking

  G4ThreeVector pos = G4ThreeVector(10*cm, 0*cm, 0*cm);
  // Shape 2
  //
  G4Material* shape2_mat = nist->FindOrBuildMaterial("G4_ADIPOSE_TISSUE_ICRP");

  G4double shape2_dx  = 1*cm;
  G4double shape2_dy  = 1*cm;
  G4double shape2_dz  = 0.6*cm;
  G4Box* solidShape2 =
    new G4Box("Shape2",                      //its name
              shape2_dx, shape2_dy, shape2_dz); //its size

  G4LogicalVolume* logicShape2 =
    new G4LogicalVolume(solidShape2,         //its solid
                        shape2_mat,          //its material
                        "Shape2");           //its name

  new G4PVPlacement(0,                       //no rotation
                    pos,                    //at position
                    logicShape2,             //its logical volume
                    "Shape2",                //its name
                    logicEnv,                //its mother  volume
                    false,                   //no boolean operation
                    0,                       //copy number
                    checkOverlaps);          //overlaps checking

  // // Set Shape2 as scoring volume
  // //
  fScoringVolume = logicShape2;

  //
  //always return the physical World
  //
  return physWorld;
}

The run.mac is:

/gun/particle neutron
/gun/energy 14 MeV
/gun/direction 1 0 0
/run/beamOn 10000

The result is:
Among them, the cumulated dose per run, in scoring volume calculated for the shape of 1cm * 1cm * 0.6cm: 1.10384 microGy;

And after I changed the size of shape2 to 3cm * 2cm * 9cm, it says: in scoring volume calculated for the shape of 3cm * 2cm * 9cm: 15.9728 nanoGy.

Why is the cumulated dose smaller for a larger box? How does fScoringVolume in exampleB1 calculate the dose deposition?

1 Like

see RunAction.cc, around lines 92-107

1 Like

thank you for answering. I get it.