Message: Re: HadronElasticProcess Seg fault Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: HadronElasticProcess Seg fault 

Forum: Hadronic Processes
Re: None HadronElasticProcess Seg fault (Manoel Couder)
Date: 01 Jun, 2006
From: Vladimir IVANTCHENKO <vnivanch@mail.cern.ch>

On Wed, 31 May 2006, Manoel Couder wrote:

> *** Discussion title: Hadronic Processes
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/hadronprocess/514"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Dear all,
> 
> I am facing a problem with hadronic elastic scattering. To reproduce my
> problem I simply modified ExN01PhysicsList.cc from the novice/N01
> example. Everything else in N01 is the same. It compile fine, but it
> Seg. fault at (from gdb output):
> 
> #0  0x08066dbf in G4VUserPhysicsList::PreparePhysicsTable ()
> #1  0x080683c0 in G4VUserPhysicsList::BuildPhysicsTable ()
> #2  0x0805d9ef in G4RunManagerKernel::BuildPhysicsTables ()
> #3  0x0805db2d in G4RunManagerKernel::RunInitialization ()
> #4  0x08060898 in G4RunManager::RunInitialization ()
> #5  0x0805f2a0 in G4RunManager::BeamOn ()
> #6  0x0804d36b in main ()
> 
> Any help would be welcome.
> 
> Cheers,
> 
> Manoel
> 
> Here is the modified ExN01PhysicsList.cc
> 
> #include "ExN01PhysicsList.hh"
> #include "G4ParticleTypes.hh"
> 
> #include "G4ProcessManager.hh"
> 
> #include "G4HadronElasticProcess.hh"
> #include "G4LElastic.hh"
> 
> ExN01PhysicsList::ExN01PhysicsList() {;}
> 
> ExN01PhysicsList::~ExN01PhysicsList() {;}
> 
> void ExN01PhysicsList::ConstructParticle()
> {
>   // In this method, static member functions should be called
>   // for all particles which you want to use.
>   // This ensures that objects of these particle types will be
>   // created in the program.
> 
>   G4Geantino::GeantinoDefinition();
>   G4Proton::ProtonDefinition();
> 
> }
> 
> void ExN01PhysicsList::ConstructProcess() {
> 
>   AddTransportation();
> 
>   G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
>   G4LElastic* theElasticModel = new G4LElastic;
>   theElasticProcess->RegisterMe(theElasticModel);
> 
>   theParticleIterator->reset();
>   while ( (*theParticleIterator)() ){
> 
>       G4ParticleDefinition* particle = theParticleIterator->value();
>       G4ProcessManager* pmanager = particle->GetProcessManager();
>       G4String particleName = particle->GetParticleName();
> 
>       if (particleName == "proton") {
>         pmanager->AddDiscreteProcess(theElasticProcess);
>        }
>       }
> 
> }
> 
> void ExN01PhysicsList::SetCuts()
> {
>   // uppress error messages even in case e/gamma/proton do not exist
>   G4int temp = GetVerboseLevel();
>   SetVerboseLevel(0);
>   //  " G4VUserPhysicsList::SetCutsWithDefault" method sets
>   //   the default cut value for all particle types
>   SetCutsWithDefault();
> 
>   // Retrieve verbose level
>   SetVerboseLevel(temp);
> }
> 
> 

In first view the elastic is included correctly, if only the part for
elastic is shown. Nevetheless, I would recommend to look into the
PhysicsList of

example/extended/electromagnetic/TesEm7,9

where elastic process can be instantiated.

VI

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

1 None: Re: HadronElasticProcess Seg fault   (Manoel Couder - 01 Jun, 2006)
(_ None: Re: HadronElasticProcess Seg fault   (Vladimir IVANTCHENKO - 01 Jun, 2006)
(_ None: Re: HadronElasticProcess Seg fault   (N.P.M. Brantjes - 13 Nov, 2006)
 Add Message Add Message
to: "Re: HadronElasticProcess Seg fault"

 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 ]