Message: Optical Physics List and G4exception Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Optical Physics List and G4exception 

Forum: Physics List
Date: 04 Sep, 2008
From: Florian ITARD <Florian ITARD>

Dear all,

I have tried to generate some Cerenkov Photons in my geometry. I have succeeded this one on my personal computer, but when I have wanted turn my code in a farm, unhappy I discovered this error's message:

//////////////////////////////////////////////////////////////////////////////////

 ### Run 0 start.

--------- Ranecu engine status ---------
 Initial seed (index) = 4
 Current couple of seeds = 3443, 4334
----------------------------------------
  G4ParticleChange::CheckIt    : the global time goes back  !!
  Difference:  0.00333564[ns] 
  G4ParticleChange::CheckIt    : the proper time goes back  !!
  Difference:  2.84061e-07[ns] 
 G4ParticleChange::CheckIt 
      -----------------------------------------------
        G4ParticleChange Information  
      -----------------------------------------------
        # of 2ndaries       :                    0
      -----------------------------------------------
        Energy Deposit (MeV):                    0
        Non-ionizing Energy Deposit (MeV):                    0
        Track Status        :                Alive
        True Path Length (mm) :                   -1
        Stepping Control      :                    0
        Mass (GeV)   :                    0
        Charge (eplus)   :                    0
        MagneticMoment   :                    0
                :  =                    0*[e hbar]/[2 m]
        Position - x (mm)   :                    0
        Position - y (mm)   :                    0
        Position - z (mm)   :                 -201
        Time (ns)           :             -0.00334
        Proper Time (ns)    :            -2.84e-07
        Momentum Direct - x :                    0
        Momentum Direct - y :                    0
        Momentum Direct - z :                    1
        Kinetic Energy (MeV):                6e+03
        Polarization - x    :                    0
        Polarization - y    :                    0
        Polarization - z    :                    0
        Touchable (pointer) :                    0

*** G4Exception : 200
      issued by : G4ParticleChange::CheckIt
momentum, energy, and/or time was illegal
*** Event Must Be Aborted 

 *** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
Attaching to program: /proc/11101/exe, process 11101
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 183013209824 (LWP 11101)]

0x00000037a078f504 in waitpid () from /lib64/tls/libc.so.6
#1  0x00000037a0739a1f in do_system () from /lib64/tls/libc.so.6
#2  0x0000002a992f16e2 in TUnixSystem::StackTrace ()
   from /usr/local/root/pro/root/lib/libCore.so
#3  0x0000002a992ee418 in TUnixSystem::DispatchSignals ()
   from /usr/local/root/pro/root/lib/libCore.so
#4  <signal handler called>
#5  0x0000002a96a43f95 in G4SteppingManager::InvokePSDIP ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#6  0x0000002a96a443ab in G4SteppingManager::InvokePostStepDoItProcs ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#7  0x0000002a96a420f7 in G4SteppingManager::Stepping ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#8  0x0000002a96a4988b in G4TrackingManager::ProcessOneTrack ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4tracking.so
#9  0x0000002a968e3e7b in G4EventManager::DoProcessing ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4event.so
#10 0x0000002a967afc1f in G4RunManager::DoEventLoop ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4run.so
#11 0x0000002a967aeb41 in G4RunManager::BeamOn ()
   from /usr/local/geant4/geant4.9.0-gcc-3.4.6/lib/Linux-g++/libG4run.so
#12 0x0000000000408960 in main ()
WARNING - Attempt to delete the physical volume store while geometry closed !
WARNING - Attempt to delete the logical volume store while geometry closed !
WARNING - Attempt to delete the solid store while geometry closed !
WARNING - Attempt to delete the region store while geometry closed !

////////////////////////////////////////////////////////////////////////////////

I have tried to solve this problem but after few days, I am always at the same level! So, can you help me to find the origin of the error and how can I corrected this one? The error come from the method ConstructOp() in my PhysicsList, it's the part coding the Cerenkov, it was inspired by the GEANT4 examples for Cerenkov. I let you my PhysicsList:

////////////////////////////////////////////////////////////////////////////////

#include "elyseePhysicsList.hh"

#include <iomanip>
#include "globals.hh"

#include "G4BaryonConstructor.hh"
#include "G4ComptonScattering.hh"
#include "G4Decay.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eIonisation.hh"
#include "G4EmProcessOptions.hh"
#include "G4eplusAnnihilation.hh"
#include "G4FastSimulationManagerProcess.hh"
#include "G4GammaConversion.hh"
#include "G4hIonisation.hh"
#include "G4IonConstructor.hh"
#include "G4ios.hh"
#include "G4LeptonConstructor.hh"
#include "G4LossTableManager.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4MesonConstructor.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuIonisation.hh"
#include "G4MultipleScattering.hh"
#include "G4MuPairProduction.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleTypes.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4StepLimiter.hh"
#include "G4UnitsTable.hh"
#include "G4UserSpecialCuts.hh"

// Bosons

#include "G4ChargedGeantino.hh"
#include "G4Geantino.hh"
#include "G4Gamma.hh"
#include "G4OpticalPhoton.hh"

// leptons

#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4NeutrinoMu.hh"
#include "G4AntiNeutrinoMu.hh"

#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4NeutrinoE.hh"
#include "G4AntiNeutrinoE.hh"

// Mesons

#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
#include "G4Eta.hh"
#include "G4EtaPrime.hh"

#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4KaonZero.hh"
#include "G4AntiKaonZero.hh"
#include "G4KaonZeroLong.hh"
#include "G4KaonZeroShort.hh"

// Baryons

#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Neutron.hh"
#include "G4AntiNeutron.hh"

// Nuclei

#include "G4Alpha.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4GenericIon.hh"

// Cherenkov

#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4OpWLS.hh"

elyseePhysicsList::elyseePhysicsList(): G4VUserPhysicsList() { G4LossTableManager::Instance(); defaultCutValue = 1.0*mm; cutForGamma = defaultCutValue; cutForElectron = defaultCutValue; cutForPositron = defaultCutValue;

theCerenkovProcess = 0; theScintillationProcess = 0; theAbsorptionProcess = 0; theRayleighScatteringProcess = 0; theBoundaryProcess = 0;

// SetVerboseLevel(1); }

elyseePhysicsList::~elyseePhysicsList() {}

void elyseePhysicsList::ConstructParticle() { ConstructBosons(); ConstructLeptons(); ConstructMesons(); ConstructBaryons(); ConstructIons(); }

void elyseePhysicsList::ConstructBosons() { G4Geantino::GeantinoDefinition(); G4ChargedGeantino::ChargedGeantinoDefinition(); G4Gamma::GammaDefinition(); G4OpticalPhoton::OpticalPhotonDefinition(); }

void elyseePhysicsList::ConstructLeptons() { G4Electron::ElectronDefinition(); G4Positron::PositronDefinition(); G4MuonPlus::MuonPlusDefinition(); G4MuonMinus::MuonMinusDefinition();

G4NeutrinoE::NeutrinoEDefinition(); G4AntiNeutrinoE::AntiNeutrinoEDefinition(); G4NeutrinoMu::NeutrinoMuDefinition(); G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); }

void elyseePhysicsList::ConstructMesons() { G4PionPlus::PionPlusDefinition(); G4PionMinus::PionMinusDefinition(); G4PionZero::PionZeroDefinition(); G4Eta::EtaDefinition(); G4EtaPrime::EtaPrimeDefinition(); G4KaonPlus::KaonPlusDefinition(); G4KaonMinus::KaonMinusDefinition(); G4KaonZero::KaonZeroDefinition(); G4AntiKaonZero::AntiKaonZeroDefinition(); G4KaonZeroLong::KaonZeroLongDefinition(); G4KaonZeroShort::KaonZeroShortDefinition(); }

void elyseePhysicsList::ConstructBaryons() { G4Proton::ProtonDefinition(); G4AntiProton::AntiProtonDefinition(); G4Neutron::NeutronDefinition(); G4AntiNeutron::AntiNeutronDefinition(); }

void elyseePhysicsList::ConstructIons() { G4Deuteron::DeuteronDefinition(); G4Triton::TritonDefinition(); G4He3::He3Definition(); G4Alpha::AlphaDefinition(); G4GenericIon::GenericIonDefinition(); }

void elyseePhysicsList::ConstructProcess() { AddTransportation(); //AddParameterisation(); ConstructEM(); ConstructGeneral(); ConstructOp(); }

void elyseePhysicsList::AddTransportation() { G4VUserPhysicsList::AddTransportation(); }

void elyseePhysicsList::ConstructEM()
{
theParticleIterator->reset();
while((*theParticleIterator)()){
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

    if (particleName == "gamma"){
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
      pmanager->AddDiscreteProcess(new G4ComptonScattering());
      pmanager->AddDiscreteProcess(new G4GammaConversion());}
    else if (particleName == "e-"){
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,-1,2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,-1, 3,3);}
    else if (particleName == "e+"){
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,-1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,-1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,0,-1,4);}
    else if( particleName == "mu+" || particleName == "mu-"){
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4MuIonisation,-1, 2,2);
      pmanager->AddProcess(new G4MuBremsstrahlung,-1, 3,3);
      pmanager->AddProcess(new G4MuPairProduction,-1, 4,4);}
    else if ((!particle->IsShortLived()) &&
             (particle->GetPDGCharge() != 0.0) && 
             (particle->GetParticleName() != "chargedgeantino")){
      pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
      pmanager->AddProcess(new G4hIonisation,-1, 2,2);}}}

