Message: TheoFSGenerator Crashes Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question TheoFSGenerator Crashes 

Forum: Hadronic Processes
Date: 19 Jun, 2008
From: Shawn Tornga <Shawn Tornga>

Hello,

I get the following error message when trying to run. I am not sure what is the cause of the problem and I would very much appreciate some help. I have also attached my hadronic and EM physics list. I am using Geant4 version Name: geant4-09-01-patch-02    (9-May-2008)

Thank You,
Shawn

*** Geant4 Hadronic Reaction Information ***
    Process: PhotonInelastic , Model: TheoFSGenerator
    Nucleus A, Z = 27 13
    Projectile was a gamma
    projectile momentum (px, py, pz) = (1.25167e-12, -8.92619e-14, 12484.3)
    Projectile energy = 12484.3
*** End of Geant4 Hadronic Reaction Information ***

*** G4Exception : 001
      issued by : TheoFSGenerator
segmentation fault
*** Fatal Exception *** core dump ***

*** G4Exception: Abortion suppressed ***
*** No guarantee for further execution ***
callback to user-defined or default signal handler

 *** Break *** segmentation violation
 Generating stack trace...
/usr/bin/addr2line: CRCounter: No such file or directory
/usr/bin/addr2line: CRCounter: No such file or directory
 0x047c8552 in _ZN28G4HadronicInteractionWrapper16ApplyInteractionER15G4HadProjectileR9G4NucleusP21G4HadronicIntera at src/G4HadronicInteractionWrapper.cc:40 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4hadronic_mgt.so
 0x047ca420 in G4HadronicProcess::GeneralPostStepDoIt(G4Track const&, G4Step const&) + 0x59c from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4hadronic_mgt.so
 0x047ce6a8 in G4HadronInelasticProcess::PostStepDoIt(G4Track const&, G4Step const&) + 0x58 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4hadronic_mgt.so
 0x0270439c in G4SteppingManager::InvokePSDIP(unsigned int) + 0x3c from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4tracking.so
 0x02704326 in G4SteppingManager::InvokePostStepDoItProcs() + 0xbe from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4tracking.so
 0x02706039 in G4SteppingManager::Stepping() + 0x4b5 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4tracking.so
 0x0270c73c in G4TrackingManager::ProcessOneTrack(G4Track*) + 0x218 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4tracking.so
 0x07e60819 in G4EventManager::DoProcessing(G4Event*) + 0x2f9 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4event.so
 0x07e61586 in G4EventManager::ProcessOneEvent(G4Event*) + 0x26 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4event.so
 0x016e4283 in G4RunManager::DoEventLoop(int, char const*, int) + 0xdf from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4run.so
 0x016e39a4 in G4RunManager::BeamOn(int, char const*, int) + 0x58 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4run.so
 0x016eef5f in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) + 0xb1f from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4run.so
 0x04b03be7 in G4UIcommand::DoIt(G4String) + 0xd7 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04b1adce in G4UImanager::ApplyCommand(char const*) + 0x54a from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04b1a87f in G4UImanager::ApplyCommand(G4String) + 0x2f from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04afaa14 in G4UIbatch::ExecCommand(G4String const&) + 0x34 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04afac54 in G4UIbatch::SessionStart() + 0xb0 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04b1882e in G4UImanager::ExecuteMacroFile(char const*) + 0x3e from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04b15acd in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) + 0x4ed from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04b03be7 in G4UIcommand::DoIt(G4String) + 0xd7 from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04b1adce in G4UImanager::ApplyCommand(char const*) + 0x54a from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x04b1a87f in G4UImanager::ApplyCommand(G4String) + 0x2f from /n/toaster/u/tornga/gimaging/sw/geant4.9.1.p02/lib/Linux-g++/libG4intercoms.so
 0x0804be46 in main + 0x41e from CRCounter
 0x0229d79a in __libc_start_main + 0xda from /lib/tls/libc.so.6
 0x0804b31d in G4TrajectoryDrawByParticleIDFactory::G4TrajectoryDrawByParticleIDFactory() + 0x31 from CRCounter
Aborted


This is my hadronic physics list

#include "globals.hh"
#include "PhysicsHadron.hh"

PhysicsHadron::PhysicsHadron(): G4VUserPhysicsList()
{
  cutForProton = 0.1*mm;
  SetVerboseLevel(1);
};

PhysicsHadron::~PhysicsHadron()
{};

#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"

void PhysicsHadron::ConstructParticle()
{
  G4MesonConstructor meson;
  meson.ConstructParticle();
  
  G4BaryonConstructor baryon;
  baryon.ConstructParticle();
  
  G4ShortLivedConstructor shortLived;
  shortLived.ConstructParticle();
};

