Message: Re: Problems with hadronic interactions in geant4.8.X Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Problems with hadronic interactions in geant4.8.X 

Forum: Hadronic Processes
Re: Question Problems with hadronic interactions in geant4.8.X (Enrico Farnea)
Date: 12 Sep, 2006
From: Vladimir IVANTCHENKO <vnivanch@mail.cern.ch>

On Tue, 12 Sep 2006, Enrico Farnea wrote:

> *** Discussion title: Hadronic Processes
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/hadronprocess/564"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> I am experiencing problems with the latest versions of geant4
> (4.8.0, 4.8.0.p01, 4.8.1, 4.8.1.p01). My code compiles without
> problems, but I get crashes when I start a run. The same code
> compiles and runs fine with geant4.7.1.p01. I am making my tests
> on a Linux laptop with gcc version 4.0.1 (4.0.1-5mdk for Mandriva 
> Linux release 2006.0); I am using CLHEP 1.9.2.2. This is my
> Physics List:
> 
> #include "myTestPhysicsList.hh"
> 
> #include "G4ProcessManager.hh"
> #include "G4ProcessVector.hh"
> #include "G4LossTableManager.hh"
> #include "G4ParticleDefinition.hh"
> #include "G4ParticleWithCuts.hh"
> #include "G4ParticleTypes.hh"
> #include "G4ParticleTable.hh"
> #include "G4Material.hh"
> #include "G4ios.hh"
> 
> myTestPhysicsList::myTestPhysicsList():  G4VUserPhysicsList()
> {
>   G4LossTableManager::Instance();
>   
>   defaultCutValue = 0.1*mm;
>   cutForGamma     = defaultCutValue;
>   cutForElectron  = defaultCutValue;
>   cutForPositron  = defaultCutValue;
>   cutForProton    = defaultCutValue;
>   cutForNeutron   = defaultCutValue;
>   
>   SetVerboseLevel(1);
> }
> 
> myTestPhysicsList::~myTestPhysicsList(){
> }
> 
> ////////////////////////////////////////////////////////////////
> // In this method, static member functions are called
> // for all particles which are used.
> // This ensures that objects of these particle types will be
> // created in the program.
> ////////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructParticle()
> {
>   G4Gamma   ::GammaDefinition();
>   G4Electron::ElectronDefinition();
>   G4Positron::PositronDefinition();
>   // hadrons
>   G4Neutron ::NeutronDefinition();
>   G4AntiNeutron::AntiNeutronDefinition();
>   G4Proton  ::ProtonDefinition();
>   G4AntiProton::AntiProtonDefinition();
>   //  Ions
>   G4Deuteron::DeuteronDefinition();
>   G4Triton::TritonDefinition();
>   G4He3::He3Definition();
>   G4Alpha::AlphaDefinition();
>   G4GenericIon::GenericIonDefinition();
>   G4Geantino::GeantinoDefinition();
> }
> 
> void myTestPhysicsList::ConstructProcess()
> {
>   AddTransportation();
>   ConstructEMStandard();
>   ConstructGeneral();
>   ConstructHadronsEMStandard();
>   ConstructHadronsEMStopp();
>   ConstructHadronsElastic();
>   ConstructHadronsInelastic();
>   ConstructAdditionalProcesses();  
> }
> 
> //////////////////////////////////////////////////////////
> /// Inclusion of header files for the classes describing
> /// the required processes.
> ///////////////////////////////////////////////////////
> ///
> /// gamma
> ///////////////////////////////////////////////////////
> /// low energy
> #include "G4LowEnergyCompton.hh"
> #ifdef G4V47
> #include "G4LowEnergyPolarizedRayleigh.hh"
> #endif
> #include "G4LowEnergyGammaConversion.hh"
> #include "G4LowEnergyPhotoElectric.hh"
> #include "G4LowEnergyRayleigh.hh"
> 
> //////////////////////////////////////////
> /// all charged particles
> /////////////////////////////////////////
> #include "G4MultipleScattering.hh"
> ///////////////////////////////////////
> /// e- e+
> //////////////////////////////////////
> /// standard
> #include "G4eIonisation.hh"
> #include "G4eBremsstrahlung.hh"
> #include "G4eplusAnnihilation.hh"
> /// low energy
> #include "G4LowEnergyBremsstrahlung.hh"
> #include "G4LowEnergyIonisation.hh"
> 
> ///////////////////////////////////////////////////////////////////////////
> /// This method registers the electromagnetic processes for gamma, e-, e+
> ///////////////////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructEMStandard()
> {
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ){
>     G4ParticleDefinition* particle = theParticleIterator->value();
>     G4ProcessManager* pmanager = particle->GetProcessManager();
>     G4String particleName = particle->GetParticleName();
>     G4String particleType = particle->GetParticleType();
>     if (particleName == "gamma") { //> gamma
>       G4VProcess* theGammaConversion;
>       G4VProcess* thePhotoElectricEffect;
>       G4VProcess* theComptonScattering;
>       G4VProcess* theRayleighScattering = NULL;
> 
>       G4cout << " Using low-energy EM interactions" << G4endl;
>       theGammaConversion     = new G4LowEnergyGammaConversion;
>       thePhotoElectricEffect = new G4LowEnergyPhotoElectric;
>       // NB polarization overrides LECS (polarization -->no LECS )
>       theComptonScattering   = new G4LowEnergyCompton;
>       theRayleighScattering  = new G4LowEnergyRayleigh;
> 
>       // add processes
>       pmanager->AddDiscreteProcess(theGammaConversion);
>       pmanager->AddDiscreteProcess(theComptonScattering);      
>       pmanager->AddDiscreteProcess(thePhotoElectricEffect);
>       pmanager->AddDiscreteProcess(theRayleighScattering);
>     } 
>     else if (particleName == "e-") { //> electron
>       G4VProcess* theeminusMultipleScattering = new G4MultipleScattering;
>       G4VProcess* theeminusIonisation;        
>       G4VProcess* theeminusBremsstrahlung;    
>       
>       theeminusIonisation         = new G4LowEnergyIonisation;
>       theeminusBremsstrahlung     = new G4LowEnergyBremsstrahlung;
> 
>       // add processes
>       pmanager->AddProcess(theeminusMultipleScattering);
>       pmanager->AddProcess(theeminusIonisation);
>       pmanager->AddProcess(theeminusBremsstrahlung);
>       // set ordering for AlongStepDoIt
>       pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
>       pmanager->SetProcessOrdering(theeminusIonisation,         idxAlongStep,2);
>       // set ordering for PostStepDoIt
>       pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
>       pmanager->SetProcessOrdering(theeminusIonisation,         idxPostStep,2);
>       pmanager->SetProcessOrdering(theeminusBremsstrahlung,     idxPostStep,3);
> 
>     } 
>     else if (particleName == "e+") {  //> positron
>       G4VProcess* theeplusMultipleScattering = new G4MultipleScattering;
>       G4VProcess* theeplusAnnihilation       = new G4eplusAnnihilation;
>       G4VProcess* theeplusIonisation         = new G4eIonisation;    
>       G4VProcess* theeplusBremsstrahlung     = new G4eBremsstrahlung;
>       // add processes
>       pmanager->AddProcess(theeplusMultipleScattering);
>       pmanager->AddProcess(theeplusIonisation);
>       pmanager->AddProcess(theeplusBremsstrahlung);
>       pmanager->AddProcess(theeplusAnnihilation);
>       // set ordering for AtRestDoIt
>       pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
>       // set ordering for AlongStepDoIt
>       pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
>       pmanager->SetProcessOrdering(theeplusIonisation,         idxAlongStep,2);
>       // set ordering for PostStepDoIt
>       pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
>       pmanager->SetProcessOrdering(theeplusIonisation,         idxPostStep,2);
>       pmanager->SetProcessOrdering(theeplusBremsstrahlung,     idxPostStep,3);
>       pmanager->SetProcessOrdering(theeplusAnnihilation,       idxPostStep,4);
>     }
>   }
> }
> 
> ////////////////////////////////////////////////////////////////////////////
> /// This method registers multiple scattering processes for charged hadrons
> ////////////////////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructHadronsEMStandard()
> {
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ){
>     G4ParticleDefinition* particle = theParticleIterator->value();
>     if( particle->GetPDGCharge() == 0. ) continue;
> 
>     if( particle->GetParticleName() == "e-" ) continue; //> multiple scattering for e+/e- has been already registered
>     if( particle->GetParticleName() == "e+" ) continue;
> 
>     G4ProcessManager* pmanager = particle->GetProcessManager();
> 
>     G4MultipleScattering* aMultipleScattering = new G4MultipleScattering;
>     pmanager->AddProcess(aMultipleScattering, -1, 1, 1);
>   }
> }
> 
> #include "G4hIonisation.hh"
> #include "G4ionIonisation.hh"
> 
> // alpha and GenericIon and deuterons, triton, He3:
> #include "G4hLowEnergyIonisation.hh"
> #include "G4EnergyLossTables.hh"
> // hLowEnergyIonisation uses Ziegler 1988 as the default
> 
> //////////////////////////////////////////////////////////////////////////
> /// This method registers stopping power EM processes for hadrons
> //////////////////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructHadronsEMStopp()
> {
> 
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ){
>     G4ParticleDefinition* particle = theParticleIterator->value();
>     
>     if( particle->GetPDGCharge() == 0. ) continue;
> 
>     if( particle->GetParticleName() == "e-" ) continue; // processes for e+/e- has been already registered
>     if( particle->GetParticleName() == "e+" ) continue;
>     
>     G4ProcessManager* pmanager = particle->GetProcessManager();
> 
>     // low energy: all hadrons use G4hLowEnergyIonisation
>     // but the call to SetElectronicStoppingPowerModel depends
>     // on the particle type
>     G4hLowEnergyIonisation* ahadronLowEIon = new G4hLowEnergyIonisation;
>     pmanager->AddProcess(ahadronLowEIon, -1, 2, 2 );
>     ahadronLowEIon->SetNuclearStoppingOn();
>     if (particle->GetParticleName() == "proton")  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4Proton::ProtonDefinition(),         "ICRU_R49p");    
>     else if (particle->GetParticleName() == "antiproton")  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4AntiProton::AntiProtonDefinition(), "ICRU_R49p");    
>     else if (particle->GetParticleName() == "deuteron")  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4Deuteron::DeuteronDefinition(),     "ICRU_R49p");    
>     else if (particle->GetParticleName() == "triton")  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4Triton::TritonDefinition(),         "ICRU_R49p");    
>     else if (particle->GetParticleName() == "He3")  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4He3::He3Definition(),               "ICRU_R49p");    
>     else if (particle->GetParticleName() == "alpha")  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4Alpha::AlphaDefinition(),           "ICRU_R49p");    
>     else if (particle->GetParticleName() == "GenericIon")  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4GenericIon::GenericIonDefinition(), "ICRU_R49p");    
>     else if (particle->GetParticleType() == "nucleus" && particle->GetPDGCharge() != 0.)  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4GenericIon::GenericIonDefinition(), "ICRU_R49p");
>     else if ((!particle->IsShortLived()) && (particle->GetPDGCharge() != 0.0))  
>       ahadronLowEIon->SetElectronicStoppingPowerModel(G4GenericIon::GenericIonDefinition(), "ICRU_R49p");
> 
>     ahadronLowEIon->SetNuclearStoppingPowerModel("ICRU_R49");      
>   }
> }
> 
> /////////////////////////////////////////////////////////////
> /// Hadronic processes
> ////////////////////////////////////////////////////////////// 
> /// Elastic processes:
> #include "G4HadronElasticProcess.hh"
> 
> // Inelastic processes:
> #include "G4ProtonInelasticProcess.hh"
> #include "G4AntiProtonInelasticProcess.hh"
> #include "G4NeutronInelasticProcess.hh"
> #include "G4AntiNeutronInelasticProcess.hh"
> #include "G4DeuteronInelasticProcess.hh"
> #include "G4TritonInelasticProcess.hh"
> #include "G4AlphaInelasticProcess.hh"
> 
> // Low-energy Models: < 20GeV
> #include "G4LElastic.hh"
> #include "G4LEProtonInelastic.hh"
> #include "G4LEAntiProtonInelastic.hh"
> #include "G4LENeutronInelastic.hh"
> #include "G4LEAntiNeutronInelastic.hh"
> #include "G4LEDeuteronInelastic.hh"
> #include "G4LETritonInelastic.hh"
> #include "G4LEAlphaInelastic.hh"
> 
> // High-energy Models: >20 GeV
> #include "G4HEProtonInelastic.hh"
> #include "G4HEAntiProtonInelastic.hh"
> #include "G4HENeutronInelastic.hh"
> #include "G4HEAntiNeutronInelastic.hh"
> 
> // Neutron high-precision models: <20 MeV
> #include "G4NeutronHPElastic.hh"
> #include "G4NeutronHPElasticData.hh"
> #include "G4NeutronHPCapture.hh"
> #include "G4NeutronHPCaptureData.hh"
> #include "G4NeutronHPInelastic.hh"
> #include "G4NeutronHPInelasticData.hh"
> #include "G4LCapture.hh"
> 
> // Stopping processes
> #include "G4AntiProtonAnnihilationAtRest.hh"
> #include "G4AntiNeutronAnnihilationAtRest.hh"
> 
> // Decays 
> #include "G4Decay.hh"
> #include "G4RadioactiveDecay.hh"
> #include "G4IonTable.hh"
> #include "G4Ions.hh"
> 
> //////////////////////////////////////////////////////////////
> /// This method registers the elastic scattering processes
> /// for hadrons
> //////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructHadronsElastic()
> {
>   G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
>   G4LElastic* theElasticModel = new G4LElastic;
>   theElasticProcess->RegisterMe(theElasticModel);
> 
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ){
>     G4ParticleDefinition* particle = theParticleIterator->value();
> 
>     if( particle->GetParticleName() == "gamma" ) continue;
>     if( particle->GetParticleName() == "e-" )    continue; // processes for e+/e- has been already registered
>     if( particle->GetParticleName() == "e+" )    continue;
> 
>     G4ProcessManager* pManager = particle->GetProcessManager();
> 
>     if( particle->GetParticleName() == "neutron" ) {
>       // elastic scattering                                                      
>       G4HadronElasticProcess* theNeutronElasticProcess = new G4HadronElasticProcess;                                             
>       G4LElastic* theElasticModel1 = new G4LElastic;                             
>       G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic;           
>       theNeutronElasticProcess->RegisterMe(theElasticModel1);                    
>       theElasticModel1->SetMinEnergy(19*MeV);                                    
>       theNeutronElasticProcess->RegisterMe(theElasticNeutron);                   
>       G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData;      
>       theNeutronElasticProcess->AddDataSet(theNeutronData);                      
>       pManager->AddDiscreteProcess(theNeutronElasticProcess);                    
>     }
> //    else if ( !particle->IsShortLived() ) { 
>     else if ( particle->GetParticleName() == "anti_neutron" ||
>               particle->GetParticleName() == "proton"       ||
>               particle->GetParticleName() == "anti_proton"  ||
>               particle->GetParticleName() == "deuteron"     ||
>               particle->GetParticleName() == "triton"       ||
>               particle->GetParticleName() == "alpha"        || 
>               particle->GetParticleName() == "He3"          ||
>               particle->GetParticleName() == "GenericIon"   || 
>              (particle->GetParticleType() == "nucleus" && particle->GetPDGCharge() != 0.)) {
>       pManager->AddDiscreteProcess(theElasticProcess);
>     }
>   }
> }
> 
> //////////////////////////////////////////////////////////////
> /// This method registers the inelastic scattering processes
> /// for hadrons
> //////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructHadronsInelastic()
> {
> 
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ){
>     G4ParticleDefinition* particle = theParticleIterator->value();
> 
>     if( particle->GetParticleName() == "gamma" ) continue;
>     if( particle->GetParticleName() == "e-" )    continue; // processes for e+/e- has been already registered
>     if( particle->GetParticleName() == "e+" )    continue;
> 
>     G4ProcessManager* pmanager = particle->GetProcessManager();
> 
>     if(particle->GetParticleName() == "proton") {
>       G4ProtonInelasticProcess* theInelasticProcess = new G4ProtonInelasticProcess("inelastic");
>       G4LEProtonInelastic* theLEInelasticModel = new G4LEProtonInelastic;
>       theInelasticProcess->RegisterMe(theLEInelasticModel);
>       G4HEProtonInelastic* theHEInelasticModel = new G4HEProtonInelastic;
>       theInelasticProcess->RegisterMe(theHEInelasticModel);
>       pmanager->AddDiscreteProcess(theInelasticProcess);
>     } 
>     else if(particle->GetParticleName() == "anti_proton") {
>       G4AntiProtonInelasticProcess* theInelasticProcess = new G4AntiProtonInelasticProcess("inelastic");
>       G4LEAntiProtonInelastic* theLEInelasticModel = new G4LEAntiProtonInelastic;
>       theInelasticProcess->RegisterMe(theLEInelasticModel);
>       G4HEAntiProtonInelastic* theHEInelasticModel = new G4HEAntiProtonInelastic;
>       theInelasticProcess->RegisterMe(theHEInelasticModel);
>       pmanager->AddDiscreteProcess(theInelasticProcess);
>     } 
>     else if(particle->GetParticleName() == "neutron") {
>       // inelastic scattering
>       G4NeutronInelasticProcess* theInelasticProcess = new G4NeutronInelasticProcess("inelastic");
>       G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
>       theInelasticModel->SetMinEnergy(19*MeV);
>       theInelasticProcess->RegisterMe(theInelasticModel);
>       G4NeutronHPInelastic * theLENeutronInelasticModel = new G4NeutronHPInelastic;
>       theInelasticProcess->RegisterMe(theLENeutronInelasticModel);
>       G4NeutronHPInelasticData * theNeutronData1 = new G4NeutronHPInelasticData;
>       theInelasticProcess->AddDataSet(theNeutronData1);
>       pmanager->AddDiscreteProcess(theInelasticProcess);
> 
>       // capture
>       G4HadronCaptureProcess* theCaptureProcess = new G4HadronCaptureProcess;
>       G4LCapture* theCaptureModel = new G4LCapture;
>       theCaptureModel->SetMinEnergy(19*MeV);
>       theCaptureProcess->RegisterMe(theCaptureModel);
>       G4NeutronHPCapture * theLENeutronCaptureModel = new G4NeutronHPCapture;
>       theCaptureProcess->RegisterMe(theLENeutronCaptureModel);
>       G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData;
>       theCaptureProcess->AddDataSet(theNeutronData3);
>       pmanager->AddDiscreteProcess(theCaptureProcess);
>     } 
>     else if(particle->GetParticleName() == "anti_neutron") {
>       G4AntiNeutronInelasticProcess* theInelasticProcess = new G4AntiNeutronInelasticProcess("inelastic");
>       G4LEAntiNeutronInelastic* theLEInelasticModel = new G4LEAntiNeutronInelastic;
>       theInelasticProcess->RegisterMe(theLEInelasticModel);
>       G4HEAntiNeutronInelastic* theHEInelasticModel = new G4HEAntiNeutronInelastic;
>       theInelasticProcess->RegisterMe(theHEInelasticModel);
>       pmanager->AddDiscreteProcess(theInelasticProcess);
> 
>     } 
>     else if(particle->GetParticleName() == "deuteron") {
>       G4DeuteronInelasticProcess* theInelasticProcess = new G4DeuteronInelasticProcess("inelastic");
>       G4LEDeuteronInelastic* theLEInelasticModel = new G4LEDeuteronInelastic;
>       theInelasticProcess->RegisterMe(theLEInelasticModel);
>       pmanager->AddDiscreteProcess(theInelasticProcess);
> 
>     } 
>     else if(particle->GetParticleName() == "triton") {
>       G4TritonInelasticProcess* theInelasticProcess = new G4TritonInelasticProcess("inelastic");
>       G4LETritonInelastic* theLEInelasticModel = new G4LETritonInelastic;
>       theInelasticProcess->RegisterMe(theLEInelasticModel);
>       pmanager->AddDiscreteProcess(theInelasticProcess);
> 
>     } 
>     else if(particle->GetParticleName() == "alpha") {
>       G4AlphaInelasticProcess* theInelasticProcess = new G4AlphaInelasticProcess("inelastic");
>       G4LEAlphaInelastic* theLEInelasticModel = new G4LEAlphaInelastic;
>       theInelasticProcess->RegisterMe(theLEInelasticModel);
>       pmanager->AddDiscreteProcess(theInelasticProcess);
>     }
>   }
> }
> 
> //////////////////////////////////////////////////////////////
> /// This method registers the decay processes
> /// for hadrons
> //////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructGeneral()
> {
> 
>   // Add Decay Process
>   G4Decay* theDecayProcess = new G4Decay();
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ) {
>     G4ParticleDefinition* particle = theParticleIterator->value();
>     G4ProcessManager* pmanager = particle->GetProcessManager();
> 
>     if (theDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) { 
>       pmanager ->AddProcess(theDecayProcess);
>       pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
>       pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
>     }
>   }
> }
> 
> //////////////////////////////////////////////////////////////////////////////
> /// In case other processes are needed to plug-in another event generator,
> /// they should be registered with this method
> //////////////////////////////////////////////////////////////////////////////
> void myTestPhysicsList::ConstructAdditionalProcesses()
> {}
> 
> void myTestPhysicsList::SetCuts()
> {
>   SetCutsWithDefault();
>   // set cut values for gamma at first and for e- second and next for e+,
>   // because some processes for e+/e- need cut values for gamma 
>   SetCutValue(cutForGamma,    "gamma");
>   G4cout << " ----> Cut for gamma is " << cutForGamma/mm << " mm" << G4endl;
>   SetCutValue(cutForElectron, "e-");
>   G4cout << " ----> Cut for electron is " << cutForElectron/mm << " mm" << G4endl;
>   SetCutValue(cutForPositron, "e+");
>   G4cout << " ----> Cut for positron is " << cutForPositron/mm << " mm" << G4endl;
>   SetCutValue(cutForNeutron,  "neutron");
>   G4cout << " ----> Cut for neutron is " << cutForNeutron/mm << " mm" << G4endl;
>   SetCutValue(cutForNeutron,  "anti_neutron");
>   G4cout << " ----> Cut for antineutron is " << cutForNeutron/mm << " mm" << G4endl;
>   
>   SetCutValue(cutForProton,   "proton");      
>   G4cout << " ----> Cut for proton is " << cutForProton/mm << " mm" << G4endl;
>   SetCutValue(cutForProton,   "anti_proton"); 
>   G4cout << " ----> Cut for antiproton is " << cutForProton/mm << " mm" << G4endl;
>   
>   if (verboseLevel>0)
>     DumpCutValuesTable();
> }
> 
> According to the debugger, the error arises with G4VUserPhysicsList::PreparePhysicsTable
> The full debugger log is:
> 
> GNU gdb 6.3-5mdk (Mandriva Linux release 2006.0)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i586-mandriva-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
> 
> Reading symbols from shared object read from target memory...done.
> Loaded system supplied DSO at 0xffffe000
> Core was generated by `myTest -g 0'.
> Program terminated with signal 11, Segmentation fault.
> 
> warning: svr4_current_sos: Can't read pathname for load map: Input/output error
> 
> Reading symbols from /usr/X11R6/lib/libGLU.so.1...done.
> Loaded symbols for /usr/X11R6/lib/libGLU.so.1
> Reading symbols from /usr/lib/libGL.so.1...done.
> Loaded symbols for /usr/lib/libGL.so.1
> Reading symbols from /usr/X11R6/lib/libXmu.so.6...done.
> Loaded symbols for /usr/X11R6/lib/libXmu.so.6
> Reading symbols from /usr/X11R6/lib/libXt.so.6...done.
> Loaded symbols for /usr/X11R6/lib/libXt.so.6
> Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
> Loaded symbols for /usr/X11R6/lib/libXext.so.6
> Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
> Loaded symbols for /usr/X11R6/lib/libX11.so.6
> Reading symbols from /usr/X11R6/lib/libSM.so.6...done.
> Loaded symbols for /usr/X11R6/lib/libSM.so.6
> Reading symbols from /usr/X11R6/lib/libICE.so.6...done.
> Loaded symbols for /usr/X11R6/lib/libICE.so.6
> Reading symbols from /usr/local/lib/libCLHEP-1.9.2.2.so...done.
> Loaded symbols for /usr/local/lib/libCLHEP-1.9.2.2.so
> Reading symbols from /usr/lib/libstdc++.so.6...done.
> Loaded symbols for /usr/lib/libstdc++.so.6
> Reading symbols from /lib/tls/libm.so.6...done.
> Loaded symbols for /lib/tls/libm.so.6
> Reading symbols from /lib/libgcc_s.so.1...done.
> Loaded symbols for /lib/libgcc_s.so.1
> Reading symbols from /lib/tls/libc.so.6...done.
> Loaded symbols for /lib/tls/libc.so.6
> Reading symbols from /lib/tls/libpthread.so.0...done.
> Loaded symbols for /lib/tls/libpthread.so.0
> Reading symbols from /usr/X11R6/lib/libXxf86vm.so.1...done.
> Loaded symbols for /usr/X11R6/lib/libXxf86vm.so.1
> Reading symbols from /lib/libdl.so.2...done.
> Loaded symbols for /lib/libdl.so.2
> Reading symbols from /lib/ld-linux.so.2...done.
> Loaded symbols for /lib/ld-linux.so.2
> #0  0x082b7c2d in G4VUserPhysicsList::PreparePhysicsTable ()
> (gdb) where
> #0  0x082b7c2d in G4VUserPhysicsList::PreparePhysicsTable ()
> #1  0x082b9263 in G4VUserPhysicsList::BuildPhysicsTable ()
> #2  0x082acf3c in G4RunManagerKernel::BuildPhysicsTables ()
> #3  0x082ad07d in G4RunManagerKernel::RunInitialization ()
> #4  0x082b0338 in G4RunManager::RunInitialization ()
> #5  0x082ae55c in G4RunManager::BeamOn ()
> #6  0x082b20a7 in G4RunMessenger::SetNewValue ()
> #7  0x084cdd40 in G4UIcommand::DoIt ()
> #8  0x084d36ae in G4UImanager::ApplyCommand ()
> #9  0x08114e30 in G4UIterminal::ExecuteCommand () at src/G4HadronicInteractionWrapper.cc:30
> #10 0x08115de5 in G4UIterminal::SessionStart () at src/G4HadronicInteractionWrapper.cc:30
> #11 0x080508fe in main (argc=3, argv=0xbfa9e624) at myTest.cc:78
> 
> Does anybody have some good suggestion? Should something be changed
> in the PhysicsList?
> 

Yes, after G4 8.0 some changings required to PhysicsList. All particles 
should be instantiated. Variants of recent PhysicsLists are in 
examples/extended/electromagnetic/ hadronic
or novice/ 
  
In your case, may be dump list of particles and processes will help to see
what is really created in PhysicsLists. The problem likely happen when
tables start to be prepared for non-existing particle or for a
short-living particle.

VI

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

 Add Message Add Message
to: "Re: Problems with hadronic interactions in geant4.8.X"

 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 ]