12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tracking and Physicswill then be asked to return a cross section value via its GetCrossSection method. If no data set respondspositively, a G4Exception is thrown and DBL_MIN is returned.void AddDataSet( G4VCrossSectionDataSet* aDataSet )This method adds the given cross section data set to the end of the list of data sets in the data store. For theevaluation of cross sections, the list has a LIFO (Last In First Out) priority, meaning that data sets added later tothe list will have priority over those added earlier to the list. Another way of saying this, is that the data store,when given a GetCrossSection request, does the IsApplicable queries in the reverse list order, startingwith the last data set in the list and proceeding to the first, and the first data set that responds positively is usedto calculate the cross section.void BuildPhysicsTable( const G4ParticleDefinition& aParticleType )This method may be invoked to indicate to the data store that there has been a change in the cuts or other parametersof the given particle type. In response, the data store will invoke the BuildPhysicsTable of each of its datasets.void DumpPhysicsTable( const G4ParticleDefinition& )This method may be used to request the data store to invoke the DumpPhysicsTable method of each of itsdata sets.Default cross sectionsThe defaults <strong>for</strong> total cross section data and calculations have been encapsulated in the singletonclass G4HadronCrossSections. Each hadronic process: G4HadronInelasticProcess, G4HadronElasticProcess,G4HadronFissionProcess, and G4HadronCaptureProcess, comes already equipped with a cross section datastore and a default cross section data set. The data set objects are really just shells that invoke the singletonG4HadronCrossSections to do the real work of calculating cross sections.The default cross sections can be overridden in whole or in part by the user. To this end, the base classG4HadronicProcess has a ``get'' method:G4CrossSectionDataStore* GetCrossSectionDataStore()which gives public access to the data store <strong>for</strong> each process. The user's cross section data sets can be added to thedata store according to the following framework:G4Hadron...Process aProcess(...)MyCrossSectionDataSet myDataSet(...)aProcess.GetCrossSectionDataStore()->AddDataSet( &MyDataSet )The added data set will override the default cross section data whenever so indicated by its IsApplicablemethod.In addition to the ``get'' method, G4HadronicProcess also has the methodvoid SetCrossSectionDataStore( G4CrossSectionDataStore* )which allows the user to completely replace the default data store with a new data store.It should be noted that a process does not send any in<strong>for</strong>mation about itself to its associated data store (and hencedata set) objects. Thus, each data set is assumed to be <strong>for</strong>mulated to calculate cross sections <strong>for</strong> one and only onetype of process. Of course, this does not prevent different data sets from sharing common data and/or calculationmethods, as in the case of the G4HadronCrossSections class mentioned above. Indeed, G4VCrossSectionDataSet159

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!