Geant4
10.00.p03
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
HadrontherapyPrimaryGeneratorAction.cc
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
// HADRONTHERAPY: a Geant4-based application for proton/ion-therapy studies
29
// _________________________________________________________________________
30
//
31
// This is the FULL version of the Hadrontherapy application.
32
// It is based on the Geant4 toolkit classes and released under the GPL3 license.
33
//
34
// Its basic version is released and maintained inside the Geant4 code
35
// as Advanced Example.
36
//
37
// To compile and run Hadrontherapy you only require the installation of Geant4 and,
38
// if you wish, the ROOT ananlysis program.
39
//
40
// For more information see the documentation at http://sites.google.com/site/hadrontherapy/
41
// or contact cirrone@lns.infn.it
42
//
43
// **************************************************************************************
44
45
#include "
HadrontherapyPrimaryGeneratorAction.hh
"
46
#include "
HadrontherapyPrimaryGeneratorMessenger.hh
"
47
#include "
HadrontherapyAnalysisManager.hh
"
48
#include "
G4SystemOfUnits.hh
"
49
#include "
G4Event.hh
"
50
#include "
G4ParticleGun.hh
"
51
#include "
G4GeneralParticleSource.hh
"
52
#include "
G4ParticleTable.hh
"
53
#include "
G4ParticleDefinition.hh
"
54
#include "
Randomize.hh
"
55
57
HadrontherapyPrimaryGeneratorAction::HadrontherapyPrimaryGeneratorAction
()
58
{
59
60
SetDefaultPrimaryParticle
();
61
62
// Definition of the General particle Source
63
particleGun
=
new
G4GeneralParticleSource
();
64
}
65
67
HadrontherapyPrimaryGeneratorAction::~HadrontherapyPrimaryGeneratorAction
()
68
{
69
delete
particleGun
;
70
71
}
72
74
void
HadrontherapyPrimaryGeneratorAction::SetDefaultPrimaryParticle
()
75
{
76
77
}
79
void
HadrontherapyPrimaryGeneratorAction::GeneratePrimaries
(
G4Event
* anEvent)
80
{
81
#ifdef G4ANALYSIS_USE_ROOT
82
// Increment the event counter
83
HadrontherapyAnalysisManager::GetInstance
()->startNewEvent();
84
#endif
85
particleGun
-> GeneratePrimaryVertex( anEvent );
86
}
87
HadrontherapyAnalysisManager::GetInstance
static HadrontherapyAnalysisManager * GetInstance()
Get the pointer to the analysis manager.
Definition:
HadrontherapyAnalysisManager.cc:72
HadrontherapyPrimaryGeneratorAction.hh
HadrontherapyPrimaryGeneratorAction::HadrontherapyPrimaryGeneratorAction
HadrontherapyPrimaryGeneratorAction()
Definition:
HadrontherapyPrimaryGeneratorAction.cc:57
G4GeneralParticleSource
Definition:
G4GeneralParticleSource.hh:151
HadrontherapyAnalysisManager.hh
G4ParticleTable.hh
G4ParticleDefinition.hh
Randomize.hh
HadrontherapyPrimaryGeneratorAction::SetDefaultPrimaryParticle
void SetDefaultPrimaryParticle()
Definition:
HadrontherapyPrimaryGeneratorAction.cc:74
HadrontherapyPrimaryGeneratorAction::~HadrontherapyPrimaryGeneratorAction
~HadrontherapyPrimaryGeneratorAction()
Definition:
HadrontherapyPrimaryGeneratorAction.cc:67
G4ParticleGun.hh
G4GeneralParticleSource.hh
G4SystemOfUnits.hh
HadrontherapyPrimaryGeneratorAction::particleGun
G4GeneralParticleSource * particleGun
Definition:
HadrontherapyPrimaryGeneratorAction.hh:83
G4Event.hh
HadrontherapyPrimaryGeneratorAction::GeneratePrimaries
void GeneratePrimaries(G4Event *)
Definition:
HadrontherapyPrimaryGeneratorAction.cc:79
G4Event
Definition:
G4Event.hh:52
HadrontherapyPrimaryGeneratorMessenger.hh
source
examples
advanced
hadrontherapy
src
HadrontherapyPrimaryGeneratorAction.cc
Generated on Sat Dec 13 2014 18:01:23 for Geant4 by
1.8.8