Forum: Particles Not Logged In (login)
Show subscribers

This forum deals with topics concerning the definition and dynamics of particles and their relation to tracks.

The email gateway for this forum is: particles-g4hn-g4hn@slac.stanford.edu


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

Question How to define cylindrical volume source using GPS?  by Anil <Anil>,   Oct 21, 02:43
Hello,

I need to visualise the isotropic emission of single energy particles, but I need these to be associated with a cylindrical volume using General Particle Source (GPS). I am using HepRApp driver and GPS commands as given below.

 /gps/particle gamma
 /gps/pos/type Volume
 /gps/pos/shape Cylinder
 /gps/pos/centre 0. 0. 0. mm
 /gps/pos/radius 10. mm
 /gps/pos/halfz 5. mm
 /gps/ang/type iso
 /gps/energy 1000. keV
 /gps/number 100
 /vis/open HepRepFile
 /vis/drawVolume
 /vis/scene/add/trajectories
 /vis/scene/add/hits
 /run/beamOn 1

But, the particle are appearing as such they are emitting from a point source but not from a whole cylindrical volume. Anything wrong in the above commands? How do I configure the GPS to actually distribute the particles uniformly throughout my volume?

Thanks in advance!!

Anil

1 Feedback: Re: How to define cylindrical volume source using GPS?   (Giovanni Santin - Nov 06, 08:33)
(_ Question: Re: How to define cylindrical volume source using GPS?   (Anil - Nov 09, 03:29)
(_ Feedback: Re: How to define cylindrical volume source using GPS?   (Giovanni Santin - Nov 11, 07:23) new
(_ None: Re: How to define cylindrical volume source using GPS?   (Anil - Nov 13, 06:27) new
Question why polarization vector is not perpendicular to momenta ?  by <zhangyf@ihep.ac.cn>,   Sep 25, 20:36
Hi,

I am a new g4 member and now starting to simulate the physical progress of Compton scattering of polarized gamma rays.

// set polarization of incident gamma rays
  GPSource->SetParticlePolarization(polar);
// polar is perpendicular to momenta (example/novice/ExN06)

Partial Results of My program:

>> tracking/verbose 3
>> run/beamOn 1
...

 G4Track Information:   Particle = gamma,   Track ID = 1,   Parent ID = 0

      -----------------------------------------------------------------------
        StepPoint Information               PreStep            PostStep
      -----------------------------------------------------------------------
         ...
         Momentum Direct - x : -0.05637176954884118  0.4130663918928705
         Momentum Direct - y :  0.03700451044691715 -0.1472695079621853
         Momentum Direct - z :    0.997723854483051 -0.8987145530774392
         ...
         Polarization - x    :   0.8547874941346449  0.9193025924556333
         Polarization - y    :  -0.5189040340729129 0.06948359839555679
         Polarization - Z    : -0.008771732660759615 0.009372527261891497
         Weight              :                    1                   1
         Step Status         :           Geom Limit       PostStep Proc
         Process defined Step:       Transportation           pol-compt
      -----------------------------------------------------------------------

My questions:

(1) In PreStep (before Compton scattering), the polarization vector is set to be perpendicular to momenta. why, in PostStep (after Compton Scattering), those two vectors become not perpendicular with each other?

(2) why the polarization vector is not a unit vector?

(3) I learn preliminarily in Physics Reference Manual that there are three different coordinate systems: World frame, Particle frame, Interaction frame. Are the momenta and polarization vector calculated in the same frame? which frame?

Thanks for your help.

zhangyf

Question J/Psi Decay  by Bryan Kerns <Bryan Kerns>,   Aug 27, 13:16
When I look over the geant4 code for J/Psi particles, it seems to be missing the decay information. I'm looking at G4JPsi.cc. Is this actually missing, or can it be found somewhere else?

Question Emission from isotropic point source that exits a rectangular window  by Ioannis Sechopoulos <Ioannis Sechopoulos>,   Aug 19, 16:07
Hello, I need to simulate photons that are emitted from an isotropic point source, but I only need to simulate the ones that are emitted in a direction so that they travel through a rectangular window. I know that GPS has an isotropic angular distribution and that you can limit the angles, but that would give me the equivalent of the exit window being a portion of a sphere centered on the source, not of a flat exit window. Also, I've seen the C++ version of having an isotropic source:

  G4double cosTheta = 2*G4UniformRand() - 1., phi = twopi*G4UniformRand();
  G4double sinTheta = std::sqrt(1. - cosTheta*cosTheta);
  G4double ux = sinTheta*std::cos(phi),
           uy = sinTheta*std::sin(phi),
           uz = cosTheta;
  particleGun->SetParticleMomentumDirection(G4ThreeVector(ux,uy,uz));

and I understand I could limit cosTheta and phi to a specific range of values, but again I would get whatever exits a portion of the sphere. Does anybody know how I can limit the isotropic source photons to those that cover a certain delta X and delta Y at a certain R distance from the source? I don't mind having to code it in the PrimaryGeneratorAction and not using GPS, I'm actually more used to the former.

Thanks!

1 Feedback: Re: Emission from isotropic point source that exits a rectangular window   (Gumplinger Peter - Aug 20, 16:15)
(_ Agree: Re: Emission from isotropic point source that exits a rectangular window   (Ioannis Sechopoulos - Aug 21, 06:59)
Question positronium tracking  by Tom Roberts <Tom Roberts>,   Jul 23, 17:43
I want to simulate the transport, stripping in matter, and decay in flight of positronium. I clearly need to implement physics processes for the last two; I'll model their creation externally, interfacing into GeneratePrimaries(). I'll also need to create ParticleDefinition-s for ortho- and para-positronium, and possibly metastable positronium -- what PDG encodings (IDs) should I use? In general, how are PDG encoding-s assigned for particles not already in the Geant4 source tree?

[I remark that the two-photon production related to para-positronium decay was just discussed in the electromagnetic processes forum, though it may be more appropriate to interface into G4Decay; advice on that is also welcome.]

Question finding secondary neutrons  by Kent Wong <Kent Wong>,   Jul 22, 07:56
Fermilab is planning on using a 400 MeV proton beam through a 42cm polystyrene block bringing the energy down to 250 MeV. I need to calculate the ratio of the proton fluence to neutron fluence at a planar target and the energy spectrum of the neutrons. I have all my .hh and .cc files required but I don't know the Geant4 Command that will allow me the extract the number of secondary neutrons, even if there are other secondary particles being produced in the polystyrene block.

Does anyone know the command ?

Thank you, Kent

1 Idea: Re: finding secondary neutrons   (Tom Roberts - Jul 22, 12:51)
None G4ChargedGeantino class not recognized??  by <jdswado@gatech.edu>,   Jun 11, 12:26
In my attempts to fix some problems with my application, I've created a somewhat worse one. When I try to "make" in Cygwin I get the following errors:

Compiling PhysicsList.cc ... PhysicsList.cc c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2236: unexpected 'class' 'G4ChargedGeantion'. Did you forget a ';'? c:/c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2143: syntax error: missing ';' before ':' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2059: syntax error : ':' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2059: syntax error : 'public' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(52) error C2143: syntax error : missing ';' before '{' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(52) erro C2447: '{' : missing function header (old-style formal list?) make: *** [c:/g4work/tmp/WIN32-VC/Application/PhysicsList.o] Error 2

Now, I'm quite certain I haven't touched the G4ChargedGeantino class definition file and ever double checked to make sure. I have however been trying to manipulate my physics list. Here is the current status of it:

------------------PhysicsList.hh----------------------------------

#ifndef PhysicsList_h
#define PhysicsList_h 1

#include "G4VUserPhysicsList.hh"
#include "globals.hh"
#include "G4TrackingManager.hh"
class G4Cerenkov; class G4Scintillation; class G4OpAbsorption; class G4OpRayleigh; class G4OpBoundaryProcess;

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

class PhysicsList: public G4VUserPhysicsList
{
  public:
    PhysicsList();
   ~PhysicsList();

  protected:
    // Construct particle and physics
    void ConstructParticle();
    void ConstructProcess();

    void SetCuts();

  protected:
    void ConstructBosons();
    void ConstructLeptons();

	void SetCutForGamma(G4double);
	void SetCutForOpticalPhoton(G4double);

  protected:
    void ConstructGeneral();
    void ConstructEM();
    void AddStepMax();
	void ConstructOp();
	void SetVerbose(G4int);
	void SetNbOfPhotonsCerenkov(G4int);

    private:
    G4Cerenkov*          theCerenkovProcess;
    G4Scintillation*     theScintillationProcess;
    G4OpAbsorption*      theAbsorptionProcess;
    G4OpRayleigh*        theRayleighScatteringProcess;
    G4OpBoundaryProcess* theBoundaryProcess;

	G4double cutForGamma;
	G4double cutForOpticalPhoton;
}
#endif

---------------------------PhysicsList.cc--------------------------------

#include "G4ios.hh"
#include <iomanip>
#include "globals.hh"
#include "PhysicsList.hh"

#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4VProcess.hh"
#include "G4VParticleChange.hh"

#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"

#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4LossTableManager.hh"
#include "G4EmSaturation.hh"

PhysicsList::PhysicsList():  G4VUserPhysicsList()
{
  theCerenkovProcess           = 0;
  theScintillationProcess      = 0;
  theAbsorptionProcess         = 0;
  theRayleighScatteringProcess = 0;
  theBoundaryProcess           = 0; 

  defaultCutValue = 1.0*cm;
   SetVerboseLevel(1);
}

PhysicsList::~PhysicsList() {}

void PhysicsList::ConstructParticle() {

  ConstructBosons();
  ConstructLeptons();
  //ConstructMesons();
  //ConstructBaryons();
}

void PhysicsList::ConstructBosons()
{
  // pseudo-particles
  //G4Geantino::GeantinoDefinition();
  //G4ChargedGeantino::ChargedGeantinoDefinition();

  // gamma
  G4Gamma::GammaDefinition();

  // optical photon
  G4OpticalPhoton::OpticalPhotonDefinition();
}

void PhysicsList::ConstructLeptons()
{
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();

  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
}

void PhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructGeneral();
  ConstructOp();
  AddStepMax();

}

#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4StepLimiter.hh"

#include "G4eMultipleScattering.hh" //#include "G4hMultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

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

    if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);

    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
      pmanager->AddProcess(new G4eIonisation,         -1, 2, 2);
      pmanager->AddProcess(new G4eBremsstrahlung,     -1, 3, 3);      

    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
      pmanager->AddProcess(new G4eIonisation,         -1, 2, 2);
      pmanager->AddProcess(new G4eBremsstrahlung,     -1, 3, 3);
      pmanager->AddProcess(new G4eplusAnnihilation,    0,-1, 4);

    }
  }
}

void PhysicsList::ConstructOp()
{
  theCerenkovProcess           = new G4Cerenkov("Cerenkov");
  theScintillationProcess = new G4Scintillation("Scintillation");
  theAbsorptionProcess     = new G4OpAbsorption();
  theRayleighScatteringProcess = new G4OpRayleigh();
  theBoundaryProcess  = new G4OpBoundaryProcess();

  theCerenkovProcess->SetMaxNumPhotonsPerStep(20);
  theCerenkovProcess->SetMaxBetaChangePerStep(10.0);
  theCerenkovProcess->SetTrackSecondariesFirst(true);

  theScintillationProcess->SetScintillationYieldFactor(1.);
  theScintillationProcess->SetTrackSecondariesFirst(true);

G4LossTableManager::Instance()->EmSaturation();
     G4OpticalSurfaceModel themodel = unified;
     theBoundaryProcess->SetModel(themodel);

     theParticleIterator->reset();
     while( (*theParticleIterator)() ){
     G4ParticleDefinition* particle = theParticleIterator->value();
     G4ProcessManager* pmanager = particle->GetProcessManager();
     G4String particleName = particle->GetParticleName();
     if (theCerenkovProcess->IsApplicable(*particle)) {
     pmanager->AddProcess(theCerenkovProcess);
     pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
    }
    if (theScintillationProcess->IsApplicable(*particle)) {
     pmanager->AddProcess(theScintillationProcess);
     pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
     pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
    }
    if (particleName == "opticalphoton") {
      G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
      pmanager->AddDiscreteProcess(theAbsorptionProcess);
      pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
      pmanager->AddDiscreteProcess(theBoundaryProcess);
    }
  }
}

void PhysicsList::SetVerbose(G4int verbose)
{
  theCerenkovProcess->SetVerboseLevel(verbose);
  theScintillationProcess->SetVerboseLevel(verbose);
  theAbsorptionProcess->SetVerboseLevel(verbose);
  theRayleighScatteringProcess->SetVerboseLevel(verbose);
  theBoundaryProcess->SetVerboseLevel(verbose);  
}
void PhysicsList::SetNbOfPhotonsCerenkov(G4int MaxNumber)
{  
  theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumber);
}

#include "G4Decay.hh" void PhysicsList::ConstructGeneral() {

  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

void PhysicsList::AddStepMax() {

  G4StepLimiter* stepLimiter = new G4StepLimiter();

  theParticleIterator->reset();
  while ((*theParticleIterator)()){
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();

      if (particle->GetPDGCharge() != 0.0)
        {
	  pmanager ->AddDiscreteProcess(stepLimiter);
        }
  }
}

void PhysicsList::SetCuts() {

	SetCutValue(0.1*cm, "gamma");
	SetCutValue(0.1*cm, "opticalphoton");
	return;
}

-----------------------------------------------------------------------

I realize that's a lot to sift through but if anything is obviously wrong please let me know!

Thanks!

1 Note: Note:   (jdswado@gatech.edu - Jun 12, 05:19)
Question Defining particles in a simulation using python  by Jorge Ferrera <Jorge Ferrera>,   May 28, 06:37
Hi guys,

I am converting my simulation from C++ to python and I stuck in a problem.

In this part:

G4Gamma::GammaDefinition();

what do I to convert it in python? I can´t use G4Gamma I think it isn´t exposed, but I need it to declare Gamma. I have tried:

G4Gamma.GammaDefinition() or G4Gamma().GammaDefinition()

but the system can´t find G4Gamma.

Until someone help me I am using a module :) and it works.

Someone knows what i should do?

Thanks in advanced.

Ferrera.

Question "particleType" not found?  by <lesward>,   24 May, 2009
When I'm running an underground physics program, an error is encounted, which reads as follows:

error "particleType" was not declared in this scope

Is there any h file I should include to declare "particleType"? Thanks a lot!

1 None: Re: "particleType" not found?   (Paul Nicholas Colin Gloster - May 28, 02:19)
Question Cascade gammas from excited 12C  by Kareem Kazkaz <Kareem Kazkaz>,   22 May, 2009
Hello everyone.

I am trying to create excited 12C nuclei as primary particles, so that I can get the subsequent cascade gammas. I am using GPS and the GRDM. Here are the commands I use:

		UI->ApplyCommand( "/gps/ion 6 12 0 4439" );
		UI->ApplyCommand( "/grdm/nucleusLimits 12 12 6 6" );

When I do this, I get the excited carbon nuclei, but no cascade gammas. In the SteppingAction, I print out the identity of the particles that are created, and then kill the track only if it's a beta or gamma. Here is the output:

	Created a 0-keV C12[4439.0]

If I set the energy state to 4440 keV, the 12C still does not relax to the ground state.

When I try to do the same with excited 137Ba, though (as though from the decay of 137Cs) using the commands

		UI->ApplyCommand( "/gps/ion 56 137 0 662" );
		UI->ApplyCommand( "/grdm/nucleusLimits 137 137 56 56" );

I get the output

	Created a 0-keV Ba137[662.0]
	Created a 661.998-keV gamma
	Created a 0-keV Ba137[0.0]

I get the 662 keV gammas out, and GEANT4 tracks the ground-state barium nucleus.

Does anybody have an idea of how to get the carbon nuclei to properly relax to the ground state?

Thanks for any and all help.

Question How to shoot gammarays/particles in a specified direction randomly?  by Pradip Datta <Pradip Datta>,   07 May, 2009
Hi All,

Can any body help to throw particles through a defined solid angle randomly using particle gun. More specifically I would like to shoot gamma rays within the solid angle sustained by the detector face at the source point. My Detector face is circular shape of radius 60.

Any suggestion is highly appreciated.

Pradip

