Using my own Geometry in rdecay02 example

Hi All, I am using rdecay02 example for my simulation. I have added my own geometry code in DetectorConstruction.cc file. I deleted DetectorMessagenger.cc file and all the references of previous gemoetry from all files. No compilation errors in code. But When In run the executable ./rdecay02, I get following error:

Checking overlaps for volume shellPV:0 (G4Sphere) ... OK! 
Checking overlaps for volume shellPV_1:0 (G4Sphere) ... OK! 
Checking overlaps for volume shellPV_2:0 (G4Sphere) ... OK! 
Checking overlaps for volume shellPV_3:0 (G4Sphere) ... OK! 
Checking overlaps for volume shellPV_4:0 (G4Sphere) ... OK! 

------------------------------------------------------------
---> The shell dimension:  inner_r 10   outer_r 1000
------------------------------------------------------------
World is registered to the default region.
physicsList->Construct() start.

 hInelastic FTFP_BERT : threshold between BERT and FTFP is over the interval 
 for pions :   3 to 6 GeV
 for kaons :   3 to 6 GeV
 for proton :  3 to 6 GeV
 for neutron : 3 to 6 GeV

physicsList->CheckParticleList() start.
physicsList->setCut() start.
/run/physicsModified
=======================================================================
======                 Electromagnetic Physics Parameters      ========
=======================================================================
LPM effect enabled                                 1
Enable creation and use of sampling tables         0
Apply cuts on all EM processes                     0
Use general process                                0
Enable linear polarisation for gamma               0
Enable sampling of quantum entanglement            0
X-section factor for integral approach             0.8
Min kinetic energy for tables                      100 eV 
Max kinetic energy for tables                      100 TeV
Number of bins per decade of a table               7
Verbose level                                      1
Verbose level for worker thread                    0
Bremsstrahlung energy threshold above which 
  primary e+- is added to the list of secondary    100 TeV
Bremsstrahlung energy threshold above which primary
  muon/hadron is added to the list of secondary    100 TeV
Lowest triplet kinetic energy                      1 MeV
Enable sampling of gamma linear polarisation       0
5D gamma conversion model type                     0
5D gamma conversion model on isolated ion          0
Livermore data directory                           livermore
=======================================================================
======                 Ionisation Parameters                   ========
=======================================================================
Step function for e+-                              (1, 1 mm)
Step function for muons/hadrons                    (1, 1 mm)
Step function for light ions                       (0.2, 0.1 mm)
Step function for general ions                     (0.2, 0.1 mm)
Lowest e+e- kinetic energy                         1 keV
Lowest muon/hadron kinetic energy                  1 keV
Fluctuations of dE/dx are enabled                  1
Use ICRU90 data                                    0
Use built-in Birks satuaration                     0
Build CSDA range enabled                           0
Use cut as a final range enabled                   0
Enable angular generator interface                 0
Max kinetic energy for CSDA tables                 1 GeV
Max kinetic energy for NIEL computation            0 eV 
Linear loss limit                                  0.01
Read data from file for e+e- pair production by mu 0
=======================================================================
======                 Multiple Scattering Parameters          ========
=======================================================================
Type of msc step limit algorithm for e+-           1
Type of msc step limit algorithm for muons/hadrons 0
Msc lateral displacement for e+- enabled           1
Msc lateral displacement for muons and hadrons     0
Urban msc model lateral displacement alg96         1
Range factor for msc step limit for e+-            0.04
Range factor for msc step limit for muons/hadrons  0.2
Geometry factor for msc step limitation of e+-     2.5
Safety factor for msc step limit for e+-           0.6
Skin parameter for msc step limitation of e+-      1
Lambda limit for msc step limit for e+-            1 mm
Use Mott correction for e- scattering              0
Factor used for dynamic computation of angular 
  limit between single and multiple scattering     1
Fixed angular limit between single 
  and multiple scattering                          3.1416 rad
Upper energy limit for e+- multiple scattering     100 MeV
Type of electron single scattering model           0
Type of nuclear form-factor                        1
Screening factor                                   1
=======================================================================
======                 Atomic Deexcitation Parameters          ========
=======================================================================
Fluorescence enabled                               1
Fluorescence Bearden data files enabled            0
Fluorescence ANSTO data files enabled              0
Auger electron cascade enabled                     1
PIXE atomic de-excitation enabled                  0
De-excitation module ignores cuts                  0
Type of PIXE cross section for hadrons             Empirical
Type of PIXE cross section for e+-                 Livermore
=======================================================================

### ===  Deexcitation model UAtomDeexcitation is activated for 1 region:
          DefaultRegionForTheWorld  1  1  0
### ===  Auger flag: 1
### ===  Ignore cuts flag:   0

phot:  for gamma SubType=12 BuildTable=0
      LambdaPrime table from 200 keV to 100 TeV in 61 bins 
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
 LivermorePhElectric : Emin=    0 eV  Emax=  100 TeV  SauterGavrila Fluo

compt:  for gamma SubType=13 BuildTable=1
      Lambda table from 100 eV  to 1 MeV, 7 bins/decade, spline: 1
      LambdaPrime table from 1 MeV to 100 TeV in 56 bins 
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
       Klein-Nishina : Emin=    0 eV  Emax=  100 TeV

conv:  for gamma SubType=14 BuildTable=1
      Lambda table from 1.022 MeV to 100 TeV, 18 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     BetheHeitlerLPM : Emin=    0 eV  Emax=  100 TeV  ModifiedTsai

Rayl:  for gamma SubType=11 BuildTable=1
      Lambda table from 100 eV  to 100 keV, 7 bins/decade, spline: 0
      LambdaPrime table from 100 keV to 100 TeV in 63 bins 
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
   LivermoreRayleigh : Emin=    0 eV  Emax=  100 TeV  CullenGenerator

msc:  for e-  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            UrbanMsc : Emin=    0 eV  Emax=  100 MeV Nbins=42 100 eV  - 100 MeV
          StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llim=1 mm
        WentzelVIUni : Emin=  100 MeV Emax=  100 TeV Nbins=42 100 MeV - 100 TeV
          StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llim=1 mm

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : glob03
      issued by : G4PhysicsLogVector::G4PhysicsLogVector()
G4PhysicsLogVector with wrong parameters: theNbin= 2 Emin= 1e+08 Emax= 1e+08Nbins should be > 1 and Emax > Emin > 0

*** Fatal Exception *** core dump ***
 **** Track information is not available at this moment
 **** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------


*** G4Exception: Aborting execution ***

Can anyone tell me what could be the problem? How can I know the problem?

Hi, it means you have some overlaps in your geometry. These errors MUST be corrected.

Susanna

I saw the above errors, It definitely checks for overlaps and it says OK!

sorry, I misread :slight_smile:
which version of Geant4 do you use? which physics list do you use?

cheers
Susanna

Ok. I solved the problem. It was basically happening because I was registering physics processes in wrong way. I was using G4VUserPhysicsList, I needed to use G4VModularPhysicsList class. It was issue related to preinit.

@guatelli, by the way, can you please tell me why constructProcess() function in physlicslist.cc file in rdecay02 does not use AddTransportation() method? I read geant4 documentation, it says it is mendatory method.

I thought that the G4VModularPhysicsList base class took care of AddTransportation itself, so that user-developed physics lists don’t have to worry about it.

as usual, thanks mkelsey!!!