void PhysicsHadron::ConstructProcess()
{
  //! LISA Physics List
  ConstructHadronModels1();
  ConstructHadrons1();
  
  //! GRESS Physics List
  //ConstructHadronModels2();
  //ConstructHadrons2();
};

void PhysicsHadron::ConstructHadronModels1()
{
  //! Hadron elastic process
  theElasticProcess = new G4HadronElasticProcess();
  
  //! High-energy model for p, n, pi+, pi-, k+, k-
  theHEModel 		= new G4TheoFSGenerator;
  
  //! Thermal nucleus models
  theEvaporation	= new G4Evaporation;
  theFermiBreakUp 	= new G4FermiBreakUp;
  theMF 		= new G4StatMF;
  
  //! Evaporation logic
  theHandler = new G4ExcitationHandler;
  theHandler->SetEvaporation(theEvaporation);
  theHandler->SetFermiModel(theFermiBreakUp);
  theHandler->SetMultiFragmentation(theMF);
  theHandler->SetMaxAandZForFermiBreakUp(12,6);
  theHandler->SetMinEForMultiFrag(3.0*MeV);
  
  //! Pre-equilibrium stage 
  thePreEquilib = new G4PreCompoundModel(theHandler);
  thePreEquilib->SetMaxEnergy(70*MeV);

  //! No-cascade generator-precompound interaface
  theCascade = new G4GeneratorPrecompoundInterface;
  theCascade->SetDeExcitation(thePreEquilib);

  //! QGSP model
  theStringModel = new G4QGSModel<G4QGSParticipants>;
  theHEModel->SetTransport(theCascade);
  theHEModel->SetHighEnergyGenerator(theStringModel);
  theHEModel->SetMinEnergy(3.0*GeV);
  theHEModel->SetMaxEnergy(100*TeV);
  
  //! Binary cascade for p, n
  theCasc = new G4BinaryCascade;
  theCasc->SetMinEnergy(65*MeV);
  theCasc->SetMaxEnergy(6.1*GeV);
  
  //! Fragmentation
  theFragmentation = new G4QGSMFragmentation;
  theStringDecay = new G4ExcitedStringDecay(theFragmentation);
  theStringModel->SetFragmentationModel(theStringDecay);
  
  //! Binary Cascade for Pi
  theCascForPi = new G4BinaryCascade;
  theCascForPi->SetMinEnergy(0*MeV);
  theCascForPi->SetMaxEnergy(1.5*GeV);
  
  // LEP to fill the gap
  theLEPionPlusInelasticModel = new G4LEPionPlusInelastic();
  theLEPionPlusInelasticModel->SetMinEnergy(1.4*GeV);
  theLEPionPlusInelasticModel->SetMaxEnergy(6.1*GeV);
  
  theLEPionMinusInelasticModel = new G4LEPionMinusInelastic();
  theLEPionMinusInelasticModel->SetMinEnergy(1.4*GeV);
  theLEPionMinusInelasticModel->SetMaxEnergy(6.1*GeV);

  //! Binary cascade for light nuclei
  theIonCascade = new G4BinaryLightIonReaction;
  theIonCascade->SetMinEnergy(100.0*MeV);
  theIonCascade->SetMaxEnergy(1000.0*GeV);
  theTripathiCrossSection	= new G4TripathiCrossSection;
  theShenCrossSection 		= new G4IonsShenCrossSection;
  theSihverCrossSection 	= new G4IonsSihverCrossSection;
  
  //! Deuteron
  theLEDeuteronInelasticModel = new G4LEDeuteronInelastic();
  theLEDeuteronInelasticModel->SetMaxEnergy(100*MeV);
  
  //! Triton
  theLETritonInelasticModel = new G4LETritonInelastic();
  theLETritonInelasticModel->SetMaxEnergy(100*MeV);
  
  //! Alpha
  theLEAlphaInelasticModel = new G4LEAlphaInelastic();
  theLEAlphaInelasticModel->SetMaxEnergy(100*MeV);
  
  //! Generic Ion and He3
  theGenIonCascade = new G4BinaryLightIonReaction;
  theGenIonCascade->SetMinEnergy(1.0*MeV);
  theGenIonCascade->SetMaxEnergy(5.0*TeV);
  theElasticModel = new G4LElastic();
  theElasticProcess->RegisterMe(theElasticModel);
  
  //! Kaon+
  theLEKaonPlusInelasticModel = new G4LEKaonPlusInelastic();
  theLEKaonPlusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Kaon0S
  theLEKaonZeroSInelasticModel = new G4LEKaonZeroSInelastic();
  theLEKaonZeroSInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Kaon0L
  theLEKaonZeroLInelasticModel = new G4LEKaonZeroLInelastic();
  theLEKaonZeroLInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Kaon-
  theLEKaonMinusInelasticModel = new G4LEKaonMinusInelastic();   
  theLEKaonMinusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Anti-proton
  theLEAntiProtonInelasticModel = new G4LEAntiProtonInelastic();
  theHEAntiProtonInelasticModel = new G4HEAntiProtonInelastic();
  theLEAntiProtonInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Neutron
  theNeutronElasticModel1	= new G4LElastic();
  theNeutronCaptureModel1 	= new G4LCapture();
  theNeutronFissionModel 	= new G4LFission();
  
  //! Anti-Neutron
  theLEAntiNeutronInelasticModel = new G4LEAntiNeutronInelastic();
  theHEAntiNeutronInelasticModel = new G4HEAntiNeutronInelastic();
  theLEAntiNeutronInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Lambda
  theLELambdaInelasticModel = new G4LELambdaInelastic();
  theHELambdaInelasticModel = new G4HELambdaInelastic();
  theLELambdaInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Anti-Lambda
  theLEAntiLambdaInelasticModel = new G4LEAntiLambdaInelastic();
  theHEAntiLambdaInelasticModel = new G4HEAntiLambdaInelastic();
  theLEAntiLambdaInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Omega-
  theLEOmegaMinusInelasticModel = new G4LEOmegaMinusInelastic();
  theHEOmegaMinusInelasticModel = new G4HEOmegaMinusInelastic();
  theLEOmegaMinusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Anti-Omega-
  theLEAntiOmegaMinusInelasticModel = new G4LEAntiOmegaMinusInelastic(); 
  theHEAntiOmegaMinusInelasticModel = new G4HEAntiOmegaMinusInelastic(); 
  theLEAntiOmegaMinusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Sigma-
  theLESigmaMinusInelasticModel = new G4LESigmaMinusInelastic();
  theHESigmaMinusInelasticModel = new G4HESigmaMinusInelastic();
  theLESigmaMinusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Anti-Sigma-
  theLEAntiSigmaMinusInelasticModel = new G4LEAntiSigmaMinusInelastic();
  theHEAntiSigmaMinusInelasticModel = new G4HEAntiSigmaMinusInelastic();
  theLEAntiSigmaMinusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Sigma+
  theLESigmaPlusInelasticModel = new G4LESigmaPlusInelastic();
  theHESigmaPlusInelasticModel = new G4HESigmaPlusInelastic();      
  theLESigmaPlusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Anti-Sigma+
  theLEAntiSigmaPlusInelasticModel = new G4LEAntiSigmaPlusInelastic();
  theHEAntiSigmaPlusInelasticModel = new G4HEAntiSigmaPlusInelastic();
  theLEAntiSigmaPlusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Xi0
  theLEXiZeroInelasticModel = new G4LEXiZeroInelastic();
  theHEXiZeroInelasticModel = new G4HEXiZeroInelastic();
  theLEXiZeroInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Anti-Xi0
  theLEAntiXiZeroInelasticModel = new G4LEAntiXiZeroInelastic();
  theHEAntiXiZeroInelasticModel = new G4HEAntiXiZeroInelastic();
  theLEAntiXiZeroInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Xi-
  theLEXiMinusInelasticModel = new G4LEXiMinusInelastic();
  theHEXiMinusInelasticModel = new G4HEXiMinusInelastic();
  theLEXiMinusInelasticModel->SetMaxEnergy(25*GeV);
  
  //! Anti-Xi-
  theLEAntiXiMinusInelasticModel = new G4LEAntiXiMinusInelastic();
  theHEAntiXiMinusInelasticModel = new G4HEAntiXiMinusInelastic();
  theLEAntiXiMinusInelasticModel->SetMaxEnergy(25*GeV);
};

