Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HadrontherapyPrimaryGeneratorAction.cc
Go to the documentation of this file.
1 // **************************************************************************************
2 //
3 // HADRONTHERAPY: a Geant4-based application for proton/ion-therapy studies
4 // _________________________________________________________________________
5 //
6 // This is the FULL version of the Hadrontherapy application.
7 // It is based on the Geant4 toolkit classes and released under the GPL3 license.
8 //
9 // Its basic version is released and maintained inside the Geant4 code
10 // as Advanced Example.
11 //
12 // To compile and run Hadrontherapy you only require the installation of Geant4 and,
13 // if you wish, the ROOT ananlysis program.
14 //
15 // For more information see the documentation at http://sites.google.com/site/hadrontherapy/
16 // or contact cirrone@lns.infn.it
17 //
18 // **************************************************************************************
19 
23 #include "G4SystemOfUnits.hh"
24 #include "G4Event.hh"
25 #include "G4ParticleGun.hh"
27 #include "G4ParticleTable.hh"
28 #include "G4ParticleDefinition.hh"
29 #include "Randomize.hh"
30 
33 {
34 
35  SetDefaultPrimaryParticle();
36 
37  // Definition of the General particle Source
38  particleGun = new G4GeneralParticleSource();
39 }
40 
43 {
44  delete particleGun;
45 
46 }
47 
49 void HadrontherapyPrimaryGeneratorAction::SetDefaultPrimaryParticle()
50 {
51 
52 }
55  {
56 #ifdef G4ANALYSIS_USE_ROOT
57  // Increment the event counter
59 #endif
60  particleGun -> GeneratePrimaryVertex( anEvent );
61  }
62