Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMXPrimaryGeneratorAction Class Reference

#include <DMXPrimaryGeneratorAction.hh>

Inheritance diagram for DMXPrimaryGeneratorAction:
Collaboration diagram for DMXPrimaryGeneratorAction:

Public Member Functions

 DMXPrimaryGeneratorAction ()
 
 ~DMXPrimaryGeneratorAction ()
 
void GeneratePrimaries (G4Event *anEvent)
 
const long * GetEventSeeds () const
 
G4double GetEnergyPrimary () const
 
- Public Member Functions inherited from G4VUserPrimaryGeneratorAction
 G4VUserPrimaryGeneratorAction ()
 
virtual ~G4VUserPrimaryGeneratorAction ()
 

Detailed Description

Definition at line 57 of file DMXPrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

DMXPrimaryGeneratorAction::DMXPrimaryGeneratorAction ( )

Definition at line 60 of file DMXPrimaryGeneratorAction.cc.

60  {
61 
62 #ifdef DMXENV_GPS_USE
63  particleGun = new G4GeneralParticleSource();
64 #else
65  particleGun = new DMXParticleSource();
66 #endif
67 
68  energy_pri=0;
69  // seeds=NULL;
70  seeds[0] =-1;
71  seeds[1] =-1;
72 
73 }
DMXPrimaryGeneratorAction::~DMXPrimaryGeneratorAction ( )

Definition at line 77 of file DMXPrimaryGeneratorAction.cc.

77  {
78 
79  delete particleGun;
80 }

Member Function Documentation

void DMXPrimaryGeneratorAction::GeneratePrimaries ( G4Event anEvent)
virtual

Implements G4VUserPrimaryGeneratorAction.

Definition at line 84 of file DMXPrimaryGeneratorAction.cc.

84  {
85 
86  energy_pri = 0.;
87 
88  // seeds
89  seeds[0] = *G4Random::getTheSeeds();
90  seeds[1] = *(G4Random::getTheSeeds()+1);
91 
92  particleGun->GeneratePrimaryVertex(anEvent);
93 
94  energy_pri = particleGun->GetParticleEnergy();
95 
96  //Fill ntuple #1
97  G4AnalysisManager* man = G4AnalysisManager::Instance();
98  man->FillNtupleDColumn(1,0,energy_pri);
99  man->AddNtupleRow(1);
100 }
void GeneratePrimaryVertex(G4Event *evt)
G4bool FillNtupleDColumn(G4int id, G4double value)
G4double GetParticleEnergy()

Here is the call graph for this function:

G4double DMXPrimaryGeneratorAction::GetEnergyPrimary ( ) const
inline

Definition at line 80 of file DMXPrimaryGeneratorAction.hh.

80 {return energy_pri;};

Here is the caller graph for this function:

const long* DMXPrimaryGeneratorAction::GetEventSeeds ( ) const
inline

Definition at line 79 of file DMXPrimaryGeneratorAction.hh.

79 {return seeds;};

Here is the caller graph for this function:


The documentation for this class was generated from the following files: