|
|
|||
File indexing completed on 2026-09-11 08:30:37
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 ITTrackingAction.cc 0027 /// \brief Implementation of the ITTrackingAction 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 0044 #include "ITTrackingAction.hh" 0045 0046 #include "G4Molecule.hh" 0047 #include "G4PhysicalConstants.hh" 0048 #include "G4SystemOfUnits.hh" 0049 #include "G4Track.hh" 0050 #include "G4UnitsTable.hh" 0051 // 0052 // #include "NeuronHitCompartments.hh" 0053 #include "Run.hh" 0054 0055 #include "G4H2O.hh" 0056 #include "G4LogicalVolume.hh" 0057 #include "G4LogicalVolumeStore.hh" 0058 #include "G4MoleculeCounter.hh" 0059 #include "G4MoleculeGun.hh" 0060 #include "G4MoleculeTable.hh" 0061 #include "G4PhysicalVolumeStore.hh" 0062 #include "G4RunManager.hh" 0063 #include "G4VPhysicalVolume.hh" 0064 0065 #include <G4Scheduler.hh> 0066 #include <cmath> 0067 0068 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0069 0070 ITTrackingAction::ITTrackingAction() : G4UserTrackingAction() {} 0071 0072 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0073 0074 ITTrackingAction::~ITTrackingAction() {} 0075 0076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0077 0078 void ITTrackingAction::PreUserTrackingAction(const G4Track* track) 0079 { 0080 // Target volumes 0081 G4VPhysicalVolume* volumeStep = track->GetTouchableHandle()->GetVolume(); 0082 G4VPhysicalVolume* volumeMedium = G4PhysicalVolumeStore::GetInstance()->GetVolume("Medium"); 0083 G4VPhysicalVolume* volumeSlice = G4PhysicalVolumeStore::GetInstance()->GetVolume("BoundingSlice"); 0084 0085 // count produced species in neuron 0086 G4Molecule* molecule = GetMolecule(track); 0087 // const G4String& moleculeName = molecule->GetName(); 0088 // G4double GTime = track->GetGlobalTime() /picosecond; 0089 0090 Run* run = static_cast<Run*>(G4RunManager::GetRunManager()->GetNonConstCurrentRun()); 0091 // run->MoleculeCount(moleculeName,GTime); 0092 0093 // time steps 0094 0095 // particles outside neuron structure 0096 // if (volumeStep == volumeMedium || volumeStep == volumeSlice) 0097 //{ 0098 // run->MoleculeCount(molecule); 0099 //} 0100 // count secondary particles in neuron 0101 // else // 0102 if (volumeStep != volumeMedium && volumeStep != volumeSlice) { 0103 run->MoleculeCountNeuron(molecule); 0104 // run->MoleculeCountNeuron(moleculeName,GTime); 0105 0106 // number of molecules at time of 1 ns ! 0107 // if ( (GTime > T_1ns-3.) && (GTime <= T_1ns)) 0108 // { 0109 // if (moleculeName =="OH^0") // OH* radical 0110 // { 0111 // fEventAction->MoleculeCountNeuron() 0112 // G4MoleculeCounter::Instance()->GetNMoleculesAtTime(moleculeName, GTime); 0113 0114 // } 0115 // } 0116 } 0117 } 0118 0119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0120 0121 void ITTrackingAction::PostUserTrackingAction(const G4Track* /*track*/) {}
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|