Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4ChemReboundTransportation.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 #ifndef TRANSPORTATION_H
0028 #define TRANSPORTATION_H
0029 
0030 #include "G4DNABoundingBox.hh"
0031 #include "G4ITReaction.hh"
0032 #include "G4ITTransportation.hh"
0033 #include "G4MolecularConfiguration.hh"
0034 
0035 class G4Molecule;
0036 class G4VUserBrownianAction;
0037 
0038 class G4ChemReboundTransportation : public G4ITTransportation
0039 {
0040     using MolConf = const G4MolecularConfiguration*;
0041 
0042 public:
0043     explicit G4ChemReboundTransportation(const G4String& aName = "ChemReboundTransportation",
0044                                        const G4DNABoundingBox* = nullptr, G4int verbosityLevel = 0);
0045     ~G4ChemReboundTransportation() override = default;
0046     G4ChemReboundTransportation(const G4ChemReboundTransportation&) = delete;
0047     G4ChemReboundTransportation& operator=(const G4ChemReboundTransportation&) = delete;
0048     void BuildPhysicsTable(const G4ParticleDefinition&) override;
0049     void StartTracking(G4Track* aTrack) override;
0050     void ComputeStep(const G4Track&, const G4Step&, G4double, G4double&) override;
0051     G4double AlongStepGetPhysicalInteractionLength(const G4Track& /*track*/,
0052                                                    G4double /*previousStepSize*/,
0053                                                    G4double /*currentMinimumStep*/,
0054                                                    G4double& /*currentSafety*/,
0055                                                    G4GPILSelection* /*selection*/) override;
0056 
0057     G4VParticleChange* PostStepDoIt(const G4Track& track, const G4Step&) override;
0058     G4VParticleChange* AlongStepDoIt(const G4Track& track, const G4Step&) override;
0059 
0060     inline void SetBoundary(const G4DNABoundingBox*);
0061     static G4double calculateNextCoordinate(G4double nextPos, G4double high, G4double low);
0062     G4double GetTimeToBoundary(const G4Track& track);
0063 
0064 protected:
0065     //________________________________________________________________
0066     // Process information
0067     struct G4ITBrownianState : public G4ITTransportationState
0068     {
0069     public:
0070         G4ITBrownianState();
0071         ~G4ITBrownianState() override = default;
0072         G4String GetType() override { return "Rebound"; }
0073 
0074         G4bool fTimeStepReachedLimit;
0075         G4double fRandomNumber;
0076     };
0077     G4ITReactionSet* fReactionSet = G4ITReactionSet::Instance();
0078 
0079     G4Material* fNistWater = nullptr;
0080     G4double fMaximumTimeStep = 0;
0081     G4double fInternalMinTimeStep;
0082     const G4DNABoundingBox* fpBoundingBox = nullptr;
0083     G4ThreeVector BouncingAction(const G4ThreeVector& nextPosition);
0084     G4double calculateDistanceFromTimeStep(MolConf mol, G4double timeStep);
0085 };
0086 
0087 inline void G4ChemReboundTransportation::SetBoundary(const G4DNABoundingBox* pBounding)
0088 {
0089   fpBoundingBox = pBounding;
0090 }
0091 
0092 #endif