Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
extended
medical
dna
neuron
src
extended/medical/dna/neuron/src/TrackingAction.cc
이 파일의 문서화 페이지로 가기
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// This example is provided by the Geant4-DNA collaboration
27
// Any report or published results obtained using the Geant4-DNA software
28
// shall cite the following Geant4-DNA collaboration publication:
29
// Med. Phys. 37 (2010) 4692-4708
30
// and papers
31
// M. Batmunkh et al. J Radiat Res Appl Sci 8 (2015) 498-507
32
// O. Belov et al. Physica Medica 32 (2016) 1510-1520
33
// The Geant4-DNA web site is available at http://geant4-dna.org
34
//
35
// -------------------------------------------------------------------
36
// November 2016
37
// -------------------------------------------------------------------
38
//
39
// $ID$
42
43
#include "TrackingAction.hh"
44
#include "
G4Track.hh
"
45
#include "
G4VSolid.hh
"
46
#include "
G4Region.hh
"
47
#include "
G4Electron.hh
"
48
#include "
G4Gamma.hh
"
49
#include "
G4RegionStore.hh
"
50
//
51
#include "
G4UnitsTable.hh
"
52
#include "
G4SystemOfUnits.hh
"
53
#include "
G4ios.hh
"
54
#include "
G4LogicalVolume.hh
"
55
#include "
G4LogicalVolumeStore.hh
"
56
#include "
G4VPhysicalVolume.hh
"
57
#include "
G4PhysicalVolumeStore.hh
"
58
//
59
// Bosons
60
#include "
G4ChargedGeantino.hh
"
61
#include "
G4Geantino.hh
"
62
#include "
G4Gamma.hh
"
63
// leptons
64
#include "
G4Electron.hh
"
65
#include "
G4Positron.hh
"
66
#include "
G4MuonPlus.hh
"
67
#include "
G4MuonMinus.hh
"
68
#include "
G4NeutrinoMu.hh
"
69
#include "
G4AntiNeutrinoMu.hh
"
70
#include "
G4NeutrinoE.hh
"
71
#include "
G4AntiNeutrinoE.hh
"
72
// Mesons
73
#include "
G4PionPlus.hh
"
74
#include "
G4PionMinus.hh
"
75
#include "
G4PionZero.hh
"
76
#include "
G4Eta.hh
"
77
#include "
G4EtaPrime.hh
"
78
79
#include "
G4KaonPlus.hh
"
80
#include "
G4KaonMinus.hh
"
81
#include "
G4KaonZero.hh
"
82
#include "
G4AntiKaonZero.hh
"
83
#include "
G4KaonZeroLong.hh
"
84
#include "
G4KaonZeroShort.hh
"
85
// Baryons
86
#include "
G4Proton.hh
"
87
#include "
G4AntiProton.hh
"
88
#include "
G4Neutron.hh
"
89
#include "
G4AntiNeutron.hh
"
90
// Nuclei
91
#include "
G4Alpha.hh
"
92
#include "
G4Deuteron.hh
"
93
#include "
G4Triton.hh
"
94
#include "
G4He3.hh
"
95
#include "
G4GenericIon.hh
"
96
#include "
G4Step.hh
"
97
#include "
G4StepStatus.hh
"
98
#include "Run.hh"
99
#include "
G4RunManager.hh
"
100
101
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
103
TrackingAction::TrackingAction
() :
104
G4UserTrackingAction
(),
105
RunInitObserver
(), fpTargetRegion(0)
106
{}
107
108
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109
110
TrackingAction::~TrackingAction
()
111
{
112
fpTargetRegion
= 0;
113
}
114
115
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116
117
void
TrackingAction::PreUserTrackingAction
(
const
G4Track
*
track
)
118
{
119
120
// Target volumes
121
G4VPhysicalVolume
* volumeStep = track->
GetTouchableHandle
()->
GetVolume
();
122
G4VPhysicalVolume
* volumeMedium =
123
G4PhysicalVolumeStore::GetInstance
()->
GetVolume
(
"Medium"
);
124
G4VPhysicalVolume
* volumeSlice =
125
G4PhysicalVolumeStore::GetInstance
()->
GetVolume
(
"BoundingSlice"
);
126
Run
* run =
static_cast<
Run
*
>
(
127
G4RunManager::GetRunManager
()->
GetNonConstCurrentRun
());
128
129
//count secondary particles
130
if
(track->
GetTrackID
() == 1)
return
;
131
G4String
name
= track->
GetDefinition
()->
GetParticleName
();
132
G4double
energy
= track->
GetKineticEnergy
();
133
134
// outside bounding slice
135
//if (volumeStep == volumeMedium) run->ParticleCount(name,energy);
136
// inside bounding slice
137
//if (volumeStep != volumeMedium) run->ParticleCountNeuron(name,energy);
138
139
// particles outside neuron structure
140
if
(volumeStep == volumeMedium || volumeStep == volumeSlice)
141
{
142
run->
ParticleCount
(name,energy);
143
}
144
// count secondary particles in neuron
145
else
//if (volumeStep != volumeMedium && volumeStep != volumeSlice)
146
{
147
run->
ParticleCountNeuron
(name,energy);
148
}
149
150
}
151
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152
153
void
TrackingAction::PostUserTrackingAction
(
const
G4Track
* track)
154
{
155
156
if
(track->
GetTrackID
() == 1)
157
{
158
G4cout
<<
"End of tracking primary particle, its final energy is :"
159
<<
G4BestUnit
(track->
GetKineticEnergy
(),
"Energy"
)<<
G4endl
;
160
}
161
162
Run
* run =
static_cast<
Run
*
>
(
163
G4RunManager::GetRunManager
()->
GetNonConstCurrentRun
());
164
G4double
tracklen = track->
GetTrackLength
();
165
if
(track->
GetTrackID
() == 1) run->
SetTrackLength
(tracklen);
166
//G4cout<< " track length = " << tracklen / um << G4endl;
167
}
168
169
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
170
void
171
TrackingAction::Initialize
()
172
{
173
//fpTargetRegion = G4RegionStore::GetInstance()->GetRegion("BoundingSlice");
174
}
G4RunManager::GetRunManager
static G4RunManager * GetRunManager()
Definition:
G4RunManager.cc:80
G4Track::GetKineticEnergy
G4double GetKineticEnergy() const
name
const XML_Char * name
Definition:
expat.h:151
G4Positron.hh
G4Gamma.hh
G4KaonZeroShort.hh
TrackingAction::~TrackingAction
~TrackingAction()
Definition:
advanced/amsEcal/include/TrackingAction.hh:46
G4Electron.hh
G4NeutrinoE.hh
G4LogicalVolumeStore.hh
G4ios.hh
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4AntiNeutrinoE.hh
G4UserTrackingAction
Definition:
G4UserTrackingAction.hh:54
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:121
G4Track::GetTrackID
G4int GetTrackID() const
RunInitObserver
Definition:
clustering/include/RunInitObserver.hh:45
G4PhysicalVolumeStore::GetVolume
G4VPhysicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const
Definition:
G4PhysicalVolumeStore.cc:165
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
G4Track::GetTouchableHandle
const G4TouchableHandle & GetTouchableHandle() const
G4Geantino.hh
G4VTouchable::GetVolume
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition:
G4VTouchable.cc:44
G4MuonMinus.hh
G4Track::GetDefinition
G4ParticleDefinition * GetDefinition() const
Run::ParticleCount
void ParticleCount(G4String, G4double)
Definition:
extended/hadronic/Hadr03/src/Run.cc:114
G4KaonZeroLong.hh
G4ChargedGeantino.hh
G4AntiNeutron.hh
TrackingAction::PostUserTrackingAction
void PostUserTrackingAction(const G4Track *)
Definition:
advanced/amsEcal/src/TrackingAction.cc:58
G4He3.hh
G4Track::GetTrackLength
G4double GetTrackLength() const
G4Deuteron.hh
G4GenericIon.hh
G4double
double G4double
Definition:
G4Types.hh:76
G4KaonPlus.hh
G4VPhysicalVolume.hh
G4PionPlus.hh
TrackingAction::fpTargetRegion
G4Region * fpTargetRegion
Definition:
extended/medical/dna/microdosimetry/include/TrackingAction.hh:67
G4Track
Definition:
G4Track.hh:76
energy
double energy
Definition:
plottest35.C:25
G4SystemOfUnits.hh
G4MuonPlus.hh
G4AntiNeutrinoMu.hh
G4PhysicalVolumeStore.hh
G4RunManager.hh
G4RunManager::GetNonConstCurrentRun
G4Run * GetNonConstCurrentRun() const
Definition:
G4RunManager.hh:528
G4Alpha.hh
G4BestUnit
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
Definition:
G4SteppingVerbose.cc:53
G4VSolid.hh
G4Track.hh
Run::ParticleCountNeuron
void ParticleCountNeuron(G4String, G4double)
Definition:
extended/medical/dna/neuron/src/Run.cc:165
TrackingAction::TrackingAction
TrackingAction()
Definition:
extended/electromagnetic/TestEm2/src/TrackingAction.cc:42
G4NeutrinoMu.hh
G4LogicalVolume.hh
G4PhysicalVolumeStore::GetInstance
static G4PhysicalVolumeStore * GetInstance()
Definition:
G4PhysicalVolumeStore.cc:187
G4Triton.hh
G4KaonZero.hh
G4Neutron.hh
TrackingAction::Initialize
void Initialize()
Definition:
extended/medical/dna/microdosimetry/src/TrackingAction.cc:114
G4AntiProton.hh
G4UnitsTable.hh
G4Proton.hh
G4Eta.hh
G4KaonMinus.hh
G4VPhysicalVolume
Definition:
G4VPhysicalVolume.hh:82
G4cout
G4GLOB_DLL std::ostream G4cout
Run::SetTrackLength
void SetTrackLength(G4double tracklen)
Definition:
extended/medical/dna/neuron/src/Run.cc:122
G4RegionStore.hh
G4Step.hh
G4StepStatus.hh
G4PionZero.hh
G4PionMinus.hh
G4Region.hh
G4AntiKaonZero.hh
track
Float_t track
Definition:
extended/medical/dna/range/plot.C:35
G4EtaPrime.hh
TrackingAction::PreUserTrackingAction
void PreUserTrackingAction(const G4Track *)
Definition:
advanced/amsEcal/src/TrackingAction.cc:53
Run
Definition:
advanced/amsEcal/include/Run.hh:46
다음에 의해 생성됨 :
1.8.5