Message: Questions on Radioactive Decay of Tritium Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Questions on Radioactive Decay of Tritium 

Keywords: G4RadioactiveDecay G4GenericIon segmentation fault
Forum: Physics List
Date: 22 May, 2007
From: Theo <Theo>

Dear all,

I have a simulation of a tube filled with a gas mixture that has tritium and i want to study its decay.

I have 2 questions:

1)First of all I construct the process like so:

void ExN01PhysicsList::ConstructProcess()
  // Define transportation process


// Add Decay Process
  G4RadioactiveDecay*  theRadioactiveDecay = new G4RadioactiveDecay();
  G4GenericIon* ion = G4GenericIon::GenericIon();

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

    if (particle == ion){
      pmanager->AddProcess(theRadioactiveDecay, 0, -1, 3);
      pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
      pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);

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


it compiles fine but when i run it i get a segmentation fault. If i comment the line: //G4GenericIon* ion = G4GenericIon::GenericIon(); and the corresponding if afterwards it runs fine.What is the case?

2)My 2nd question has to do with the setup of my to-be simulation.
  I want the simulation to start without any primary particles to hit
  the tube and i want a run to last as long as i define it, for ex.2sec
  of data taking etc and i haven't found the way to do both.Is there a
  simple example i could look into?

Sorry for my questions but im just learning geant. Thanks in advance theo

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

 Add Message Add Message
to: "Questions on Radioactive Decay of Tritium"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]