#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"

void PhysicsHadron::ConstructHadrons1()
{
  G4cout << "--> LISA Hadronic Physics List Loaded" << G4endl;
  
  theParticleIterator->reset();
  while((*theParticleIterator)())
  {
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();
    
    if (particleName == "pi+") 
    {
      /////////
      // PI+ //
      /////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      thePionPlusInelasticProcess = new G4PionPlusInelasticProcess();
      thePionPlusInelasticProcess->RegisterMe(theCascForPi);
      thePionPlusInelasticProcess->RegisterMe(theLEPionPlusInelasticModel);
      thePionPlusInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(thePionPlusInelasticProcess);
    }
    else if (particleName == "pi-") 
    {
      /////////
      // PI- //
      /////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      thePionMinusInelasticProcess = new G4PionMinusInelasticProcess();
      thePiMinusAbsorptionAtRest = new G4PiMinusAbsorptionAtRest();
      thePionMinusInelasticProcess->RegisterMe(theCascForPi);
      thePionMinusInelasticProcess->RegisterMe(theLEPionMinusInelasticModel);
      thePionMinusInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(thePionMinusInelasticProcess);
      pmanager->AddRestProcess(thePiMinusAbsorptionAtRest,ordDefault);
    }
    else if (particleName == "kaon+") 
    {
      ///////////
      // KAON+ //
      ///////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theKaonPlusInelasticProcess = new G4KaonPlusInelasticProcess();
      theKaonPlusInelasticProcess->RegisterMe(theLEKaonPlusInelasticModel);
      theKaonPlusInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(theKaonPlusInelasticProcess);
    } 
    else if (particleName == "kaon0S") 
    {
      /////////////
      // KAON-OS //
      /////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theKaonZeroSInelasticProcess = new G4KaonZeroSInelasticProcess();
      theKaonZeroSInelasticProcess->RegisterMe(theLEKaonZeroSInelasticModel);
      theKaonZeroSInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(theKaonZeroSInelasticProcess);
      
    }
    else if (particleName == "kaon0L") 
    {
      /////////////
      // KAON-0L //
      /////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theKaonZeroLInelasticProcess = new G4KaonZeroLInelasticProcess();
      theKaonZeroLInelasticProcess->RegisterMe(theLEKaonZeroLInelasticModel);
      theKaonZeroLInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(theKaonZeroLInelasticProcess);
    } 
    else if (particleName == "kaon-") 
    {
      ///////////
      // KAON- //
      ///////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theKaonMinusInelasticProcess = new G4KaonMinusInelasticProcess();
      theKaonMinusAbsorptionAtRest = new G4KaonMinusAbsorptionAtRest();
      theKaonMinusInelasticProcess->RegisterMe(theLEKaonMinusInelasticModel);
      theKaonMinusInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(theKaonMinusInelasticProcess);
      pmanager->AddRestProcess(theKaonMinusAbsorptionAtRest,ordDefault);
    }
    else if (particleName == "proton") 
    {
      ////////////
      // PROTON //
      ////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theProtonInelasticProcess = new G4ProtonInelasticProcess();
      theProtonInelasticProcess->RegisterMe(thePreEquilib);
      theProtonInelasticProcess->RegisterMe(theCasc);
      theProtonInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(theProtonInelasticProcess);
    } 
    else if (particleName == "anti_proton") 
    {
      /////////////////
      // ANTI-PROTON //
      /////////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiProtonInelasticProcess	= new G4AntiProtonInelasticProcess();
      theAntiProtonAnnihilationAtRest 	= new G4AntiProtonAnnihilationAtRest();
      theAntiProtonInelasticProcess->RegisterMe(theLEAntiProtonInelasticModel);
      theAntiProtonInelasticProcess->RegisterMe(theHEAntiProtonInelasticModel);
      pmanager->AddDiscreteProcess(theAntiProtonInelasticProcess);
      pmanager->AddRestProcess(theAntiProtonAnnihilationAtRest,ordDefault);
    }
    else if (particleName == "neutron")
    {
      /////////////
      // NEUTRON //
      /////////////
      theNeutronElasticProcess = new G4HadronElasticProcess();
      theNeutronElasticProcess->RegisterMe(theNeutronElasticModel1);
      pmanager->AddDiscreteProcess(theNeutronElasticProcess);
      
      theNeutronInelasticProcess = new G4NeutronInelasticProcess();
      theNeutronInelasticProcess->RegisterMe(thePreEquilib);
      theNeutronInelasticProcess->RegisterMe(theCasc);
      theNeutronInelasticProcess->RegisterMe(theHEModel);
      pmanager->AddDiscreteProcess(theNeutronInelasticProcess);
      
      theNeutronCaptureProcess = new G4HadronCaptureProcess();
      theNeutronCaptureProcess->RegisterMe(theNeutronCaptureModel1);
      pmanager->AddDiscreteProcess(theNeutronCaptureProcess);
      
      theNeutronFissionProcess = new G4HadronFissionProcess();
      theNeutronFissionProcess->RegisterMe(theNeutronFissionModel);
      pmanager->AddDiscreteProcess(theNeutronFissionProcess);
    } 
    else if (particleName == "anti_neutron") 
    {
      //////////////////
      // ANTI-NEUTRON //
      //////////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiNeutronInelasticProcess = new G4AntiNeutronInelasticProcess();
      theAntiNeutronAnnihilationAtRest = new G4AntiNeutronAnnihilationAtRest();
      theAntiNeutronInelasticProcess->RegisterMe(theLEAntiNeutronInelasticModel);
      theAntiNeutronInelasticProcess->RegisterMe(theHEAntiNeutronInelasticModel);
      pmanager->AddDiscreteProcess(theAntiNeutronInelasticProcess);
      pmanager->AddRestProcess(theAntiNeutronAnnihilationAtRest,ordDefault);
    }
    else if (particleName == "deuteron")
    {
      //////////////
      // DEUTERON //
      //////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      
      theDeuteronInelasticProcess = new G4DeuteronInelasticProcess();
      theDeuteronInelasticProcess->AddDataSet(theTripathiCrossSection);
      theDeuteronInelasticProcess->AddDataSet(theShenCrossSection);
      theDeuteronInelasticProcess->RegisterMe(theLEDeuteronInelasticModel);
      theDeuteronInelasticProcess->RegisterMe(theIonCascade);
      pmanager->AddDiscreteProcess(theDeuteronInelasticProcess);
    }
    else if (particleName == "triton")
    {
      ////////////
      // TRITON //
      ////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      
      theTritonInelasticProcess = new G4TritonInelasticProcess();
      theTritonInelasticProcess->AddDataSet(theTripathiCrossSection);
      theTritonInelasticProcess->AddDataSet(theShenCrossSection);
      theTritonInelasticProcess->RegisterMe(theLETritonInelasticModel);
      theTritonInelasticProcess->RegisterMe(theIonCascade);
      pmanager->AddDiscreteProcess(theTritonInelasticProcess);
    }
    else if (particleName == "alpha")
    {
      ///////////
      // ALPHA //
      ///////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      
      theAlphaInelasticProcess = new G4AlphaInelasticProcess();
      theAlphaInelasticProcess->AddDataSet(theTripathiCrossSection);
      theAlphaInelasticProcess->AddDataSet(theShenCrossSection);
      theAlphaInelasticProcess->AddDataSet(theSihverCrossSection);
      theAlphaInelasticProcess->RegisterMe(theLEAlphaInelasticModel);
      theAlphaInelasticProcess->RegisterMe(theIonCascade);
      pmanager->AddDiscreteProcess(theAlphaInelasticProcess);
    } 
    else if (particleName == "He3")
    {
      /////////
      // HE3 //
      /////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theHe3InelasticProcess = new G4HadronInelasticProcess("He3Inelastic", G4He3::He3());
      theHe3InelasticProcess->AddDataSet(theTripathiCrossSection);
      theHe3InelasticProcess->AddDataSet(theShenCrossSection);
      theHe3InelasticProcess->RegisterMe(theGenIonCascade);
      pmanager->AddDiscreteProcess(theHe3InelasticProcess);
    } 
    else if (particleName == "GenericIon")
    {
      //////////////////
      // GENERIC IONS //
      //////////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theGenericIonInelasticProcess = new G4HadronInelasticProcess("IonInelastic", G4GenericIon::GenericIon());
      theGenericIonInelasticProcess->AddDataSet(theTripathiCrossSection);
      theGenericIonInelasticProcess->AddDataSet(theShenCrossSection);
      theGenericIonInelasticProcess->AddDataSet(theSihverCrossSection);
      theGenericIonInelasticProcess->RegisterMe(theGenIonCascade);
      pmanager->AddDiscreteProcess(theGenericIonInelasticProcess);
    }
    else if (particleName == "lambda")
    {
      ////////////
      // LAMBDA //
      ////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theLambdaInelasticProcess = new G4LambdaInelasticProcess();
      theLambdaInelasticProcess->RegisterMe(theLELambdaInelasticModel);
      theLambdaInelasticProcess->RegisterMe(theHELambdaInelasticModel);
      pmanager->AddDiscreteProcess(theLambdaInelasticProcess);
    }
    else if (particleName == "anti_lambda")
    {
      /////////////////
      // ANTI-LAMBDA //
      /////////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiLambdaInelasticProcess = new G4AntiLambdaInelasticProcess();
      theAntiLambdaInelasticProcess->RegisterMe(theLEAntiLambdaInelasticModel);
      theAntiLambdaInelasticProcess->RegisterMe(theHEAntiLambdaInelasticModel);
      pmanager->AddDiscreteProcess(theAntiLambdaInelasticProcess);
    } 
    else if (particleName == "omega-")
    {
      ////////////
      // OMEGA- //
      ////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theOmegaMinusInelasticProcess = new G4OmegaMinusInelasticProcess();
      theOmegaMinusInelasticProcess->RegisterMe(theLEOmegaMinusInelasticModel);
      theOmegaMinusInelasticProcess->RegisterMe(theHEOmegaMinusInelasticModel);
      pmanager->AddDiscreteProcess(theOmegaMinusInelasticProcess);
    } 
    else if (particleName == "anti_omega-")
    {
      /////////////////
      // ANTI-OMEGA- //
      /////////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiOmegaMinusInelasticProcess = new G4AntiOmegaMinusInelasticProcess();
      theAntiOmegaMinusInelasticProcess->RegisterMe(theLEAntiOmegaMinusInelasticModel);
      theAntiOmegaMinusInelasticProcess->RegisterMe(theHEAntiOmegaMinusInelasticModel);
      pmanager->AddDiscreteProcess(theAntiOmegaMinusInelasticProcess);
    }
    else if (particleName == "sigma-")
    {
      ////////////
      // SIGMA- //
      ////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theSigmaMinusInelasticProcess = new G4SigmaMinusInelasticProcess(); 
      theSigmaMinusInelasticProcess->RegisterMe(theLESigmaMinusInelasticModel);
      theSigmaMinusInelasticProcess->RegisterMe(theHESigmaMinusInelasticModel);
      pmanager->AddDiscreteProcess(theSigmaMinusInelasticProcess);
    } 
    else if (particleName == "anti_sigma-")
    {
      /////////////////
      // ANTI-SIGMA- //
      /////////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiSigmaMinusInelasticProcess = new G4AntiSigmaMinusInelasticProcess();
      theAntiSigmaMinusInelasticProcess->RegisterMe(theLEAntiSigmaMinusInelasticModel);
      theAntiSigmaMinusInelasticProcess->RegisterMe(theHEAntiSigmaMinusInelasticModel);
      pmanager->AddDiscreteProcess(theAntiSigmaMinusInelasticProcess);
    } 
    else if (particleName == "sigma+")
    {
      ////////////
      // SIGMA+ //
      ////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theSigmaPlusInelasticProcess = new G4SigmaPlusInelasticProcess();
      theSigmaPlusInelasticProcess->RegisterMe(theLESigmaPlusInelasticModel);
      theSigmaPlusInelasticProcess->RegisterMe(theHESigmaPlusInelasticModel);
      pmanager->AddDiscreteProcess(theSigmaPlusInelasticProcess);
    } 
    else if (particleName == "anti_sigma+")
    {
      /////////////////
      // ANTI-SIGMA+ //
      /////////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiSigmaPlusInelasticProcess = new G4AntiSigmaPlusInelasticProcess();
      theAntiSigmaPlusInelasticProcess->RegisterMe(theLEAntiSigmaPlusInelasticModel);
      theAntiSigmaPlusInelasticProcess->RegisterMe(theHEAntiSigmaPlusInelasticModel);
      pmanager->AddDiscreteProcess(theAntiSigmaPlusInelasticProcess);
    }
    else if (particleName == "xi0")
    {
      /////////
      // XI0 //
      /////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theXiZeroInelasticProcess = new G4XiZeroInelasticProcess();
      theXiZeroInelasticProcess->RegisterMe(theLEXiZeroInelasticModel);
      theXiZeroInelasticProcess->RegisterMe(theHEXiZeroInelasticModel);
      pmanager->AddDiscreteProcess(theXiZeroInelasticProcess);
    } 
    else if (particleName == "anti_xi0")
    {
      //////////////
      // ANTI-XI0 //
      //////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiXiZeroInelasticProcess = new G4AntiXiZeroInelasticProcess();
      theAntiXiZeroInelasticProcess->RegisterMe(theLEAntiXiZeroInelasticModel);
      theAntiXiZeroInelasticProcess->RegisterMe(theHEAntiXiZeroInelasticModel);
      pmanager->AddDiscreteProcess(theAntiXiZeroInelasticProcess);
    }
    else if (particleName == "xi-")
    {
      /////////
      // XI- //
      /////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theXiMinusInelasticProcess = new G4XiMinusInelasticProcess();
      theXiMinusInelasticProcess->RegisterMe(theLEXiMinusInelasticModel);
      theXiMinusInelasticProcess->RegisterMe(theHEXiMinusInelasticModel);
      pmanager->AddDiscreteProcess(theXiMinusInelasticProcess);

    } 
    else if (particleName == "anti_xi-")
    {
      //////////////
      // ANTI-XI- //
      //////////////
      pmanager->AddDiscreteProcess(theElasticProcess);
      theAntiXiMinusInelasticProcess = new G4AntiXiMinusInelasticProcess();
      theAntiXiMinusInelasticProcess->RegisterMe(theLEAntiXiMinusInelasticModel);
      theAntiXiMinusInelasticProcess->RegisterMe(theHEAntiXiMinusInelasticModel);
      pmanager->AddDiscreteProcess(theAntiXiMinusInelasticProcess);
    }
  }
};

