ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RunAction.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 //
41 
42 #ifndef RunAction_h
43 #define RunAction_h 1
44 
45 #include "G4UserRunAction.hh"
46 #include "globals.hh"
47 #include <iostream>
48 #include "DetectorConstruction.hh"
49 //
50 #include "G4ThreeVector.hh"
51 //class NeuronHitCompartments;
52 //class NeuronLoadDataFile;
54 class Run;
55 class G4Run;
56 class TrackingAction;
57 
58 class RunAction : public G4UserRunAction
59 {
60 public:
61 
63  virtual ~RunAction();
64 
65  virtual void BeginOfRunAction(const G4Run*);
66  virtual void EndOfRunAction(const G4Run*);
67 //
68  void SetRndmFreq(G4int val) {fSaveRndm = val;}
70  virtual G4Run* GenerateRun();
71 
72 // Edep in all volume
74  void SetEdepALL(G4double vall){ fEdepAll = vall;}
75  void AddEdepALL (G4double vall)
76  {
77  fEdepAll += vall;
78  fEdepAll_err += vall*vall;
79  }
80 // 0. Edep in homogeneous Medium
82  void SetEdepMedium(G4double vall){ fEdepMedium = vall;}
83  void AddEdepMedium (G4double vall)
84  {
85  fEdepMedium += vall;
86  fEdepMedium_err += vall*vall;
87  }
88 // 1. Edep in Bounding Slice Volume
90  void SetEdepSlice(G4double vall){ fEdepSlice = vall;}
91  void AddEdepSlice (G4double vall)
92  {
93  fEdepSlice += vall;
94  fEdepSlice_err += vall*vall;
95  }
96 // 2. Edep in Soma volume
98  void SetEdepSoma(G4double vall){ fEdepSoma = vall;}
99  void AddEdepSoma (G4double vall)
100  {
101  fEdepSoma += vall;
102  fEdepSoma_err += vall*vall;
103  }
104 
105 // 3. Edep in Dendrites volume
107  void SetEdepDend(G4double vall){ fEdepDend = vall;}
108  void AddEdepDend (G4double vall)
109  {
110  fEdepDend += vall;
111  fEdepDend_err += vall*vall;
112  }
113 
114 // 4. Edep in Axon volume
116  void SetEdepAxon(G4double vall){ fEdepAxon = vall;}
117  void AddEdepAxon (G4double vall)
118  {
119  fEdepAxon += vall;
120  fEdepAxon_err += vall*vall;
121  }
122 
123 // 5. Edep in whole Neuron volume
125  void SetEdepNeuron(G4double vall){ fEdepNeuron = vall;}
127  {
128  fEdepNeuron += vall;
129  fEdepNeuron_err += vall*vall;
130  }
131 
133  void SetNumEvent(G4int i){fNumEvent = i;}
134 
135 private:
136 
138  // Histogramming
139  //
140  void CreateHistogram();
141  void WriteHistogram();
142 
144  // Print Info
145  //
146  void PrintRunInfo(const G4Run* run);
147 
149  // Attributes
150  //
151  //TrackingAction* fpTrackingAction;
152  //bool fInitialized;
153  bool fDebug;
154 
158  //NeuronLoadDataFile * fNeuronLoadParamz;
159  //NeuronHitCompartments* fCompart;
160  Run* fRun;
161 
162 //
163 // phys
169 
170 };
171 
172 #endif