SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_UniformPrimaryGeneratorAction.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 ParisUniformPrimaryGeneratorAction_h
29 #define ParisUniformPrimaryGeneratorAction_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 ParisUniformPrimaryGeneratorMessanger;
42 
43 
45 namespace SToGS {
47 
71 class ParisUniformPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
72 {
73 public:
77 
78 public:
79  virtual void GeneratePrimaries(G4Event* anEvent);
80 
81 public:
83 
87  void ComputeParameters(G4String filename = "setup/uniform.gene");
88 
89  void ChangeMultiplicity(G4int smult);
90 
91 private:
92  // Maximum gamma multiplicity in a cascade
93  static const G4int MultMax = 100;
94  G4ParticleGun* particleGun;
95  G4int mult;
96  G4double Posx;
97  G4double Posy;
98  G4double Posz;
99  G4double betax;
100  G4double betay;
101  G4double betaz;
102  G4double Emin, Emax, Thetamin, Thetamax, Phimin, Phimax;
103  G4double Egamma[MultMax];
104  G4double EgammaDoppler[MultMax];
105 
107 };
108 
109 #include "G4UImessenger.hh"
110 
111 class G4UIdirectory;
112 class G4UIcmdWithAString;
113 class G4UIcmdWithAnInteger;
114 
116 
122 class ParisUniformPrimaryGeneratorMessanger: public G4UImessenger
123 {
124 public:
127 
128  void SetNewValue(G4UIcommand*, G4String);
129 private:
131 
132  G4UIdirectory *theDirectory;
133  G4UIcmdWithAString *resetParametersCmd;
134  G4UIcmdWithAnInteger *multCmd;
135 };
136 
137 } // SToGS Namespace
138 
139 #endif
Messanger class for ParisBasicPrimaryGenerator.
ParisUniformPrimaryGeneratorMessanger(ParisUniformPrimaryGeneratorAction *)
void ComputeParameters(G4String filename="setup/uniform.gene")
from a given file, it reads the characteristics of the gamma cascade
It generates gamma-rays using an uniform distribution.