void PhysicsHadron::ConstructHadronModels2()
{
  
};

void PhysicsHadron::ConstructHadrons2()
{
  G4cout << "--> GRESS Hadronic Physics List Loaded" << G4endl;	
};

void PhysicsHadron::SetCuts()
{ 
};


This is my EM physics list
#include "globals.hh"
#include "PhysicsEM.hh"

#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4ios.hh"
#include "G4RegionStore.hh"

PhysicsEM::PhysicsEM(): G4VUserPhysicsList()
{
  defaultCutValue	= 0.1*mm;
  cutForGamma 		= 0.1*mm;
  cutForElectron 	= 0.1*mm;
  SetVerboseLevel(1);
};

PhysicsEM::~PhysicsEM()
{};

void PhysicsEM::ConstructParticle()
{
  //! Basic EM particles
  G4Gamma::GammaDefinition();
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  G4Geantino::GeantinoDefinition();
};

void PhysicsEM::ConstructProcess()
{
  ConstructEM();
};

//----------------------------------------------------------------------------//
// Define electromagnetic transportation processes
//----------------------------------------------------------------------------//
// gamma (Standard implementation)
#include "G4PhotoElectricEffect.hh"
#include "G4ComptonScattering.hh"  
#include "G4PolarizedComptonScattering.hh"
#include "G4GammaConversion.hh" 
// gamma (LowEnergy implementation)
#include "G4LowEnergyPhotoElectric.hh"
#include "G4LowEnergyRayleigh.hh" 
#include "G4LowEnergyCompton.hh"  
#include "G4LowEnergyPolarizedCompton.hh"
#include "G4LowEnergyGammaConversion.hh" 
// gamma (G4LECS implementation)
#include "G4LECSRayleigh.hh"
#include "G4LECSCompton.hh"
// gamma (Penelope implementation)
#include "G4PenelopePhotoElectric.hh"
#include "G4PenelopeRayleigh.hh" 
#include "G4PenelopeCompton.hh"  
#include "G4PenelopeGammaConversion.hh" 
// e+/- (Standard implementation)
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh" 
#include "G4eBremsstrahlung.hh" 
#include "G4eplusAnnihilation.hh"
// e+/- (LowEnergy implementation)
#include "G4LowEnergyIonisation.hh" 
#include "G4LowEnergyBremsstrahlung.hh" 
// e+/- (Penelope implementation)
#include "G4PenelopeIonisation.hh" 
#include "G4PenelopeBremsstrahlung.hh" 
#include "G4PenelopeAnnihilation.hh"
// Mu+/-
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4MuonMinusCaptureAtRest.hh"
#include "G4ionIonisation.hh"

