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

#include <B4bSteppingAction.hh>

Inheritance diagram for B4bSteppingAction:
G4UserSteppingAction

Public Member Functions

 B4bSteppingAction (const B4DetectorConstruction *detectorConstruction)
 
virtual ~B4bSteppingAction ()
 
virtual void UserSteppingAction (const G4Step *step)
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Stepping action class.

In UserSteppingAction() there are collected the energy deposit and track lengths of charged particles in Absober and Gap layers and updated in B4bRunData object.

Definition at line 44 of file B4bSteppingAction.hh.

Constructor & Destructor Documentation

B4bSteppingAction::B4bSteppingAction ( const B4DetectorConstruction detectorConstruction)

Definition at line 40 of file B4bSteppingAction.cc.

43  fDetConstruction(detectorConstruction)
44 {
45 }
B4bSteppingAction::~B4bSteppingAction ( )
virtual

Definition at line 49 of file B4bSteppingAction.cc.

50 {
51 }

Member Function Documentation

void B4bSteppingAction::UserSteppingAction ( const G4Step step)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 55 of file B4bSteppingAction.cc.

References B4bRunData::Add(), B4DetectorConstruction::GetAbsorberPV(), G4Track::GetDefinition(), B4DetectorConstruction::GetGapPV(), G4RunManager::GetNonConstCurrentRun(), G4ParticleDefinition::GetPDGCharge(), G4Step::GetPreStepPoint(), G4RunManager::GetRunManager(), G4Step::GetStepLength(), G4Step::GetTotalEnergyDeposit(), G4StepPoint::GetTouchableHandle(), G4Step::GetTrack(), G4VTouchable::GetVolume(), kAbs, and kGap.

56 {
57 // Collect energy and track length step by step
58 
59  // get volume of the current step
60  G4VPhysicalVolume* volume
62 
63  // energy deposit
64  G4double edep = step->GetTotalEnergyDeposit();
65 
66  // step length
67  G4double stepLength = 0.;
68  if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
69  stepLength = step->GetStepLength();
70  }
71 
72  B4bRunData* runData = static_cast<B4bRunData*>
74 
75  if ( volume == fDetConstruction->GetAbsorberPV() ) {
76  runData->Add(kAbs, edep, stepLength);
77  }
78 
79  if ( volume == fDetConstruction->GetGapPV() ) {
80  runData->Add(kGap, edep, stepLength);
81  }
82 }
G4ParticleDefinition * GetDefinition() const
G4double GetStepLength() const
void Add(G4int id, G4double de, G4double dl)
Definition: B4bRunData.hh:82
G4StepPoint * GetPreStepPoint() const
const G4VPhysicalVolume * GetGapPV() const
const G4VPhysicalVolume * GetAbsorberPV() const
G4double GetTotalEnergyDeposit() const
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const
G4double GetPDGCharge() const
G4Run * GetNonConstCurrentRun() const
const G4TouchableHandle & GetTouchableHandle() const

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