Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
medical/GammaTherapy/src/CheckVolumeSD.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 // $Id: CheckVolumeSD.cc 103469 2017-04-11 07:29:36Z gcosmo $
27 //
30 //
31 // -------------------------------------------------------------
32 //
33 // ---------- CheckVolumeSD -------------
34 //
35 // Modified:
36 //
37 // -------------------------------------------------------------
38 
39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
41 
42 #include "CheckVolumeSD.hh"
43 
44 #include "G4RunManager.hh"
45 #include "Run.hh"
46 #include "G4VPhysicalVolume.hh"
47 #include "G4LogicalVolume.hh"
48 #include "G4Track.hh"
49 #include "G4Positron.hh"
50 #include "G4Gamma.hh"
51 #include "G4SystemOfUnits.hh"
52 
53 #include "globals.hh"
54 
55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56 
59 {
60 }
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 
65 {}
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
68 
70 {}
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
73 
75 {
76  Run* run = static_cast<Run*>(
78 
79  const G4Track* track = aStep->GetTrack();
80  G4double e = track->GetKineticEnergy();
81  if (track->GetDefinition() == G4Gamma::Gamma()) {
82  G4ThreeVector p = track->GetPosition();
83  G4double x = p.x();
84  G4double y = p.y();
85  G4double r = std::sqrt(x*x + y*y);
86  run->AddPhantomGamma(e,r);
87  }
88  if(run->GetVerbose()) {
89  G4cout << "CheckVolumeSD: energy = " << e/MeV
90  << G4endl;
91  }
92  return true;
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
96 
98 {}
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
101 
103 {}
104 
105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
106 
107 
109 {}
110 
111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
112 
113 
Float_t x
Definition: compare.C:6
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:80
G4double GetKineticEnergy() const
const XML_Char * name
Definition: expat.h:151
static constexpr double MeV
Definition: G4SIunits.hh:214
void AddPhantomGamma(G4double e, G4double r)
virtual void Initialize(G4HCofThisEvent *)
#define G4endl
Definition: G4ios.hh:61
Float_t y
Definition: compare.C:6
const char * p
Definition: xmltok.h:285
G4ParticleDefinition * GetDefinition() const
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
virtual void EndOfEvent(G4HCofThisEvent *)
G4Track * GetTrack() const
const G4ThreeVector & GetPosition() const
Definition: G4Step.hh:76
G4Run * GetNonConstCurrentRun() const
G4GLOB_DLL std::ostream G4cout
double x() const
double y() const
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)