File indexing completed on 2025-01-18 09:58: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 class G4DNAMolecularReactionData;
0032 class G4MolecularConfiguration;
0033 class G4DNABoundingBox;
0034 class G4DNAScavengerMaterial;
0035 class G4DNAScavengerProcess : public G4VITProcess
0036 {
0037 public:
0038 using MolType = const G4MolecularConfiguration*;
0039 using Data = const G4DNAMolecularReactionData;
0040 explicit G4DNAScavengerProcess(const G4String& aName,
0041 const G4DNABoundingBox& box,
0042 G4ProcessType type = fUserDefined);
0043 ~G4DNAScavengerProcess() override;
0044 G4DNAScavengerProcess(const G4DNAScavengerProcess&) = delete;
0045 G4DNAScavengerProcess& operator=(const G4DNAScavengerProcess&) = delete;
0046 void StartTracking(G4Track*) override;
0047 void SetReaction(MolType, Data* pData);
0048
0049 public:
0050 void BuildPhysicsTable(const G4ParticleDefinition&) override;
0051
0052 G4double PostStepGetPhysicalInteractionLength(
0053 const G4Track& track, G4double previousStepSize,
0054 G4ForceCondition* condition) override;
0055
0056 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&) override;
0057
0058 G4double AtRestGetPhysicalInteractionLength(const G4Track&,
0059 G4ForceCondition*) override
0060 {
0061 return -1.0;
0062 }
0063
0064 G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&) override
0065 {
0066 return nullptr;
0067 }
0068
0069
0070 G4double AlongStepGetPhysicalInteractionLength(const G4Track&, G4double,
0071 G4double, G4double&,
0072 G4GPILSelection*) override
0073 {
0074 return -1.0;
0075 }
0076
0077
0078 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&) override
0079 {
0080 return nullptr;
0081 }
0082
0083 protected:
0084 struct G4DNAScavengerProcessState : public G4ProcessState
0085 {
0086 G4DNAScavengerProcessState();
0087 ~G4DNAScavengerProcessState() override { ; }
0088 G4double fPreviousTimeAtPreStepPoint;
0089 G4bool fIsInGoodMaterial;
0090 };
0091
0092 protected:
0093 G4bool fIsInitialized;
0094 G4double fReturnedValue;
0095 G4ParticleChange fParticleChange;
0096 const G4MolecularConfiguration* fpMolecularConfiguration;
0097 std::map<MolType , std::map<MolType , Data*>>
0098 fConfMap;
0099 std::vector<MolType> fpMaterialVector;
0100 MolType fpMaterialConf;
0101 const G4DNABoundingBox* fpBoundingBox;
0102 G4DNAScavengerMaterial* fpScavengerMaterial{nullptr};
0103 };
0104 #endif