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

None HadronElasticProcess Seg fault 

Forum: Hadronic Processes
Date: 31 May, 2006
From: Manoel Couder <manoel.couder@fynu.ucl.ac.be>

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);
}

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

1 None: Re: HadronElasticProcess Seg fault   (Vladimir IVANTCHENKO - 01 Jun, 2006)
(_ 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: "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 ]