Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
advanced
hadrontherapy
src
HadrontherapySteppingAction.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
// Hadrontherapy advanced example for Geant4
27
// See more at: https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
28
29
#include "
G4SteppingManager.hh
"
30
#include "
G4TrackVector.hh
"
31
#include "
HadrontherapySteppingAction.hh
"
32
#include "
G4ios.hh
"
33
#include "
G4SteppingManager.hh
"
34
#include "
G4Track.hh
"
35
#include "
G4Step.hh
"
36
#include "
G4StepPoint.hh
"
37
#include "
G4TrackStatus.hh
"
38
#include "
G4TrackVector.hh
"
39
#include "
G4ParticleDefinition.hh
"
40
#include "
G4ParticleTypes.hh
"
41
#include "
G4UserEventAction.hh
"
42
#include "
G4TransportationManager.hh
"
43
#include "
G4VSensitiveDetector.hh
"
44
#include "
HadrontherapyRunAction.hh
"
45
#include "
HadrontherapyMatrix.hh
"
46
#include "
G4SystemOfUnits.hh
"
47
49
HadrontherapySteppingAction::HadrontherapySteppingAction
(
HadrontherapyRunAction
*run)
50
{
51
runAction
= run;
52
}
53
55
HadrontherapySteppingAction::~HadrontherapySteppingAction
()
56
{
57
}
58
60
void
HadrontherapySteppingAction::UserSteppingAction
(
const
G4Step
* aStep)
61
{
62
63
// The followings are calls to usefuls information retrieved at the step level
64
// Please, comment out them if want to use
65
66
// G4Track* theTrack = aStep->GetTrack();
67
68
//G4StepPoint* PreStep = aStep->GetPreStepPoint();
69
//G4StepPoint* PostStep = aStep->GetPostStepPoint();
70
71
//G4TouchableHandle touchPreStep = PreStep->GetTouchableHandle();
72
//G4TouchableHandle touchPostStep = PostStep->GetTouchableHandle();
73
74
//G4double PreStepX =PreStep->GetPosition().x();
75
//G4double PreStepY =PreStep->GetPosition().y();
76
//G4double PreStepZ =PreStep->GetPosition().z();
77
78
//G4double PostStepX =PostStep->GetPosition().x();
79
//G4double PostStepY =PostStep->GetPosition().y();
80
//G4double PostStepZ =PostStep->GetPosition().z();
81
82
83
84
//To get the current volume:
85
//G4VPhysicalVolume* volumePre = touchPreStep->GetVolume();
86
//G4VPhysicalVolume* volumePost =touchPostStep->GetVolume();
87
88
//To get its name:
89
//G4String namePre = volumePre->GetName();
90
91
92
// positions in the global coordinate system:
93
//G4ThreeVector posPreStep = PreStep->GetPosition();
94
//G4ThreeVector posPostStep = PostStep->GetPosition();
95
96
//G4int eventNum = G4RunManager::GetRunManager() -> GetCurrentEvent() -> GetEventID();
97
98
//G4double parentID =aStep->GetTrack()->GetParentID();
99
//G4double trackID =aStep->GetTrack()->GetTrackID();
100
101
//G4double eKin = aStep -> GetPreStepPoint() -> GetKineticEnergy();
102
103
//G4double PosX = aStep->GetTrack()->GetPosition().x();
104
//G4double PosY = aStep->GetTrack()->GetPosition().y();
105
//G4double PosZ = aStep->GetTrack()->GetPosition().z();
106
107
//G4String material= aStep -> GetTrack() -> GetMaterial() -> GetName();
108
//G4cout << "material " << material << G4endl;
109
110
//G4String volume= aStep->GetTrack()->GetVolume()->GetName();
111
112
113
114
//G4String pvname= pv-> GetName();
115
116
G4String
particleName = aStep->
GetTrack
()->
GetDefinition
()->
GetParticleName
();
117
118
119
}
120
121
122
123
124
G4VSensitiveDetector.hh
HadrontherapySteppingAction::UserSteppingAction
void UserSteppingAction(const G4Step *)
Definition:
HadrontherapySteppingAction.cc:60
G4ios.hh
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:121
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
HadrontherapyRunAction
Definition:
HadrontherapyRunAction.hh:42
G4ParticleTypes.hh
G4SteppingManager.hh
G4Track::GetDefinition
G4ParticleDefinition * GetDefinition() const
G4TrackStatus.hh
G4TransportationManager.hh
HadrontherapyMatrix.hh
HadrontherapySteppingAction::~HadrontherapySteppingAction
~HadrontherapySteppingAction()
Definition:
HadrontherapySteppingAction.cc:55
G4SystemOfUnits.hh
HadrontherapySteppingAction.hh
G4Step::GetTrack
G4Track * GetTrack() const
HadrontherapyRunAction.hh
G4Step
Definition:
G4Step.hh:76
G4TrackVector.hh
G4Track.hh
G4UserEventAction.hh
G4Step.hh
G4ParticleDefinition.hh
HadrontherapySteppingAction::HadrontherapySteppingAction
HadrontherapySteppingAction(HadrontherapyRunAction *)
Definition:
HadrontherapySteppingAction.cc:49
G4StepPoint.hh
HadrontherapySteppingAction::runAction
HadrontherapyRunAction * runAction
Definition:
HadrontherapySteppingAction.hh:56
다음에 의해 생성됨 :
1.8.5