Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
BrachySteppingAction Class Reference

#include <BrachySteppingAction.hh>

Inheritance diagram for BrachySteppingAction:
G4UserSteppingAction

Public Member Functions

 BrachySteppingAction (BrachyAnalysisManager *analysis)
 
 ~BrachySteppingAction ()
 
void UserSteppingAction (const G4Step *)
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 39 of file BrachySteppingAction.hh.

Constructor & Destructor Documentation

BrachySteppingAction::BrachySteppingAction ( BrachyAnalysisManager analysis)

Definition at line 48 of file BrachySteppingAction.cc.

48  :analysis(analysisMan)
49 {
50 
51 }
BrachySteppingAction::~BrachySteppingAction ( )

Definition at line 53 of file BrachySteppingAction.cc.

54 {
55 }

Member Function Documentation

void BrachySteppingAction::UserSteppingAction ( const G4Step aStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 57 of file BrachySteppingAction.cc.

References G4Gamma::Definition(), energy(), fAlive, G4UserSteppingAction::fpSteppingManager, and python.hepunit::keV.

58 {
59 
60 // Retrieve the spectrum of gamma emitted in the Radioactive Decay
61 // and store it in a 1D histogram
62 
63  G4SteppingManager* steppingManager = fpSteppingManager;
64  G4Track* theTrack = aStep-> GetTrack();
65 
66  // check if it is alive
67  if(theTrack-> GetTrackStatus() == fAlive) {return;}
68 
69  // G4cout << "Start secondariessss" << G4endl;
70  // Retrieve the secondary particles
71  G4TrackVector* fSecondary = steppingManager -> GetfSecondary();
72 
73  for(size_t lp1=0;lp1<(*fSecondary).size(); lp1++)
74  {
75  // Retrieve particle
76  const G4ParticleDefinition* particleName = (*fSecondary)[lp1] -> GetDefinition();
77 
78  if (particleName == G4Gamma::Definition())
79  {
80  G4String process = (*fSecondary)[lp1]-> GetCreatorProcess()-> GetProcessName();
81 
82  // Retrieve the process originating it
83  // G4cout << "creator process " << process << G4endl;
84  if (process == "RadioactiveDecay")
85  {
86 #ifdef ANALYSIS_USE
87  G4double energy = (*fSecondary)[lp1] -> GetKineticEnergy();
88  // Store the initial energy of particles in a 1D histogram
89  analysis -> FillPrimaryParticleHistogram(energy/keV);
90 #endif
91  }
92  }
93  }
94 }
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4SteppingManager * fpSteppingManager
std::vector< G4Track * > G4TrackVector
double G4double
Definition: G4Types.hh:76
static G4Gamma * Definition()
Definition: G4Gamma.cc:49

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