1 Feedback: Re: How to shoot gammarays/particles in a specified direction randomly?   (Giovanni Santin - 07 May, 2009)
1 None: Re: How to shoot gammarays/particles in a specified direction randomly?   (Pradip Datta - 08 May, 2009)
(_ None: Re: How to shoot gammarays/particles in a specified direction randomly?   (Giovanni Santin - 08 May, 2009)
2 None: Re: How to shoot gammarays/particles in a specified direction randomly?   (michel maire - 07 May, 2009)
Question different electronic charge states  by Daniel Rodríguez <Daniel Rodríguez>,   23 Apr, 2009
Dear all,

I have a question regarding the electronic charge state of a particle. I would like to know whether particles with different charge states can be fired, i.e. He++, He+, C6+, C5+, C4+..

I also would like to know if the question above is afirmative, whether thre is some mechanism in GEANT4 describing stripping of ions.

Thankyou very much Daniel

1 Idea: Re: different electronic charge states   (Vladimir Ivanchenko - 21 May, 2009)
Question How to include angular correlation in Co-60  by Anil <Anil>,   15 Apr, 2009
Dear Geant4 users,

I am using Co-60 with General particle source. But the problem is, the 2 gammas i.e 1.17 and 1.33MeV gamma rays have an angular correlation. How can I model the angular correlation and in which part of toolkit it should be included?

I would be very grateful you for the help.

Thanking you in advance,

Anil

1 Feedback: Re: How to include angular correlation in Co-60   (Gumplinger Peter - 06 May, 2009)
1 Warning: Re: How to include angular correlation in Co-60   (Gumplinger Peter - 06 May, 2009)
2 Idea: Re: How to include angular correlation in Co-60   (Fan Lei - 12 May, 2009)
Question GeneralParticleSorce  by Suhaili Zakaria <Suhaili Zakaria>,   26 Mar, 2009
Hi

Can anyone tell me what's the difference between /gps/position/ and /gps/pos/centre?

Thanks.

Suhaili

None dEStep  by Caroline Guimaraes <Caroline Guimaraes>,   26 Mar, 2009
When I open the output file to look at the gamma particles of interest, it only shows me dEStep for the low energy Compton scattering (LowEnCompton) and not for Compton Scattering (compt).

For example,

KineE dEStep Process 358.199 keV 0 eV compt 248.707 keV 109.492 keV LowEnCompton 146.536 keV 102.17 keV LowEnCompton 98.0533 keV 0 eV compt

Does anyone have any ideas why this is the case and how to fix it? Thank you in advance,

Caroline G

1 Feedback: Re: dEStep   (Gumplinger Peter - 26 Mar, 2009)
Question How to use /gps/hist/  by Suhaili Zakaria <Suhaili Zakaria>,   23 Mar, 2009
Hello

I have some questions regarding gps

1. I want to use GPS to generate energy histogram. The problem is that I'm quite confused with the command "/gps/hist/point". I now that the first parameter is the energy (in MeV) and the second is the weight but I don't know how to use this parameter.

I have refer to http://reat.space.qinetiq.com/gps/ and its examples, but still could not figure it out.

2.I also want to have volume sphere source with x, y, and z biasing. I believe I shoud use /gps/hist/type biasx, /gps/hist/type biasy and /gps/hist/type biasz, and again I dont know how to define this.

Help is highly appreciated. Thanks a lot, Suhaili

1 None: Re: How to use /gps/hist/   (Suhaili Zakaria - 24 Mar, 2009)
Question Too many particles causing Segmentation Error  by Daniel O'Brien <Daniel O'Brien>,   18 Mar, 2009
Hi, I new here so I may as well introduce myself first. I'm Daniel O'Brien and I'm a Medical Physics PhD student with UCD and St Luke's Hospital in Dublin, Ireland working on small field dosimetry. I'm using Geant4 to investigate the dosimetry of the fields coming from a LINAC at fields sizes which are too small to measure reliably.

This involves modeling a LINAC which I am presently attempting to do but I ran into a problem when I increased the number of electrons I started off with. When I ran the model with 200000 electrons initially the program runs fine, but If I increase it to 300000 a segmentation fault occurs. When running the model properly I intend to use much more than 300000 electrons.

In order to determine what was causing it, I removed all but the bare essentials from the program, leaving only a Tungsten target surrounded by air and a single point source of mono-energetic electrons pointed towards the target, with no visualisation or tracking elements what-so-ever. The problem still occurs!

I've put the code online for you to easily check out at the following address:

http://www.efmods.com/geant4/models/LINACModel/

As you can see the code is very very basic now that I've removed all of the complexities. I've only been using Geant4 for a couple of months so hopefully people with greater experience can see the problem.

Perhaps it is a hardware issue?

My system is Ubuntu Linux, Linux-g++ compiler, 1 GB of RAM and 2 x 2.0 GHz processor (however the program does not use multi-threading so only one processor is being utilised). Using the Gnome system monitor I checked to see if the RAM was an issue but the RAM usage reached about 70% and never increased beyond that during the course of the program.

I have intended to run the program on a computer with higher specs but I haven't had the opportunity so far.

I would really appreciate any help anybody can offer. Thank you taking the time to read this.

Daniel

1 Note: Re: Too many particles causing Segmentation Error   (Juan - 19 Mar, 2009)
(_ None: Re: Too many particles causing Segmentation Error   (Paul Nicholas Colin Gloster - 19 Mar, 2009)
(_ None: Re: Too many particles causing Segmentation Error   (Daniel O'Brien - 19 Mar, 2009)
(_ Feedback: Re: Too many particles causing Segmentation Error   (Gumplinger Peter - 19 Mar, 2009)
(_ Agree: Re: Too many particles causing Segmentation Error   (Daniel O'Brien - 20 Mar, 2009)
Question Temporal Distributions GPS  by Michael <Michael>,   07 Mar, 2009
I found a previously unanswered post regarding this. Is there an elegant way to produce a time varying particle source? I've spotted the /gps/time command which allows me to do this manually but would prefer not to have to add 1024 individual sources with varying time and intensity!

Any help would be greatly appreciated!

1 Feedback: Re: Temporal Distributions GPS   (Kevin Lynch - 10 Mar, 2009)
(_ None: Re: Temporal Distributions GPS   (Michael - 12 Mar, 2009)
(_ None: Re: Temporal Distributions GPS   (Kevin Lynch - 16 Mar, 2009)
Question New User: Low Energy Deuteron Fusion?  by Robert <Robert>,   06 Feb, 2009
I am brand new to Geant4!

I would like to know if it is possible to transport deuterons below 300keV while still being able to track DD fusion reactions? (Other transport codes cannot track reactions below 2MeV for deuterons, they only use a continual slowing down model)

Not looking for a step-by-step how to, just wondering if this is possible with any libraries. I've searched the forums and have not come across any limitations that would prevent this so far... Thanks!!

None No gammas produced by Bremsstrahlung of electrons?  by Krisztian Balla <Krisztian Balla>,   24 Jan, 2009
Dear forum members,

I'm trying to simulate an x-ray tube using Geant4. Unfortunately there are no gammas produced (or they are not visualised). Please see the attached image.

1.) Building the geometry is done like this:

/** This method constructs the X-Ray Tube. This covers the following parts:
    - the anode (Wolfram)
    - the filter (Aluminium)
    - the sensitive read-out region (Water :-)
    - the tube itself (filled with nothing -> vacuum)
    See the simulation model for the detailed placement and orientation of these parts.
    @returns   A pointer to the physical volume of the world (tube).
*/
G4VPhysicalVolume* XRayTubeConstruction::Construct()
{
  // === define the needed materials ===
  G4NistManager* man = G4NistManager::Instance();
  // 1.) Vacuum (absolute vacuum is not possible in Geant4, because the density would be 0; see Example 4.10 of G4BookForAppliDev.pdf)
  G4Material* vacuum = new G4Material("vacuum_pseudo", 1, 1.01*g/mole, universe_mean_density, kStateGas, 0.1*kelvin, 1.e-19*pascal);
  // 2.) Wolfram (= Tungsten)
  G4Material* W = new G4Material("Wolfram", 74, 179.95*g/mole, 18.4*g/cm3);
  // 3. Aluminium
  G4Material* Al = new G4Material("Aluminum", 13, 26.98*g/mole, 2.7*g/cm3);
  // 4. Water
  G4Material* H2O = man->FindOrBuildMaterial("G4_WATER");

  // === define the parts of the X-Ray Tube ===
  // 1.) tube = world volume (size.x=440mm, size.y=1080mm, size.z=440mm)
  G4Box* xr_tube_shape = new G4Box("xr_tube_box", 220.0*mm, 540.0*mm, 220.0*mm);
  G4LogicalVolume* xr_tube_log = new G4LogicalVolume(xr_tube_shape, vacuum, "xr_tube_log", 0, 0, 0);
  xr_tube = new G4PVPlacement(0, G4ThreeVector(), xr_tube_log, "xr_tube", 0, false, 0);
  // 2.) anode (size.x=10mm, size.y=30mm, size.z=30mm, alpha=-45°, theta=0°, phi=270°)
  G4Para* xr_anode_shape = new G4Para("xr_anode_parallelepiped", 5.0*mm, 15.0*mm, 15.0*mm, -0.7854, 0.0, 4.7124);
  G4LogicalVolume* xr_anode_log = new G4LogicalVolume(xr_anode_shape, W, "xr_anode_log", 0, 0, 0);
  xr_anode = new G4PVPlacement(0, G4ThreeVector(5.0, 500.0, 0.0), xr_anode_log, "xr_anode", xr_tube_log, false, 0);
  // 3.) filter (size.x=50mm, size.y=2mm, size.z=50mm)
  G4Box* xr_filter_shape = new G4Box("xr_filter_box", 25.0*mm, 1.0*mm, 25.0*mm);
  G4LogicalVolume* xr_filter_log = new G4LogicalVolume(xr_filter_shape, Al, "xr_filter_log", 0, 0, 0);
  xr_filter = new G4PVPlacement(0, G4ThreeVector(0.0, 449.0, 0.0), xr_filter_log, "xr_filter", xr_tube_log, false, 0);
  // 4.) sensitive region (size.x=400mm, size.y=2mm, size.z=400mm) having 40 stripes each (size.x=10mm, size.y=2mm, size.z=400mm)
  G4Box* xr_sensitive_shape = new G4Box("xr_sensitive_box", 200.0*mm, 1.0*mm, 200.0*mm);
  G4LogicalVolume* xr_sensitive_log = new G4LogicalVolume(xr_sensitive_shape, H2O, "xr_sensitive_log", 0, 0, 0);
  xr_sensitive = new G4PVPlacement(0, G4ThreeVector(0.0, -501.0, 0.0), xr_sensitive_log, "xr_sensitive", xr_tube_log, false, 0);
  G4Box* xr_sensitive_stripe = new G4Box("xr_sensitive_stripe_box", 5.0*mm, 1.0*mm, 200.0*mm);
  G4LogicalVolume* xr_sensitive_stripe_log = new G4LogicalVolume(xr_sensitive_stripe, H2O, "xr_sensitive_stripe_log", 0, 0, 0);
  xr_sensitive_stripes = new G4PVReplica("xr_sensitive", xr_sensitive_stripe_log, xr_sensitive, kXAxis, 40, 10.0, 0.0);

// TODO: assign a G4SensitiveDetector to the sensitive_stripes

  return xr_tube;
}

2.) I registered the processes of interest:

/** Register the needed low energy (electromagnetic) processes with Geant4.
*/
void XRayTubePhysicsList::ConstructEMProcess()
{
  theParticleIterator->reset();
  while((*theParticleIterator)())
  {
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();
    // assign processes to the process manager of the particles
    if(particleName == "gamma")
    {
      // gamma     
      pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);         // Rayleigh-Scattering
      pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);    // Photo-Electric effects
      pmanager->AddDiscreteProcess(new G4LowEnergyCompton);          // Compton-Scattering
    }
    else if(particleName == "e-")
    {
      // electron
      pmanager->AddProcess(new G4MultipleScattering,      -1, 1, 1);  // Coulomb-Scattering
      pmanager->AddProcess(new G4LowEnergyBremsstrahlung, -1,-1, 2);  // Bremsstrahlung by electrons
      pmanager->AddProcess(new G4LowEnergyIonisation,     -1, 2, 3);  // Ionisation and energy loss by electrons
    }
}

3.) I use a GarticleGun to shoot electrons:

/** Construct a particle gun and make it shoot electrons of 100 keV.
*/
XRayTubePrimaryAction::XRayTubePrimaryAction()
{
  particleGun = new G4ParticleGun(1);
  particleGun->SetParticleDefinition(G4Electron::ElectronDefinition());
  particleGun->SetParticleEnergy(100*keV);
  particleGun->SetParticlePosition(G4ThreeVector(-100.0, 500.0, 0.0));
}

If I'm not mistaken, gammas should show up in the visulation as green tracks. Unfortunately I only see red (electron-) tracks.

Could somebody please help me?

Thanks in advance,

Krisztián

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2009/01/24/03.11-11010-xray-tube01.png
1 Question: Re: No gammas produced by Bremsstrahlung of electrons?   (Krisztian Balla - 24 Jan, 2009)
1 Sad: Re: No gammas produced by Bremsstrahlung of electrons?   (Krisztian Balla - 28 Jan, 2009)
(_ Idea: Re: No gammas produced by Bremsstrahlung of electrons?   (Krisztian Balla - 29 Jan, 2009)
2 Idea: Re: No gammas produced by Bremsstrahlung of electrons?   (Vladimir Ivanchenko - 02 Feb, 2009)
Question Problem in Ion definition  by Adrien MATTA <Adrien MATTA>,   20 Jan, 2009
Hello Everyone,

I'm facing new problem since I use my code on the new Geant4 release (and a different computer). When I'm calling the GetIon(Z,A,E) method a segmentation violation occured. The debugging message let think the problem occured when the above method called the G4LossTableBuilder::BuildDEDXTable NB:The GetIon method is called after Initialisation of G4 kernel. I don't have the warning message about creating Ion in preInit state.

Here part of my code: (physics list)

NB: the first 'TEST' print occured, then I have my segmentation violation

///////////// Construction of unstable Nuclei and Decay Channel ////////////////////

	G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
	G4ParticleDefinition* particle;
	G4VDecayChannel* channel;
  	G4double flat[1];flat[0]=1;
CLHEP::RandGeneral* randflat = new CLHEP::RandGeneral(flat,1);

//10He
 G4DecayTable* table10He  = new G4DecayTable();
 G4cout << " TEST " << G4endl;
 particle = particleTable->GetIon(2,10,1.);
 G4cout << " TEST " << G4endl;
particle->SetPDGStable(false);
particle->SetPDGLifeTime(22.e-22*s);	
//Setting a 2 neutron Decay channel using the 3 product decay
channel = new  G4NuclearDecayChannel (	
IT, 			// mode
0,			// verbose
particle,		// parent nucleus
1.,			// BR 
0.,			// FFN 
false,randflat,	        // betaSimple,randBeta
-2.068*MeV,		// Q
8, 			// A
2,			// Z
0.,			// Daughter Excitation
"neutron",		// Daughter2
"neutron");		// Daughter3

table10He->Insert(channel); particle->SetDecayTable(table10He);

/////////////////////////////////////////////////////////////////////////////////////

And here part of the error message:

#10 0x086698e3 in G4LossTableBuilder::BuildDEDXTable ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4emutils.so
#11 0x0866e478 in G4LossTableManager::BuildTables ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4emutils.so
#12 0x0866f23a in G4LossTableManager::BuildPhysicsTable ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4emutils.so
#13 0x08680a12 in G4VEnergyLossProcess::BuildPhysicsTable ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4emutils.so
#14 0x016f9245 in G4VUserPhysicsList::BuildPhysicsTable ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4run.so
#15 0x016f9fef in G4VUserPhysicsList::AddProcessManager ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4run.so
#16 0x016f08d9 in G4UserPhysicsListMessenger::SetNewValue ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4run.so
#17 0x05dc28cb in G4UIcommand::DoIt ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4intercoms.so
#18 0x05dce828 in G4UImanager::ApplyCommand ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4intercoms.so
#19 0x02133541 in G4IonTable::AddProcessManager ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4partman.so
#20 0x02133ed5 in G4IonTable::CreateIon ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4partman.so
#21 0x0214c07d in G4ParticleTable::GetIon ()
   from /usr/local/geant4.9.2/lib/Linux-g++/libG4partman.so
#22 0x08062b81 in PhysicsList::ConstructDecay ()
#23 0x080515f3 in main ()
The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /proc/4975/exe, process 4975

////////////////////////////////////////////////////////////////////////////////////

I tried using static library only, and it did the same. I also search the forum for answer but didn't manage to find something...

Did I miss something? Thanks in advance.

1 Idea: Re: Problem in Ion definition   (Vladimir Ivanchenko - 20 Jan, 2009)
(_ More: Re: Problem in Ion definition   (Adrien MATTA - 21 Jan, 2009)
Question Problem in defining source using gps  by Anil <Anil>,   10 Dec, 2008
Using thread#91, I have included Radioactive decay in PhysicsList. Iam using following gps commands to simulate radioactive decay of Cs-137. The energy deposited by each gamma ray in NaI crystal is stored in an output ASCII file. But the energy deposited is zero for all particles. Where is the mistake?

/gps/particle ion

/gps/ion 55 137 0 0

/gps/energy 0. keV

/gps/pos/type Point

/gps/pos/centre 0. 0. 0. mm

/gps/ang/type iso

/gps/number 1

/control/verbose 2

/run/verbose 2

/run/beamOn 1000

Also, for following gps commands, the trajectories are not appearing in HepRepFile. Where is the mistake?

/gps/particle ion

/gps/ion 55 137 0 0

/gps/energy 0. keV

/gps/pos/type Point

/gps/pos/centre 0. 0. 0. mm

/gps/ang/type iso

/gps/number 100

/vis/open HepRepFile

/vis/drawVolume

/vis/scene/add/trajectories

/vis/scene/add/hits

/run/beamOn 1

Please help me. I am confused.

Thanks in advance!

Question Problem when running exgps example  by Arnaud Claret <Arnaud Claret>,   26 Nov, 2008
Hello,

I tried to run the example of GPS provided in: examples/extended/eventgenerator/exgps

I follow the insructions given in the readme file and I get some error messages, see below:
Idle> control/execute macros/display.mac
Got standard cmap
Window name: viewer-0 (OpenGLImmediateX)
G4Scene::AddWorldIfEmpty: The scene was empty of run-duration models.
  "world" has been added.
***** COMMAND NOT FOUND </vis/viewer/viewpointThetaPhi 30 30> *****

***** Batch is interupted!! *****
Idle> /vis/viewer/set/viewpointThetaPhi 30 30
Idle> /vis/scene/endOfEventAction accumulate
WARNING: The vis manager will keep up to 100 events.
  This may use a lot of memory.
Idle> /tracking/storeTrajectory 1
Idle> run/beamOn 10
### Run 0 start.
Columns : syntax error
BatchLab::BaseTuple::booking : Bad syntax in "std::string Pname, std::double Energy, X, Y, Z, Theta, Phi, Weight".

---> Begin of event: 0

BatchLab::MemoryTuple::fill(string) : column 0 not found.
BatchLab::MemoryTuple::fill(double) : column 1 not found.
BatchLab::MemoryTuple::fill(double) : column 2 not found.
BatchLab::MemoryTuple::fill(double) : column 3 not found.
BatchLab::MemoryTuple::fill(double) : column 4 not found.
BatchLab::MemoryTuple::fill(double) : column 5 not found.
BatchLab::MemoryTuple::fill(double) : column 6 not found.
BatchLab::MemoryTuple::fill(double) : column 7 not found.
G4VisManager: Using G4TrajectoryDrawByCharge as default trajectory model. See commands in /vis/modeling/trajectories/ for other options.
BatchLab::MemoryTuple::fill(string) : column 0 not found.
BatchLab::MemoryTuple::fill(double) : column 1 not found.
BatchLab::MemoryTuple::fill(double) : column 2 not found.

Some outfiles are nevertheless generated. When I try to read them, I also get some error messages, see below:
>jas3 exgps.aida
java.io.IOException: Error reading /home/local1/geant4/work/exgps/exgps.aida
    at hep.aida.ref.xml.AidaXMLStore.read(AidaXMLStore.java:148)
    at hep.aida.ref.tree.Tree.init(Tree.java:1035)
    at hep.aida.ref.tree.TreeFactory.createTree(TreeFactory.java:183)
    at org.freehep.jas.extension.aida.AIDAPlugin$JAS3TreeFactory.createTree(AIDAPlugin.java:284)
    at hep.aida.ref.tree.TreeFactory.create(TreeFactory.java:115)
    at org.freehep.jas.extension.aida.AIDAPlugin.openFile(AIDAPlugin.java:113)
    at org.freehep.jas.extension.aida.AIDAPlugin.openFile(AIDAPlugin.java:108)
    at org.freehep.jas.plugin.basic.FileOpener.openFile(FileOpener.java:124)
    at org.freehep.jas.plugin.basic.FileOpener.handleEvent(FileOpener.java:89)
    at org.freehep.application.studio.EventSender.broadcast(EventSender.java:30)
    at org.freehep.application.studio.Studio.fireInitializationComplete(Studio.java:347)
    at org.freehep.application.Application.createFrame(Application.java:708)
    at org.freehep.jas.JAS3.main(JAS3.java:209)

With onxlab, I manage to see histograms with the expected titles, but they seem empty.

Thanks a lot for any suggestion and help.

Best regards.

1 None: Re: Problem when running exgps example   (Guy Barrand - 10 Dec, 2008)
Question Lithium ion definiton in particlegun ?  by cihangir celik <cihangir celik>,   13 Nov, 2008
Geant4 version Name: geant4-09-02-beta-01

I am trying to shoot Lithium ion in the particlegun, but I can not find Li in G4ParticleTable.On the other hand, even if I see the Li ion in G4IonTable by GetIonName(Z,A,E), I can not use it in the particlegun. Am I missing something? Can anybody help me ?

#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4ParticleDefinition.hh"
#include "globals.hh"

void ExN01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
// There is no Li in G4ParticleTable
  particleGun = new G4ParticleGun(n_particle);
  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
  particleGun->SetParticleDefinition(particleTable->FindIon(3,7,0));

// Neither I can use the Li in G4IonTable
  G4IonTable* ionTable ;
  G4cout<<ionTable->GetIonName(3, 7, 0.84*MeV)<<G4endl;; // Seems to work
  G4cout<<ionTable->GetNucleusEncoding(3, 7, 0.84*MeV)<<G4endl; // Seems to work
  G4ParticleDefinition* ion = ionTable->GetIon(3,7,0.84*MeV); 
  particleGun->SetParticleDefinition(ion);

  particleGun->SetParticleEnergy(0.84*MeV);    
  particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, 0.0));    
  G4ThreeVector v(1.0,0.0,0.0);
  particleGun->SetParticleMomentumDirection(v);
  particleGun->GeneratePrimaryVertex(anEvent);
}

1 Feedback: Re: Lithium ion definiton in particlegun ?   (Gumplinger Peter - 13 Nov, 2008)
(_ Ok: Re: Lithium ion definiton in particlegun ?   (cihangir celik - 14 Nov, 2008)
Question proton energy loss in medium  by AdamKl <AdamKl>,   13 Nov, 2008
dear Geant4 users

I have a question related to the proton interactions in a medium, like plastic scintillator. In my simulation I consider protons with kinetic energies above 10 MeV and I am interested in the amount of energy they deposit in the material. I am also interested in processes that lead to energy loss, for instance if it was ionization or scattering on a nucleus. I want to know also amount of energy deposited by the electrons ionized by incident proton. however when I check information stored in a G4Track object or G4VHit object I see only that the proton has interacted and deposited some energy in medium but I do not know how it happened...So here comes my questions: is it possible to extract information what kind of process is responsible for the proton energy loss? to me it looks like Geant4 somehow hides information about secondary particles induced by protons and delivers only "integrated" information about the proton energy loss including energy loss of all secondaries that proton has produced. Am I right?

best regards Adam

1 Feedback: Re: proton energy loss in medium   (Gumplinger Peter - 13 Nov, 2008)
(_ None: Re: proton energy loss in medium   (AdamKl - 14 Nov, 2008)
Question Thermal neutron code- gives segmenttaion fault  by M. Jamil <M. Jamil>,   04 Nov, 2008
Dear All GEANT4 Users !

I have problem with the my geant4 code. Actually I want to detect thermal neutrons using geant4 code, I am using QGSP model as my physics List.

The strange thing about the code is, it gives some values for trigger 10 particles only, 100 particles only, but when I increase the neutron particle trigger it shows segmentation fault.

I think the detection efficiency I am having from it is quite low.

These are the messages, which I get when running 10, 100 and 1000 trigger(neutron particles);

================================================ For 10 particles ===========================

NULL returned from G4StackManager.
Terminate current event processing.
 NumberOfParticlesToBeGenerated: 1
Shape not one of the plane types
Raw position 0,0,0
Rotated Position (0,0,0)
Rotated and Translated position (0,0,0)
Reference vectors for cosine-law (1,0,0) (0,1,0) (0,0,1)
Resultant Planar wave  momentum vector (0,0,1)
Creating primaries and assigning to vertex
Particle name: neutron
       Energy: 2.6e-09
     Position: (0,0,0)
    Direction: (0,0,1)
 Primary Vetex generated !
=====================================
  G4EventManager::ProcessOneEvent()
=====================================
1 vertices passed from G4Event.
G4PrimaryTransformer::PrimaryVertex (0(mm),0(mm),0(mm),0(nsec))
Primary particle (neutron) --- Transfered with momentum (0,0,0.0022103713)
A new track 0xa154948 (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 : 0xa154d40 with G4Track 0xa154948 (trackID 1, parentID 0)
Track 0xa154948 (trackID 1, parentID 0) is passed to G4TrackingManager.
Track (trackID 1, parentID 0) is processed with stopping code 2
### pop requested out of 0 stacked tracks.
### 0 waiting tracks are re-classified to
     0 urgent tracks and 0 waiting tracks.
NULL returned from G4StackManager.
Terminate current event processing.
Run terminated.
Run Summary
  Number of events processed : 10
  User=0.01s Real=0.38s Sys=0s
number of generated events: 10
number of detected events: 0
efficiency: 0%
=====================================
For 100 neutron particles:
===================================
Particle name: neutron
       Energy: 2.6e-09
     Position: (0,0,0)
    Direction: (0,0,1)
 Primary Vetex generated !
=====================================
  G4EventManager::ProcessOneEvent()
=====================================
1 vertices passed from G4Event.
G4PrimaryTransformer::PrimaryVertex (0(mm),0(mm),0(mm),0(nsec))
Primary particle (neutron) --- Transfered with momentum (0,0,0.0022103713)
A new track 0xae38948 (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 : 0xae38d40 with G4Track 0xae38948 (trackID 1, parentID 0)
Track 0xae38948 (trackID 1, parentID 0) is passed to G4TrackingManager.
Track (trackID 1, parentID 0) is processed with stopping code 2
### pop requested out of 0 stacked tracks.
### 0 waiting tracks are re-classified to
     0 urgent tracks and 0 waiting tracks.
NULL returned from G4StackManager.
Terminate current event processing.
Run terminated.
Run Summary
  Number of events processed : 100
  User=0.06s Real=3.05s Sys=0.02s
number of generated events: 100
number of detected events: 2
efficiency: 0.02%

================================== For neutron using beamOn 1000- Segmenttaion fault???? =================

Raw position 0,0,0
Rotated Position (0,0,0)
Rotated and Translated position (0,0,0)
Reference vectors for cosine-law (1,0,0) (0,1,0) (0,0,1)
Resultant Planar wave  momentum vector (0,0,1)
Creating primaries and assigning to vertex
Particle name: neutron
       Energy: 2.6e-09
     Position: (0,0,0)
    Direction: (0,0,1)
 Primary Vetex generated !
=====================================
  G4EventManager::ProcessOneEvent()
=====================================
1 vertices passed from G4Event.
G4PrimaryTransformer::PrimaryVertex (0(mm),0(mm),0(mm),0(nsec))
Primary particle (neutron) --- Transfered with momentum (0,0,0.0022103713)
A new track 0xab5ea80 (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 : 0xab5edd0 with G4Track 0xab5ea80 (trackID 1, parentID 0)
Track 0xab5ea80 (trackID 1, parentID 0) is passed to G4TrackingManager.
Track (trackID 1, parentID 0) is processed with stopping code 2
### pop requested out of 0 stacked tracks.
### 0 waiting tracks are re-classified to
     0 urgent tracks and 0 waiting tracks.
NULL returned from G4StackManager.
Terminate current event processing.
Segmentation fault
[test@cmssw1 Thermal_Neutron]$
====

Waiting for your reply,

Jamil

Question Problem with define source Na22 or other  by Paul <Paul>,   27 Oct, 2008
Hi G4 Users, Unfortunately, I have a problem with define positron source. I read Your advices about this topic and I did this changes in my codes #include "PrimaryGeneratorAction.hh"

#include "PrimaryGeneratorMessenger.hh"
#include "DetectorConstruction.hh"
#include "HistoManager.hh"

#include "G4Event.hh"
#include "G4GeneralParticleSource.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "Randomize.hh"
 #include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det,
                               HistoManager* hist)
:Detector(det),histoManager(hist) 
{
  G4int n_particle = 1;
  particleGun  = new G4GeneralParticleSource();
  SetDefaultKinematic();
  rndmBeam = 0.;

  //create a messenger for this class
  gunMessenger = new PrimaryGeneratorMessenger(this);
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
  delete particleGun;
  delete gunMessenger;
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PrimaryGeneratorAction::SetDefaultKinematic()
{
  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
  G4String particleName;
  G4ParticleDefinition* particle
                    = particleTable->FindParticle(particleName="e+");
  particleGun->SetParticleDefinition(particle);
  particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
  particleGun->SetParticleEnergy(545.*keV);
  G4double position = -0.5*(Detector->GetWorldSizeX());
  particleGun->SetParticlePosition(G4ThreeVector(position,0.*cm,0.*cm));
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
  //this function is called at the begining of event
  //
  //randomize the beam, if requested.
  if (rndmBeam > 0.) 
    {
      G4ThreeVector oldPosition = particleGun->GetParticlePosition();    
      G4double rbeam = 0.5*(Detector->GetCalorSizeYZ())*rndmBeam;
      G4double x0 = oldPosition.x();
      G4double y0 = oldPosition.y() + (2*G4UniformRand()-1.)*rbeam;
      G4double z0 = oldPosition.z() + (2*G4UniformRand()-1.)*rbeam;
      particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
      particleGun->GeneratePrimaryVertex(anEvent);
      particleGun->SetParticlePosition(oldPosition);      
    }
  else  particleGun->GeneratePrimaryVertex(anEvent);
I use example TestEm3 and I need positrons from Na22 other source. This code have errors during the compilation. Help me please.
Best Regards
Pawel

Question how tp define a Na22 positron source  by Or Chen <Or Chen>,   18 Oct, 2008
Hey,

I'm working on a positron annihilation spectroscopy simulation. I want to use Na22 as my positron source.

For now I'm using a particle gun that shoots positrons with a Gaussian energy distribution and obviously it is'n accurate enough which leads to my question, Is there a built in Na22 positron source that I can use instead of my particle gun?

Thanks' Or Chen.

Question Print number of Protons  by Oscar Larsson <Oscar Larsson>,   08 Oct, 2008
Hi

I'm fairly new to Geant4 but I've manage to construct a simulation model of a particle detector, and all the deposited energies are printed to an output data file. This is done in "void EventAction::EndOfEvent.."

When I run a simulation I constantly change the incident particle when runing the program (different types of ions) i.e. /gun/particle ion /gun/ion 6 12 6 for instance. Now I would like the the output data file to contain the integer value of the ion used in the simulation.

What function do I call to get this value and how do I call that function?

Cheers!

Question How to get information of the Primary which produces a Secondary?   by Cristina Consolandi <Cristina Consolandi>,   25 Sep, 2008
Hello, I need some help. I have to get the kinetic energy of the primary particle when it has produced a secondary.

I'm trying to do it with stepping action but I can not get it.
Can you give me an example which can help me?
thank you wery much.
Cri
1 None: Re: How to get information of the Primary which produces a Secondary?   (michel maire - 25 Sep, 2008)
1 Ok: Re: How to get information of the Primary which produces a Secondary?   (Cristina Consolandi - 26 Sep, 2008)
2 Feedback: Re: How to get information of the Primary which produces a Secondary?   (Gumplinger Peter - 25 Sep, 2008)
1 None: Re: How to get information of the Primary which produces a Secondary?   (Cristina Consolandi - 26 Sep, 2008)
Question propagation of optical photon  by Florian ITARD <Florian ITARD>,   13 Aug, 2008
Dear all,

I need your help. I tried to generate some cherenkov photon in PbF2 blocks. Inspiring myself by the example 6 from novice example, I succeeded to generate them.

But, now, I tried to record them in a photo-multiplier which take place at the end of each block, but this doesn't work. Any photon pass through it. Though, my code seems correct, I have defined the material and all the surface as in the example.

Could you help me to find what is wrong in my code or help me to solve the issue?

Thank you for your consideration.

Florian

ps: I let my "DetectorConstuction.cc" in attach files. The cherenkov part of the code are include in the lines 216 to 370 for the materials and lines 1386 to 1454 for the geometry of the PM and Pbf2 block, and their surface border.

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2008/08/13/06.31-7248-eeDetectorConstruction.cc

1 Feedback: Re: propagation of optical photon   (Gumplinger Peter - 14 Aug, 2008)
Question Weight of G4PrimaryVertex and G4PrimaryParticle  by Niklas <Niklas>,   04 Aug, 2008
Dear all,

I am working on incorporating variance reduction into a Geant4 program. More specifically, I would like to assign a weight to a particle at the very beginning (and adjusting the weight depending on the initial direction).

What is the difference between

G4PrimaryVertex* vert; vert->SetWeight(w1);

and

G4PrimaryParticle* part; part->SetWeight(w2);

?

And more specifically:

- Are both weights independent? Or does this result in a weight of w=w1*w2?

- Is the weight "transported", i.e. is it being accounted for during calculation of deposited energy?

Thank you!

Niklas

BTW: A very similar question was already asked http://hypernews.slac.stanford.edu:5090/HyperNews/geant4/get/particles/93.html in 2004 but nobody replied.

1 Question: Re: Weight of G4PrimaryVertex and G4PrimaryParticle   (Niklas - 04 Aug, 2008)
None Problem with radioactive decay  by Bari Osmanov <Bari Osmanov>,   31 Jul, 2008
 My greetings to everyone,
I am trying to simulate the beta-decay of 12N. I have constructed the generic ion and the corresponding Radioactive Decay process in my physics list. It compiles without a problem. However, when I start generating events as:

/gun/particle ion

/gun/ion 7 12 0 0

/run/beamOn 1

Here is the output:

=====================================
  G4EventManager::ProcessOneEvent()
=====================================
1 primaries are passed from G4EventTransformer.
!!!!!!! Now start processing an event !!!!!!!
### pop requested out of 1 stacked tracks.

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

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     -432     -788 -3.7e+03     1e-06        0        0         0 scint_oil_tank_PV initStep
    1     -432     -788 -3.7e+03         0    1e-06 3.52e-06  3.52e-06 scint_oil_tank_PV hIoni
G4RadoactiveDecay::LoadDecayTable() : cannot find ion radioactive decay file
    2     -432     -788 -3.7e+03         0        0        0  3.52e-06 scint_oil_tank_PV Scintillation
Track (trackID 1, parentID 0) is processed with stopping code 2
### pop requested out of 0 stacked tracks.
### 0 waiting tracks are re-classified to
     0 urgent tracks and 0 waiting tracks.
NULL returned from G4StackManager.
Terminate current event processing.
Run terminated.
Run Summary
  Number of events processed : 1
  User=0s Real=0s Sys=0s
-------------------------------------------------------------------------

So the problem is in

G4RadoactiveDecay::LoadDecayTable() : cannot find ion radioactive decay file

 I will appreciate if someone helps me out. Here is my physics list part:

 void PhysicsList::ConstructGeneral()
{
  // Add Decay Process

  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }

  // Declare radioactive decay to the GenericIon in the IonTable

     const G4IonTable     *theIonTable =  G4ParticleTable::GetParticleTable()->GetIonTable();
     G4RadioactiveDecay   *theRadioactiveDecay  = new G4RadioactiveDecay();

    for (G4int i=0; i<theIonTable->Entries(); i++) 
    {
      G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
      if (particleName == "GenericIon") 
      {
         G4ProcessManager* pmanager = 
	 theIonTable->GetParticle(i)->GetProcessManager();
	 pmanager ->SetVerboseLevel(verboseLevel);
	 pmanager ->AddProcess(theRadioactiveDecay);
	 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep,1);
	 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest,1);
      } 
    }
  }

 Thank you in advance,

 Sincerely,

 Bari.   

Question Cosmic rays simulation through my detector  by M. Jamil <M. Jamil>,   19 Jun, 2008
Dear GEANT4 Users,

Hi!

Can some body help me and tell me that how can I insert cosmic rays and simulate through my detector?

Is there any special code or Physics list for it.

Or I have to generate the cosmic rays in your primary generator action.

As the definition of Cosmic rays says, that : Almost 90% of all the incoming cosmic ray particles are protons, about 9% are helium nuclei (alpha particles) and about 1% are electrons (beta minus particles).

Also you told me to find the simulation results for single particles separately,

 /gps/particle e-    ( For Electrons)
 /gps/particle p     ( for Protons)
 /gps/particle alpha  ( For Alpha particle or Helium nuclei)

Hence how can I combine these three particles to get combined result to generate cosmic rays into my detector.

with best wishes,

Jamil

None Angular distribution of neutrinos from pions that decay in flight  by Bari Osmanov <Bari Osmanov>,   21 May, 2008

Hello, everyone. I am simulating the interaction of 1 GeV proton beam with mercury target and have come to an unexpected result. When protons interact with mercury, positive and negative pions are produced. These pions further decay to muons and neutrinos. I am interested in getting angular distribution of neutrinos from pions that decayed in flight (not at rest). Normally, this distribution should be forward-directed (by forward I mean along the direction of incident protons). However, when I get the histogram of angular distribution, it looks like it is peaked at 90 degrees (perpendicular to the proton beam path). Here is how I do it in my SteppingAction:

 I define the direction to the detector (which is located far “behind” the target, about 150 degrees from proton beamline direction) as

  G4double dirX = -25.*m;
  G4double dirY = 0.*m;
  G4double dirZ = 54.*m;

  G4ThreeVector dir2det(dirX,dirY,dirZ);

Then I pick out the positive pions that decayed in flight with the emission of muon neutrino, obtain the momentum direction of neutrino, get the cosine of the angle between the two unit vectors, calculate the angle and fill the histogram:

if ((part == G4PionPlus::PionPlus()) && (proc_name == "Decay") && (sec_name == "nu_mu") && (stepstat == "NotAtRest") ){

     G4ThreeVector nu_dir = secondary_track->GetMomentumDirection();
     G4double cos2det = nu_dir*dir2det/dir2det.mag()/nu_dir.mag();
     G4double alpha = acos(cos2det)/CLHEP::degree;
     rm->FillHisto("angle_nu_mu_det",alpha);}

Once again, normally this histogram should peak around 180 degrees because proton beam is incident along Z axis in “negative” direction. Instead I get the histogram which peaks around 90 degrees...

 I will appreciate if someone helps me out, maybe I am making some simple mistake....

 Thank you in advance.

1 None: Re: Angular distribution of neutrinos from pions that decay in flight   (Bari Osmanov - 12 Jun, 2008)
None Limit on number of primary particles per event?  by Ben Morgan <Ben Morgan>,   28 Apr, 2008

Hi,

I've been writing an application using the GPS where the number of primary particles will be high, of the order of 10^5-10^6. However, when running with more than 262050 (roughly) primary particles, the program falls over with a seg fault somewhere at the end of the event, certainly after "Terminate current event processing" is reported (using /event/verbose 1). Running in gdb seems to trace back the fault to the destructor of G4PrimaryParticle (have to admit that I'm not an expert with gdb...). I've cross-checked this by using the GPS in example N01 and I see the same behaviour here.

Just wondered if there's a limit on the number of primary particles that can be generated? The number where the seg fault starts to occur is close to 2^18, although maybe a coincidence?

Cheers,

Ben.

1 None: RE: Limit on number of primary particles per event?   (Makoto Asai - 28 Apr, 2008)
(_ None: RE: Limit on number of primary particles per event?   (Ben Morgan - 28 Apr, 2008)
Question Hemispherical particle source - GPS  Keywords: GPS hemisphere
by valentina <valentina>,   22 Apr, 2008

Hi all!

I have a question about the use of GPS, and in particular the way to generate particles from an hemisperical surface.

I know that I have to bias the angular distribution and that there is an example (test32.g4mac) but I'm not sure to do the right thing.

Suppose that I have my detector on the XY plane and I want to generate the photons from an hemisphere above the detector. The theta distribution is from 0 to 90 deg respect to the normal of the surface.

This is the macro I wrote:

/gps/particle gamma

/gps/pos/type Surface

/gps/pos/shape Sphere

/gps/pos/centre 0. 0. 0. mm

/gps/pos/radius 100. mm

/gps/ang/type cos

/gps/ang/mintheta 0. deg

/gps/ang/maxtheta 90. deg

/gps/energy 100. keV

/gps/hist/type biaspt

/gps/hist/point 0. 0.

/gps/hist/point 0.5 0.

/gps/hist/point 1. 1.

/gps/hist/type biaspp

/gps/hist/point 0. 1.

/gps/hist/point 0.75 1.

/gps/hist/point 1. 1.

I bias the theta and phi position, but I don't know if it's right.

Someone can help me?

Thank you for every comment/help!

Valentina

None mu- lifetime in mercury  by Bari Osmanov <Bari Osmanov>,   08 Apr, 2008
 My greetings, I have the following question: I am simulating the interactiuon of 1 GeV proton beam with mercury target.
 Among other particles, negative muons are produced. I need to deduce the mu- lifetime in mercury 
which was measured to be about 76 ns.
 I was told before that both decay and capture processes for mu- are done through "muMinusCaptureAtRest".
I will appreciate if someone tells me how to deduce mu- lifetime (or to get mu- time spectrum) in mercury in my SteppingAction.
 The value that I currently get is about 1 ns which is definitely wrong...

  Thank you in advance.

 Sincerely,

 Bari. 
1 None: Re: mu- lifetime in mercury   (Vladimir IVANTCHENKO - 08 Apr, 2008)
(_ None: Re: mu- lifetime in mercury   (barry_osm@yahoo.com - 08 Apr, 2008)
Question IonFilter  by Kathrin <gester@physik.rwth-aachen.de>,   14 Mar, 2008
Hello, 

I am trying to create a primitive scorer for ions by using the G4SDParticleFilter. 
I used the a filter for generic ions, but if I shoot C12 ions, the filter does not recognize the C12ions, 
as their name is not Generic Ion but C12[0.0]. If I try to create a filter by 

G4SDParticleFilter* C12IonFilter = new G4SDParticleFilter(filterName = "C12IonFilter", particleName = "C12[0.0]");

I get the error that ions cannot be created in the PreInit State. My problem is that the filter is used 
in my DetectorCunstruction class but the DetectorConstruction has to be done  before I can use the Initialize-method 
in my main programme therefore I am in the PreInit State. 

Is there a way I can create filters for ions?

Thank you for your help

Kathrin
Question How to use gps confine physical volume?  Keywords: GPS,confine,volume
by Anil <Anil>,   07 Mar, 2008

Hello,

Iam new to GPS usage. Iam interested to confine the gammas from a point isotropic source to a physical volume of a pentagon. The source is 140mm away from the front surface pentagon. As mentioned in GPS manual, Iam using "gps/pos/confine crysphy" where crysphy is name of physical volume. But Iam getting following message and in the output file the particles are not confined to the physical volume.

************************************* LoopCount = 100000 Either the source distribution >> confinement or any confining volume may not overlap with the source distribution or any confining volumes may not exist If you have set confine then this will be ignored for this event. ************************************* Following commands are being used.

/gps/particle gamma /gps/pos/type Point /gps/pos/centre 0. 0. 140. mm /gps/pos/confine crysphy /gps/ang/type iso /gps/energy 1000. keV /gps/number 100 /vis/open HepRepFile /vis/drawVolume /vis/scene/add/trajectories /vis/scene/add/hits /run/beamOn 1

May I know where Iam wrong? Thanks in advance!!

Anil

None Confining to a surface using GPS  Keywords: GPS,confine,surface
by Anil <Anil>,   06 Mar, 2008

Hello,

I wish to confine the particles from a point source to the front end of a hexagon or a pentagon. How to achieve this using GPS?

Question unsupported particle: H2  Keywords: H2 unsupported particle
by Adam Hecht <Adam Hecht>,   25 Feb, 2008

Dear all,

I am running a proton beam simulation which is aborting whenever a H2 particle is created. Setting tracking to verbose, the last particle listed before crashing is Particle = H2[18827.3]

The error message is
*** G4Exception : 007
      issued by : G4HadronicCrossSections
GetParticleCode: unsupported particle
*** Fatal Exception *** core dump ***
*** G4Exception: Aborting execution ***

How do I make this particle supported? I see many codes with G4Proton, G4Neutron, etc., but how would I define H2? Adding G4H2 in the list of particles undergoing hadronic processes doesn't work.

Also, I heard that the number in [] is the excitation energy. No other particles created list any excitation energy, they're all [0.0], and I wonder why this one does. Do you have any ideas?

Thank you, Adam

1 None: Re: unsupported particle: H2   (Adam - 26 Feb, 2008)
(_ None: Re: unsupported particle: H2   (Vladimir IVANTCHENKO - 26 Feb, 2008)
Question Problem in the definition of a circular sources in gps?  Keywords: intensity gps annular bins
by Shahrokh <Shahrokh>,   14 Feb, 2008
Hello,

I do not exactly know how to use the following commands:
/gps/source/intensity  ***
/gps/source/add  ***

For example, I want to define a circular source with annular synchronous bins 
(five bins: #source bin 1, #source bin 2, #source bin 3, #source bin 4 and #source bin 5) 
with the following relative intensities: 
5:4:3:2:1 respectively. 
Is it correctly the following commands?

# source bin 1
/gps/source/intensity  5
…
# source bin 2
/gps/source/add  4
…
# source bin 3
/gps/source/add  3
…
# source bin 4
/gps/source/add  2
…
# source bin 5
/gps/source/add  1
…

Please guide me.
Shahrokh.
News Problem in the source definition?  Keywords: source shape truncated cone
by Shahrokh <Shahrokh>,   14 Feb, 2008
Hello,

How can I define a source located on the inner surface of a truncated cone?
In the other words, I want to set the source shape to the inner surface of a truncated cone. How can I do?

Please guide me.
Shahrokh.

None Simulating a space-charge dependent ion beam  Keywords: Space-charge dependent ion beam
by Zach Hartwig <Zach Hartwig>,   08 Feb, 2008
Hi.

I was wondering if anyone had any experience with or advice on how to 
simulate a space-charge dependent ion beam.  Specifically, the monte-carlo 
method of GEANT4 makes it very difficult to model the electromagnetic 
dependence of particles grouped in a bunch.  

I am specifically interested in determing the spreading of the beam at a 
given point in my geometry.  The space-charge dependence is a function of 
the pulsed current, so for instance a 10mA beam at 1MeV has a beam-spot 
size at 1m away of 2-3cm. 

Any help is appreciated.  Thanks!

 

Question Angle distribution from direction cosines  Keywords: angle
by valentina <valentina>,   04 Feb, 2008

Hi, my Geant4 output file gives me the direction cosines (DX, DY, DZ) of the particle. I have to calculate theta and phi (spherical coordinates) from these cosines and I'm using:

theta = acos(-MZ) phi = atan(DY/DX)

From the GPS Users Manual I have found:

The direction cosines are calculated as

        Px = - sin(q) cos(f)
        Py = - sin(q) sin(f)
        Pz = - cos(q)

The problem is that the result is bit strange and I don't know if I'm using a wrong transformation. Can someone help me?

Thanks! Valentina

1 Idea: Re: Angle distribution from direction cosines   (G.A.P.Cirrone - 04 Feb, 2008)
3 None: Re: Angle distribution from direction cosines   (Marc Verderi - 04 Feb, 2008)
1 None: Re: Angle distribution from direction cosines   (michel maire - 04 Feb, 2008)
(_ None: Re: Angle distribution from direction cosines   (Vladimir IVANTCHENKO - 05 Feb, 2008)
4 Ok: Re: Angle distribution from direction cosines   (valentina - 06 Feb, 2008)
Question Stopping the decay of daughter nuclei  Keywords: decay radioactive grdm/nucleusLimits macro
by Jesse Angle <angle@phys.ufl.edu>,   28 Jan, 2008
I wish to simulate the individual decays of the Uranium and Thorium 
chain as well as other radioactive decay chains.  I have been using 
the following macro under the assumption that the /grdm/nucleusLimits 
command would only decay the primary particle and would merely track 
the daughter while not decaying said daughter.  This is not happening, 
the daughters continue decaying until a stable isotope is reached.  
What do I need to modify in order to keep all daughter particles from 
decaying?


/Xe/generateCE  0
/Xe/saveHits 1
#
/Xe/printModulo 25000

# detector parameters
/Xe/detector/setTeflonReflectivity .95
/Xe/detector/setLXeScintillation 0
/Xe/detector/setLXeAbsorbtionLength 100. cm

# gun: particle
/Xe/gun/particle ion
/Xe/gun/ion 89 228 0 0
/Xe/gun/energytype Mono
/Xe/gun/energy 0 keV
/Xe/gun/type RandomIC

/grdm/nucleusLimits 89 89 228 228

/tracking/verbose 2
/run/verbose 2
/control/verbose 2
/run/beamOn 1
None ion energy per nucleon or total  Keywords: Ion, energy, gps
by Shawn Kang <Shawn Kang>,   14 Jan, 2008

Dear Geant4 users,

Can anyone help me specify energy level in transporting ions?

I set up my macro file as shown below. What I want is Z=6, A=12, Q=6 (entirely stripped), and 1 MeV total energy.

Is the 1 MeV energy total or per nucleon as I used in my macro?

/gps/ion 6 12 6

/gps/energy 1 MeV

/gps/pos/type Surface

/gps/pos/shape Sphere

/gps/pos/centre 0. 0. 0. cm

/gps/pos/radius 15. cm

/gps/ang/type cos

/tracking/verbose 1

/run/beamOn 100000

Thank you,

Shawn

1 None: Re: ion energy per nucleon or total   (Vladimir IVANTCHENKO - 16 Jan, 2008)
Question anti_deuteron beam?  Keywords: antideuteron
by Henning Gast <Henning Gast>,   11 Jan, 2008

Hi!

I've successfully used G4.9.1 to study the annihilation of antiprotons after being stopped down in some material.

Now I would like to do the same thing for anti_*deuterons*. Two questions:

1. As the G4ParticleGun doesn't seem to like antideuterons, is there a simple way to get an antideuteron beam?

2. Is the annihilation of generic anti-ions included in the hadronic physics lists (QGS*)?

Many thanks in advance

Henning

Question Does the momentum direction influence the energy of the optical photon?  Keywords: optical photon warning random numbers
by Aivaras <aivaras.zukauskas@gmail.com>,   03 Jan, 2008
Hi all,

In my simulation I have optical photons with energy of 2.92 eV. 
When I use:
particleGun->SetParticleEnergy(2.92*eV), and then
particleGun->SetParticleMomentumDirection(G4ThreeVector(x,y,z))
with, for example, x=0, y=0, z=1, everything goes fine, but when I change
x, y, z into the random numbers, I get:

Warning: G4MaterialPropertyVector::GetProperty
==> attempt to Retrieve Property above range

Can anyone explain me, why I get this message when random numbers
are introduced? Does it change the energy of the optical photon?
Is there a range of allowed/forbidden energies? If yes, how can I control 
it?

Thanks,
Aivaras
1 Feedback: Re: Does the momentum direction influence the energy of the optical photon?   (Peter Gumplinger - 03 Jan, 2008)
None How to define heavy nuclei C N and O?  by <lliu@pmo.ac.cn>,   22 Dec, 2007

The incident particles in my simulation are cosmic ray heavy nuclei C,N and O.How to define the particle sources in Geant4?

1 None: Re: How to define heavy nuclei C N and O?   (cheney - 25 Dec, 2007)
None Making use of the G4ParticleTable in stand-alone (v9.0)  Keywords: Finding PDG info without PhysicsList
by Peter Niessen <niessen@ifh.de>,   20 Nov, 2007

Hey G4,

I have a little format converter (CORSIKA->ROOT) which needs the particle masses to convert from total to kinetic energy. In GEANT4 v7.X, I could do

  static G4ParticleTable *particle_table (G4ParticleTable::GetParticleTable ());
  G4double mass = particle_table->FindParticle (11)->GetPDGMass () / MeV;

and mass would have .511... inside. Alas! not any more with v9.0!

Now I get the

  G4Exception: PartMan0000
  issued by : G4ParticleTable::CheckReadiness ()

Do I really need a run manager and a physics list to make use of the G4ParticleTable?

Cheers, Peter.

None Gamma Tracking  by John <calculus7@gmail.com>,   05 Nov, 2007

I'm coding a program that is supposed to measure the amount of gammas that are transmitted past a piece of metal without producing electrons. I decided to implement this by ensuring that the momentum directions in PreUserTrackingAction and PostUserTrackingAction of the TrackingAction class are the same. However, when I try this, I still get unexpected results. Anyone have any suggestions?

Question Generic Ion Problems  by Laura <lapaulucci@gmail.com>,   01 Nov, 2007
Hello!

I am sorry for this may sound like a very basic question but 
I am trying to implement an iron beam and for that I did:

In the Physics List:

void ISMPhysicsList::ConstructIons()
{ 
    G4IonConstructor iConstructor;
    iConstructor.ConstructParticle();
}

In the Primary Generator Action:

ISMPrimaryGeneratorAction::ISMPrimaryGeneratorAction()
{
  particleGun = new G4ParticleGun(1);

  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
  G4ParticleDefinition* particleName = particleTable->GetIon(26,56,0.);
  particleGun->SetParticleDefinition(particleName);
(...)
}  

And I am getting the following error message:

*** G4Exception : Illegal operation
      issued by : G4IonTable::CreateIon()
Can not create ions in PreInit state
*** This is just a warning message.

*** G4Exception : Event00003
      issued by : G4ParticleGun::SetParticleDefinition()
Null pointer is given.
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution ***
Abort

I have tried to look the advanced examples but I did not 
find what seems to be the problem...
Does anybody know what am I doing wrong?
Thank you.
1 None: RE: Generic Ion Problems   (Makoto Asai - 01 Nov, 2007)
1 Agree: RE: Generic Ion Problems   (Laura - 01 Nov, 2007)
2 None: Re: Generic Ion Problems   (Vladimir IVANTCHENKO - 02 Nov, 2007)
Question Particle information update  Keywords: particle information update
by Huaimin Liu <Huaimin Liu>,   23 Oct, 2007
Dear Geant4 experts,

In Geant4, the particle information is taken from the Particle Data
group(PDG). As I noticed, the mass of neutral Kaon (0.497672 GeV)is 
from PDG'02, which is about 0.03 MeV heavier than PDG'06. The PDG
formally update particle properties every two years. Does Geant4 has
a policy to uptade its particle information?

Huaimin Liu
IHEP, Beijing 
None ParticleGun  Keywords: angle solid
by Ibrahim <Ibrahim>,   20 Oct, 2007

Hi,

how can i define a solid angle in geant4. I' d like to send the gammas in this angle solid into my cyliderical detector. The radius of cylinder is 3.81 cm and the distance between the gamma source and the detector is 4 cm .

regards

1 None: Re: ParticleGun   (michel maire - 22 Oct, 2007)
3 None: Re: ParticleGun   (Fan Lei - 02 Nov, 2007)
Question Problems with GPS and position and direction distributions?  Keywords: GPS, position and direction distributions, biasing, usr-defined histograms
by Shahrokh <Shahrokh>,   17 Oct, 2007
Hi,
 
I have some questions about to define position and angular distributions by using GPS, as follows:

When I execute my application, the particles traverse a plane. For each particle traversing 
this plane the position (X and Y coordinates), direction ( X, Y and Z components of momentum direction ) 
and energy are stored in six 1-D histograms by using AIDA that these horizontal axes are 
the position coordinates, the components of momentum direction and energy, respectively in which 
the particle incident upon the plane. Afterwards, I want to define these distributions (positions, directions 
and energy) by using GPS commands in user-defined histograms or biasing and save these commands in a macro file 
and then I execute again from this planar source by having these distributions in this macro file. 
In the following, I divide my works in three steps, the definition of energy, position and angular distributions 
from these six 1-D histograms by using GPS commands:
 
---------------------------
1- Energy distribution:
I can initialize this energy distribution (1-D histogram) by using the commands following:
/gps/ene/type User
/gps/hist/type energy
/gps/hist/point ... ...
 
/gps/hist/point is followed by its two arguments - the upper boundary of the bin and weight of the bin. 
I think I do it correctly. In your opinion, is it correct?
 
---------------------------
2- Direction distribution:
For the initialization of the direction distribution by using GPS, firstly I must get 
angular distribution (Phi and Theta) from momentum direction distribution. 
For this purpose, after getting X, Y and Z components of momentum direction, I can calculate 
Phi and Theta angles with the following formulas:
 
Phi = Arctan(Py/Px)
Theta = Pi - Arccos(Pz)
 
After getting two 1-D histograms from Phi and Theta distributions, I can use the following commands:
For Theta:
/gps/ang/type user
/gps/hist/type theta
/gps/hist/point ... ...
...
For Phi:
/gps/ang/type user
/gps/hist/type phi
/gps/hist/point ... ...
...
I think I do it correctly. In your opinion, is it correct?
---------------------------
3- Position distribution:
The position distribution in this plane is that many particles emanate from a region in the rectangular shape 
and a few particles emanate from the out of this region.
 
At now, I want to define a planar source by using this position distribution, but I do not know how to do it. 
I thought that I could do it by using the commands as follows:
/gps/pos/type user
/gps/hist/type biasx
/gps/hist/point ... ...
...
 
Unfortunately, I did not see the command as similar to /gps/pos/type user. 
Although I do not exactly understand the concept of biasing.
How can I do it?
Please tell me the role of biasing.
 
In the other hands, is it correct that I bias distributions by using two 1-D histograms of X and Y components, synchronously? 
Does it superimpose into the rectangular region?
 
Please guide me, 
 
Shahrokh.
1 Question: Re: Problems with GPS and position and direction distributions?   (Shahrokh - 20 Oct, 2007)
3 None: Re: Problems with GPS and position and direction distributions?   (Fan Lei - 02 Nov, 2007)
Question GPS random seed  Keywords: GPS, general particle source, HEPrandom, random seed
by Ben Loer <Ben Loer>,   19 Sep, 2007

Hi all, I'm having a problem using the GPS. I set a "Para" volume distribution which is confined to a portion of my detector. The particles are showing up in the right distribution, but they are not really randomized: the first vertex is always at the same point. I set the random seed in my main() in the standard way:

CLHEP::HepRandom::setTheEngine(new CLHEP::RanluxEngine); CLHEP::HepRandom::setTheSeed(time(0));

But this doesn't seem to have any effect. Does GPS get its random seed from some other source? Or do I need to manually set it somewhere via gps commands?

Thanks!

Ben

1 None: Re: GPS random seed   (Fan Lei - 02 Nov, 2007)
Question Calculating the range of a secondary particle  Keywords: TestEm1, particle range, secondary vs. primary,
by Matthew Middione <middionematt@csufresno.edu>,   19 Jul, 2007

Hello,

I am in need of calculating the range of a secondary particle. I am using TestEm1 as a base example that I am modifying in order to meet this goal. TestEm1 calculates the range and compares this simulated range to the csda range of the primary particle. I am in need of changing the code in order to allow these calculations to executed on the secondary particles. I am modeling a positron emitting point source as the primary particle and it emits positrons with a Track ID of 4 and a Parent ID of 1. Is there a way that I can alter the code to allow the range calculations to be performed on a different Track ID?

Thanks, Matthew Middione

Question G4GeneralParticleSource problem  by Jérôme Souin <Jérôme Souin>,   19 Jul, 2007

Hi,

I'm a begginer in Geant4 (8.3) and I want to construct a radioactive source of 60Co using G4GeneralParticleSource. I'm following the examples : novice N02 and extended exrdm.

Every thing is ok during the compilation but my nucleus don't decay... and the process "Decay" doesn't appear in the list of process??

Idle> process/list
     Transportation,                msc,              hIoni,        StepLimiter
              eIoni,              eBrem,            annihil,               phot
              compt,               conv,             muIoni,            muBrems
         muPairProd

I get only that as result :

*********************************************************************************************************
* G4Track Information:   Particle = Co60[0.0],   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume     Process
    0      0 fm      0 fm      0 fm      0 eV      0 eV      0 fm      0 fm   physicopper    initStep

#Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume     Process
    1      0 fm      0 fm      0 fm      0 eV      0 eV      0 fm      0 fm   physicopper   UserLimit
Track (trackID 1, parentID 0) is processed with stopping code 2

In my PhysicList I have :

#include "globals.hh"
#include "ExPerso2PhysicsList.hh"

#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExPerso2PhysicsList::ExPerso2PhysicsList():  G4VUserPhysicsList()
{
  defaultCutValue = 1.0*cm;
   SetVerboseLevel(1);
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExPerso2PhysicsList::~ExPerso2PhysicsList() {}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::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. 

  ConstructBosons();
  ConstructLeptons();
  ConstructBaryons();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructBosons()
{
  // pseudo-particles
  G4Geantino::GeantinoDefinition();
  G4ChargedGeantino::ChargedGeantinoDefinition();

  // gamma
  G4Gamma::GammaDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructLeptons()
{
  // leptons
  //  e+/-
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  // mu+/-
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();
  // nu_e
  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  // nu_mu
  G4NeutrinoMu::NeutrinoMuDefinition();
  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructBaryons()
{
  //  barions
  G4Proton::ProtonDefinition();
  G4AntiProton::AntiProtonDefinition();

  G4Neutron::NeutronDefinition();
  G4AntiNeutron::AntiNeutronDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructGeneral();
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"

#include "G4MultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4hIonisation.hh"

#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

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

    if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);

    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);      

    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);

    } else if( particleName == "mu+" || 
               particleName == "mu-"    ) {
      //muon  
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4MuIonisation,      -1, 2,2);
      pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3);
      pmanager->AddProcess(new G4MuPairProduction,  -1, 4,4);       

    } else if ((!particle->IsShortLived()) &&
	       (particle->GetPDGCharge() != 0.0) && 
	       (particle->GetParticleName() != "chargedgeantino")) {
      //all others charged particles except geantino
      pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
      pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
      //step limit
      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);         
      ///pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);  
    }
  }       

}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "G4GenericIon.hh"
#include "G4RadioactiveDecay.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"

void ExPerso2PhysicsList::ConstructGeneral() {

     const G4IonTable     *theIonTable =  G4ParticleTable::GetParticleTable()->GetIonTable();
     G4RadioactiveDecay*   theRadioactiveDecay  = new G4RadioactiveDecay();

    for (G4int i=0; i<theIonTable->Entries(); i++) 
    {   
      G4ParticleDefinition* ionparticle = theIonTable->GetParticle(i);
      G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
      if (particleName == "GenericIon") 
      {
         G4ProcessManager* ionpmanager = ionparticle->GetProcessManager();
    	 ionpmanager->SetVerboseLevel(3);
    	 ionpmanager->AddProcess(theRadioactiveDecay);
    	 ionpmanager->SetProcessOrdering(theRadioactiveDecay, idxPostStep, 1);
    	 ionpmanager->SetProcessOrdering(theRadioactiveDecay, idxAtRest, 1);
     } 
    }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void ExPerso2PhysicsList::SetCuts()
{
  //G4VUserPhysicsList::SetCutsWithDefault method sets 
  //the default cut value for all particle types 
  //
  SetCutsWithDefault();

if (verboseLevel>0) DumpCutValuesTable(); }

Thank you for your help,

J.

None 2 particles in UI mac file  by Vadim Boyarkin <Vadim Boyarkin>,   09 Jul, 2007

If I want to start an event by shooting two particles (e- and gamma) with different energies, what should I do? If I use PrimaryGeneratorAction everything is OK. But if I want to use a macros?

something like: /gun/particle "particle1" /gun/energy "energy1" and for the second one

Thank you in advance.

1 Feedback: Re: 2 particles in UI mac file   (Peter Gumplinger - 09 Jul, 2007)
(_ None: Re: 2 particles in UI mac file   (bv - 20 Jul, 2007)
(_ Feedback: Re: 2 particles in UI mac file   (Peter Gumplinger - 20 Jul, 2007)
(_ None: Re: 2 particles in UI mac file   (bv - 23 Jul, 2007)
None Particles with 3 different energies  Keywords: paricles energy
by Konstantinos Michael <Konstantinos Michael >,   08 Jul, 2007

hi all,

I want to make the particle gun to shoot randomly particles with 3 different energies and in random direction but i am not sure how can i do it.

here is a part of my code.

void ExN03PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
G4double x0 = -0.8*(ExN03Detector->GetWorldSizeX());
  G4double y0 = 0.*cm, z0 = 0.*cm;

{ 
       y0 = (ExN03Detector->GetCalorSizeYZ())*(G4UniformRand()-0.5);
      z0 = (ExN03Detector->GetCalorSizeYZ())*(G4UniformRand()-0.5);

      G4double E1=5.5*MeV;
      G4double E2=6.5*MeV;
      G4double E3=7.5*MeV;

particleGun->SetParticleEnergy(E1);      
particleGun->SetParticleEnergy(E2);
particleGun->SetParticleEnergy(E3);
      G4double i=G4UniformRand();
       G4double j=0;
       G4double k=0;
      particleGun->SetParticleMomentumDirection(G4ThreeVector(i,j,k));

    particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));

}

  particleGun->GeneratePrimaryVertex(anEvent);
  particleGun->GeneratePrimaryVertex(anEvent);
  particleGun->GeneratePrimaryVertex(anEvent);
}

Thanks

1 Feedback: Re: Particles with 3 different energies   (Peter Gumplinger - 09 Jul, 2007)
(_ None: Re: Particles with 3 different energies   (areg - 08 Nov, 2007)
(_ Feedback: Re: Particles with 3 different energies   (Peter Gumplinger - 09 Nov, 2007)
(_ None: Re: Particles with 3 different energies   (Areg - 09 Nov, 2007)
(_ More: Re: Particles with 3 different energies   (Peter Gumplinger - 12 Nov, 2007)
None Lack of entire beta spectrum from F-18  Keywords: beta spectra, F-18 point source, positron
by Matthew Middione <middionematt@csufresno.edu>,   03 Jul, 2007
I had a question regarding the lack of positrons from a beta spectrum 
from an F-18 point source.  

Below is my macro file and output.

# Macro File for F-18 Positron Range
#
/pr/det/setMat Tissue
/pr/det/setSize 2 m
#/pr/det/setField 3 T
#/pr/det/setField 5 T
#/pr/det/setField 7.5 T
#/pr/det/setField 9.4 T
/run/initialize
/tracking/verbose 1
/pr/phys/setCuts 1 um
/gps/position 0. 0. 0. cm
/gps/direction 1. 0. 0.
/gps/particle ion
/gps/ion 9 18 0 0 
/gps/ene/type Mono
/gps/ene/mono 0.0 MeV
/grdm/fBeta 1
/run/beamOn 1

Output
F-18 point source with no applied magnetic field

========= Table of registered couples ==============================



Index : 0     used in the geometry : Yes     recalculation needed : No 

 Material : Tissue

 Range cuts        :  gamma 1 um    e- 1 um    e+ 1 um

 Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV 

 Region(s) which use this couple : 

    DefaultRegionForTheWorld



====================================================================



### Run 0 start.



--------- Ranecu engine status ---------

 Initial seed (index) = 0

 Current couple of seeds = 9876, 54321

----------------------------------------



---> Begin of Event: 0



*********************************************************************************************************

* G4Track Information:   Particle = F18[0.0],   Track ID = 1,   Parent ID = 0

*********************************************************************************************************



Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume     Process

    0      0 fm      0 fm      0 fm      0 eV      0 eV      0 fm      0 fm       Tissue    initStep

    1      0 fm      0 fm      0 fm      0 eV      0 eV      0 fm      0 fm       Tissue  RadioactiveDecay



*********************************************************************************************************

* G4Track Information:   Particle = e+,   Track ID = 4,   Parent ID = 1

*********************************************************************************************************



Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume     Process

    0      0 fm      0 fm      0 fm    322 keV     0 eV      0 fm      0 fm       Tissue    initStep

    1  -6.04 um   2.64 um   30.6 um    318 keV   4.1 keV  31.5 um   31.5 um       Tissue         msc

    2  -9.94 um   3.71 um   37.9 um    316 keV  1.54 keV  8.34 um   39.8 um       Tissue       eIoni

    3  -48.7 um   7.08 um    114 um    300 keV  15.1 keV  86.8 um    127 um       Tissue       eIoni

    4  -46.4 um    3.1 um    126 um    289 keV  1.72 keV  12.8 um    139 um       Tissue       eIoni

    5  -29.4 um  -10.9 um    151 um    282 keV  6.39 keV  33.8 um    173 um       Tissue       eIoni

    6  -9.36 um  -18.1 um    174 um    265 keV   3.6 keV  31.8 um    205 um       Tissue       eIoni

    7   31.1 um  -57.9 um    222 um    250 keV  13.8 keV  75.6 um    281 um       Tissue       eIoni

    8   41.8 um    -70 um    252 um    242 keV  5.74 keV  34.1 um    315 um       Tissue       eIoni

    9   48.8 um  -86.3 um    331 um    224 keV  17.1 keV  83.3 um    398 um       Tissue       eIoni

   10   46.2 um   -173 um    432 um    192 keV  28.6 keV   140 um    538 um       Tissue       eIoni

   11   46.5 um   -173 um    433 um    190 keV   269 eV    806 nm    539 um       Tissue       eIoni

   12     47 um   -173 um    434 um    188 keV   176 eV   1.54 um    540 um       Tissue       eIoni

   13   47.1 um   -173 um    434 um    185 keV  12.2 eV   69.2 nm    540 um       Tissue       eIoni

   14   51.7 um   -171 um    445 um    181 keV  1.97 keV  12.1 um    552 um       Tissue       eIoni

   15   53.8 um   -167 um    461 um    177 keV  2.85 keV  16.2 um    569 um       Tissue       eIoni

   16   56.2 um   -165 um    478 um    171 keV  4.18 keV  17.7 um    586 um       Tissue       eIoni

   17   51.5 um   -113 um    565 um    139 keV  31.3 keV   108 um    694 um       Tissue       eIoni

   18   21.3 um  -97.6 um    591 um    128 keV  8.22 keV  44.4 um    738 um       Tissue       eIoni

   19   9.94 um  -91.4 um    594 um    124 keV  2.93 keV  13.5 um    752 um       Tissue       eIoni

   20   3.84 um  -85.4 um    596 um    122 keV  2.44 keV  8.77 um    761 um       Tissue       eIoni

   21  -1.19 um    -80 um    598 um    118 keV  1.28 keV  7.77 um    768 um       Tissue       eIoni

   22  -2.32 um  -78.4 um    599 um    115 keV   299 eV   2.09 um    770 um       Tissue       eIoni

   23  -3.21 um  -76.9 um    599 um    108 keV   333 eV   1.83 um    772 um       Tissue       eIoni

   24   5.42 um   3.98 um    611 um   53.1 keV  29.2 keV  92.4 um    865 um       Tissue       eIoni

   25   4.68 um   10.1 um    612 um   47.4 keV  4.12 keV   6.4 um    871 um       Tissue       eIoni

   26  -7.34 um   29.6 um    608 um      0 eV   47.4 keV  48.5 um    920 um       Tissue       eIoni

   27  -7.34 um   29.6 um    608 um      0 eV      0 eV      0 fm    920 um       Tissue     annihil

There were other particles that were tracked (e- and nu_e, and O-18), but I removed them
to save space.

I know that the beta energy spectra for F-18 ranges from about 0 to 640 keV.  How come the most entergetic
e+ that was tracked was only around 300 kev?

Any information that could lead to the solution to this problem would be much appreciated.

Thanks in anticipation,
Matthew Middione 
 
Question Charm decay is missing - How to include it?  Keywords: charm decay
by F. Juget <frederic.juget@unine.ch>,   29 Jun, 2007

There is no charm decay included in G4. Is it already existing decay tables somewhere or should we define tables for each charmed particle by ourself?

Question Altering Example TestEm1 to use GPS to simulate positron source emission   Keywords: F-18 GPS positron source through TestEm1
by Matthew Middione <middionematt@csufresno.edu>,   27 Jun, 2007
I am trying to alter the TestEm1 example to allow for the 
G4GeneralParticleSource to be used to allow me to simulate a positron
point source being emitted.  

The reason for this is because I want to model these positrons from
specific isotopes, specifically those important to PET.  For example,
I have a volume of tissue and I need a F-18 positron point source to 
be emitted and have its range be tracked and recorded.  I then will apply 
different strengths of magnetic fields to see the alterations in the range
of the positrons as they travel through the tissue medium.

I had originally just used the example TestEm1 to do this, but this was
modeling monoentergetic positrons and I am in need of modeling 
polyentergetic positrons, thus the F-18 source method would work.

Any assistance regarding altering the TestEm1 code to allow for the GPS 
to be used would be much appreciated.  Or maybe I am heading down the 
wrong track...any advice would be much appreciated.

Thanks in anticipation,
Matthew Middione 
1 None: Re: Altering Example TestEm1 to use GPS to simulate positron source emission   (Vladimir IVANTCHENKO - 27 Jun, 2007)
1 None: Re: Altering Example TestEm1 to use GPS to simulate positron source emission   (Matthew Middione - 27 Jun, 2007)
(_ Note: Re: Altering Example TestEm1 to use GPS to simulate positron source emission   (Matthew Middione - 28 Jun, 2007)
(_ Question: Re: Altering Example TestEm1 to use GPS to simulate positron source emission   (Rahul Shah - 07 Apr, 2009)
(_ Feedback: Re: Altering Example TestEm1 to use GPS to simulate positron source emission   (Giovanni Santin - 07 Apr, 2009)
2 None: Re: Altering Example TestEm1 to use GPS to simulate positron source emission   (michel maire - 27 Jun, 2007)
None Generating 2 particles with different energies  by Adam <ax_blais@laurentian.ca>,   08 Jun, 2007

I have to generate two particles at a time, coming from the same vertex. Each particle has to have a unique energy. I tried setting energy1 and then generating vertex, and then setting energy2 and calling generateVertex again. (This is with the same particle gun.) The result was thousands of tracks which led to a segmentation fault. This doesn't happen when I set each particle to have the same energy. How can I do this?

1 None: RE: Generating 2 particles with different energies   (Makoto Asai - 10 Jun, 2007)
(_ None: RE: Generating 2 particles with different energies   (Adam - 11 Jun, 2007)
(_ None: RE: Generating 2 particles with different energies   (Makoto Asai - 11 Jun, 2007)
(_ None: RE: Generating 2 particles with different energies   (Adam - 11 Jun, 2007)
(_ None: RE: Generating 2 particles with different energies   (Makoto Asai - 11 Jun, 2007)
(_ None: RE: Generating 2 particles with different energies   (Adam - 11 Jun, 2007)
Idea Confine command in GPS  Keywords: confine error source
by Justin Dingley <Justin Dingley>,   23 May, 2007
I recently tried to use the /gps/pos/confine command to create a uniformly
distributed source. I received the following error:


LoopCount = 100000
Either the source distribution >> confinement
or any confining volume may not overlap with
the source distribution or any confining volumes
may not exist
If you have set confine then this will be ignored
for this event.


even though I knew my source was well contained within the volume.
There have been questions in the forum about this error, but no answer 
was given.
The solution to my particular case was to include the /gps/pos/centre 
command- even though the confinement volume was at 0,0,0  and the default
gps center is also at 0,0,0 , this error occurs unless the center 
is explicitly defined.

I assume its just a peculiarity of the code.

 
None Antideuteron & particle ID of Ions  Keywords: antideuteron, ions
by Philip von Doetinchem <Philip von Doetinchem>,   18 May, 2007

Hello, I have three questions which you can maybe answer. I'm using GEANT4 for a cosmic ray simulation in Earth's atmosphere. So far I shoot only "normal" particles like protons, electrons oder positrons in the atmosphere, but I want to have a look at ions (alpha, carbon, boron, ...) and antideuteron up to energies of about 100GeV.

 - Could you please help me and tell me how to define an antideuteron? 
   I didn't find anything on this topic...

 - My other question concerns the ions. To store the particle id in a 
   ROOT file I'm using the PDGcode. Is there some kind of integer 
   accessable for ions which defines them in a non-ambigious way?

 - I had some problems with alphas in GEANT4 with higher energies 
   (starting from a few GeV per nucleon). The code crashes with an 
   exception. Do you have an idea how to use light ions with energies 
   up to 100GeV in GEANT4?

Best regards and have a nice weekend, Philip

Question How to set the cut value in energy?  Keywords: cut value in energy run time
by Shahrokh <Shahrokh>,   13 May, 2007
Hi friends:

I understand that the cutoff value is set in range and G4ParicleWithCuts() class provides
the functionality to convert the cut value in range into energy threshold.

In order to set the cut value in energy, I have some questions as follows:

1. I want to set directly the energy cutoff of photons and electrons to 10 KeV and 500 KeV,
respectively. In the other hands, I know how to set the cut value in range by using SetCuts()
and SetRangeCut(), but I do not know how to set the cut value in energy?

2. Is the energy cutoff reduced the run time of my simulation effectively?

3. Can I set different cut value in energy for each physical volume? How can I do it?

Please help me.
Thanks a lot.

Shahrokh
None RadioActive Decay for EM waves  Keywords: EM Radioactive Deacy
by Alan Shippen <Alan Shippen>,   26 Apr, 2007

I want to simulate the X-Ray distribution from a Decaying cs-137 source. I have managed to create a simulation using the suggestions in previous threads (particularly #91) which introduce G4RadioActive Decay in the physics processes. This works great for producing beta+ or - events but doesnt produce gamma or X-Ray events, as you would expect in a real decay Firstly, Have I got an error in my simulation, particularly the physics processes? or alternatively am I missing something within the code? How would I approach simulating such an event if this is the case?

Thank You for Your Time.

Alan

None RadioActive Decay for EM waves  Keywords: EM Radioactive Deacy
by Alan Shippen <Alan Shippen>,   26 Apr, 2007

I want to simulate the X-Ray distribution from a Decaying cs-137 source. I have managed to create a simulation using the suggestions in previous threads (particularly #91) which introduce G4RadioActive Decay in the physics processes. This works great for producing beta+ or - events but doesnt produce gamma or X-Ray events, as you would expect in a real decay Firstly, Have I got an error in my simulation, particularly the physics processes? or alternatively am I missing something within the code? How would I approach simulating such an event if this is the case?

Thank You for Your Time Alan

None How to define two particle sources emiting particles at the same time?  Keywords: two particle sources
by fangrui <fangrui>,   18 Apr, 2007

Hi,everyone,

I want to define two particle sources emiting particles at the same time in my model. Can I define two particleguns? And how to make them work simultaneously? Can anybody offer some examples? Any suggestion will be appreciated very much.

Ben

None Partially charged ions  Keywords: Partially charged ions
by Jean Claude Thiry <jean-claude.thiry@ulp.u-strasbg.fr>,   17 Apr, 2007

Hi,

I'm a Geant newbie and I've got some problems defining a partially ionized ion. In fact I want to shoot a Zirconium particle, charged +20 in an ionization chamber.

The problem is that I don't succeed in defining the ion: particleGun->SetParticleDefinition(ionTable->GetIon(40,91,0,20)); should shoot ions with charge +20, but apparently it doesn't...

The only other way I see to set the charge is using a G4DynamicalParticle, but in this case the particleGun won't accept that particle as it's not a G4ParticleDefinition...

What can I do to solve this problem?

Regards

Jean Claude Thiry

1 None: Re: Partially charged ions   (Vladimir IVANTCHENKO - 27 Apr, 2007)
(_ None: Re: Partially charged ions   (Jean Claude Thiry - 27 Apr, 2007)
(_ None: Re: Partially charged ions   (Vladimir IVANTCHENKO - 27 Apr, 2007)
1 None: Re: Partially charged ions   (Jean Claude Thiry - 09 May, 2007)
3 None: Re: Partially charged ions   (Jean Claude Thiry - 22 Jan, 2008)
1 None: Re: Partially charged ions   (Vladimir IVANTCHENKO - 29 Jan, 2008)
... 1 Message(s)
None Pb to retreive Optical Photon via FinParticle(PDG)  by <campagne@lal.in2p3.fr>,   13 Apr, 2007

Using optical photon since some times for some Cerenkov studies, I am confronted to a problem. As you know the PDG code of an OP is set to 0 and

the following crash

particleGun->SetParticleDefinition(particleTable->FindParticle(beampdg)) ; with beampdg = 0

Note that the code is ok when I am using electron (pdg =11).

Have you a comment? JE

1 None: Re: Pb to retreive Optical Photon via FinParticle(PDG)   (Vladimir IVANTCHENKO - 13 Apr, 2007)
(_ None: Re: Pb to retreive Optical Photon via FinParticle(PDG)   (Jean-Eric Campagne - 13 Apr, 2007)
(_ None: Re: Pb to retreive Optical Photon via FinParticle(PDG)   (Vladimir IVANTCHENKO - 13 Apr, 2007)
None Polarisation of photon  by rajani <rajani>,   27 Mar, 2007

Dear All,

I have a question regarding the optical photon. Why is it important to define the polarization of photon? How does the polarization predicts reflection or refraction?

Thanking you

Cheers :)

Rajani

1 Feedback: Re: Polarisation of photon   (Peter Gumplinger - 28 Mar, 2007)
(_ None: Re: Polarisation of photon   (Campagne J.E - 16 Apr, 2007)
(_ Feedback: Re: Polarisation of photon   (Peter Gumplinger - 16 Apr, 2007)
None how to generate time dependent particles  Keywords: time dependent particles
by fmh_medphys <fmh_medphys@nuaa.edu.cn>,   27 Mar, 2007

Hi:
    how to generate time dependent particles? Can anyone help? any suggenstions will be OK.
Thanks a lot. 

None multiple vertex GPS coodinates  Keywords: multiple vertex GPS coodinates
by ahmet <ahmetsedat.ayan@gmail.com>,   21 Mar, 2007

Hello, I generated two cylindrical volume sources with GPS. I turned on gps verbose level to max as: /gps/verbose 2. I also turned on multiple vertexing as: /gps/source/multiplevertex true

When I shoot a gamma with /run/beamOn 1 , I expect to see "two" primary vertex information for two gammas from two volumes. Visualization shows two photons. However only one vertex informatin is printed. Is this the normal behaviour?

In addition, I also want to to be able access this information in my EventAction so that I can record primary vertex positions. How can I record the primary positions for ALL gammas from ALL source volumes?

thank you very much, ahmet.

None Getting Secondary Particle Number  by Katherin Shtejer <kshtejer@if.usp.br>,   22 Feb, 2007

Hello,

I am interested on counting the number of secondary particles produced in my sensitive detectors which are contiguous slices in a cylinder. In my sensitive detector class I score the total energy deposit in each slice, as well as the energy deposited by the secondaries also in each slice. I firstly was thinking about account for the number of steps in which I get these values of the deposited energy from the secondaries, but I know this is not really the number of particles because a same particle could contribute to the energy deposited in different steps.

 Please, can you help me to find the way for counting the number of produced secondary particles in each slice?

I would appreciate any help or suggestion.
Thank you in advance.
 Best regards,

Katherin Shtejer

1 None: Re: Getting Secondary Particle Number   (Anton Korneev - 22 Feb, 2007)
1 None: Re: Getting Secondary Particle Number   (Katherin Shtejer - 23 Feb, 2007)
(_ None: Re[2]: Getting Secondary Particle Number   (Anton Korneev - 23 Feb, 2007)
(_ None: Re: Re[2]: Getting Secondary Particle Number   (Katherin Shtejer - 24 Feb, 2007)
2 None: Re: Getting Secondary Particle Number   (Makoto Asai - 22 Feb, 2007)
4 None: Re: Getting Secondary Particle Number   (michel maire - 25 Feb, 2007)
1 None: Re: Getting Secondary Particle Number   (Katherin Shtejer - 26 Feb, 2007)
None optical photon declaration  by rajani <rajani>,   20 Feb, 2007

Dear All!!

I jus have a simple question.

When i declare optical photon as the particle in gps, It gives me an error saying it isn't able to identify the command. I saw in th extended/LXe README that optical photon is similar to X-Ray photon. So may i declare it as gamma? Rather than optical photon. But the macro photon.mac declares it as Optical photon. Could anyone please clear this small doubt.

Thanking you a lot!!

Cheers

Rajani

1 Feedback: Re: optical photon declaration   (Peter Gumplinger - 20 Feb, 2007)
(_ None: Re: optical photon declaration   (rajani - 21 Feb, 2007)
(_ Feedback: Re: optical photon declaration   (Peter Gumplinger - 21 Feb, 2007)
None How to add more variable in HEPEvt event format?  by Xiang-yao Wu <wuxy68@sohu.com>,   17 Feb, 2007

Dear All,

I simulate the cosmic ray interaction in atmospere. So, the generator is corsika. As you know, I can read the event by G4HEPEvtInterface. But in G4HEPEvtInterface, only ISTHEP(IHEP),IDHEP(IHEP),JDAHEP(1,IHEP),JDAHEP(2,IHEP), PHEP(1,IHEP),PHEP(2,IHEP),PHEP(3,IHEP),PHEP(5,IHEP) variables. In fact, I need some other information, such as Time, Primary energy, Primary Direction, Primary Position and the Age. How to do so??

     Any help is grateful!!!

       Best Regards,

                       Xiang-yao Wu

None Memory Leak with Muons Decaying  by Lance Simms <Lance Simms>,   13 Feb, 2007

I am fairly certain that there is a memory leak in the G4Decay class in the version of GEANT4 I am using.

I am using ExN02 from the novice examples. When I change the generated particle to muons, the memory used by ExN02 grows linearly with respect to time. If I remove the following lines from ExN02PhysicsList.cc

  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay("decay");
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) {
      pmanager ->AddProcess(theDecayProcess);
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }

the memory leak goes away.

I am currently using the installation at SLAC under /afs/slac/geant4/vol4. This is geant4-08-00-p01-patch-00.

Is this an issue with the version I am using? Has anyone seen this before?

Help would be greatly appreciated,

Lance

1 None: Re: Memory Leak with Muons Decaying   (Makoto Asai - 13 Feb, 2007)
None How to find out segmentation error in this case?  Keywords: segmentation error, debug,
by long <long>,   16 Dec, 2006

Hi,everyone. Could we discuss about how to debug our codes, especially for
segmentation error. Because I am a beginner. When I began to write my codes, I met
many problems,especially segmentation errors. I found it is hard for a freshman
to find out what happened? So I think this discussion will help all beginers like me.
    Here is my concrete case, when I use geant4info particle, no error occured. 
But when I use electron, segmentation error will happen. Then if I remove some codes on Visualization,
the error will disappear. By using GDB, I found the errors only come up at the end of main(), I mean, after delete
runManager,visManger... So I guess maybe the application try to free
some memory which had been freed or which don't belong to it. But where is the 
problem? So could anybody give some general ideas on how to deal with these kind things?
  Thank you very much!

1 None: Re: How to find out segmentation error in this case?   (Vladimir IVANTCHENKO - 18 Dec, 2006)
(_ None: Re: How to find out segmentation error in this case?   (long - 18 Dec, 2006)
(_ None: Re: How to find out segmentation error in this case?   (Vladimir IVANTCHENKO - 19 Dec, 2006)
Question the problem for define the C12+ particle  Keywords: C12+ particle
by Ling Long <Ling Long>,   06 Dec, 2006

How can I define the particle C12+ with the G4 function. My work is design a program to work out dose that C12+ particle through the human body. Thank you !!! waiting solution onling.

1 None: Re: the problem for define the C12+ particle   (michel maire - 07 Dec, 2006)
None the problem for define the C12+ particle  Keywords: C12+ particle
by Ling Long <Ling Long>,   06 Dec, 2006

How can I define the particle C12+ with the G4 function. My work is design a program to work out dose that C12+ particle through the human body. Thank you !!! waiting solution onling.

Question low energy ions range in gases  Keywords: ions low energy range
by Alfredo Tomás <atomas@unizar.es>,   23 Nov, 2006

Hello, people

I'm launching ions in a gas target by the UI command:

/ion 18 40 0

I understand that means neutral Ar atom and

/ion 18 40 1

would means Ar+. Am I OK?

The ions has been added the proces hLowEnergyIonization and the range of energies I'm interested in is about 100 keV.

I observe the ions to show great changes in their direction even after the first hit (always produced by hLowEnergyIonization, and cut ~1um) and that is unexpected to me. Beacause it's a very diferent result of which we had when working with SRIM code.

Thanks in advance.

1 None: Re: low energy ions range in gases   (Vladimir IVANTCHENKO - 23 Nov, 2006)
Question total number of Cherenkov photons which are produced by a primary particle  Keywords: number of Cherenkov Photons
by adnan <adnank@uludag.edu.tr>,   14 Nov, 2006

Hi, all of the geant4 experts and users.

&#304; have achieved to get total number of Cherenkov photons which are produced by a primary particle in all of the detector layers using a stackingAction class as stated in G4Tips. However, i also want to see the number of Cherenkov photons belongs to each layers. As i know from Geant4 Tips we could'nt obtain information about secondary particles (i.e. Cherenkov photons) using sensitive detectors, unlike primaries (that 's to say using hits classes) is that true? For this reason, if i am not wrong, i must use useroptional classes (i.e. eventaction,steppingaction,trackingaction etc.).In such a case, how can i prepare these classes?

Could you give me some idea or advices to solve this problem?

Thanks a lot everybody.

yours sincerely,

Adnan.

1 Feedback: Re: total number of Cherenkov photons which are produced by a primary particle   (Peter Gumplinger - 14 Nov, 2006)
(_ Idea: total number of Cherenkov photons which are produced by a primary particle   (adnan - 15 Nov, 2006)
(_ More: Re: total number of Cherenkov photons which are produced by a primary particle   (Peter Gumplinger - 15 Nov, 2006)
Note Geant4 GPS manual web is not working  Keywords: cannot open GPS manual web page
by Petr Mikes <mikes@fzu.cz>,   01 Nov, 2006

I cannot open: reat.space.qinetiq.com/gps/

is it somewhere blocked?

Thanks

Petr

1 Note: Re: Geant4 GPS manual web is not working   (Petr Mikes - 03 Nov, 2006)
None Secondary Particles  by Gregor Simmer <Gregor Simmer>,   26 Oct, 2006

Hi Folks

I have a question concerning the scoring of secondary particles. When using the PrimitiveScorer-Classes one has too define in which volume the scorer has to score. Beside other Scorers I'm using the "G4PSNofSecondary". Lets assume that I have two G4Orbs in each other (mother and daughter)and I'm scoring the secondaries (protons for instance) which are generated in the daughter volume. Going on with our thinking it is also possible that in the mother volume secondary protons are generated which could be transported into the daughter volume. Depending on the DetectorConstruction those could be only a few but also quite many.

My question is: Does the scorer in the daughter volume count the secondary protons which were generated in the mother volume but then transported into the daughter?

Cheers

Gregor

None Energy of Primaries  Keywords: receiving primaryParticle-Energy
by Gregor Simmer <gregor.simmer@gsf.de>,   25 Oct, 2006

Hi folks

Maybe that's one of the simpler questions but I cannot find out how to receive the energy of my primary particles. I'm doing Simulation of Bonner-Spheres hit by Neutrons. I'm using the G4ParticleGun and I change the energy from the primary Neutrons in batch-mode with the "/gun/energy"-command in my JobFile. Obviously there is a "SetParticleEnergy"-Method in the G4ParticleGun-Class but I cannot find an appropriate "Get"-Method. I wrote such a "Get"-Method on my own, but I only receive always the same energy which is the first energy defined in my Programm (PrimaryGeneratorAction-File). So how can I receive the updated energy of my PrimaryParticles right after changing it through UI-Commands?

Thx for helping

Gregor

1 None: Re: Energy of Primaries   (Vladimir IVANTCHENKO - 25 Oct, 2006)
1 None: Re: Energy of Primaries   (Gregor Simmer - 25 Oct, 2006)
2 None: Re: Energy of Primaries   (michel maire - 25 Oct, 2006)
Question Geant4 useful for chemical reactions?  Keywords: chemical reactions
by <machado@soton.ac.uk>,   20 Oct, 2006

Hi

Does anybody know whether or not Geant4 has been used or is useful for any kind of chemical reaction problems?

Thanks

Question what is the meanning of parameters in the SetParticleMomentumDirection()  Keywords: beam direction
by Hyunduk.Kim <kimhd@kaist.ac.kr>,   11 Oct, 2006

Hi all!

In my source file, I want to generate the cone beam into the z axis.

My questions are

1) In order to make cone beam, Which class do I use in the myPrimaryGeneratorAction.cc?

2) As I mentioned in the title, If the SetParticleMomentumDirection() function was usually used in order to generate the beam into the special direction, what is the meannig of the parameter in the function? Is the parameter directed cosine?

3) If there is another method to generate the cone beam, Could you show me that how to modify my input file?

4) I do not understand the funcion,GeneretePrimaryVertex(),, Could you give me more information about the meanning of this function?

regards H.D.Kim

3 Idea: Re: what is the meanning of parameters in the SetParticleMomentumDirection()   (Jeong Han Lee - 24 Oct, 2006)
None create more than 2 billion particles  Keywords: create particules
by Frédéric Guillaume <Frédéric Guillaume>,   09 Oct, 2006

Hi!

I want to launch several billion particules during a run .... But above 2 billion particules, the simulation does not start at all (come back to the "idle>" command) Is there a threshold or am i doing somehting wrong ???

regards Frederic.

None problem generating several billion particles...  by Frédéric Guillaume <Frédéric Guillaume>,   28 Sep, 2006

Hi!

I need to run geant4 for several billions particles.... But when i try a number of particles greater than 2 billion, the run seems to start but immediately returns to geant4 batch "idle>" waiting for a command ... up to 2,000,000,000 it is working well...

Is there a threshold, a limit ???

Regards. Frederic

1 None: Re: problem generating several billion particles...   (foo@bar.pl - 10 Oct, 2006)
(_ None: Re: problem generating several billion particles...   (Frédéric Guillaume - 11 Oct, 2006)
Question gamma emission from inelastic scattering of fast neutrons on C nucleus  Keywords: gamma emission, inelastic scattering of fast neutrons
by Corinne Groiselle <Corinne Groiselle>,   20 Sep, 2006

Hello,

I'd like to simulate the gamma emission resulting from the inelastic scattering of fast neutrons (14.1 MeV) on

carbon nucleus (12C). To do so, I've added a G4HPorLEInelasticModel instance in the inelastic process manager

attached to the neutrons particles.

As a result, I get the distribution of the emitted gamma, which, in my mind, should be more or less exclusively

made of 4.3 MeV carbon ray.

The problem is that, in addition to this ray, I also get some other peaks, corresponding to other carbon

nuclear excitation states, but with an intensity much higher than predicted (wrt nuclear database and MCNP simulations).

I tried to change the neutron inelastic model (NeutronHPorLEInelastic, Precompound, Bertini), as well as using

the LHEP_PRECO and LHEP_PRECO_HP physics list. I also verified that the G4NDL and the PhotonEvaporation

data are readable and are well pointed out by environment variables.

The results are very different from a model to another, but although the 4.3 MeV peak is always present, there is

always other peaks or continuous spectrum superimposed to this 4.3 MeV peak.

For exemple, if I use LHEP_PRECO_HP or my own physic list, where only NeutronHPorLEInelastic process is set (plus transportation),

I obtain the 4.3 MeV peak, but also 4 others peaks (namely, the 8.268, 9.637, 12.703 and 15.100 MeV peaks)

with intensities largely higher than expected.

So, my question is : does anybody already encountered this kind of problems or have a tip to help me with it ?

A possible reason would be that I don't plot only the gamma emitted from neutron inelastic interaction.

To get this spectrum, I've wrote a G4UserTrackingAction, where I record the kinetic energy of track if and only if

the track particle is a photon (PDG=22), the volume is the carbon target, the parent is track 1 (corresponding to

the 14.1 MeV neutron), and the process is "NeutronInelastic". Do you think I'm doing something wrong in this step ?

Thank in advance for any of your suggestions...

Question decayBiasProfile  Keywords: decayBiasProfile sourceTimeProfile
by <sohani@kvi.nl>,   09 Sep, 2006
Hi,

I have tried to find any more details about decayBiasProfile in grdm
than it's official manual text, but I failed.
It is highly appreciated if any body addresses me to some more information
about it, also about the sourceTimeProfile.

Best regards,

Moslem
1 None: Re: decayBiasProfile   (Fan Lei - 22 Sep, 2006)
Question decay products kinematics  Keywords: decay products kinematics
by <sohani@kvi.nl>,   09 Sep, 2006

Hi,

I want to have access to decay products kinematics for each decay event. Is there any standard way (Get command or other) to get this information aftere every and each event?

Thanks a lot for your kind attention.

Best regards,

Moslem

1 None: Re: decay products kinematics   (Fan Lei - 22 Sep, 2006)
None How to calculate exposure times of CDG source which obey cosine-law?  by Wes Tung <dongyw@ihep.ac.cn>,   16 Aug, 2006

I have the differential spectra of COSMIC diffuse gamma-ray now .

f(e)=112*E^{-2.3}.

GPS Command Example 7:

    /gps/particle gamma
    /gps/pos/type Surface
    /gps/pos/shape Cylinder
    /gps/pos/centre 2. 2. 2. cm
    /gps/pos/radius 2.5 cm
    /gps/pos/halfz 5. cm
    /gps/ang/type cos
    /gps/ene/type Cdg
    /gps/ene/min 20. keV
    /gps/ene/max 1. MeV
    /gps/ene/calculate

shows one example to generate CDG source. Then How can I calculate out the

effective exposure times giving the number of events?

Question How to use GPS (General Particle Source)  Keywords: GPS user defined energy spectrum
by Jorge Cabello <Jorge Cabello>,   11 Aug, 2006

Hi guys,

I am shooting some beta electrons (beta emitter) to a slab of silicon to know the behaviour of a CCD and CMOS sensor. I've been using monoenergetic electrons so far but now I want to simulate a point source of C14. To do that I have to use GPS to generate a user defined energy spectrum (any alternative suggestion?). The problem is that I'm quite confused with the command "/gps/histpoint". I now that the first parameter is the energy (in MeV) and the second is the weight but I don't know how to use this parameter. I am trying to understand this with experiments but the more I do the more I am confused. I've been looking for in internet about this but everything I find are experiments, that don't fit with my situation, and the documentation that is quite poor in this aspect.

Can anybody help me? Thanks a lot, Jorge

1 Feedback: Re: How to use GPS (General Particle Source)   (Giovanni Santin - 15 Aug, 2006)
(_ None: Re: How to use GPS (General Particle Source)   (Jorge - 04 Sep, 2006)
(_ None: Re: How to use GPS (General Particle Source)   (Jorge - 14 Sep, 2006)
(_ Feedback: Re: How to use GPS (General Particle Source)   (Peter Gumplinger - 14 Sep, 2006)
None Linking errors with ported application  Keywords: geant4 compilation problem
by Dan LaFuze <dlafuze@optivus.com>,   08 Aug, 2006

Sorry if this is the wrong forum. I've just ported a working geant4 simulation from some of our postdocs that worked on windows to virtually the latest version. (4.8.0-1 if I'm reading release notes properly)

I'm using SUSE 10 with gcc 4.0.2 20050901

I'm using GNU Make 3.80

I've successfully compiled and installed CLHEP and geant4 and have been successfully compiling/modifying/running examples with no problem.

After porting our existing application, I made it all the way to the linker phase before I started seeing this:

`.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPVector.o): defined in discarded section `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' of ../../lib//libG4had_neu_hp.a(G4NeutronHPVector.o) `.gnu.linkonce.t._ZN29G4NeutronHPEnergyDistribution4InitERSt14basic_ifstreamIcSt11char_traitsIcEE' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPFissionBaseFS.o): defined in discarded section `.gnu.linkonce.t._ZN29G4NeutronHPEnergyDistribution4InitERSt14basic_ifstreamIcSt11char_traitsIcEE' of ../../lib//libG4had_neu_hp.a(G4NeutronHPFissionBaseFS.o) `.gnu.linkonce.t._ZN29G4NeutronHPEnergyDistribution4InitERSt14basic_ifstreamIcSt11char_traitsIcEE' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPInelasticBaseFS.o): defined in discarded section `.gnu.linkonce.t._ZN29G4NeutronHPEnergyDistribution4InitERSt14basic_ifstreamIcSt11char_traitsIcEE' of ../../lib//libG4had_neu_hp.a(G4NeutronHPInelasticBaseFS.o) `.gnu.linkonce.t._ZN29G4NeutronHPEnergyDistribution4InitERSt14basic_ifstreamIcSt11char_traitsIcEE' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPInelasticCompFS.o): defined in discarded section `.gnu.linkonce.t._ZN29G4NeutronHPEnergyDistribution4InitERSt14basic_ifstreamIcSt11char_traitsIcEE' of ../../lib//libG4had_neu_hp.a(G4NeutronHPInelasticCompFS.o) `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPLabAngularEnergy.o): defined in discarded section `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' of ../../lib//libG4had_neu_hp.a(G4NeutronHPLabAngularEnergy.o) `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPLegendreStore.o): defined in discarded section `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' of ../../lib//libG4had_neu_hp.a(G4NeutronHPLegendreStore.o) `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPPartial.o): defined in discarded section `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' of ../../lib//libG4had_neu_hp.a(G4NeutronHPPartial.o) `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPDiscreteTwoBody.o): defined in discarded section `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' of ../../lib//libG4had_neu_hp.a(G4NeutronHPDiscreteTwoBody.o) `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' referenced in section `.rodata' of ../../lib//libG4had_neu_hp.a(G4NeutronHPContAngularPar.o): defined in discarded section `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' of ../../lib//libG4had_neu_hp.a(G4NeutronHPContAngularPar.o)

collect2: ld returned 1 exit status

I have no idea what to do since all of that stuff appears to be built at install time.

Normally, I'd delete the offending libraries and rebuild them.

If anyone has seen this sort of thing, I'd appreciate any help you can offer.

Dan L.

Question GPS, Histogram and Energy Units  Keywords: epn gps hist Ehi
by Rick Foster <rickf@space.mit.edu>,   03 Aug, 2006
When I use the gps histogram function as follows

/gps/hist/type epn
.
.
/gps/hist/point Ehi weight
/gps/hist/point Ehi weight
/gps/hist/point Ehi weight
.
.
.

How do I let gps know what energy units (keV,Mev,Gev,...)
I am using for Ehi?

Thanks
Rick

PS: I seem to think it defaults to MeV, but can't seem to find
that documented anywhere


1 None: Re: GPS, Histogram and Energy Units   (Wes Tung - 03 Aug, 2006)
None GPS arbitrary point-wise spectrum question  by Wes Tung <dongyw@ihep.ac.cn>,   02 Aug, 2006

/gps/ene/type Arb

/gps/hist/type arb

/gps/hist/point 1.0 2.

/gps/hist/point 2.0 5.

/gps/hist/point 7.0 1.

/gps/hist/point 10. 1.

/gps/hist/inter Log

can define arbitrary point-wise energy function with logarithmic interpolation. But how can I define a exponential/spline interpolation between (2.0,5) and (7.0,1)? In another word, how to define different interpolations for different intervals?

None How to add poisson fluctuation to the incident particle model?  by Wes Tung <dongyw@ihep.ac.cn>,   01 Aug, 2006

I use GPS method to generate particles. A background spectrum is used. I want the background spectrum to be polluted by poisson noise. What should I do?

/gps/particle gamma

/gps/position 0 0 4 cm

/gps/direction 0 0 -1

/gps/ene/type Arb

/gps/hist/type arb

/gps/hist/point 0.05 800

/gps/hist/point 0.5 1

/gps/hist/point 3.0 800

/gps/hist/inter Exp

Question Generating a Beam with a given Energy Probability Distribution  Keywords: Generating a Beam with a given Energy Probability Distribution
by <maryam@jlab.org>,   31 Jul, 2006
Dear geant4 experts,
I need to generate a beam which has a given energy distribution. This beam is representing a beta radiation from a Sr90 source which does not have a constant energy. Could anyone please help me with how to set this up in my PrimaryGeneratorAction.cc or direct me towards a good example? I looked at example novice N03 but it wasn't that useful to my purpose.
Thanks a lot in advance,
Best regards,
Maryam
1 None: Re: Generating a Beam with a given Energy Probability Distribution   (Maria Grazia Pia - 01 Aug, 2006)
(_ None: Re: Generating a Beam with a given Energy Probability Distribution   (Giovanni Santin - 01 Aug, 2006)
(_ Question: Re: Generating a Beam with a given Energy Probability Distribution   (maryam@jlab.org - 01 Aug, 2006)
(_ None: Re: Generating a Beam with a given Energy Probability Distribution   (Giovanni Santin - 02 Aug, 2006)
(_ Question: Re: Generating a Beam with a given Energy Probability Distribution   (maryam@jlab.org - 02 Aug, 2006)
(_ None: Re: Generating a Beam with a given Energy Probability Distribution   (Vladimir IVANTCHENKO - 02 Aug, 2006)
(_ Sad: Re: Generating a Beam with a given Energy Probability Distribution   (maryam@jlab.org - 02 Aug, 2006)
(_ Ok: Re: Generating a Beam with a given Energy Probability Distribution   (maryam@jlab.org - 04 Aug, 2006)
None How to speed up tracking for individual optical photons?  by Jianglai Liu <Jianglai Liu>,   21 Jul, 2006
Dear Geanters,

I am working on a MC for a detector with large volume of liquid 
scintillator and PMTs. Apparently, tracking individual optical 
photons is very time consuming. I wonder if there is a simple 
modification to G4Scintillation.cc, to only track say 1/N
of the photons, while keeping the mean photoelectrons
and the energy resolution of the detector unchanged. 

I thought about one dirty fix in G4Scintillation.cc. One can do 
something like:

MeanTrack = MeanNumberOfPhotons/N;
G4double sigma = ResolutionScale * sqrt(MeanTrack)/sqrt(N);
NumTrack = G4int(G4RandGauss::shoot(MeanTrack,sigma)+0.5);

Then go on with the tracking ...

Then in the "digitization" routine, for each track that makes a 
photoelectron, I assign a random weight Poisson(N), and count the 
weight as the true number of PE. 

I am not sure this is an air-tight approach. Would you please share 
your smarter ideas, if any? Thanks a lot in advance!

Regards,
Jianglai
Question Aborted, problems about G4GeneralParticleSource?  Keywords: G4GeneralParticleSource running Abort
by Shahrokh <Shahrokh>,   11 Jul, 2006
Hi,
I am trying to generate primary particles that their positions, angular and 
energy distributions are set with G4SPSPosDistribution, G4SPSAngDistribution and
G4SPSEneDistribution classes. My program is compiled correctly.
My program is run for low events (nearly 10 events), correctly :-)
The exact problem is that when this is running for numerous events (100000 events),
it is aborted!!!!!!! :-(
Here is my code, PrimaryGeneratorAction.cc:

#include "PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4GeneralParticleSource.hh"
#include "G4SPSAngDistribution.hh"
#include "G4SPSEneDistribution.hh"
#include "G4SPSPosDistribution.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
PrimaryGeneratorAction::PrimaryGeneratorAction()
{
   particleGun = new G4GeneralParticleSource();
   //the type of particle
   G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
   particle = particleTable->FindParticle("gamma");
   particleGun->SetParticleDefinition(particle);

   posDist = particleGun->GetCurrentSource()->GetPosDist();
   posDist->SetPosDisType("Plane");
   posDist->SetPosDisShape("Annulus");
   posDist->SetCentreCoords(G4ThreeVector(0.*cm,  0.*cm,  503.85*mm));

   angDist = particleGun->GetCurrentSource()->GetAngDist() ;
   angDist->SetAngDistType("iso");

   eneDist = particleGun->GetCurrentSource()->GetEneDist() ;
   eneDist->SetEnergyDisType("User");
}

PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
delete particleGun;
}

void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
   //
   //beam 0
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(1);
   //
   //the position and shape of source
   posDist->SetRadius0(0.*cm);
   posDist->SetRadius(0.5*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(0*deg);
   angDist->SetMaxTheta(1.16368*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.2*MeV, 1., 0.));
   //
   //beam 1
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(2.94286);
   //
   //the position and shape of source
   posDist->SetRadius0(0.5*cm);
   posDist->SetRadius(1*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(1.16368*deg);
   angDist->SetMaxTheta(2.3264*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 13., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 22., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 18., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.6*MeV, 1., 0.));
   //
   //beam 2
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(4.85714);
   //
   //the position and shape of source
   posDist->SetRadius0(1*cm);
   posDist->SetRadius(1.5*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(2.3264*deg);
   angDist->SetMaxTheta(3.4872*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 13., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 16., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 25., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 23., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 16., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 27., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 18., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 22., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 19., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 18., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 13., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.6*MeV, 1., 0.));
   //
   //beam 3
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(6.64286);
   //
   //the position and shape of source
   posDist->SetRadius0(1.5*cm);
   posDist->SetRadius(2*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(3.4872*deg);
   angDist->SetMaxTheta(4.64515*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 23., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 28., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 36., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 41., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 32., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 35., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 39., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 21., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.8*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10*MeV, 2., 0.));
   //
   //beam 4
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(9.01429);
   //
   //the position and shape of source
   posDist->SetRadius0(2*cm);
   posDist->SetRadius(2.5*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(4.64515*deg);
   angDist->SetMaxTheta(5.79931*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 54., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 51., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 42., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 53., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 46., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 28., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 34., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 30., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 35., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 17., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 17., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 22., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 19., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.6*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.6*MeV, 2., 0.));
   //
   //beam 5
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(10.4571);
   //
   //the position and shape of source
   posDist->SetRadius0(2.5*cm);
   posDist->SetRadius(3*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(5.79931*deg);
   angDist->SetMaxTheta(6.94876*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 18., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 60., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 56., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 61., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 54., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 36., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 42., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 36., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 30., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 32., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 19., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 21., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 23., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 25., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 22., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 16., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 19., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(11*MeV, 1., 0.));
   //
   //beam 6
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(11.9857);
   //
   //the position and shape of source
   posDist->SetRadius0(3*cm);
   posDist->SetRadius(3.5*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(6.94876*deg);
   angDist->SetMaxTheta(8.09262*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 17., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 63., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 74., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 61., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 64., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 63., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 55., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 56., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 34., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 35., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 31., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 29., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 27., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 13., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 16., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 20., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 16., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 13., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.6*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.4*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.4*MeV, 1., 0.));
   //
   //beam 7
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(14.1143);
   //
   //the position and shape of source
   posDist->SetRadius0(3.5*cm);
   posDist->SetRadius(4*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(8.09262*deg);
   angDist->SetMaxTheta(9.23003*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 25., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 94., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 79., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 80., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 75., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 70., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 59., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 43., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 39., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 39., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 43., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 31., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 32., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 22., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 18., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 22., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 20., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 16., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 13., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.6*MeV, 6., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(11*MeV, 2., 0.));
   //
   //beam 8
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(16.1571);
   //
   //the position and shape of source
   posDist->SetRadius0(4*cm);
   posDist->SetRadius(4.5*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(9.23003*deg);
   angDist->SetMaxTheta(10.3601*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 28., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 103., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 110., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 102., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 84., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 78., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 68., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 58., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 48., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 42., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 34., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 35., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 35., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 27., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 26., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 21., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 27., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 17., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 13., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 17., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 11., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.4*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.4*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.4*MeV, 1., 0.));
   //
   //beam 9
   //the intensity of source
   particleGun->SetCurrentSourceIntensity(18.4286);
   //
   //the position and shape of source
   posDist->SetRadius0(4.5*cm);
   posDist->SetRadius(5*cm);
   //
   //the dircetion of particles
   angDist->SetMinTheta(10.3601*deg);
   angDist->SetMaxTheta(11.4822*deg);
   //
   //the energy of particles
   eneDist->UserEnergyHisto(G4ThreeVector(0.2*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.4*MeV, 41., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.6*MeV, 149., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(0.8*MeV, 122., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1*MeV, 95., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.2*MeV, 100., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.4*MeV, 93., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.6*MeV, 82., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(1.8*MeV, 54., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2*MeV, 58., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.2*MeV, 44., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.4*MeV, 41., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.6*MeV, 46., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(2.8*MeV, 37., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3*MeV, 43., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.2*MeV, 25., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.4*MeV, 27., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.6*MeV, 27., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(3.8*MeV, 26., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4*MeV, 20., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.2*MeV, 23., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.4*MeV, 15., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.6*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(4.8*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5*MeV, 16., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.2*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.4*MeV, 12., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.6*MeV, 8., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(5.8*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6*MeV, 9., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.2*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.4*MeV, 14., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.6*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(6.8*MeV, 10., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.2*MeV, 3., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.4*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.6*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(7.8*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.2*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.4*MeV, 7., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.6*MeV, 5., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(8.8*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9*MeV, 2., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.2*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.4*MeV, 4., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(9.6*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10*MeV, 1., 0.));
   eneDist->UserEnergyHisto(G4ThreeVector(10.2*MeV, 1., 0.));


   particleGun->GeneratePrimaryVertex(anEvent);
}



Below is output:
Idle>/run/beamOn 100000
…
### Run 0 start
Start Run Processing
Aborted

I do not know what my problem is.
Please help me,
Many thanks for any suggestion.
Shahrokh

None primary energy (following thread 37)  Keywords: kinetic energy
by Alan <Alan>,   06 Jul, 2006
Hi, in Question 37 Dr. Asai mentioned the definition of monentum: 

 (Ek+M)^2 = P^2 + M^2 where Ek is kinetic energy.
 Thus for kinetic energy of 1 GeV of proton (mass = 0.938 GeV), 
 momentum is 1.696 GeV. 

I just want to make sure that when I use user command like this: 

/gun/particle ion 
/gun/ion 26 56 26 
/gun/energy 1 GeV 

The 1 GeV is the kninetic energy, right? 
And is there any manual or introduction for the UI commands? 
Thanks. 
1 None: Re: primary energy (following thread 37)   (Makoto Asai - 07 Jul, 2006)
Question primary and secondary protons?  by Dan Fry <Dan Fry>,   20 Jun, 2006

Sorry for a double post but perhaps this is a better place for my question?

I don't know if this is a problem but I suspect I may not be calling something in the right way. I see a strange dip in the mean proton energy as a function of depth in water when I turn the hadronics on. In other words it starts out at the entrance of the water phantom with close to the initial energy (200MeV) but does not decay monotonically to close to zero within the Bragg peak. Instead there is a dip to low energy near the phantom entrance (shallow depth) and increases again before decaying. I have thoroughly checked my binning method, not to mention that the mean proton energy decays monotonically if the hadronics is off. My suspicion is that I am somehow getting a mix between primary and secondary protons which would only happen when the hadronics is turned on. The lower energy secondaries which are more pronounced in number at shallow water depths would skew the energy distribution resulting in a lower mean energy.

The part of the code with UserSteppingAction is below. I am looking at whether the proton is primary or secondary by looking at fParentID. Is this correct? Also, do I need to have anything set a certain way in the TrackingAction or is it sufficient to use [const G4Track* currentTrack = aStep->GetTrack();]

Thanks for any help,

Dan

----Code snippet below----

if(particle_name == "proton")
{		 
 // Look to see if the proton is a secondary or primary.
 // Primary has a track ID, fTrackID = 1, fParentID = 0.

        G4int fParentID = currentTrack->GetParentID();
        if(fParentID == 1)  // This is secondary proton
	{
             ptrVoxelData[pindex].spCount += 1;
	     ptrVoxelData[pindex].spEnergy += Ekin_PreStep/MeV;
	     ptrVoxelData[pindex].spDose += EdepStep/MeV;
             if(pindex != ptr_EvtAction->last_Voxel)
	     {
		ptrVoxelData[pindex].pfluxCount += 1;
		ptr_EvtAction->last_Voxel = pindex;
	     }
	 }
	 else if(fParentID == 0)  // This is primary proton
	 {
	     ptrVoxelData[pindex].pCount += 1;
	     ptrVoxelData[pindex].pEnergy += Ekin_PreStep/MeV;
	     ptrVoxelData[pindex].pDose += EdepStep/MeV;

	     //Output range here, based upon an energy threshold of 100keV

	     if(((Ekin_PostStep/keV) <= 10.) && (ptr_EvtAction->flag != false))
	     {
		int xint = (int)((position_post.x()/mm)/0.1);
		int yint = (int)((position_post.y()/mm)/0.1);
		int zint = (int)((position_post.z()/mm)/0.1);

		prangex[xint] += 1;
		prangey[yint] += 1;
	        prangez[zint] += 1;
		ptr_EvtAction->flag = false;

		if(pindex != ptr_EvtAction->last_Voxel)
		{
		   ptrVoxelData[pindex].spfluxCount += 1;
		   ptr_EvtAction->last_Voxel = pindex;
		}
	     }
         }
}

1 None: Re: primary and secondary protons?   (Vladimir IVANTCHENKO - 29 Jun, 2006)
(_ None: Re: primary and secondary protons?   (Dan Fry - 29 Jun, 2006)
Question Mapping a Distribution of the Number of Particles?  Keywords: Voxel, Radioactive decay, Activity
by Jonathan <Jonathan>,   15 Jun, 2006

Hello all. I am still quite a new user, and I have a project that I am currently involved in where I am voxelizing CT data, then taking an activity map from a nuclear medicine imaging device, and I need to calculate the dose distribution throughout the voxels. My question is is there a way to take this map (just an input file of values - number of counts) and develop a generator class to place a different number of particles in each voxel. Each on of these voxels will need to in turn be associated with a radionuclide (I was thinking about the RDM) and simluated. If anyone out there has any direction for me, I will be eternally grateful! Thanks in advance,

Jonathan

None general particle source module  by Manju Sudhakar <manjus@isac.gov.in>,   25 May, 2006

Hi,

I have a doubt regarding the gps command on polarization. /gps/polarization Px Py Pz where Px, Py and Pz are the 3 doubles that set the source polarization. What are these doubles ? Are they the 3 Stokes parameters, linear, circular and elliptical parameters ?? For example, if we want the photons to be linearly polaraized, the 3 arguments will have the format 1,0,0. Is my understanding correct?

Manju Sudhakar

1 Disagree: Re: general particle source module   (Peter Gumplinger - 25 May, 2006)
None How to get the number of optical photon in a scintillator?  by Jianglai Liu <Jianglai Liu>,   19 May, 2006
Dear Geanters,

I have a simple question. I have an electron beam which goes through
two scintillators. I would like to count the total number of optical 
photons in each scintillator. Currently, I follow the "classical approach" by 
by adding two counters in either G4UserStackingAction or 
G4UserTrackingAction, and incrementing individual counter by testing 
on volume name. It works, however, I am wondering if there is more natural way of
doing this under the framework of Hits/Sensitive Detectors. After all, 
for a scintillator, the number of photons should be simply kept just 
like dEdx. 

So far I came up with an ugly fix. I try to count the total number of 
unique new trackID in SD::ProcessHits() demanding that the particle name = 
"optical photons". If you happen to know a better approach, would you 
share it with me? Thanks much!

Jianglai
1 Feedback: Re: How to get the number of optical photon in a scintillator?   (Peter Gumplinger - 19 May, 2006)
None intensity of radioactive source  by Manju Sudhakar <manjus@isac.gov.in>,   19 May, 2006

Hi ,

I want to simulate natural radioactive decay of Cs137. I am using gps. In the example macro file, /gps/source/intensity 1 /gps/ion/55 137 etc, etc

Now what I want to know is this "intensity" ... the number should be normalized to some value, say 1 milli Curie, or something ... I want to simulate the radioactive source that I have in the laboratory, whose strength is 1 micro Curie. So, what "intensity" do I have to specify in the macro file ??

Thanks !!!

Manju Sudhakar.

None /gun/ion 26 56 0  Keywords: shooting Fe atom
by hepg <wujian@ustc.edu.cn>,   28 Apr, 2006

Hi experts,
    When I shoot Fe atom to the calorimeter, I found that the energy
deposite is also substantial, though less than bare Fe nucleus. But
it's almost the same as Fe +2 or Fe +3 ions. Anything wrong?

1 None: Re: /gun/ion 26 56 0   (Vladimir Ivantchenko - 29 Apr, 2006)
None Where did g4vion go?  by <totallyfake1@eml.cc>,   26 Apr, 2006

Downloaded 4.8.0.p01 today and noticed that g4vion doesn't exist any more.

Was this removed? I see no mention of this anywhere.

Question GetParticleCode: unsupported particle Error  Keywords: GetParticleCode: unsupported particle Error
by Rick Foster <rickf@space.mit.edu>,   21 Apr, 2006

I am running a simulation the uses the Wilson Abrasion Model, along with standard ionization processes.

The primary particle is 1 GeV/nuc Fe56.

It seems to run fine, but after some number of events, it crashes with the following error:

*********************************************************************************************************
* G4Track Information:   Particle = Ar41[0.0],   Track ID = 69,   Parent ID = 1
*********************************************************************************************************

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume     Process
    0   89.8 mum  2.56 mm  -4.58 cm   41.2 GeV     0 eV      0 fm      0 fm         TEP1    initStep

*** G4Exception : 007
      issued by : G4HadronCrossSections
GetParticleCode: unsupported particle
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution ***

Any ideas would be appreciated.

Thanks Rick

PS: I did look at thread 87, but they didn't post a conclusion.

1 Idea: Re: GetParticleCode: unsupported particle Error - Fixed (??)   (Rick Foster - 27 Apr, 2006)
None rotating the particle source  Keywords: rotate, particle source,
by <ahcruzs@gmail.com>,   04 Apr, 2006

dear mr/ms

i would like to rotate the source of particles around a phantom, after certain number of events, in order to get the final position and energy of the particles at the end of the phantom, for different source positions. how can i do that? thanks a lot.

None carbon interaction with the matter  Keywords: carbon 12 , interaction
by habib <habibovich@hotmail.com>,   03 Apr, 2006

hi everybody, my simulation consists of sending neutrons at different energies to

interact with a scintillator in order to find the efficiency of that one.

the problem is when i visualize my simulation i always see that the interaction

between neutrons and the scintillaor giving birth to protons and carbon 12

and that s normal because the scintillator is C10 H13,but the protons

generated by the reaction of neutrons and hydrogen interact with the

matter in the scintillator and are stopped(there is energy deposit).

if the neutron interact with a carbon, the carbon never interact with

the matter and is always emitted from the scintillator(wihtout any energy

deposit).

what should i add to my physic list or anywhere to make possible the

interaction of the carbon in the matter and to ensure the energy deposit ??

i tried to add the process of the GenericIon considering that the C 12

is an ion but it still didn t work.

1 None: Re: carbon interaction with the matter   (Vladimir IVANTCHENKO - 23 Apr, 2006)
None Untitled  Keywords: carbon 12 , interaction
by habib <habibovich@hotmail.com>,   03 Apr, 2006

hi everybody, my simulation consists of sending neutrons at different energies to

interact with a scintillator in order to find the efficiency of that one.

the problem is when i visualize my simulation i always see that the interaction

between neutrons and the scintillaor giving birth to protons and carbon 12

and that s normal because the scintillator is C10 H13,but the protons

generated by the reaction of neutrons and hydrogen interact with the

matter in the scintillator and are stopped(there is energy deposit).

if the neutron interact with a carbon, the carbon never interact with

the matter and is always emitted from the scintillator(wihtout any energy

deposit).

what should i add to my physic list or anywhere to make possible the

interaction of the carbon in the matter and to ensure the energy deposit ??

i tried to add the process of the GenericIon considering that the C 12

is an ion but it still didn t work.

None How to know the particle information in outer programm?  Keywords: outer programm particle information
by <zhangqm@ihep.ac.cn>,   20 Mar, 2006

  I want to know the particle information(e.g.whether charged or not,mass)
through the particle index code in my C++ programm.(not geant4)
  How should I do it?
  Thanks!

None Add decay process to a volume  Keywords: decay
by Jonathan <Jonathan>,   17 Mar, 2006

Hi all. I hope this meesage is posted in the right forum. I am a novice Geant4 user, so this could be a simple question. I need to simulate particles from a radioactive source (Ir-192), but I need these to be associated with a volume. Does Geant4 have a way to associate a decay process with an entire volume, ie in this case a wire. I have looked at the two decay examples, and I can't find a method. Thanks in advance!

- Jon

None ambe source  Keywords: AmBe neutrons
by sharmila <shami71@yahoo.com>,   17 Mar, 2006

Hi Is there a way to use gps to simulate an AmBe source which throws both the neutron distribution and the attendant gammas? sharmila

None how to add multiple particle guns  Keywords: Particle gun
by rajani <rajani>,   17 Mar, 2006

Hi I am a novice to GEANT,and have this problem. I want to have three types of particles together,If i add three particle guns,the functions , through which the input files open creates an error of multiple declaration.Shall i add three new functions Can anybody help me with what is to be done for having protons & gammas ,all with different probabilities at different energies. Thanking you

1 None: Re: how to add multiple particle guns   (Makoto Asai - 17 Mar, 2006)
(_ None: Re: how to add multiple particle guns   (seth - 28 Jun, 2007)
Question How to generate jets of e+e- collision @ TeV scale in Geant4?  Keywords: jet generate
by <zhangqm@ihep.ac.cn>,   27 Feb, 2006

How to generate jets of e+e- collision @ TeV scale in Geant4? In addition, How to know the energy of the secondary charged particles or all the information of the secondary particles?

Thanks!!!

1 None: Re: How to generate jets of e+e- collision @ TeV scale in Geant4?   (Norman Graf - 28 Feb, 2006)
Question Delta rays  by andreas battaglia <andreas.battaglia@roma1.infn.it>,   23 Feb, 2006
Hallo, 
I'm trying to simulate a Tile scintillator wrapped with Tyvek and with WLS fibers in it.
In particular I'd like to simulate the effect of a muon beam that hits the tile in a set of given points.
I choose muons because I'd like to have a as much as possible localizated energy deposit.
So, in this intention the occurance of Delta rays can disturb me.
Could you please tell me how can I turn the delta rays off?
Thank you very much in advantage.
Andreas Battaglia
1 None: Re: Delta rays   (Vladimir Ivantchenko - 23 Feb, 2006)
None Problem with Generic ion in Geant4 8.0 + patch-01  by Maria Martinez <mariam@unizar.es>,   23 Feb, 2006

I've got a wrong behaviour of the generic ion particle since the instalation of the patch-01 to the 8.0 geant4 version.

I've tried the underground_physics advanced example. During the initialization, the following message appears:

G4ProcessManager::GetAttribute(): particle[GenericIon]
  index out of range
  #processes[5]  index [-1]
G4ProcessManager::GetAttribute(): particle[GenericIon]
  index out of range
  #processes[5]  index [-1]

Then the generic ions I have tried don't work fine. The problem did not appear with version 8.0 without the patch

Thanks in advance

1 None: Re: Problem with Generic ion in Geant4 8.0 + patch-01   (Vladimir Ivantchenko - 23 Feb, 2006)
1 None: Re: Problem with Generic ion in Geant4 8.0 + patch-01   (Maria Martinez - 23 Feb, 2006)
(_ None: Re: Problem with Generic ion in Geant4 8.0 + patch-01   (Dan LaFuze - 08 Aug, 2006)
2 Feedback: Re: Problem with Generic ion in Geant4 8.0 + patch-01   (Kazuyoshi Furutaka - 19 Apr, 2006)
1 Feedback: Re: Problem with Generic ion in Geant4 8.0 + patch-01   (Maria Martinez - 20 Apr, 2006)
(_ Feedback: Re: Problem with Generic ion in Geant4 8.0 + patch-01   (Kazuyoshi Furutaka - 20 Apr, 2006)
(_ None: Re: Problem with Generic ion in Geant4 8.0 + patch-01   (mariam@unizar.es - 21 Apr, 2006)
None Problem with a heavy ion source  by jazmin <jaztango@aol.com>,   17 Feb, 2006

Dear GEANT4 memebers:

I am trying to calculate energy loss of some ions in water. I am testing my code with carbon, but have tried it with several other ions and I get an error message as soon as it tries to track the ion.

The following is my particle definition:

  particleGun1 = new G4ParticleGun(n_particle);
  G4ParticleDefinition* Ac225 = particleTable->GetIon(6, 12, 0.0);
  particleGun1->SetParticleDefinition(Ac225); 
  particleGun1->SetParticleEnergy(100*keV);

I get the error message below regardless of wether I include a physics list for the ion or not!!!

Any ideas?

Thanks Jazmin

---> Begin of event: 0

*********************************************************************************************************
* G4Track Information:   Particle = C12[0.0],   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0  0.00356  0.00306   0.0847       0.1        0        0         0       Cells initStep

 *** Break *** segmentation violation
 Generating stack trace...
 0x00002aaab33b4b46 in G4SteppingManager::DefinePhysicalStepLength() + 0x96 from /geant/geant4.7.1/lib/Linux-g++/libG4tracking.so
 0x00002aaab33b7637 in G4SteppingManager::Stepping() + 0xd7 from /geant/geant4.7.1/lib/Linux-g++/libG4tracking.so
 0x00002aaab33c0778 in G4TrackingManager::ProcessOneTrack(G4Track*) + 0x168 from /geant/geant4.7.1/lib/Linux-g++/libG4tracking.so
 0x00002aaab30ffb3f in G4EventManager::DoProcessing(G4Event*) + 0x32f from /geant/geant4.7.1/lib/Linux-g++/libG4event.so
 0x00002aaab1e07e80 in G4RunManager::DoEventLoop(int, char const*, int) + 0x230 from /geant/geant4.7.1/lib/Linux-g++/libG4run.so
 0x00002aaab1e05e4a in G4RunManager::BeamOn(int, char const*, int) + 0x6a from /geant/geant4.7.1/lib/Linux-g++/libG4run.so
 0x00002aaab1e0a359 in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) + 0x259 from /geant/geant4.7.1/lib/Linux-g++/libG4run.so
 0x00002aaab4ec7a20 in G4UIcommand::DoIt(G4String) + 0x860 from /geant/geant4.7.1/lib/Linux-g++/libG4intercoms.so
 0x00002aaab4ed33f6 in G4UImanager::ApplyCommand(char const*) + 0x426 from /geant/geant4.7.1/lib/Linux-g++/libG4intercoms.so
 0x00002aaaae537e3f in G4UIterminal::ExecuteCommand(G4String) + 0x5f from /geant/geant4.7.1/lib/Linux-g++/libG4UIbasic.so
 0x00002aaaae5393b6 in G4UIterminal::SessionStart() + 0x56 from /geant/geant4.7.1/lib/Linux-g++/libG4UIbasic.so
 0x000000000041904d in main + 0x527 from ./exampleN01
 0x00000036bd91c4cc in __libc_start_main + 0xdc from /lib64/libc.so.6
 0x0000000000418799 in G4VUserPhysicsList::RetrievePhysicsTable(G4ParticleDefinition*, G4String const&, bool) + 0xa9 from ./exampleN01
Abort

Question Problems with refractive of optical photons generating from NaI scintillation  by jwdu <junweidu@mail.ustc.edu.cn>,   12 Feb, 2006

Hello

I'm a new user of Geant4. I'm using geant4 version 4.5.2 p02, compiled with g++ under Linux Redhat 9.0.

I define a NaI scintillation,with a glass light-guide under it.I use this NaI scintillation to see the response of a gama in it.I want the optical photons has a refractive at the surface but not at the boundary of NaI and glass light-guide.Then how to define the surfaces ? I think it is define in the file of ExN06DetectorConstruction.cc,and follow is my ExN06DetectorConstruction.cc.

Regards, jwDu

//ExN06DetectorConstruction.cc

#include "ExN06DetectorConstruction.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4PVPlacement.hh"
#include "G4OpBoundaryProcess.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExN06DetectorConstruction::ExN06DetectorConstruction()
{
  //air
  expHall_x = expHall_y =20*cm;
  expHall_z = 10*cm;
  //NaI
  NaI_x = 55*mm;
  NaI_y = 55*mm;
  NaI_z	= 11*mm;
  //glass guide light SiO2
  glass_x=55*mm;
  glass_y=55*mm;
  glass_z=5*mm;
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExN06DetectorConstruction::~ExN06DetectorConstruction(){;}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

G4VPhysicalVolume* ExN06DetectorConstruction::Construct() {

// ------------- Materials -------------

  G4double a, z, density;
  G4int nelements,ncomponents;

// Air
// 
  G4Element* elN = new G4Element("Nitrogen", "N", z=7. , a=14.01*g/mole);
  G4Element* elO = new G4Element("Oxygen"  , "O", z=8. , a=16.00*g/mole);

  G4Material* Air = new G4Material("Air", density=1.29*mg/cm3, nelements=2);
  Air->AddElement(elN, 70*perCent);
  Air->AddElement(elO, 30*perCent);

 //NaI(Tl)
    //NaI
    a = 22.99*g/mole;
    G4Element *elNa = new G4Element("Sodium","Na",z=11.,a);
    a = 126.9*g/mole;
    G4Element *elI = new G4Element("Iodine","I",z=53.,a);
    density = 3.67*g/cm3;
    G4Material* NaI_Tl = new G4Material("NaI_Tl",density,nelements=2);
    NaI_Tl->AddElement(elNa,1);
    NaI_Tl->AddElement(elI,1);
    //Tl  0.4%
    a = 204.383*g/mole;
    G4Element *elTl = new G4Element("Thallium","Tl",z=81.,a);
    density=3.67*g/cm3;
    G4Material* NaI = new G4Material("NaI",density,ncomponents=2);
    NaI->AddMaterial(NaI_Tl,99.6*perCent);
    NaI->AddElement(elTl,0.4*perCent);

 //SiO2
 // 
    a = 28.09*g/mole;
    G4Element *elSi=new G4Element("silicon","Si",z=14.,a);
    density=2.200*g/cm3;
    G4Material *SiO2=new G4Material("quartz",density,ncomponents=2);
    SiO2->AddElement(elSi,1);
    SiO2->AddElement(elO,2);

  // Print all the materials defined.
  //
    G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
    G4cout << *(G4Material::GetMaterialTable()) << G4endl;

//
// ------------ Generate & Add Material Properties Table ------------
//
  const G4int nEntries = 32;

  G4double PhotonEnergy[nEntries] =
            { 2.034*eV, 2.068*eV, 2.103*eV, 2.139*eV,
              2.177*eV, 2.216*eV, 2.256*eV, 2.298*eV,
              2.341*eV, 2.386*eV, 2.433*eV, 2.481*eV,
              2.532*eV, 2.585*eV, 2.640*eV, 2.697*eV,
              2.757*eV, 2.820*eV, 2.885*eV, 2.954*eV,
              3.026*eV, 3.102*eV, 3.181*eV, 3.265*eV,
              3.353*eV, 3.446*eV, 3.545*eV, 3.649*eV,
              3.760*eV, 3.877*eV, 4.002*eV, 4.136*eV };
//
// Water
//
   G4double RefractiveIndex1[nEntries]=
            {1.8390,   1.8395,   1.8400,   1.8405,
             1.8410,   1.8415,   1.8420,   1.8425,
             1.8430,   1.8435,   1.8440,   1.8447,
             1.8455,   1.8460,   1.8465,   1.8473,
             1.8477,   1.8485,   1.8490,   1.8495,
             1.8500,   1.8505,   1.8510,   1.8515,
             1.8523,   1.8527,   1.8535,   1.8540,
             1.8545,   1.8550,   1.8555,   1.8563 };		

  G4double Absorption1[nEntries] =
           {3.448*m,  4.082*m,  6.329*m,  9.174*m, 12.346*m, 13.889*m,
           15.152*m, 17.241*m, 18.868*m, 20.000*m, 26.316*m, 35.714*m,
           45.455*m, 47.619*m, 52.632*m, 52.632*m, 55.556*m, 52.632*m,
           52.632*m, 47.619*m, 45.455*m, 41.667*m, 37.037*m, 33.333*m,
           30.000*m, 28.500*m, 27.000*m, 24.500*m, 22.000*m, 19.500*m,
           17.500*m, 14.500*m };

  G4double ScintilFast[nEntries] =
            { 0.000134, 0.004432, 0.053991, 0.241971, 0.398942, 
		0.000134, 0.004432,0.053991, 0.241971, 0.398942,
		0.000134, 0.004432, 0.053991, 0.241971, 0.398942,
		0.000134, 0.004432, 0.053991, 0.241971, 0.398942,
		0.000134, 0.004432, 0.053991, 0.241971, 0.398942,
		0.000134, 0.004432, 0.053991, 0.241971, 0.398942,
		0.000134, 0.004432 };
  G4double ScintilSlow[nEntries] =
            { 0.000010, 0.000020, 0.000030, 0.004000, 0.008000, 0.005000, 0.020000,0.001000,
		0.000010, 0.000020, 0.000030, 0.004000, 0.008000, 0.005000, 0.020000, 0.001000,
		0.000010, 0.000020, 0.000030, 0.004000, 0.008000, 0.005000, 0.020000,0.001000,
		0.000010, 0.000020, 0.000030, 0.004000, 0.008000, 0.005000, 0.020000,0.001000,};

  G4MaterialPropertiesTable* myMPT1 = new G4MaterialPropertiesTable();
  myMPT1->AddProperty("RINDEX",       PhotonEnergy, RefractiveIndex1,nEntries);
  myMPT1->AddProperty("ABSLENGTH",    PhotonEnergy, Absorption1,     nEntries);
  myMPT1->AddProperty("FASTCOMPONENT",PhotonEnergy, ScintilFast,     nEntries);
  myMPT1->AddProperty("SLOWCOMPONENT",PhotonEnergy, ScintilSlow,     nEntries);

  myMPT1->AddConstProperty("SCINTILLATIONYIELD",3800./MeV);
  myMPT1->AddConstProperty("RESOLUTIONSCALE",1.0);
  myMPT1->AddConstProperty("FASTTIMECONSTANT", 1.*ns);
  myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns);
  myMPT1->AddConstProperty("YIELDRATIO",0.8);

  NaI->SetMaterialPropertiesTable(myMPT1);

//
// Air
//
  G4double RefractiveIndex2[nEntries] =
            { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00 };

  G4MaterialPropertiesTable* myMPT2 = new G4MaterialPropertiesTable();
  myMPT2->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex2, nEntries);

  Air->SetMaterialPropertiesTable(myMPT2);

//
//Glass light guide SiO2
//
  G4double RefractiveIndex3[nEntries]=
           {1.4577,    1.4581,    1.4584,    1.4588,    1.4591,
            1.4595,    1.4600,    1.4604,    1.4609,    1.4613,
            1.4619,    1.4624,    1.4630,    1.4636,    1.4642,
            1.4649,    1.4657,    1.4665,    1.4673,    1.4682,
            1.4692,    1.4702,    1.4713,    1.4725,    1.4738,
            1.4751,    1.4766,    1.4782,    1.4800,    1.4819,
            1.4840,    1.4862 };

  G4MaterialPropertiesTable* myMPT3 = new G4MaterialPropertiesTable();
  myMPT3->AddProperty("RINDEX",       PhotonEnergy, RefractiveIndex3,nEntries);

  SiO2->SetMaterialPropertiesTable(myMPT3);

// // ------------- Volumes --------------

// The experimental Hall
//
  G4Box* expHall_box = new G4Box("World",expHall_x,expHall_y,expHall_z);

  G4LogicalVolume* expHall_log
    = new G4LogicalVolume(expHall_box,Air,"World",0,0,0);

  G4VPhysicalVolume* expHall_phys
    = new G4PVPlacement(0,G4ThreeVector(),expHall_log,"World",0,false,0);

//~~~~~~~~~~~~~~~~NaI Scintillation Definition~~~~~~~~~~~~~~~~~~~~~~~~//
  G4Box* NaI_box = new G4Box("NaI",NaI_x,NaI_y,NaI_z);

  G4LogicalVolume* NaI_log
    = new G4LogicalVolume(NaI_box,NaI,"NaI",0,0,0);

  G4VPhysicalVolume* NaI_phys
    = new G4PVPlacement(0,G4ThreeVector(),NaI_log,"NaI",
                        expHall_log,false,0);

//~~~~~~~~~~~~glass light guide SiO2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

  G4Box* SiO2_box =new G4Box("SiO2",glass_x,glass_y,glass_z);

  G4LogicalVolume* SiO2_log
    =new G4LogicalVolume(SiO2_box,SiO2,"SiO2",0,0,0);

  G4VPhysicalVolume* SiO2_phys
    =new G4PVPlacement(0,G4ThreeVector(0,0,-16*mm),SiO2_log,"SiO2",
		       expHall_log,false,0); 

//	------------- Surfaces --------------
//
//NaI
//
   G4OpticalSurface* OpSurfaceNaI = new G4OpticalSurface("SurfaceNaI");
   OpSurfaceNaI->SetType(dielectric_metal);
   OpSurfaceNaI->SetFinish(polished);
   OpSurfaceNaI->SetModel(glisur);
//   G4double polish = 0.8;

   G4LogicalBorderSurface* SurfaceNaI =
				new G4LogicalBorderSurface("SurfaceNaI",
				NaI_phys,expHall_phys,OpSurfaceNaI);
  if(SurfaceNaI->GetVolume1() == NaI_phys) G4cout << "Equal" << G4endl;
  if(SurfaceNaI->GetVolume2() == expHall_phys) G4cout << "Equal" << G4endl;

//SiO2
//
  G4OpticalSurface* OpSurfaceSiO2 = new G4OpticalSurface("SurfaceSiO2");
  OpSurfaceSiO2->SetType(dielectric_dielectric);
  OpSurfaceSiO2->SetFinish(polished);
  OpSurfaceSiO2->SetModel(unified);

  G4LogicalSkinSurface* SurfaceSiO2 =
                                new G4LogicalSkinSurface("SurfaceSiO2",
                                SiO2_log,OpSurfaceSiO2);
  if(SurfaceSiO2->GetLogicalVolume() == SiO2_log ) G4cout << "Equal" << G4endl;
     SurfaceSiO2->GetSurface(SiO2_log) -> GetOpticalSurface() -> DumpInfo();

  //----------------Dielectric metal surface properties defined via the G4OpticalSurface
   //NaI
   //  
   const  G4int num = 2;
    G4double Ephoton[num] = {2.034*eV, 4.140*eV};
   G4double Reflective[num] = {0.,0.};
   G4double Efficiency[num] = {0.,0.};

   G4MaterialPropertiesTable* myST1 = new G4MaterialPropertiesTable();
   myST1->AddProperty("REFLECTIVITY",   Ephoton, Reflective,        num);
   myST1->AddProperty("EFFICIENCY",     Ephoton, Efficiency,        num);

   OpSurfaceNaI->SetMaterialPropertiesTable(myST1);

  //SiO2

    G4double Reflectivity[num] = {0., 0.};
    G4double Efficiency3[num]   = {0.,0.};

  G4MaterialPropertiesTable *myST3 = new G4MaterialPropertiesTable();
  myST3->AddProperty("REFLECTIVITY", Ephoton, Reflectivity, num);
  myST3->AddProperty("EFFICIENCY",   Ephoton, Efficiency3,   num);

  OpSurfaceSiO2->SetMaterialPropertiesTable(myST3);

//always return the physical World
  return expHall_phys;
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 

1 Feedback: Re: Problems with refractive of optical photons generating from NaI scintillation   (Peter Gumplinger - 13 Feb, 2006)
Question How can I count number of primary and secondary particles that pass through a volume?  Keywords: count particles Sensitive detector
by Shahrokh <Shahrokh>,   05 Feb, 2006
I have a question.
  
I want to get number of primary particles (from point source) and also 
secondary particles that are produced by the interaction of primary particles 
with environment and pass through a volume that is defined sensitive detector;
for example: # primary photons and # secondary photons with each energy and anywhere on sensitive detector, separately.
How can I do?

Thanks for any help. 
Regards,
Shahrokh
Question Energy distribution of alphas through a finite layer from an infinitely thick source  Keywords: alpha particles, finite layer, infinitely thick source, energy distribution
by Jennifer Foster <jfoster@clemson.edu>,   27 Jan, 2006

I need to model the distribution of the energy deposited from alpha particles through a finite thickness (ZnS scintillation layer). The source of the alpha particles is an infinitely thick liquid. I don't know much about Geant4 and I was wondering if anyone could confirm that this task could be completed using this program. Any help would be greatly appreciated. I'm a student!

Question How to take the direction of particle motion?  Keywords: direction motion
by Shahrokh <Shahrokh>,   08 Jan, 2006
Hi,

How can I take and store the direction of particles motion traversing a plane 
perpendicular to the central axis of beam?

please help me,
thanks a lot.
Shahrokh
1 None: Re: How to take the direction of particle motion?   (Makoto Asai - 08 Jan, 2006)
(_ Question: Re: How to take the direction of particle motion?   (Shahrokh - 29 Jan, 2006)
Question How to identify type nuclei and isotopes  Keywords: genericion, nuclei
by Gabriel Sawakuchi <Gabriel Sawakuchi>,   21 Dec, 2005
Hi,

I would like to get energy deposited by different nuclei and 
its isotepes. So I am doing the following in my SteppingAction:

 G4Track* fTrack = aStep->GetTrack();
 G4String particleType = fTrack->GetDefinition()->GetParticleType();
               .
               .
               .
 if(particleName == "C10[0.0]"||
    particleName == "C11[0.0]"||
    particleName == "C12[0.0]"||
    particleName == "C13[0.0]"||
    particleName == "C14[0.0]"||
    particleName == "C15[0.0]" ||
    particleName == "C16[0.0]")
   {
     runAction->FillCEdep(edep);
     runAction->FillHistoC(0, x/mm , edep);
     runAction->FillHistoCFluence(0, x/mm , slw);
   }

 if(particleName == "N12[0.0]"||    
    particleName == "N13[0.0]"||
    particleName == "N14[0.0]"||
    particleName == "N15[0.0]"||
    particleName == "N16[0.0]"||
    particleName == "N17[0.0]")
   {    
     runAction->FillNEdep(edep);
     runAction->FillHistoN(0, x/mm , edep);
     runAction->FillHistoNFluence(0, x/mm , slw);
   }
               .
               .
               .
Considering the nomenclature for genericion Z[X].
Questions:
1) What is the meaning of X ?
2) I noticed that sometimes I get particles with X != 0.0. 
How can I track this particles ?
3) Trying to get around this problem I used the atomic number instead 
of particle name to identify the particles. However when do this I get 
0 of energy deposited for all particles. I am doing the following:

 G4int Z = fTrack->GetDefinition()->GetAtomicNumber();

 if(Z == 12)
   {
     runAction->FillCEdep(edep);
     runAction->FillHistoC(0, x/mm , edep);
     runAction->FillHistoCFluence(0, x/mm , slw);
   }

 if(Z == 13)
   {    
     runAction->FillNEdep(edep);
     runAction->FillHistoN(0, x/mm , edep);
     runAction->FillHistoNFluence(0, x/mm , slw);
   }
               .
               .
               .

Am I missing something ?

Best regards,

Gabriel
1 None: Re: How to identify type nuclei and isotopes   (vnivanch@mail.cern.ch - 02 Jan, 2006)
(_ None: GetAtomicNumber() returns 0 for Z > 2   (Gabriel Sawakuchi - 02 Jan, 2006)
(_ None: Re: GetAtomicNumber() returns 0 for Z > 2   (Makoto Asai - 02 Jan, 2006)
Sad How to store the fluence distribution and the energy spectra?  Keywords: save, energy fluence ,particle fluence ,momentum distribution
by Shahrokh <Shahrokh>,   18 Dec, 2005

Hi,

What can I store and save the information of energy fluence, particle fluence and the momentum distribution of particles on a plane? (for example, the particle is electron produced by interaction of photon source with material.)

please help me.

Thanks a lot.

Shahrokh

Question How to set different cut value for different physical(or logical) volume?  Keywords: cut value different physical logical volume
by <zhangqm@ihep.ac.cn>,   16 Dec, 2005

How to set different cut value for different physical(or logical) volume?

  I want to improve the efficiency of the program, so I want to set different cut value for different physical(or logical) volume.

eg. for e+ of 1.0Mev, if it is in absorber, because the absorber is thick enough and it can't transport through,I can terminate the track.Howerver, if it is in sensitive detector, because I am concerned about it,I cann't terminate the track.

Now I have a method. It is that I can terminate an unuseful track by judging the energy and the volume in every step. Apparently, the method is not good, because the judging time maybe more or the improvement efficiency is not good.

  I wonder whether I can set different cut value for different physical(or logical) volume and how to achieve.

  Thanks!

1 None: Re: How to set different cut value for different physical(or logical) volume?   (vnivanch@mail.cern.ch - 16 Dec, 2005)
(_ None: Re: How to set different cut value for different physical(or logical) volume?   (Makoto Asai - 16 Dec, 2005)
Question How to do a Simple Radioactive Decay, Am-241  Keywords: Radioactive Decay, Am-241
by Phillip Taddei <taddei@usna.edu>,   15 Dec, 2005

I have modified example ExN03 to create a very simple scenerio with a detector that is made of silicon. It is in the World volume along with a box made of Americium-241.

I have been trying to make the Am-241 emit particles through radioactive decay. The radioactive decay code from example "exrdm," exrdmPhysListGeneral.cc, has been added to ExN03PhysicsList.cc, along with the necessary include file references.

It compiles fine. It still runs fine with the command "/run/beamOn X."

How do I turn on the radioactivity? Is there some kind of timer that can be turned on to simulate, for example, 600 seconds?

Thank you for your help.

Phil Taddei

1 None: Re: How to do a Simple Radioactive Decay, Am-241   (Karen - 16 Dec, 2005)
(_ More: Re(2): How to do a Simple Radioactive Decay, Am-241   (Phillip Taddei - 16 Dec, 2005)
Sad How to evaluate the fluence distribution and the energy spectra?  Keywords: fluence energy distributions
by Shahrokh <Shahrokh>,   13 Dec, 2005

Hello:

I defined electron source. I have two questions.

1)What can I evaluate the fluence distribution of certain particle
  (for example: photon produced) on the plane? (the plane is located
   in distance from electron source.)

2)What can I evaluate the energy spectra of same particle produced 
  (for example: photon produced)on the plane?

please help me.

thanks.

Shahrokh.

1 None: Re: How to evaluate the fluence distribution and the energy spectra?   (michel maire - 13 Dec, 2005)
None singly charged ions  by Daniel <rodriguez@lpccaen.in2p3.fr>,   04 Dec, 2005

Dear Madam/Sir,

I have a question about ions in GEANT4. Is it possible to fire singly charged ions ? Thankyou very much

Best regards Daniel

1 None: Re: singly charged ions   (vnivanch@mail.cern.ch - 04 Dec, 2005)
Question Energy range question  by andreas battaglia <andreas.battaglia@roma1.infn.it>,   02 Dec, 2005
Hallo, 
I have a short question about how the code reads the energy range.

For example suppose you have to define a scintillation range, such as:

const G4int nEntriesScint = 12;
  G4double PhotonEnergyScint[nEntriesScint] =
    {  
      3.44*eV, 3.26*eV, 3.1*eV, 3.02*eV, 2.95*eV, 2.92*eV, 
      2.82*eV, 2.76*eV, 2.7*eV, 2.58*eV, 2.38*eV, 2.08*eV       
    };
  G4double ScintilFast[nEntriesScint] =
    {    
      0.04, 0.07, 0.20, 0.49, 0.84, 1.00, 
      0.83, 0.55, 0.40, 0.17, 0.03, 0.00 
    };


How does the code read the extreme points?: 

 - for Energy >= 3.44*eV ---> Scintillation probability = 0.04
   for Energy <= 2.08*eV ---> Scintillation probability = 0.00

 - for Energy = 3.44*eV ---> Scintillation probability = 0.04
   for Energy = 2.08*eV ---> Scintillation probability = 0.00
   for Energy > 3.44*eV && for Energy < 2.08*eV ---> Scintillation probability not defined

In the latter case how does the code work? The scintillation is not activated at all or what?
And are the extreme points interpreted in the same way by all the physical modules or not?: 
for example the scintillation and the cerenkov processes consider the end points in the same way?

Thanks a lot

Andreas Battaglia
1 Feedback: Re: Energy range question   (Peter Gumplinger - 02 Dec, 2005)
Question Problems in the number of Cerenkov optical photons.  by Andreas Battaglia <andreas.battaglia@roma1.infn.it>,   30 Nov, 2005
Hallo,
I’ve a problem in the number of  optical photons produced by Cerenkov process.
I’m trying to simulate a polystyrene scintillator wrapped with tyvek and with
WLS double cladding fibers in it. In my Detector Construction I had to define
some spectra: the materials’ refractive indexes, their absorption length, the
scintillator scintillation probability and the WLS absorption length and
emission probability.
Now, if the various spectra have different energy ranges, I get many warnings of
the type:
Warning: G4MaterialPropertyVector::GetProperty ==> attempt to Retrieve Property above range 
Warning: G4MaterialPropertyVector::GetProperty ==> attempt to Retrieve Property below range 


So I had to match the energy ranges each other and the warnings disappear.
In doing that I’ve taken care of adjusting the properties in a correct way: for
example I asked the scintillation probability out of the original energy range
to be 0.
Now my problem is: if I enlarge the energy range in which a material refractive
index is defined, the number of optical photons produced by Cerenkov process
increases.
So: an operation I only do to avoid the warnings leads me to a different
physical situation!!
Note that I kept the material refractive indexes constant in the energy range.

Thanks a lot in advantage.
Andreas Battaglia
1 Feedback: Re: Problems in the number of Cerenkov optical photons.   (Peter Gumplinger - 30 Nov, 2005)
Question Classification of neutrinos?  Keywords: neutrino identify kill G4ParticleDefinition G4StackingAction
by Lewis Dartnell <l.dartnell@ucl.ac.uk>,   18 Nov, 2005

Perhaps a naďve question, but how do I uniquely identify all neutrinos so that I can kill them in G4UserStackingAction and hopefully speed up processing of extensive particle cascades? I can't do it using Particle Definitions, as below:

     G4ParticleDefinition* particleDef = aStep->GetTrack()->GetDefinition();
     particleDef->GetParticleType()
     particleDef->GetParticleSubType()

because both an electron and a nu_e (for example) are identified identically as lepton/e. I could set up a filter to select all chargeless leptons, but this doesn't seem particularly elegant. What's the best way of killing neutrinos in my model please...?

Lewis

None Angular correlation of Gamma-rays in Co-60  Keywords: angular correlation of 2 gamma - rays in radioactive source
by Dridi <Dridi>,   18 Nov, 2005
Dear Geant4 users,

I generated 2 gammas-rays of the Co-60 with 
GeneratorPrimaries, but the problem is, there 2 gammas rays have an
angular correlation.

And I don't know, how can I modelling the angular correlation?

Can you, please, help me ?

Thank you very much!!

Walid DRIDI
Question Decay Table Not Defined  Keywords: Decay table Co-57
by Burcin Donmez <Burcin Donmez>,   17 Nov, 2005

Hi,

I've just started to use geant4. I'm trying to simulate co-57 source incident to the detector.Reading the forum I've made following changes to my program.

In the ExN01PhysicsList.cc file -------------------------------

void ExN01PhysicsList::ConstructGeneral() {

 // Add Decay Process
 G4Decay* theDecayProcess = new G4Decay();
 theParticleIterator->reset();

   while((*theParticleIterator)()){
	G4ParticleDefinition* particle = theParticleIterator->value();
	G4ProcessManager* pmanager = particle->GetProcessManager();

	if (theDecayProcess->IsApplicable(*particle)){
       	pmanager ->AddProcess(theDecayProcess);
	// set ordering for PostStepDoIt and AtRestDoIt
	pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
	pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
	}
   }

   // Declare radioactive decay to the GenericIon in the IonTable.
   const G4IonTable *theIonTable = G4ParticleTable::GetParticleTable()->GetIonTable();
   G4RadioactiveDecay *theRadioactiveDecay = new G4RadioactiveDecay();

   for (G4int i=0; i<theIonTable->Entries(); i++){
	G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
	G4String particleType = theIonTable->GetParticle(i)->GetParticleType();

	if (particleName == "GenericIon"){
	G4ProcessManager* pmanager = theIonTable->GetParticle(i)->GetProcessManager();
	pmanager ->AddProcess(theRadioactiveDecay);
	pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
	pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);
	}
    }        
}

In the ExN01PrimaryGeneratorAction.cc file 
------------------------------------------
void ExN01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
  static ofstream outFile;

  G4int n_particle = 1;
  particleGun = new G4ParticleGun(n_particle);
  G4ParticleTable *pTable = G4ParticleTable::GetParticleTable();
  G4ParticleDefinition* particle;
  particle= pTable->GetIon(27,57,0.0);                           
  particle->DumpTable();
  particleGun->SetParticleDefinition(particle);
  particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));

  // Reset variables
  numberOfDetectorsHit = 0;

  // Use system time as seed
  G4double rand_x, rand_y;
  static time_t curr = time(0);
  static TRandomMersenne randomizer(curr);

  rand_x = randomizer.Random()*1.50 - .75; // Originally ... *0.225 - ...
  rand_y = randomizer.Random()*1.50 - .75; // Originally ... *0.225 - ...

  particleGun->SetParticlePosition(G4ThreeVector(rand_x*mm, rand_y*mm,-50*mm));
  particleGun->GeneratePrimaryVertex(anEvent);

}

But, when I run the simulation, I see "Decay table is not defined !!" line. Also when I look at the energy of the beam it is around 5MeV. I try to put 122 keV but it did not work.

How can i solve this problem?

Thanks,

Burcin

Question Beta-decay spectrum shape   Keywords: GEANT 4.7.0, beta-spectrum, GenaralParticleSource
by Ilya <ilya.kraev@fys.kuleuven.ac.be>,   10 Nov, 2005

Hello,

I'm making simulation of the 60Co beta-decay and I have the question concerning the way how the 60Co spectrum is generated in GEANT. I'm using G4GeneralParticleSource to simulate the decay. The shape I obtain is different from what I see in the experiment and also from the one I found on the Lund/LBNL website (http://nucleardata.nuclear.lu.se/nucleardata/toi/). The biggest difference is in the energy region below 70 keV. At this energy spectrum generated with GEANT has a maximum while spectrum from Lund/LBNL database goes up continiously to the lowest energy. The average energy of the beta-decay for the GEANT-generated spectrum is also about 10 keV higher than the one that can be found in databases.

The question is what causes such a difference and how precise is the spectrum below 100 keV?

I tried to find some formulas and theoretical description put into the basis of beta-spectrum generated in GEANT but there is not enough information available in all GEANT documentation. If somebody could provide some references on this topic that would be really great.

Thanks a lot, Ilya.

Question problems with optical photons  by andreas battaglia <andreas.battaglia@roma1.infn.it>,   03 Nov, 2005
Sorry, I've made a mistake with the previous message: it should be a question messagge!!!
Sorry again (I'm quite new in G4 forum ...)


Hi, I have some problems in simulating optical photon processes.

I'm trying to simulate a wrapped scintillator with double cladding WLS Fibers in it.
The boundaries world/wrapping and scintillator/fiber are described only giving the 
two refractive index of the corresponding materials (not with surfaces).
In my Physics List I have activated G4Scintillation and G4Cerenkov to create optical 
photons, and G4OpAbsorption, G4OpBoundary and G4OpWLS to describe them; note that I
have attached the WLS properties only to the fiber core material, not to the cladding 
materials.

The first problem is:
My gun shoots a 500MeV mu- wich produces about 500 scintillation optical
photons: 10% of these optical photons reach a fiber, but they don't cross
the fiber itself!!
To be more precise: if I take a look at the last step of an optical
photon, I see that the track volume is the scintillator, the track next
volume is the fiber and the step is limited by transportation.
So it seems to me that an optical photon is transported through the
scintillator, but when it reaches the fiber it isn't absorbed or
refracted or reflected but it only "dies" ?! 
The stepping output sounds like this:

*********************************************************************************************************
* G4Track Information:   Particle = opticalphoton,   Track ID = 167,   Parent ID = 1
*********************************************************************************************************

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume  Next Volume     Process
    0     75 cm     25 cm  -1.52 mm   2.98 eV      0 eV      0 fm      0 fm    ScintCore ScintCore    initStep
    1   74.8 cm   25.2 cm    1.4 mm   2.98 eV      0 eV   3.74 mm   3.74 mm    ScintCore WLSFiberClad2  Transportation


I have the same problem when an optical photon reaches the boundary between the world and the wrapping;
here is an example:

*********************************************************************************************************
* G4Track Information:   Particle = opticalphoton,   Track ID = 178,   Parent ID = 1
*********************************************************************************************************

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume  Next Volume     Process
    0     75 cm     25 cm  -1.61 mm   2.71 eV      0 eV      0 fm      0 fm    ScintCore ScintCore    initStep
 Photon at Boundary! 
 Old Momentum Direction: (-0.180298,0.0815424,0.980226)
 Old Polarization:       (0.918038,0.371726,0.137937)
 New Momentum Direction: (-0.187323,0.0847193,0.978638)
 New Polarization:       (0.917035,0.372168,0.143313)
 *** FresnelRefraction *** 
    1   74.9 cm     25 cm    2.4 mm   2.71 eV      0 eV   4.09 mm   4.09 mm    ScintCore ScintSlice  Transportation
    2   74.9 cm     25 cm    2.5 mm   2.71 eV      0 eV    102 mum  4.19 mm   ScintSlice     World  Transportation


The second problem is:
I have defined three optical photon energy spectra: one for the 
scintillation emission, one for the WLS Absorption and one for the WLS 
emission.
I get a lot of warnings like:

Warning: G4MaterialPropertyVector::GetProperty
==> attempt to Retrieve Property above range

or like:

Warning: G4MaterialPropertyVector::GetProperty
==> attempt to Retrieve Property below range

First I had the following energy spectra:

// Scintillator
  const G4int nEntriesScint = 12;
  G4double PhotonEnergyScint[nEntriesScint] =
    {      
      3.44*eV, 3.26*eV, 3.1*eV, 3.02*eV, 2.95*eV, 2.92*eV, 
      2.82*eV, 2.76*eV, 2.7*eV, 2.58*eV, 2.38*eV, 2.08*eV
    };  
  
// WLS Fiber Core Absorption
  const G4int nEntriesFiber1 = 42;
  G4double PhotonEnergyFiber1[nEntriesFiber1] =
    { 
      3.539*eV, 3.477*eV, 3.340*eV, 3.321*eV, 3.291*eV, 3.214*eV, 
      3.162*eV, 3.129*eV, 3.091*eV, 3.086*eV, 3.049*eV, 3.008*eV, 
      2.982*eV, 2.958*eV, 2.928*eV, 2.905*eV, 2.895*eV, 2.890*eV, 
      2.858*eV, 2.813*eV, 2.774*eV, 2.765*eV, 2.752*eV, 2.748*eV, 
      2.739*eV, 2.735*eV, 2.731*eV, 2.723*eV, 2.719*eV, 2.698*eV,
      2.674*eV, 2.626*eV, 2.610*eV, 2.583*eV, 2.556*eV, 2.530*eV, 
      2.505*eV, 2.480*eV, 2.455*eV, 2.431*eV, 2.407*eV, 2.384*eV 
    };          

// WLS Fiber Core Emission
  const G4int nEntriesFiber2= 24;
  G4double PhotonEnergyFiber2[nEntriesFiber2] =
    { 
      2.69*eV, 2.67*eV, 2.66*eV, 2.64*eV, 2.63*eV, 2.61*eV, 2.58*eV, 2.56*eV, 
      2.55*eV, 2.53*eV, 2.50*eV, 2.48*eV, 2.46*eV, 2.45*eV, 2.44*eV, 2.43*eV, 
      2.41*eV, 2.37*eV, 2.33*eV, 2.25*eV, 2.24*eV, 2.19*eV, 2.15*eV, 2.08*eV
    };     
 
Then I tried the following things:
- I matched all the ranges of the spectra: from 2.08 to 3.539 eV --> about the
same number of above range, less number of below range;
- I enlarged the ranges: from 1.51 to 3.91 eV --> less above and below range;
- I enlarged again: from 1 to 5 eV --> both above and below range number increases
really a lot (much more than the initial situation)!!!
- I returned to the initial situation, but I inactivated the WLS process --> about 
the same results of the initial try!                  

I have no idea how to solve this problems (the first seems very similar to the one posted 
by Vincent Clochard in date 8/6/2004); I studied the N06 example and I took a look at 
the Lxe extended example, but didn't get the solution.
Could you please help me?                                                                                       
Thanks a lot in advantage.
Andreas Battaglia
None problems with optical photons  by andreas battaglia <andreas.battaglia@roma1.infn.it>,   03 Nov, 2005
Hi, I have some problems in simulating optical photon processes.

I'm trying to simulate a wrapped scintillator with double cladding WLS Fibers in it.
The boundaries world/wrapping and scintillator/fiber are described only giving the 
two refractive index of the corresponding materials (not with surfaces).
In my Physics List I have activated G4Scintillation and G4Cerenkov to create optical 
photons, and G4OpAbsorption, G4OpBoundary and G4OpWLS to describe them; note that I
have attached the WLS properties only to the fiber core material, not to the cladding 
materials.

The first problem is:
My gun shoots a 500MeV mu- wich produces about 500 scintillation optical
photons: 10% of these optical photons reach a fiber, but they don't cross
the fiber itself!!
To be more precise: if I take a look at the last step of an optical
photon, I see that the track volume is the scintillator, the track next
volume is the fiber and the step is limited by transportation.
So it seems to me that an optical photon is transported through the
scintillator, but when it reaches the fiber it isn't absorbed or
refracted or reflected but it only "dies" ?! 
The stepping output sounds like this:

*********************************************************************************************************
* G4Track Information:   Particle = opticalphoton,   Track ID = 167,   Parent ID = 1
*********************************************************************************************************

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume  Next Volume     Process
    0     75 cm     25 cm  -1.52 mm   2.98 eV      0 eV      0 fm      0 fm    ScintCore ScintCore    initStep
    1   74.8 cm   25.2 cm    1.4 mm   2.98 eV      0 eV   3.74 mm   3.74 mm    ScintCore WLSFiberClad2  Transportation


I have the same problem when an optical photon reaches the boundary between the world and the wrapping;
here is an example:

*********************************************************************************************************
* G4Track Information:   Particle = opticalphoton,   Track ID = 178,   Parent ID = 1
*********************************************************************************************************

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume  Next Volume     Process
    0     75 cm     25 cm  -1.61 mm   2.71 eV      0 eV      0 fm      0 fm    ScintCore ScintCore    initStep
 Photon at Boundary! 
 Old Momentum Direction: (-0.180298,0.0815424,0.980226)
 Old Polarization:       (0.918038,0.371726,0.137937)
 New Momentum Direction: (-0.187323,0.0847193,0.978638)
 New Polarization:       (0.917035,0.372168,0.143313)
 *** FresnelRefraction *** 
    1   74.9 cm     25 cm    2.4 mm   2.71 eV      0 eV   4.09 mm   4.09 mm    ScintCore ScintSlice  Transportation
    2   74.9 cm     25 cm    2.5 mm   2.71 eV      0 eV    102 mum  4.19 mm   ScintSlice     World  Transportation


The second problem is:
I have defined three optical photon energy spectra: one for the 
scintillation emission, one for the WLS Absorption and one for the WLS 
emission.
I get a lot of warnings like:

Warning: G4MaterialPropertyVector::GetProperty
==> attempt to Retrieve Property above range

or like:

Warning: G4MaterialPropertyVector::GetProperty
==> attempt to Retrieve Property below range

First I had the following energy spectra:

// Scintillator
  const G4int nEntriesScint = 12;
  G4double PhotonEnergyScint[nEntriesScint] =
    {      
      3.44*eV, 3.26*eV, 3.1*eV, 3.02*eV, 2.95*eV, 2.92*eV, 
      2.82*eV, 2.76*eV, 2.7*eV, 2.58*eV, 2.38*eV, 2.08*eV
    };  
  
// WLS Fiber Core Absorption
  const G4int nEntriesFiber1 = 42;
  G4double PhotonEnergyFiber1[nEntriesFiber1] =
    { 
      3.539*eV, 3.477*eV, 3.340*eV, 3.321*eV, 3.291*eV, 3.214*eV, 
      3.162*eV, 3.129*eV, 3.091*eV, 3.086*eV, 3.049*eV, 3.008*eV, 
      2.982*eV, 2.958*eV, 2.928*eV, 2.905*eV, 2.895*eV, 2.890*eV, 
      2.858*eV, 2.813*eV, 2.774*eV, 2.765*eV, 2.752*eV, 2.748*eV, 
      2.739*eV, 2.735*eV, 2.731*eV, 2.723*eV, 2.719*eV, 2.698*eV,
      2.674*eV, 2.626*eV, 2.610*eV, 2.583*eV, 2.556*eV, 2.530*eV, 
      2.505*eV, 2.480*eV, 2.455*eV, 2.431*eV, 2.407*eV, 2.384*eV 
    };          

// WLS Fiber Core Emission
  const G4int nEntriesFiber2= 24;
  G4double PhotonEnergyFiber2[nEntriesFiber2] =
    { 
      2.69*eV, 2.67*eV, 2.66*eV, 2.64*eV, 2.63*eV, 2.61*eV, 2.58*eV, 2.56*eV, 
      2.55*eV, 2.53*eV, 2.50*eV, 2.48*eV, 2.46*eV, 2.45*eV, 2.44*eV, 2.43*eV, 
      2.41*eV, 2.37*eV, 2.33*eV, 2.25*eV, 2.24*eV, 2.19*eV, 2.15*eV, 2.08*eV
    };     
 
Then I tried the following things:
- I matched all the ranges of the spectra: from 2.08 to 3.539 eV --> about the
same number of above range, less number of below range;
- I enlarged the ranges: from 1.51 to 3.91 eV --> less above and below range;
- I enlarged again: from 1 to 5 eV --> both above and below range number increases
really a lot (much more than the initial situation)!!!
- I returned to the initial situation, but I inactivated the WLS process --> about 
the same results of the initial try!                  

I have no idea how to solve this problems (the first seems very similar to the one posted 
by Vincent Clochard in date 8/6/2004); I studied the N06 example and I took a look at 
the Lxe extended example, but didn't get the solution.
Could you please help me?                                                                                       
Thanks a lot in advantage.
Andreas Battaglia
                                                                                                                             
1 Feedback: Re: problems with optical photons   (Peter Gumplinger - 07 Nov, 2005)
Question Generating time distributions of particles  Keywords: Creating time-dependent particle distribtions
by Zach Hartwig <zsh42@g2pc1.bu.edu>,   29 Sep, 2005
Hi all,
   I was wondering if anyone knew of a way to generate time-dependent 
distributions for particle sources.  For example, I'd like to be able
to fire 10000 particles distributed over time described by a Gaussian 
centered around some ideal time value.  I was looking for an easier way 
than creating my own version of GPS but I hadn't found anything suitable
in GPS or elsewhere (GPS does have an option to set the particle time but
this is a constant parameter for all particles in a given run).  Your 
help is always appreciated!

~Zach
Sad Problems with emission energy of optical photons generating from scintillation  Keywords: energy optical photons scintillation
by Maria Lucia <lucia.magliozzi@iss.infn.it>,   09 Sep, 2005
Hello!

I'm simulating a gamma camera using 
optically-isolated NaI scintillator crystals.

I set the scintillating material properties as below:

  const G4int nEntries = 5;
  G4double PhotonEnergy[nEntries] =  { 2.58*eV, 2.76*eV, 2.99*eV, 3.26*eV, 3.54*eV};

  // NaITl	 
  G4double ScintilFast[nEntries]  =  {0.0100,  0.2400,   0.500,   0.2400,  0.0100};
  G4double ScintilSlow[nEntries]  =  {0.0 ,    0.0 ,     0.0,     0.0,     0.0};
	      
  G4double NaI_RIND[nEntries]     =  { 1.85,    1.85,    1.85,    1.85,    1.85};
  G4double NaI_ABSL[nEntries]     =  {35.*cm,   35.*cm,  35.*cm,  35.*cm,  35.*cm};

  G4MaterialPropertiesTable* NaI_MPT = new G4MaterialPropertiesTable();
  NaI_MPT->AddProperty("RINDEX",       PhotonEnergy, NaI_RIND,    nEntries);
  NaI_MPT->AddProperty("ABSLENGTH",    PhotonEnergy, NaI_ABSL,    nEntries);
  NaI_MPT->AddProperty("FASTCOMPONENT",PhotonEnergy, ScintilFast, nEntries);
  NaI_MPT->AddProperty("SLOWCOMPONENT",PhotonEnergy, ScintilSlow, nEntries);
 
  NaI_MPT->AddConstProperty("SCINTILLATIONYIELD", 38000./MeV);
  NaI_MPT->AddConstProperty("RESOLUTIONSCALE", 1.0);
  NaI_MPT->AddConstProperty("FASTTIMECONSTANT", 250.*ns);
  NaI_MPT->AddConstProperty("SLOWTIMECONSTANT", 620.*ns);
  NaI_MPT->AddConstProperty("YIELDRATIO", 1.);
  
  NaITl->SetMaterialPropertiesTable(NaI_MPT);

In this way the emission energy histogram of opticals 
looks like:

       _________
      |         |
      |         |
      |         |
      |         |
   ___|         |___
  |                 |
__|_________________|______
 2.6 2.8 3.0 3.2 3.4 3.6   eV

instead of something like this:

          ____
         |    |
      ___|    |___
     |            |
  ___|            |___
_|____________________|______
 2.6 2.8  3.0  3.3 3.6   eV


What's wrong?

If I try to increase the number of energy entries,
during run obtain the warning messages:

Warning: G4MaterialPropertyVector::GetProperty  ==> 
attempt to Retrieve Property above range

Warning: G4MaterialPropertyVector::GetProperty  ==> 
attempt to Retrieve Property below range

Can someone tell me what's happening?

Thank you

Maria Lucia Magliozzi
1 Idea: Re: Problems with emission energy of optical photons generating from scintillation   (Peter Gumplinger - 09 Sep, 2005)
Question GPS Command ignored  Keywords: General Particle Source
by Nirmal Painuly <npp56@uow.edu.au>,   02 Sep, 2005
Hi,
I am simulating a detector which require  multiple microplanar beams originating 
from same source. Simulation runs fine with one source without using GPS 
,however, when I try to run it using GPS it says </gps/hist/point  …………
command not found. ****** command ignored. I have replaced G4ParticleGun with 
G4GeneralParticleSource in "PrimaryGeneratorAction".
I am using spectrum in GPS which looks like this. 
/gps/particle  gamma
/gps/pos/type  Plane
/gps/pos/shape  Rectangle
/gps/pos/halfx   0.025 mm
/gps/pos/halfy   0.0125 mm
/gps/direction  0 0 1
# energy spectrum
/gps/ene/type User
/gps/ene/emspec  True
/gps/hist/type  energy
/gps/hist/point  1000  0
……………………..
/gps/hist/point  35000  4498
………………………
/gps/hist/point  40000  120890
……………………….
/gps/hist/point  600000  15
/tracking/verbose 1
/run/beamOn 1000

Thanks in anticipation.
Nirmal
None Radioactive Decay, excited Nuclide  by Karen Saucke <Karen Saucke>,   15 Aug, 2005

Hello,

I am using RadioactiveDecay for the simulation of different Nuclids.

A nuclide like 108Ag wich has two entries in the data-base:

# 108AG (2.37 m)
#  Excitation   Halflife Mode       Daughter Ex  Intensity           Q
P     0.00000  1.422E+02
                         BetaPlus       0.00000  2.828E-03
                         KshellEC       0.00000  2.219E-02
 ...etc. ...

# 108AG (418 y)
#  Excitation   Halflife Mode       Daughter Ex  Intensity           Q
P   109.44000  1.319E+10
                         IT           109.44000  8.700E-02
                         BetaPlus       0.00000  0.000E+00
                         KshellEC       0.00000  7.720E-01
                         LshellEC       0.00000  1.130E-01
                         MshellEC       0.00000  2.798E-02
                         KshellEC    1771.16200  7.720E+01   256.27800
                         LshellEC    1771.16200  1.130E+01   256.27800
                         MshellEC    1771.16200  2.798E+00   256.27800

how can I distinguish between these two?

In other libraries the excited 108Ag is called Ag108m.

Is the way to specify the excitation energy like \gun\ion 47 108 0 109.44 and that means, GEANT4 only uses the decay for Ag108m?

Thanks Karen

1 None: Re: Radioactive Decay, excited Nuclide   (Karen - 16 Aug, 2005)
None how to create or add polyenergetic beam?  Keywords: how to add polyenergetic beam?
by Ka <phm1kc@surrey.ac.uk>,   26 Jul, 2005

can anyone let me know how to input a polyenergetic beam ?

Question GetTotalEnergyDeposit() in the class G4Step is the total energy deposited by a particle until it stops?  Keywords: the class G4Step is the total energy deposited by a particle until it stops?
by Jose <alcaraz@ifae.es>,   21 Jul, 2005

Hi to all, I want to use the funtion of the G4Step.hh:

G4double GetTotalEnergyDeposit()

And the funtion says that it is the total energy deposited, I would like to know if it means the total energy per Step or it is the total energy deposited by the particle until to stop in the detector. Thanks Jose

Question GetTotalEnergyDeposit() in the class G4Step is the total energy deposited by a particle until it stops?  Keywords: the class G4Step is the total energy deposited by a particle until it stops?
by Jose <alcaraz@ifae.es>,   21 Jul, 2005

Hi to all, I want to use the funtion of the G4Step.hh:

G4double GetTotalEnergyDeposit()

And the funtion says that it is the total energy deposited, I would like to know if it means the total energy per Step or it is the total energy deposited by the particle until to stop in the detector. Thanks Jose

1 Feedback: Re: GetTotalEnergyDeposit() in the class G4Step is the total energy deposited by a particle until it stops?   (Peter Gumplinger - 21 Jul, 2005)
None production of GenericIon  by Sara Vecchio <sara.vecchio@pi.infn.it>,   15 Jul, 2005

By shooting protons on PMMA through a very complicated beam line (made of different materials), when I look the tracking verbosity I see a large variety of ions: C12, C13, O16, N15, O17, Be8, B11, Al27.. No C11, O15, C10 appear but this may be due by a wrong physics list, since I've seen them in previous simulations.

But I also see, quite often, the tracking of a "Generic Ion" (I've not yet checked whether they can also decay). If all the isotopes are identified by theirname and mass number.. what does the GenericIon stand for? Can this behaviour due to the physics list, too?

*********************************************************************************************************
* G4Track Information:   Particle = neutron,   Track ID = 1293,   Parent ID = 1288
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     -128     47.7    -6.95      1.42        0        0         0 patientPhys initStep
    1     -127     46.8    -5.57      1.42        0     1.82      1.82 patientPhys LElastic
    2     -126     44.9    -2.86      1.35        0     3.57      5.39 patientPhys LElastic
    3     -123     39.9     7.76      1.35        0     12.1      17.4 patientPhys LElastic
    4     -116     26.9     35.2      1.35        0     31.2      48.6 patientPhys LElastic
    5     -110     14.8     60.8         0        0     29.1      77.7 patientPhys LElastic

*********************************************************************************************************
* G4Track Information:   Particle = GenericIon,   Track ID = 1296,   Parent ID = 1293
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     -126     44.9    -2.86    0.0705        0        0         0 patientPhys initStep
    1     -126     44.9    -2.86    0.0355    0.035 0.000312  0.000312 patientPhys hLowEIoni
    2     -126     44.9    -2.86   0.00917   0.0263 0.000312  0.000625 patientPhys hLowEIoni
    3     -126     44.9    -2.86         0  0.00917 0.000312  0.000937 patientPhys hLowEIoni
    4     -126     44.9    -2.86         0        0        0  0.000937 patientPhys RadioactiveDecay

1 None: Re: production of GenericIon   (Vladimir IVANTCHENKO - 06 Aug, 2005)
(_ None: Re: production of GenericIon   (Sara Vecchio - 09 Sep, 2005)
(_ None: Re: production of GenericIon   (vnivanch@mail.cern.ch - 09 Sep, 2005)
None the light output response about the neutron detection  Keywords: neutron, light output
by <lixq2002@hep.pku.edu.cn>,   13 Jul, 2005
Hi, I want to simulate a neutron detection efficiency.
Can you tell, in Geant4, where I can find the parameter of 
the light output response.
So I can calculate the efficiency of the neutron detection for 
difference ions.

Very thanks!
1 Feedback: Re: the light output response about the neutron detection   (Peter Gumplinger - 13 Jul, 2005)
Question Decay of stable particles!?  Keywords: G4RadioactiveDecay
by Sara Vecchio <sara.vecchio@pi.infn.it>,   05 Jul, 2005

I would like to monitor the beta+ activity produced by shooting protons on a PMMA phantom (carbon, oxygen, hydrogen). I managed to produce only a very rough simulation (this is my first approach to GEANT4), with a cylindric phantom and vacuum around it, probably even the PhysicsList is not the proper one. I introduce the possibility of decay of the isotopes produced by proton-material interaction with the following code (made with "copy and paste" from the examples):

*****************************************************************

void PMMAtestPhysicsList::ConstructGeneral() {
  G4Decay* decayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ) {
	G4ParticleDefinition *particle = theParticleIterator->value();
	G4ProcessManager *pManager = particle->GetProcessManager();
	if(decayProcess->IsApplicable(*particle)) {
	  pManager->AddProcess(decayProcess);
	  pManager->SetProcessOrdering(decayProcess, idxPostStep);
	  pManager->SetProcessOrdering(decayProcess, idxAtRest);
	}
  }  

// Declare radioactive decay to the GenericIon in the IonTable.
  //
  const G4IonTable *theIonTable = G4ParticleTable::GetParticleTable()->GetIonTable();

  G4RadioactiveDecay*  theRadioactiveDecay = new G4RadioactiveDecay();
  for (G4int i=0; i<theIonTable->Entries(); i++)
    {
      G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
      if (particleName == "GenericIon")
	{
	  G4ProcessManager* pmanager = theIonTable->GetParticle(i)->GetProcessManager();
	  pmanager->SetVerboseLevel(0);
	  pmanager ->AddProcess(theRadioactiveDecay);
	  pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
	  pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);
	}
    } 
}
***************************************************

But when I run the simulation (250 MeV for protons hitting the material) I get the strange results that stable isotopes C12 or O16 seems to decay!! (and no C11 or O15 appears..)

I copy below some lines of what appears on my screen:

*****************************************************
G4Track Information: Particle = proton, Track ID = 1, Parent ID = 0
*********************************************************************
Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     44.1     44.6      -50       250        0        0         0     expHall initStep
    6     46.3     48.7      192       149     20.3     33.3       242 PMMA_cyl_phys hLowEIoni
    7     46.5     49.1      198       142     4.06     6.45       248 PMMA_cyl_phys LElastic
**********************************************************************
G4Track Information: Particle = C12[0.0], Track ID = 4, Parent ID = 1
***********************************************************************
Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     46.5     49.1      198      2.97        0        0         0 PMMA_cyl_phys initStep
    1     46.5     49.1      198      2.67      0.3 0.000261  0.000261 PMMA_cyl_phys hLowEIoni
   10     63.2     40.6      215         0        0        0   0.00363 PMMA_cyl_phys RadioactiveDecay
******************************************************

What's the mistake? Should I declare explicitly each isotope that I am interested to study? But why C12 and O16 seems to decay? And why there is no trace of their decay products?

1 None: Re: Decay of stable particles!?   (Luciano - 05 Jul, 2005)
None particles list from an external file  Keywords: data input
by Andres <Andres.Russu@uv.es>,   30 Jun, 2005

Dear colleagues,

I am trying to do a simulation spacecraft radiation environment. I have a list of particles with energies and flux from SPENVIS and CREME96. May I introduce that table as a Geant 4 Input?

Thank you, Andres

1 None: Re: particles list from an external file   (Tore Ersmark - 02 Jul, 2005)
(_ None: Re: particles list from an external file   (Andres - 22 Feb, 2007)