1 |
cafagna |
1.1 |
|
2 |
|
|
|
3 |
|
|
#ifndef PrimaryGeneratorAction_h
|
4 |
|
|
#define PrimaryGeneratorAction_h 1
|
5 |
|
|
|
6 |
|
|
#include "G4VUserPrimaryGeneratorAction.hh"
|
7 |
|
|
#include "globals.hh"
|
8 |
|
|
|
9 |
|
|
class G4ParticleGun;
|
10 |
|
|
class G4Event;
|
11 |
|
|
class DetectorConstruction;
|
12 |
|
|
class PrimaryGeneratorMessenger;
|
13 |
|
|
|
14 |
|
|
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
15 |
|
|
{
|
16 |
|
|
public:
|
17 |
|
|
PrimaryGeneratorAction(DetectorConstruction*);
|
18 |
|
|
~PrimaryGeneratorAction();
|
19 |
|
|
|
20 |
|
|
public:
|
21 |
|
|
void GeneratePrimaries(G4Event* anEvent);
|
22 |
|
|
void SetRndmFlag(G4String val) { rndmFlag = val;}
|
23 |
|
|
|
24 |
|
|
private:
|
25 |
|
|
G4ParticleGun* particleGun;
|
26 |
|
|
DetectorConstruction* Detector;
|
27 |
|
|
|
28 |
|
|
PrimaryGeneratorMessenger* gunMessenger; //messenger of this class
|
29 |
|
|
G4String rndmFlag; //flag for a random impact point
|
30 |
|
|
};
|
31 |
|
|
|
32 |
|
|
#endif
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
// 2005 by G.I.Vasilyev
|