|
|
|||
File indexing completed on 2026-03-30 07:50:48
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 /// \file TimeStepAction.cc 0027 /// \brief Implementation of the TimeStepAction class 0028 0029 // This example is provided by the Geant4-DNA collaboration 0030 // Any report or published results obtained using the Geant4-DNA software 0031 // shall cite the following Geant4-DNA collaboration publication: 0032 // Med. Phys. 37 (2010) 4692-4708 0033 // and papers 0034 // M. Batmunkh et al. J Radiat Res Appl Sci 8 (2015) 498-507 0035 // O. Belov et al. Physica Medica 32 (2016) 1510-1520 0036 // The Geant4-DNA web site is available at http://geant4-dna.org 0037 // 0038 // ------------------------------------------------------------------- 0039 // November 2016 0040 // ------------------------------------------------------------------- 0041 // 0042 0043 #include "TimeStepAction.hh" 0044 0045 #include "G4SystemOfUnits.hh" 0046 #include "G4UnitsTable.hh" 0047 0048 #include <G4Scheduler.hh> 0049 // #include "G4Molecule.hh" 0050 0051 TimeStepAction::TimeStepAction() : G4UserTimeStepAction() 0052 { 0053 /** 0054 * Give to G4ITTimeStepper the user defined time steps 0055 * eg : from 1 picosecond to 10 picosecond, the minimum time 0056 * step that the TimeStepper can returned is 0.1 picosecond. 0057 * Those time steps are used for the chemistry of G4DNA 0058 */ 0059 0060 AddTimeStep(1 * picosecond, 0.1 * picosecond); 0061 AddTimeStep(10 * picosecond, 1 * picosecond); 0062 AddTimeStep(100 * picosecond, 3 * picosecond); 0063 AddTimeStep(1000 * picosecond, 10 * picosecond); 0064 AddTimeStep(10000 * picosecond, 100 * picosecond); 0065 } 0066 0067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0068 0069 TimeStepAction::~TimeStepAction() 0070 { 0071 // dtor 0072 } 0073 0074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0075 0076 TimeStepAction::TimeStepAction(const TimeStepAction& other) : G4UserTimeStepAction(other) 0077 { 0078 // copy ctor 0079 } 0080 0081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0082 0083 TimeStepAction& TimeStepAction::operator=(const TimeStepAction& rhs) 0084 { 0085 if (this == &rhs) return *this; // handle self assignment 0086 // assignment operator 0087 return *this; 0088 } 0089 0090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0091 0092 void TimeStepAction::UserPostTimeStepAction() 0093 { 0094 // G4cout << "_________________" << G4endl; 0095 /* 0096 G4cout << "Time Step : " 0097 << G4BestUnit(G4ITScheduler::Instance()->GetTimeStep(), 0098 "Time") 0099 << G4endl; 0100 0101 G4cout << "End of step: " 0102 << G4BestUnit(G4ITScheduler::Instance()->GetGlobalTime(), 0103 "Time") 0104 << G4endl; 0105 */ 0106 } 0107 0108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0109 0110 void TimeStepAction::UserReactionAction(const G4Track&, const G4Track&, 0111 const std::vector<G4Track*>* /*products*/) 0112 { 0113 /* 0114 for (int i = 0 ; i < nbProducts ; i ++) 0115 { 0116 G4cout << "Product[" << i << "] : " 0117 << GetMolecule(products[i])->GetName() 0118 << G4endl ; 0119 } 0120 */ 0121 }
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|