Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/medical/dna/molcounters/basic/README is written in an unsupported language. File is not indexed.

0001  -------------------------------------------------------------------
0002 
0003       =========================================================
0004       Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005       =========================================================
0006 *** molcounters/basic example ***
0007 
0008 Author: C. Velten \
0009 Date: 7 April 2025 \
0010 Email: cv2415@columbia.edu
0011 
0012 (c) The Geant4-DNA collaboration.
0013 
0014 This example shows how to use the new molecule counter manager
0015 system and how to write custom molecule counters.
0016 
0017 This example is provided by the Geant4-DNA collaboration.
0018 
0019 The custom (spatially-aware) molecule counter used here
0020 is further described in:
0021 - Radiat. Phys. Chem. 212 (2023) 111194 \
0022 doi:10.1016/j.radphyschem.2023.111194
0023 
0024 Any report or published results obtained using the Geant4-DNA software shall
0025 cite the following Geant4-DNA collaboration publications:
0026 - Med. Phys. 51 (2024) 5873–5889 
0027 - Med. Phys. 45 (2018) e722-e739 
0028 - Phys. Med. 31 (2015) 861-874   
0029 - Med. Phys. 37 (2010) 4692-4708 
0030 - Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
0031 
0032 ### Description:
0033 
0034 1. __Geometry__:
0035 A box of liquid water with a 8 µm (radius) spherical cell placed at its center.
0036 The cell contains a 4 µm (radius) nucleus and 100 mitochondria.
0037 
0038 2. __Incident particles__:
0039 Electrons with 1 keV energy, which can be changed in
0040 the simple_sbs.ini macro file.
0041 They are shot from the center of the box (inside the nucleus).
0042 
0043 3. __Physics__:
0044 The default Geant4-DNA physics constructor 2 is used in
0045 the PhysicsList class with chemistry constructor 3.
0046 
0047 4. __Molecule Counters__: 
0048 Counters are defined and registered in the ActionInitialization
0049 class for master & workers using the BuildMoleculeCounters(), and
0050 BuildMultipleAndCustomMoleculeCounters() methods.
0051 To switch between either of these methods, change the
0052 boolean value of fBuildMultipleAndCustomMoleculeCounters in
0053 ActionInitialization.hh.
0054 By default, the molecule counter manager will accumulate counts from
0055 worker instances into the master instance. To facilitate this the user
0056 __must__ create a `UserEventAction` and `UserRunAction` and override
0057 the `(Begin|End)Of(Event|Run)Action` methods and call the corresponding
0058 method on the `G4DNAChemistryManager::Instance()`. See the example's
0059 `EventAction.hh` and `RunAction.(hh|cc)` on how to do this. \
0060 
0061     __Default Method: `BuildMoleculeCounters()`:__
0062     * Reset counters before each run but not keep counter values between events
0063     * Register a default `G4MoleculeCounter` instance called "Molecules"
0064     * Register a default `G4MoleculeReactionCounter` instance called "Reactions"
0065     
0066 
0067     __Alternative Method: `BuildMultipleAndCustomMoleculeCounters()`:__
0068     * Reset counters before each run but not keep counter values between events
0069     * Register a `G4MoleculeCounter` instance called "BasicCounter":
0070         * set its time precision to 25 ps
0071     * Register a `G4MoleculeCounter` instance called "BasicCounter_Restricted":
0072         * set its time precision to 25 ps
0073         * activate the counter for global times in [500 ps, 10 ns]
0074     * Register a `G4MoleculeCounter` instance called "BasicCounter_VariablePrecision":
0075         * set its time precision to vary with global time:
0076         ```
0077             <= 10 ps: 5 ps
0078             <= 100 ps: 50 ps
0079             <= 1 ns: 0.5 ns
0080             <= 1 µs: 50 ns
0081         ```
0082         * activate the counter for global times in [500 ps, 10 ns]
0083     * Register a custom `MoleculeCounter` instance called "MoleculeCounter"
0084         * set its time precision to vary with global time:
0085         ```
0086             <= 10 ps: 5 ps
0087             <= 100 ps: 50 ps
0088             <= 1 ns: 0.5 ns
0089             <= 1 µs: 50 ns
0090         ```
0091         * __(important)__ `SetSensitiveToStepping(true)` to change molecule count when traversing geometry boundaries
0092         * `SetIgnoreMoleculePosition(false)` if set to `true` the counter behaves like `G4MoleculeCounter`
0093         * `SetNegativeCountsAreFatal(true)` to throw a FatalException if any molecule count drops below 0 through misregistration
0094     * Register a `G4MoleculeReactionCounter` instance called "Reactions":
0095         * set its time precision to 50 ps
0096         * activate the counter for global times in [0 ps, 1 µs]
0097 
0098 5. __Execute__ the code by running:
0099 `./molcounters_basic [simple_sbs.in,simple_irt_syn_react.in]`
0100 The `simple_sbs.in` macro __only__ includes molecule transport (diffusion)!
0101 
0102 6. __Output__: Contents of the molecule counters are dumped to `stdout`
0103 at the end of each run by the RunAction::EndOfRunAction()