File indexing completed on 2026-09-21 09:10:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifndef G4DNASCAVENGERPROCESS_HH
0028 #define G4DNASCAVENGERPROCESS_HH
0029
0030 #include "G4VITProcess.hh"
0031 #include "G4MoleculeTable.hh"
0032
0033 class G4DNAMolecularReactionData;
0034 class G4MolecularConfiguration;
0035 class G4DNABoundingBox;
0036 class G4DNAScavengerMaterial;
0037 class G4DNAScavengerProcess : public G4VITProcess
0038 {
0039 public:
0040 using MolType = const G4MolecularConfiguration*;
0041 using Data = const G4DNAMolecularReactionData;
0042 explicit G4DNAScavengerProcess(const G4String& aName,
0043 const G4DNABoundingBox& box,
0044 G4ProcessType type = fUserDefined);
0045 ~G4DNAScavengerProcess() override;
0046 G4DNAScavengerProcess(const G4DNAScavengerProcess&) = delete;
0047 G4DNAScavengerProcess& operator=(const G4DNAScavengerProcess&) = delete;
0048 void StartTracking(G4Track*) override;
0049 void SetReaction(MolType, Data* pData);
0050
0051 public:
0052 void BuildPhysicsTable(const G4ParticleDefinition&) override;
0053
0054 G4double PostStepGetPhysicalInteractionLength(
0055 const G4Track& track, G4double previousStepSize,
0056 G4ForceCondition* condition) override;
0057
0058 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&) override;
0059
0060 G4double AtRestGetPhysicalInteractionLength(const G4Track&,
0061 G4ForceCondition*) override
0062 {
0063 return -1.0;
0064 }
0065
0066 G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&) override
0067 {
0068 return nullptr;
0069 }
0070
0071
0072 G4double AlongStepGetPhysicalInteractionLength(const G4Track&, G4double,
0073 G4double, G4double&,
0074 G4GPILSelection*) override
0075 {
0076 return -1.0;
0077 }
0078
0079
0080 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&) override
0081 {
0082 return nullptr;
0083 }
0084
0085 protected:
0086 struct G4DNAScavengerProcessState : public G4ProcessState
0087 {
0088 G4DNAScavengerProcessState();
0089 ~G4DNAScavengerProcessState() override { ; }
0090 G4double fPreviousTimeAtPreStepPoint;
0091 G4bool fIsInGoodMaterial;
0092 };
0093
0094 protected:
0095 G4bool fIsInitialized;
0096 G4double fReturnedValue;
0097 G4ParticleChange fParticleChange;
0098 const G4MolecularConfiguration* fpMolecularConfiguration;
0099 std::map<MolType , std::map<MolType , Data*>>
0100 fConfMap;
0101 std::vector<MolType> fpMaterialVector;
0102 MolType fpMaterialConf;
0103 const G4DNABoundingBox* fpBoundingBox;
0104 G4DNAScavengerMaterial* fpScavengerMaterial{nullptr};
0105 MolType fH3Op = G4MoleculeTable::Instance()->GetConfiguration("H3Op(B)");
0106 MolType fH2O = G4MoleculeTable::Instance()->GetConfiguration("H2O");
0107 MolType fHOm = G4MoleculeTable::Instance()->GetConfiguration("OHm(B)");
0108 };
0109 #endif