|
|
|||
File indexing completed on 2026-07-13 08:21:03
0001 #ifndef G4HepEmData_HH 0002 #define G4HepEmData_HH 0003 0004 struct G4HepEmMatCutData; 0005 struct G4HepEmMaterialData; 0006 struct G4HepEmElementData; 0007 0008 struct G4HepEmElectronData; 0009 struct G4HepEmSBTableData; 0010 0011 struct G4HepEmGammaData; 0012 0013 /** 0014 * @file G4HepEmData.hh 0015 * @struct G4HepEmData 0016 * @author M. Novak 0017 * @date 2020 0018 * 0019 * The top level, global data structure i.e. collection of global data 0020 * structures used by all physics interactions covered by `G4HepEm`. 0021 * 0022 * There supposed to be a single instance of this data structure constructed and 0023 * stored by the master `G4HepEmRunManager`. That single instance is 0024 * constructed when calling the `G4HepEmRunManager::InitializeGlobal()` method 0025 * wehn invoking the master `G4HepEmRunManager::Initialize()` method. 0026 * Worker `G4HepEmRunManager`-s will have their pointer set to this master 0027 * run-manager `G4HepEmData` member object. 0028 * 0029 * Members of this data structure, represented by their pointers, are created 0030 * individualy by invoking the dedicated intialisation methods one-by-one. 0031 * 0032 * In case of CUDA build, the members, suffixed by `_gpu`, points do device memory 0033 * locations where the corresponding data structures are located (after copying 0034 * them). All the corresponding members can be (deep) copied from the host to 0035 * device by calling the `CopyG4HepEmDataToGPU()` function. This will invoke 0036 * the dedicated copy methods provided by the individual data structures. 0037 * 0038 * The dynamically allocated memory, represented by all the members of this 0039 * collection (including device side memeory as well in case of CUDA build), can 0040 * be cleaned by calling the `FreeG4HepEmData()` function. This is done, in the 0041 * `G4HepEmRunManager::Clear()` method. 0042 */ 0043 0044 struct G4HepEmData { 0045 /** Global G4HepEmMatCutData i.e. material and scondary production threshold related data.*/ 0046 struct G4HepEmMatCutData* fTheMatCutData = nullptr; 0047 /** Global material and scondary production threshold related data.*/ 0048 struct G4HepEmMaterialData* fTheMaterialData = nullptr; 0049 struct G4HepEmElementData* fTheElementData = nullptr; 0050 0051 struct G4HepEmElectronData* fTheElectronData = nullptr; 0052 struct G4HepEmElectronData* fThePositronData = nullptr; 0053 0054 struct G4HepEmSBTableData* fTheSBTableData = nullptr; 0055 0056 0057 struct G4HepEmGammaData* fTheGammaData = nullptr; 0058 0059 0060 #ifdef G4HepEm_CUDA_BUILD 0061 struct G4HepEmMatCutData* fTheMatCutData_gpu = nullptr; 0062 struct G4HepEmMaterialData* fTheMaterialData_gpu = nullptr; 0063 struct G4HepEmElementData* fTheElementData_gpu = nullptr; 0064 0065 struct G4HepEmElectronData* fTheElectronData_gpu = nullptr; 0066 struct G4HepEmElectronData* fThePositronData_gpu = nullptr; 0067 0068 struct G4HepEmSBTableData* fTheSBTableData_gpu = nullptr; 0069 0070 0071 struct G4HepEmGammaData* fTheGammaData_gpu = nullptr; 0072 #endif // G4HepEm_CUDA_BUILD 0073 0074 }; 0075 0076 /** Function that ...*/ 0077 void InitG4HepEmData (struct G4HepEmData* theHepEmData); 0078 0079 /** Function that ...*/ 0080 void FreeG4HepEmData (struct G4HepEmData* theHepEmData); 0081 0082 0083 #ifdef G4HepEm_CUDA_BUILD 0084 /** Function that ...*/ 0085 void CopyG4HepEmDataToGPU(struct G4HepEmData* onCPU); 0086 0087 /** Function that ...*/ 0088 void FreeG4HepEmDataOnGPU(struct G4HepEmData* onCPU); 0089 #endif // G4HepEm_CUDA_BUILD 0090 0091 0092 #endif // G4HepEmData_HH
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|