SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_BasicPrimaryGeneratorAction.hh
Go to the documentation of this file.
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 //
27 
28 #ifndef ParisBasicPrimaryGeneratorAction_h
29 #define ParisBasicPrimaryGeneratorAction_h 1
30 
31 #include "globals.hh"
32 #include "G4VUserPrimaryGeneratorAction.hh"
33 
34 // std includes
35 #include <iostream>
36 #include <sstream>
37 #include <fstream>
38 
39 class G4ParticleGun;
40 class G4Event;
41 class ParisBasicPrimaryGeneratorActionMessanger;
42 
44 namespace SToGS {
46 
80 class ParisBasicPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
81 {
82 public:
86 
87 public:
88  virtual void GeneratePrimaries(G4Event* anEvent);
89 
90 public:
92 
96  void ComputeParameters(G4String filename = "setup/basic.gene");
97 
98 private:
99  // Maximum gamma multiplicity in a cascade
100  static const G4int MultMax = 100;
101  G4ParticleGun* particleGun;
102  G4int mult;
103  G4double Posx;
104  G4double Posy;
105  G4double Posz;
106  G4double betax;
107  G4double betay;
108  G4double betaz;
109  G4double Egamma[MultMax];
110  G4double EgammaDoppler[MultMax];
111  G4double Theta_min[MultMax];
112  G4double Theta_max[MultMax];
113  G4double Phi_min[MultMax];
114  G4double Phi_max[MultMax];
115 
117 };
118 
119 #include "G4UImessenger.hh"
120 
121 class G4UIdirectory;
122 class G4UIcmdWithAString;
123 
125 
131 class ParisBasicPrimaryGeneratorActionMessanger: public G4UImessenger
132 {
133 public:
136 
137  void SetNewValue(G4UIcommand*, G4String);
138 
139 private:
140  ParisBasicPrimaryGeneratorAction *theGenerator;
141 
142  G4UIdirectory *theDirectory;
143  G4UIcmdWithAString *resetParametersCmd;
144 };
145 
146 } // SToGS Namespace
147 
148 #endif
149 
150 
Messanger class for ParisBasicPrimaryGenerator.
void ComputeParameters(G4String filename="setup/basic.gene")
from a given file, it reads the characteristics of the gamma cascade
Basic generator to generate a cascade of discrete gamma-rays.
ParisBasicPrimaryGeneratorActionMessanger(ParisBasicPrimaryGeneratorAction *)