Problem 511 - Can multiple scattering function without ionization?
Summary: Can multiple scattering function without ionization?
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic (show other problems)
Version: 5.0
Hardware: All Windows
: P2 normal
Assignee: Michel.Maire
URL:
Depends on:
Blocks:
 
Reported: 2003-07-18 16:54 CEST by novikova
Modified: 2012-02-15 05:08 CET (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description novikova 2003-07-18 16:54:04 CEST
Not sure whether this is a bug or "by design."

During debugging, I tried to figure out where one certain problem comes from.
There were two candidates - multiple scattering and ionization, so i tried to
turn off one and keep the other running. I was experimenting with ions, when I
saw the strange behavior I am about to report, but ions are way too complex, so
I reproduced the "bug" with electrons instead of ions. So, here it goes:

I am shooting 10MeV electrons into a brick of material - any dense material
will do. If ionization, Brem and msc are all turned on - I see normal behavior.
If I turn off msc and leave ionization and Brem on - the behavior is normal
again (in terms of c-code - the program runs and doesn't crush).  If I turn off
both Brem and ionization, and leave msc on - there is a crush during the first
step of electron propagation.  The crush occurs when msc process is trying to
access its physics table and doesn't find it.  However, this physics table was
built by msc process during initialization stage.

To be specific, below is the physics list using which I get the bug.

PhysicsList::
PhysicsList()
{
}

PhysicsList::
~PhysicsList()
{
}

void
PhysicsList::
ConstructParticle()
{
    G4Gamma::GammaDefinition();

    G4LeptonConstructor pConstructor;
    pConstructor.ConstructParticle();
}

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

void
PhysicsList::
SetCuts()
{
    SetCutsWithDefault();
}

void PhysicsList::
ConstructEM()
{
    theParticleIterator->reset();

    while( (*theParticleIterator)() )
    {

        G4ParticleDefinition* particle = theParticleIterator->value();
        G4ProcessManager* pManager = particle->GetProcessManager();
        G4String particleName = particle->GetParticleName();

        if (particleName == "e-")
        {

//            G4LowEnergyIonisation*     theLEIonisation             = new
G4LowEnergyIonisation();
//            G4LowEnergyBremsstrahlung* theLEBremsstrahlung         = new
G4LowEnergyBremsstrahlung();
            G4MultipleScattering*      theEMinusMultipleScattering = new
G4MultipleScattering();

            pManager->AddProcess(theEMinusMultipleScattering,-1, 1,1);
//            pManager->AddProcess(theLEIonisation,            -1, 2,2);
//            pManager->AddProcess(theLEBremsstrahlung,        -1,-1,3);

        }
    }
*** end of code *****************************

One might argue that there is no physical sense in running ionization without
multiple scattering.  No physical sense - may be, but turning processes on and
off one by one is a good way to debug things.  In this particular case, I am
under a strange impression that the msc process doesn't fill out its table
correctly when ionization is not turned on.

Thanks,
-- Elena.
Comment 1 Hans-Peter.Wellisch 2003-07-24 04:18:59 CEST
Hi Michel,

  can you please take care?

Many greetings,

Hans-Peter.
Comment 2 Michel.Maire 2003-11-24 10:07:59 CET
In Geant4 6.0 (January 2004) standard Ionisation and Brems can be
desactived separately or simultaneously.
Comment 3 Michel.Maire 2003-11-24 10:08:59 CET
In Geant4 6.0 (January 2004) standard Ionisation and Brems can be
desactived separately or simultaneously.