Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/medical/dna/neuron/include/RunAction.hh
이 파일의 문서화 페이지로 가기
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 #ifndef RunAction_h
44 #define RunAction_h 1
45 
46 #include "G4UserRunAction.hh"
47 #include "globals.hh"
48 #include <iostream>
49 #include "DetectorConstruction.hh"
50 //
51 #include "G4ThreeVector.hh"
52 //class NeuronHitCompartments;
53 //class NeuronLoadDataFile;
55 class Run;
56 class G4Run;
57 class TrackingAction;
58 
59 class RunAction : public G4UserRunAction
60 {
61 public:
62 
64  virtual ~RunAction();
65 
66  virtual void BeginOfRunAction(const G4Run*);
67  virtual void EndOfRunAction(const G4Run*);
68 //
69  void SetRndmFreq(G4int val) {fSaveRndm = val;}
71  virtual G4Run* GenerateRun();
72 
73 // Edep in all volume
75  void SetEdepALL(G4double vall){ fEdepAll = vall;}
76  void AddEdepALL (G4double vall)
77  {
78  fEdepAll += vall;
79  fEdepAll_err += vall*vall;
80  }
81 // 0. Edep in homogeneous Medium
83  void SetEdepMedium(G4double vall){ fEdepMedium = vall;}
84  void AddEdepMedium (G4double vall)
85  {
86  fEdepMedium += vall;
87  fEdepMedium_err += vall*vall;
88  }
89 // 1. Edep in Bounding Slice Volume
91  void SetEdepSlice(G4double vall){ fEdepSlice = vall;}
92  void AddEdepSlice (G4double vall)
93  {
94  fEdepSlice += vall;
95  fEdepSlice_err += vall*vall;
96  }
97 // 2. Edep in Soma volume
99  void SetEdepSoma(G4double vall){ fEdepSoma = vall;}
100  void AddEdepSoma (G4double vall)
101  {
102  fEdepSoma += vall;
103  fEdepSoma_err += vall*vall;
104  }
105 
106 // 3. Edep in Dendrites volume
108  void SetEdepDend(G4double vall){ fEdepDend = vall;}
109  void AddEdepDend (G4double vall)
110  {
111  fEdepDend += vall;
112  fEdepDend_err += vall*vall;
113  }
114 
115 // 4. Edep in Axon volume
117  void SetEdepAxon(G4double vall){ fEdepAxon = vall;}
118  void AddEdepAxon (G4double vall)
119  {
120  fEdepAxon += vall;
121  fEdepAxon_err += vall*vall;
122  }
123 
124 // 5. Edep in whole Neuron volume
126  void SetEdepNeuron(G4double vall){ fEdepNeuron = vall;}
128  {
129  fEdepNeuron += vall;
130  fEdepNeuron_err += vall*vall;
131  }
132 
134  void SetNumEvent(G4int i){fNumEvent = i;}
135 
136 private:
137 
139  // Histogramming
140  //
141  void CreateHistogram();
142  void WriteHistogram();
143 
145  // Print Info
146  //
147  void PrintRunInfo(const G4Run* run);
148 
150  // Attributes
151  //
152  //TrackingAction* fpTrackingAction;
153  //bool fInitialized;
154  bool fDebug;
155 
159  //NeuronLoadDataFile * fNeuronLoadParamz;
160  //NeuronHitCompartments* fCompart;
161  Run* fRun;
162 
163 //
164 // phys
170 
171 };
172 
173 #endif
double G4double
Definition: G4Types.hh:76
The primary generator action class with particle gun.
Definition: G4Run.hh:46
int G4int
Definition: G4Types.hh:78
Simple detector construction with a box volume placed in a world.