Message: troubles with not defined particle Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Sad troubles with not defined particle 

Forum: Physics List
Date: 20 Apr, 2011
From: Jérôme Roccaz <Jérôme Roccaz>

Hi everyone,

I have trouble with my Physicslist. I want to modelize an ionization chamber, so I build the Physicsist so to consider ions, alpha, electron, proton, neutron and gamma.

While executing the program, it ends from its own. I placed some screen prints so to locate the problem :

#include "G4Decay.hh"

void NISPhysicsList::ConstructGeneral()
	  G4cout << "Construct general" << G4endl;

  // Add Decay Process
   G4Decay* theDecayProcess = new G4Decay();
  G4cout << "avant while" << G4endl;
  while( (*theParticleIterator)() ){
	G4cout << "dans while1" << G4endl;
    G4ParticleDefinition* particle = theParticleIterator->value();
	G4String particleName = particle->GetParticleName();
	G4cout << "particle is" << particleName << G4endl;
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      G4cout << "dans if1" << G4endl;
	  pmanager ->AddProcess(theDecayProcess);
	  G4cout << "dans if11" << G4endl;
      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
	  G4cout << "dans if12" << G4endl;
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
	  G4cout << "dans if2" << G4endl;
	G4cout << "dans while2" << G4endl;
  G4cout << "Construct general end" << G4endl;

on the execution screen here is what I get :

avant while dans while1 particle is GenericIon dans while2 dans while1 particle is alpha dans while2 dans while1 particle is anti_lambda dans if1

roccazj@local /cygdrive/c/Geant4/g4work/bin/WIN32-VC $

I do not understand how the particle iterator works so to consider anti_lambda, whereas I do not construct such particle. And I don't understand why it stops.

I use cygwin and last Geant4 release.

thanks for your help

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

1 Idea: Re: troubles with not defined particle   (Vladimir Ivanchenko - 24 Apr, 2011)
(_ Ok: Re: troubles with not defined particle   (Jérôme Roccaz - 26 Apr, 2011)
 Add Message Add Message
to: "troubles with not defined particle"

 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 ]