| Summary: | problems with late loading of G4VIon | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | lerikson |
| Component: | particles | Assignee: | kurasige |
| Status: | RESOLVED WONTFIX | ||
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 6.0 | ||
| Hardware: | Other | ||
| OS: | Other | ||
|
Description
lerikson
2004-05-26 18:12:34 CEST
All ions derived from G4VIon are static class (such as G4Alpha, G4He3) same as usual particles (i.e. proton, electron etc.) Objects of these classes are created in global scope by using their static methods anywhere in your application (Usually, XXXXDefinition() method is called in ConstructParticle() method of PhysicsList. So, no way to create these particle objects dynamically (i.e You can not use new nor declare variables in the local scope.) Ions other than G4VIon (such as 12C, 60Co) are created dynamically by using the G4ParticleTable::GetIon method. Thank you for explaining the cause of the problem. I don't see an explaination why you don't intend to fix. Why depend upon 'global' construction - the architechure clearly could be changed to remove this requirement. At the beggining of Geant4, we decided that particle definition class (such as G4Proton, G4Alpha) is defined as static. Now we are studying possiblities that all particle definition classes are created dynamically (not as static objects). But this design change gives big impacts on many categries in Geant4. So I can not say clear statements for the future release. |