source: trunk/source/processes/electromagnetic/lowenergy/test/hTest/include/hTestPrimaryGeneratorAction.hh@ 1201

Last change on this file since 1201 was 1199, checked in by garnier, 16 years ago

nvx fichiers dans CVS

File size: 4.4 KB
Line 
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#ifndef hTestPrimaryGeneratorAction_h
27#define hTestPrimaryGeneratorAction_h 1
28
29//---------------------------------------------------------------------------
30//
31// ClassName: hTestPrimaryGeneratorAction
32//
33// Description: Generate primary beam
34//
35// Authors: 0.6.04.01 V.Ivanchenko
36//
37// Modified:
38//
39//----------------------------------------------------------------------------
40//
41
42//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
43//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
44
45#include "hTestDetectorConstruction.hh"
46#include "G4Event.hh"
47#include "G4ParticleGun.hh"
48#include "G4VUserPrimaryGeneratorAction.hh"
49#include "G4ThreeVector.hh"
50#include "globals.hh"
51
52//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
53
54class hTestPrimaryGeneratorMessenger;
55
56class hTestPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
57{
58 public:
59
60 // The constructor defines a ParticleGun object, which allows
61 // shooting a beam of particles through the experimental set-up.
62 hTestPrimaryGeneratorAction(hTestDetectorConstruction*);
63
64 //The destructor. It deletes the ParticleGun.
65 ~hTestPrimaryGeneratorAction();
66
67 public:
68
69 //It reads the parameters of the primary particles.
70 //Generates the primary event via the ParticleGun method.
71 void GeneratePrimaries(G4Event* anEvent);
72
73 //Get/Set methods
74 void SetBeamX(G4double val) {x0 = val;};
75 void SetBeamY(G4double val) {y0 = val;};
76 void SetBeamZ(G4double val) {z0 = val;};
77 void SetBeamSigmaX(G4double val) {sigmaX = val;};
78 void SetBeamSigmaY(G4double val) {sigmaY = val;};
79 void SetBeamSigmaZ(G4double val) {sigmaY = val;};
80 void SetBeamSigmaE(G4double val);
81 void SetBeamEnergy(G4double val);
82 void SetBeamMinCosTheta(G4double val) {minCosTheta = val;};
83 void SetVerbose(G4int val) {verbose = val;};
84 G4ThreeVector GetBeamPosition() const {return position;};
85 G4ThreeVector GetBeamDirection() const {return direction;};
86 G4ThreeVector GetBeamEnergy() const {return energy;};
87 G4int GetVerbose() const {return verbose;};
88 void SetBeamBeta(G4double val);
89 void SetSigmaBeta(G4double val);
90 void SetRandom(const G4String& type) {m_gauss = type;};
91
92 private:
93
94 void InitializeMe();
95
96 hTestDetectorConstruction* theDet;
97 G4ParticleGun* particleGun;
98 hTestPrimaryGeneratorMessenger* theMessenger;
99
100 G4int counter;
101 G4int verbose;
102 G4double x0, y0, z0;
103 G4double sigmaX, sigmaY, sigmaZ;
104 G4double sigmaE;
105 G4double energy;
106 G4double minE, maxE, minBeta, maxBeta;
107 G4double minCosTheta;
108 G4ThreeVector position;
109 G4ThreeVector direction;
110 G4String m_gauss;
111};
112
113//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
114
115#endif
116
117
118
119
120
121
Note: See TracBrowser for help on using the repository browser.