Message: Alpha particles physics list Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Alpha particles physics list 

Keywords: alpha physics
Forum: Physics List
Date: 17 Sep, 2007
From: max <cinimassimo@gmail.com>

Hi everyone!
My purpose is to simulate alpha particles and, as a first step,
I want to obtain the correct physics list.
What I have done is quite simple: I have modified the program
called novice/N01 by using alpha particles instead of geantino.
That's the physics list I've got:

-----------------------------------------------------------------
#include "PhysicsList.hh"
#include "G4LeptonConstructor.hh"
#include "G4BosonConstructor.hh"
#include "G4Alpha.hh"
#include "G4IonConstructor.hh"
#include "G4Transportation.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4PenelopePhotoElectric.hh"
#include "G4PenelopeCompton.hh"
#include "G4PenelopeGammaConversion.hh"
#include "G4PenelopeRayleigh.hh"
#include "G4MultipleScattering.hh"
#include "G4PenelopeIonisation.hh"
#include "G4PenelopeBremsstrahlung.hh"
#include "G4PenelopeAnnihilation.hh"
#include "G4ionIonisation.hh"

PhysicsList::PhysicsList()
{;}

PhysicsList::~PhysicsList()
{;}

void PhysicsList::ConstructParticle()
{
 G4LeptonConstructor lept;
 lept.ConstructParticle();

 G4BosonConstructor boson;
 boson.ConstructParticle();

 G4Alpha::AlphaDefinition();

 G4IonConstructor iConstructor;
 iConstructor.ConstructParticle();
}

void PhysicsList::ConstructProcess()
{
 AddTransportation();
 ConstructEM();
}

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

  if (particleName == "gamma") {
   pmanager->AddDiscreteProcess(new G4PenelopePhotoElectric);
   pmanager->AddDiscreteProcess(new G4PenelopeCompton);
   pmanager->AddDiscreteProcess(new G4PenelopeGammaConversion);
   pmanager->AddDiscreteProcess(new G4PenelopeRayleigh);
  } else if (particleName == "e-") {
   pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
   pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
   pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);
  } else if (particleName == "e+") {
   pmanager->AddProcess(new G4MultipleScattering,     -1, 1, 1);
   pmanager->AddProcess(new G4PenelopeIonisation,     -1, 2, 2);
   pmanager->AddProcess(new G4PenelopeBremsstrahlung, -1,-1, 3);
   pmanager->AddProcess(new G4PenelopeAnnihilation,    0,-1, 4);
  } else if( particleName == "alpha"  ) {
   pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
   pmanager->AddProcess(new G4ionIonisation,      -1, 2,2);
  }
 }
}

void PhysicsList::SetCuts(){
 SetCutsWithDefault();
 if (verboseLevel>0) DumpCutValuesTable();
}
-----------------------------------------------------------------



When I compile everything works well but when I try to execute
the program I get a "segmentation fault":

-----------------------------------------------------------------
...
Start Run processing.
=====================================
  G4EventManager::ProcessOneEvent()
=====================================
1 vertices passed from G4Event.
G4PrimaryTransformer::PrimaryVertex (-2000(mm),0(mm),0(mm),0(nsec))
Primary particle (alpha) --- Transfered with momentum (202.379,0,0)
A new track 0xa201b0 (trackID 1, parentID 0) is passed to G4StackManager.
1 primaries are passed from G4EventTransformer.
!!!!!!! Now start processing an event !!!!!!!
### pop requested out of 1 stacked tracks.
Selected G4StackedTrack : 0xa205b0 with G4Track 0xa201b0 (trackID 1, parentID 0)
Track 0xa201b0 (trackID 1, parentID 0) is passed to G4TrackingManager.

*******************************************************************************************
* G4Track Information:   Particle = alpha,   Track ID = 1,   Parent ID = 0
*******************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0   -2e+03        0        0      5.49        0        0         0     expHall initStep
Segmentation fault
-----------------------------------------------------------------

Would you please give me some advice ?
It would be very much appreciated!
Thanks,
Massimo

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

1 None: Re: Alpha particles physics list   (Maria Grazia Pia - 17 Sep, 2007)
(_ None: Re: Alpha particles physics list   (max - 20 Sep, 2007)
 Add Message Add Message
to: "Alpha particles physics list"

 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 ]