Ions

From: Dmitry Naumov <naumov_at_nusun.jinr.ru>
Date: Tue, 12 Sep 2006 15:02:59 +0400


Dear VMC team,

I am experiencing a problem with ions as beam particles. Perhaps I do not understand how to make them properly. This is what I am doing:

TString fParticleName reads from configuration type of the particle. Then I check:

    if (!(fParticleName.Contains("proton") || fParticleName.Contains("neutron"))) {

        TParticlePDG *part =
TDatabasePDG::Instance()->GetParticle(fParticleName);

        if (part)
            fPdg = part->PdgCode();
        else {
            cout << "DEFINE ION MYSELF!!! " << endl; 
            gMC->DefineIon(fParticleName.Data(),fZ,fA,fQ,fExcEnergy);
            fPdg = 
TDatabasePDG::Instance()->GetParticle(fParticleName)->PdgCode();
        }
        cout << fParticleName << " " << fPdg << " this particle is 
created " << fZ << " " << fA << " " << endl;

    }

If particle with this name is already defined in TDatabasePDG then just get its Pdg code to pass into MCStack object as a primary. If not then add it using gMC->AddIon() method.
I am calling this piece of code after

    gMC->Init();
    gMC->BuildPhysics();

which should create all particles (if I am not wrong in this point).

Just before to call the above piece of code I check the TDatabasePDG and see that alpha etc are there:

Rootino                    0    Mass:   0.0000 Width (GeV): Stable      
Charge:   0.0
Deuteron              10010020  Mass:   1.8711 Width (GeV): Stable      
Charge:   3.0
Triton                10010030  Mass:   2.8094 Width (GeV): 1.6916e-33  
Charge:   3.0
Alpha                 10020040  Mass:   3.7284 Width (GeV): Stable      
Charge:   6.0
HE3                   10020030  Mass:   2.8094 Width (GeV): 0.0000e+00  
Charge:   6.0
Cherenkov             50000050  Mass:   0.0000 Width (GeV): 0.0000e+00  
Charge:   0.0
FeedbackPhoton        50000051  Mass:   0.0000 Width (GeV): 0.0000e+00  
Charge:   0.0
Alpha                 10020040  Mass:   3.7284 Width (GeV): Stable      
Charge: 6.0

When my piece of code is done I see this:

Alpha 10020040 this particle is created 2 4

Finally I have the following exception:
### Run 0 start.
Alpha Alpha pdgEncoding: 10020040

    TG4PrimaryGeneratorAction::TransformPrimaries:     G4ParticleTable::FindParticle() failed. *** TG4Exception: Aborting execution ***

Which happens in void TG4ParticlesManager::AddIon <http://ivana.home.cern.ch/ivana/g4vmc_html/classTG4ParticlesManager.html#1a536ef6d4af275048ff6ce95a2cf02b>

method. Could you please help me to understand what is wrong and what is the correct way to create ion as a beam particle? If I pass say iron as an ion then it works (because this particle is not defined in G4 seems), but there are no hadronic interactions. Perhaps you could advise me how to set them up also for this case? Thanks a lot, Dmitry Received on Tue Sep 12 2006 - 13:03:06 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:55:09 MET