Geant4 error with making Calorimeter construction cell for CMS

ROOT Version: ROOT 6.14/06
_Geant4
Geant4 version Name: geant4-10-05 (7-December-2018)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/
Platform: linuxx8664gcc
Compiler: cmake version 3.8.2


I want to make calorimeter cell construction with geant4 and simulate particle event. But, I got error with “violation segmentation”. It didn’t push any errors when I make some little cells like 9x9 size.

  • cell construction ( 9x9 )
// DetectorConstruction.cc
...
G4VPhysicalVolume* DetectorConstruction::DefineVolumes() {
  // Geometry parameters
  // World
  const G4double kWorldXSide = 1000.0 * cm;
  const G4double kWorldYSide = 1000.0 * cm;
  const G4double kWorldZSide = 1000.0 * cm;

  // Calorimeter
  // PbWO4 crystal calorimeter
  const G4int kNumOfCrystalsPerRow = 9;
  const G4int kNumOfCrystalsPerColumn = 9;

  const G4double kCrystalWidth = 2.2*cm;
  const G4double kCrystalLength = 23.0*cm;

  const G4double kCaloXSide = (kCrystalWidth * kNumOfCrystalsPerRow) + 1*cm;
  const G4double kCaloYSide = (kCrystalWidth * kNumOfCrystalsPerColumn) + 1*cm;
  const G4double kCaloZSide = kCrystalLength;

...
  • output
    None error

But, I got violation segmentation errors when I make many cells like 13x13 size, 15x15 size, 30x30 size … (all same condition).

  • cell construction ( 9x9 )
// DetectorConstruction.cc
...
G4VPhysicalVolume* DetectorConstruction::DefineVolumes() {
  // Geometry parameters
  // World
  const G4double kWorldXSide = 1000.0 * cm;
  const G4double kWorldYSide = 1000.0 * cm;
  const G4double kWorldZSide = 1000.0 * cm;

  // Calorimeter
  // PbWO4 crystal calorimeter
  const G4int kNumOfCrystalsPerRow = 13;
  const G4int kNumOfCrystalsPerColumn = 13;

  const G4double kCrystalWidth = 2.2*cm;
  const G4double kCrystalLength = 23.0*cm;

  const G4double kCaloXSide = (kCrystalWidth * kNumOfCrystalsPerRow) + 1*cm;
  const G4double kCaloYSide = (kCrystalWidth * kNumOfCrystalsPerColumn) + 1*cm;
  const G4double kCaloZSide = kCrystalLength;

...

And, It didn’t push these errors when I make cells less than 9x9 size, like 4x4.

Plz help me

Geant4 User Forum

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