void elyseePhysicsList::ConstructOp() {

G4cout<<"Now creating Optical processes"<<G4endl; //G4Cerenkov* theCerenkovProcess = new G4Cerenkov("Cerenkov"); //G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption(); G4cout<<"Now creating the Rayleigh scattering process "<<G4endl; //G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh(); G4cout<<"Now creating the boundary process "<<G4endl; //G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();

//theCerenkovProcess->SetVerboseLevel(2); //theAbsorptionProcess->SetVerboseLevel(0); //theRayleighScatteringProcess->SetVerboseLevel(0); //theBoundaryProcess->SetVerboseLevel(0);

G4int MaxNumPhotons = 300;

theCerenkovProcess->SetTrackSecondariesFirst(true); theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumPhotons);

G4OpticalSurfaceModel themodel = unified; theBoundaryProcess->SetModel(themodel);

theParticleIterator->reset();
while((*theParticleIterator)()){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

/// ///problem there, no message error when this part is commented ///

    if (theCerenkovProcess->IsApplicable(*particle)) {
      pmanager->AddProcess(theCerenkovProcess);
      pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);}

/// /// ///

    if (particleName == "opticalphoton") {
      G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
      pmanager->AddDiscreteProcess(theAbsorptionProcess);
      pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
      pmanager->AddDiscreteProcess(theBoundaryProcess);}

  }

}

void elyseePhysicsList::AddParameterisation()
{
  // -- Fast simulation manager process for "mass geometry":
G4FastSimulationManagerProcess* fastSimProcess_massGeom     = new G4FastSimulationManagerProcess("G4FSMP_massGeom");
  // -- Fast simulation manager process for "parallel geometry":
G4FastSimulationManagerProcess* fastSimProcess_parallelGeom = new G4FastSimulationManagerProcess("G4FSMP_parallelGeom", "pionGhostWorld");
theParticleIterator->reset();
while((*theParticleIterator)()){
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();
      // -- For the mass geometry, G4FSMP is a PostStep process, ordering does not matter:
      if (particle->GetParticleName() == "e+"  || 
  	  particle->GetParticleName() == "e-"  ||
          particle->GetParticleName() == "gamma"){pmanager->AddDiscreteProcess(fastSimProcess_massGeom);}
      // -- For the parallel geometry, G4FSMP is an Along+PostStep process, and ordering matters:
      if (particle->GetParticleName() == "pi+" || 
          particle->GetParticleName() == "pi-"){
          pmanager->AddProcess(fastSimProcess_parallelGeom);
          pmanager->SetProcessOrdering(fastSimProcess_parallelGeom, idxAlongStep, 1);
          pmanager->SetProcessOrdering(fastSimProcess_parallelGeom, idxPostStep);}}}

void elyseePhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while((*theParticleIterator)()){
  G4ParticleDefinition* particle = theParticleIterator->value();
  G4ProcessManager* pmanager = particle->GetProcessManager();
  if (theDecayProcess->IsApplicable(*particle)) { 
    pmanager ->AddProcess(theDecayProcess);
    pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
    pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);}}}

void elyseePhysicsList::SetNbOfPhotonsCerenkov(G4int MaxNumber) { theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumber); }

void elyseePhysicsList::SetCuts()
{
if (verboseLevel >0){
  G4cout << "elyseePhysicsList::SetCuts:";
  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;}

SetCutValue(defaultCutValue,"gamma"); SetCutValue(defaultCutValue,"e-"); SetCutValue(defaultCutValue,"e+");

if (verboseLevel>0) DumpCutValuesTable(); }

void elyseePhysicsList::SetCutForGamma(G4double cut) { cutForGamma = cut; SetParticleCuts(cutForGamma,G4Gamma::Gamma()); }

void elyseePhysicsList::SetCutForElectron(G4double cut) { cutForElectron = cut; SetParticleCuts(cutForElectron,G4Electron::Electron()); }

void elyseePhysicsList::SetCutForPositron(G4double cut) { cutForPositron = cut; SetParticleCuts(cutForPositron,G4Positron::Positron()); }

////////////////////////////////////////////////////////////////////////////////

Last question, I would have a PhysicsList enable to manage hadronic interactions, of course electromagnetic interactions and optical photon. Do it exist a GEANT 4 reference PhysicsList for that?

Thank you for your consideration.

Florian.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Optical Physics List and G4exception   (Florian ITARD - 24 Sep, 2008)
(_ Question: Re: Optical Physics List and G4exception   (Michael Fernald - 26 Sep, 2008)
 Add Message Add Message
to: "Optical Physics List and G4exception"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]