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

#include <XrayFluoSteppingAction.hh>

Inheritance diagram for XrayFluoSteppingAction:
G4UserSteppingAction

Public Member Functions

 XrayFluoSteppingAction ()
 
 ~XrayFluoSteppingAction ()
 
void UserSteppingAction (const G4Step *)
 
void SetMercuryFlag (G4bool val)
 
- 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 47 of file XrayFluoSteppingAction.hh.

Constructor & Destructor Documentation

XrayFluoSteppingAction::XrayFluoSteppingAction ( )

Definition at line 51 of file XrayFluoSteppingAction.cc.

References G4cout, and G4endl.

52  :mercuryFlag(false)
53 {
54  G4cout << "XrayFluoSteppingAction created" << G4endl;
55 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
XrayFluoSteppingAction::~XrayFluoSteppingAction ( )

Definition at line 59 of file XrayFluoSteppingAction.cc.

References G4cout, and G4endl.

60 {
61  G4cout << "XrayFluoSteppingAction deleted" << G4endl;
62 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

void XrayFluoSteppingAction::SetMercuryFlag ( G4bool  val)
inline

Definition at line 55 of file XrayFluoSteppingAction.hh.

Referenced by XrayFluoSimulation::RunSimulation().

55 {mercuryFlag=val;};
void XrayFluoSteppingAction::UserSteppingAction ( const G4Step aStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 66 of file XrayFluoSteppingAction.cc.

References XrayFluoMercuryDetectorConstruction::GetInstance(), G4VPhysicalVolume::GetName(), G4Track::GetNextVolume(), G4VPhysicalVolume::GetObjectTranslation(), XrayFluoMercuryDetectorConstruction::GetOptic(), G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetTrack(), and G4StepPoint::SetMomentumDirection().

67 {
68 #ifdef G4ANALYSIS_USE
69  XrayFluoAnalysisManager* analysis = XrayFluoAnalysisManager::getInstance();
70  analysis->analyseStepping(aStep);
71 #endif
72 
73  if (mercuryFlag){
75 
76  if(aStep->GetTrack()->GetNextVolume()) {
77 
78  if(aStep->GetTrack()->GetNextVolume()->GetName() == "DetectorOptic") {
79  G4ThreeVector particlePosition = aStep->GetPostStepPoint()->GetPosition();
80  G4ThreeVector detectorPosition = detector->GetOptic()->GetObjectTranslation();
81  G4ThreeVector newDirection = detectorPosition - particlePosition;
82  aStep->GetPostStepPoint()->SetMomentumDirection(newDirection);
83  }
84  }
85  }
86 }
static XrayFluoMercuryDetectorConstruction * GetInstance()
G4VPhysicalVolume * GetNextVolume() const
void SetMomentumDirection(const G4ThreeVector &aValue)
const G4String & GetName() const
const G4ThreeVector & GetPosition() const
G4StepPoint * GetPostStepPoint() const
G4ThreeVector GetObjectTranslation() const
G4Track * GetTrack() const

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