File indexing completed on 2025-01-18 09:58:08
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
0028 #ifndef G4DNAPolyNucleotideReactionProcess_hh
0029 #define G4DNAPolyNucleotideReactionProcess_hh
0030 #include <CLHEP/Units/SystemOfUnits.h>
0031 #include "G4VITDiscreteProcess.hh"
0032 #include <variant>
0033 class G4DNAMolecularReactionTable;
0034 class G4DNAComponentNode;
0035 class G4VDNAHitModel;
0036
0037 class G4DNAPolyNucleotideReactionProcess : public G4VITDiscreteProcess
0038 {
0039 public:
0040 explicit G4DNAPolyNucleotideReactionProcess(
0041 const G4String& aName = "DNAStaticMoleculeReactionProcess",
0042 G4int verbosityLevel = 0);
0043 ~G4DNAPolyNucleotideReactionProcess() override;
0044
0045 G4DNAPolyNucleotideReactionProcess(const G4DNAPolyNucleotideReactionProcess&) = delete;
0046 G4DNAPolyNucleotideReactionProcess& operator =(
0047 const G4DNAPolyNucleotideReactionProcess&) = delete;
0048
0049 inline void SetDNADamageReactionModel(G4VDNAHitModel* pModel);
0050
0051 G4bool IsApplicable(const G4ParticleDefinition&) override { return true; }
0052
0053 G4double CalculateTimeStep(const G4Track& trackA,
0054 const G4double& userTimeStep = 0);
0055
0056 void StartTracking(G4Track* aTrack) override;
0057
0058 G4double PostStepGetPhysicalInteractionLength(
0059 const G4Track&,
0060 G4double,
0061 G4ForceCondition* pForceCond) override;
0062 G4VParticleChange* PostStepDoIt(const G4Track& track, const G4Step&) override;
0063
0064 G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*) override
0065 {
0066 return DBL_MAX;
0067 }
0068
0069 inline void SetVerbose(G4int verbose);
0070
0071 protected:
0072 G4VParticleChange fParticleChange;
0073
0074 private:
0075 struct G4PolyNucleotideReactionState
0076 : public G4ProcessStateBase<G4PolyNucleotideReactionState>
0077 {
0078 G4PolyNucleotideReactionState();
0079 ~G4PolyNucleotideReactionState() override = default;
0080 G4String GetType() override { return "PolyNucleotideReactionState"; }
0081
0082 using DNANode =
0083 std::variant<const G4DNAComponentNode*,
0084 const G4VPhysicalVolume* >;
0085 DNANode fNodeReactant;
0086 G4double fSampledMinTimeStep;
0087 G4double fPreviousTimeAtPreStepPoint;
0088 };
0089 G4bool fHasAlreadyReachedNullTime{false};
0090 G4int fVerbose;
0091 G4double fRCutOff;
0092 G4VDNAHitModel* fpDamageModel{nullptr};
0093 };
0094 inline void G4DNAPolyNucleotideReactionProcess::SetVerbose(G4int verbose)
0095 {
0096 fVerbose = verbose;
0097 }
0098
0099 inline void G4DNAPolyNucleotideReactionProcess::SetDNADamageReactionModel(
0100 G4VDNAHitModel* pModel)
0101 {
0102 fpDamageModel = pModel;
0103 }
0104 #endif