Loading...
Searching...
No Matches
Public Member Functions | List of all members
F05SteppingAction Class Reference

#include <Doxymodules_field.h>

Inheritance diagram for F05SteppingAction:
G4UserSteppingAction

Public Member Functions

 F05SteppingAction ()=default
 
 ~F05SteppingAction () override=default
 
void UserSteppingAction (const G4Step *) override
 

Detailed Description

Definition at line 139 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F05SteppingAction()

F05SteppingAction::F05SteppingAction ( )
default

◆ ~F05SteppingAction()

F05SteppingAction::~F05SteppingAction ( )
overridedefault

Member Function Documentation

◆ UserSteppingAction()

void F05SteppingAction::UserSteppingAction ( const G4Step aStep)
override

Definition at line 43 of file F05SteppingAction.cc.

44{
45
46 G4String processName = aStep->GetPostStepPoint()->
47 GetProcessDefinedStep()->GetProcessName();
48
49 if(processName != "DecayWithSpin" ){
50
51 G4Track* aTrack= aStep->GetTrack();
52
53 G4String particleName = aStep->GetTrack()->
54 GetDefinition()->GetParticleName();
55
56 G4ThreeVector polDir = aTrack->GetPolarization();
57 G4ThreeVector momDir = aTrack->GetMomentumDirection();
58
59 if (particleName == "mu+") {
60 if (momDir * polDir < (1.-1.E-7)) {
61
62 G4double cos_theta = momDir * polDir;
63 G4double gTime = aTrack->GetGlobalTime();
64
65 G4cout << " *** ERROR - WARNING *** " << G4endl;
66 G4cout << "processName: " << processName << G4endl;
67 G4cout << "particleName " << particleName << G4endl;
68 G4cout << "Global Time: " << gTime/ns << "nsec" << G4endl;
69 G4cout << "Angle between spin and momentum:" << cos_theta << G4endl;
70 G4Exception("SteppingAction::UserSteppingAction","Error",
71 FatalException,
72 "Angle between spin and momentum too large");
73 }
74 }
75 }
76}

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

Applications | User Support | Publications | Collaboration