Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:08

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 /*
0028  * G4DNAIRTMoleculeEncounterStepper.hh
0029  *
0030  *  Created on: Jul 23, 2019
0031  *      Author: W. G. Shin
0032  *              J. Ramos-Mendez and B. Faddegon
0033 */
0034 
0035 #pragma once
0036 
0037 #include "G4VITTimeStepComputer.hh"
0038 #include "G4KDTreeResult.hh"
0039 #include "G4ITReaction.hh"
0040 #include "G4ITTrackHolder.hh"
0041 
0042 class G4VDNAReactionModel;
0043 class G4DNAMolecularReactionTable;
0044 class G4MolecularConfiguration;
0045 
0046 class G4Molecule;
0047 
0048 /**
0049  * Given a molecule G4DNAIRTMoleculeEncounterStepper will calculate for its possible reactants
0050  * what will be the minimum encounter time and the associated molecules.*
0051  *
0052  * This model includes dynamical time steps as explained in
0053  * "Computer-Aided Stochastic Modeling of the Radiolysis of Liquid Water",
0054  * V. Michalik, M. Begusová, E. A. Bigildeev,
0055  * Radiation Research, Vol. 149, No. 3 (Mar., 1998), pp. 224-236
0056  *
0057  */
0058 
0059 class G4DNAIRTMoleculeEncounterStepper : public G4VITTimeStepComputer
0060 {
0061 public:
0062     G4DNAIRTMoleculeEncounterStepper();
0063     ~G4DNAIRTMoleculeEncounterStepper() override;
0064     G4DNAIRTMoleculeEncounterStepper(const G4DNAIRTMoleculeEncounterStepper&) = delete;
0065     G4DNAIRTMoleculeEncounterStepper& operator=(const G4DNAIRTMoleculeEncounterStepper&) = delete;
0066 
0067     void Prepare() override;
0068     G4double CalculateStep(const G4Track&, const G4double&) override;
0069     G4double CalculateMinTimeStep(G4double, G4double) override;
0070 
0071     void SetReactionModel(G4VDNAReactionModel*);
0072     G4VDNAReactionModel* GetReactionModel();
0073 
0074     void SetVerbose(int);
0075     // Final time returned when reaction is available in the reaction table = 1
0076     // All details = 2
0077 
0078 private:
0079     void InitializeForNewTrack();
0080 
0081     class Utils;
0082     void CheckAndRecordResults(const Utils&,
0083 #ifdef G4VERBOSE
0084                                const G4double reactionRange,
0085 #endif
0086                                G4KDTreeResultHandle&);
0087 
0088     G4bool fHasAlreadyReachedNullTime{false};
0089 
0090     const G4DNAMolecularReactionTable*& fMolecularReactionTable;
0091     G4VDNAReactionModel* fReactionModel{nullptr};
0092     G4ITReactionSet* fReactionSet;
0093     G4ITTrackHolder* fpTrackContainer;
0094     G4int fVerbose{0};
0095 
0096     class Utils
0097     {
0098     public:
0099         Utils(const G4Track& tA, const G4MolecularConfiguration* mB);
0100         ~Utils() = default;
0101 
0102         G4double GetConstant() const
0103         {
0104             return fConstant;
0105         }
0106 
0107         const G4Track& fpTrackA;
0108         const G4MolecularConfiguration* fpMoleculeB;
0109         const G4Molecule* fpMoleculeA;
0110         G4double fDA;
0111         G4double fDB;
0112         G4double fConstant;
0113     };
0114 };