// p+
#include "G4hIonisation.hh"
// Nuclear
#include "G4PhotoNuclearProcess.hh"
#include "G4ElectroNuclearReaction.hh"
#include "G4ElectronNuclearProcess.hh"
#include "G4PositronNuclearProcess.hh"
// Nuclear models
#include "G4GammaNuclearReaction.hh"
#include "G4TheoFSGenerator.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4GammaParticipants.hh"
#include "G4QGSModel.hh"

void PhysicsEM::ConstructEM()
{
  G4cout << "-->Electromagnetic Physics List Loaded" << G4endl;
  
  G4ElectroNuclearReaction* theElectronReaction = new G4ElectroNuclearReaction();
  
  G4LowEnergyPhotoElectric*  lowePhot = new G4LowEnergyPhotoElectric();
  G4LowEnergyIonisation*     loweIon  = new G4LowEnergyIonisation();
  G4LowEnergyBremsstrahlung* loweBrem = new G4LowEnergyBremsstrahlung();
  lowePhot->SetCutForLowEnSecPhotons(10*keV);
  loweIon->SetCutForLowEnSecPhotons(10*keV);
  loweBrem->SetCutForLowEnSecPhotons(10*keV);
  
  theParticleIterator->reset();
  while((*theParticleIterator)())
  {
    G4ParticleDefinition* particle	= theParticleIterator->value();
    G4ProcessManager* pmanager 		= particle->GetProcessManager();
    G4String particleName 		= particle->GetParticleName();
    
    if(particleName == "gamma")
    {
      /*
      //! Low energy classes + GLECS
      pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric());
      pmanager->AddDiscreteProcess(new G4LECSRayleigh());
      pmanager->AddDiscreteProcess(new G4LECSCompton());
      pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion());
      
      //! Low energy extended high-energy EM physics
      G4GammaNuclearReaction* lowEGammaModel = new G4GammaNuclearReaction();
      lowEGammaModel->SetMaxEnergy(3.5*GeV);
	
      //! High energy extended high-energy EM physics
      G4TheoFSGenerator* highEGammaModel = new G4TheoFSGenerator();
      G4GeneratorPrecompoundInterface* preComModel = new G4GeneratorPrecompoundInterface();
      highEGammaModel->SetTransport(preComModel);
	
      G4QGSModel<G4GammaParticipants>* theStringModel = new G4QGSModel<G4GammaParticipants>;
      G4QGSMFragmentation* fragModel = new G4QGSMFragmentation();
      G4ExcitedStringDecay* stringDecay = new G4ExcitedStringDecay(fragModel);
      theStringModel->SetFragmentationModel(stringDecay);
	
      highEGammaModel->SetHighEnergyGenerator(theStringModel);
      highEGammaModel->SetMinEnergy(3.0*GeV);
      highEGammaModel->SetMaxEnergy(100.0*TeV); 
	
      G4PhotoNuclearProcess* thePhotoNuclearProcess = new G4PhotoNuclearProcess();
      thePhotoNuclearProcess->RegisterMe(lowEGammaModel);
      thePhotoNuclearProcess->RegisterMe(highEGammaModel);
      pmanager->AddDiscreteProcess(thePhotoNuclearProcess);
      */
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);
      //pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion());
    }
    else if(particleName == "e-")
    {
      // Low-energy classes
      pmanager->AddProcess(new G4MultipleScattering(),        -1, 1,1);
      pmanager->AddProcess(new G4LowEnergyIonisation(),       -1, 2,2);
      pmanager->AddProcess(new G4LowEnergyBremsstrahlung(),   -1,-1,3);
      
      //! Extended high-energy EM physics
      G4ElectronNuclearProcess* theElectronNuclearProcess = new G4ElectronNuclearProcess();
      theElectronNuclearProcess->RegisterMe(theElectronReaction);
      pmanager->AddDiscreteProcess(theElectronNuclearProcess);
      
    }
    else if(particleName == "e+")
    {
      pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
      pmanager->AddProcess(new G4eIonisation(),       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung(),   -1,-1,3); 
      pmanager->AddProcess(new G4eplusAnnihilation(),  0,-1,4);
      
      //! Extended high-energy physics options
      G4PositronNuclearProcess* thePositronNuclearProcess = new G4PositronNuclearProcess();
      thePositronNuclearProcess->RegisterMe(theElectronReaction);
      pmanager->AddDiscreteProcess(thePositronNuclearProcess);
    }
    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,-1, 3);
      pmanager->AddProcess(new G4MuPairProduction(),  -1,-1, 4);
      if( particleName == "mu-" ) pmanager->AddProcess(new G4MuonMinusCaptureAtRest(),0,-1,-1);
    }
    else if(particleName == "GenericIon") 
    { 
      pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1);
      pmanager->AddProcess(new G4ionIonisation,      -1, 2, 2);
    } 
    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 PhysicsEM::SetCuts()
{
  SetCutValue(cutForGamma, "gamma");
  SetCutValue(cutForElectron, "e-");
  SetCutValue(cutForElectron, "e+");
  
  /*
  //! Set cuts for specific regions
  G4String regName;
  G4int nregion_photon		= 4;
  G4int nregion_electron 	= 4;
  G4int nregion_positron 	= 4;

  G4double photon_cuts[4]	= {0.1*mm, 1.0*mm, 10.0*mm, 100.0*mm};
  G4double electron_cuts[4] 	= {0.1*mm, 1.0*mm, 10.0*mm, 100.0*mm};
  G4double positron_cuts[4] 	= {0.1*mm, 1.0*mm, 10.0*mm, 100.0*mm};

  std::vector<G4Region*> regions;
  std::vector<G4ProductionCuts*> prodcuts;

  char name[100];
  G4int counter = -1;
  for(G4int i=0;i<nregion_photon;i++)
  {
    for(G4int j=0;j<nregion_electron;j++)
    {
      for(G4int k=0;k<nregion_positron;k++)
      {
        sprintf(name,"%d_%d_%d",i,j,k);
        regName.assign(name);

        counter++;
        regions.push_back(G4RegionStore::GetInstance()->GetRegion(regName));
        prodcuts.push_back(new G4ProductionCuts());
        prodcuts[counter]->SetProductionCut(photon_cuts[i],G4ProductionCuts::GetIndex("gamma"));
        prodcuts[counter]->SetProductionCut(electron_cuts[i],G4ProductionCuts::GetIndex("e-"));
        prodcuts[counter]->SetProductionCut(positron_cuts[i],G4ProductionCuts::GetIndex("e+"));
        regions[counter]->SetProductionCuts(prodcuts[counter]);
      }
    }
  }
  if (verboseLevel > 0) DumpCutValuesTable();  
  */
};

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

1 Idea: Re: TheoFSGenerator Crashes   (Vladimir Ivanchenko - 23 Jun, 2008)
 Add Message Add Message
to: "TheoFSGenerator Crashes"

 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 ]