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

#include <F05SteppingAction.hh>

Inheritance diagram for F05SteppingAction:
Collaboration diagram for F05SteppingAction:

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 43 of file F05SteppingAction.hh.

Constructor & Destructor Documentation

F05SteppingAction::F05SteppingAction ( void  )

Definition at line 44 of file F05SteppingAction.cc.

45 {;}
F05SteppingAction::~F05SteppingAction ( )
virtual

Definition at line 49 of file F05SteppingAction.cc.

50 {;}

Member Function Documentation

void F05SteppingAction::UserSteppingAction ( const G4Step aStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 54 of file F05SteppingAction.cc.

55 {
56 
57  G4String processName = aStep->GetPostStepPoint()->
58  GetProcessDefinedStep()->GetProcessName();
59 
60  if(processName != "DecayWithSpin" ){
61 
62  G4Track* aTrack= aStep->GetTrack();
63 
64  G4String particleName = aStep->GetTrack()->
65  GetDefinition()->GetParticleName();
66 
67  G4ThreeVector polDir = aTrack->GetPolarization();
68  G4ThreeVector momDir = aTrack->GetMomentumDirection();
69 
70  if (particleName == "mu+") {
71  if (momDir * polDir < (1.-1.E-7)) {
72 
73  G4double cos_theta = momDir * polDir;
74  G4double gTime = aTrack->GetGlobalTime();
75 
76  G4cout << " *** ERROR - WARNING *** " << G4endl;
77  G4cout << "processName: " << processName << G4endl;
78  G4cout << "particleName " << particleName << G4endl;
79  G4cout << "Global Time: " << gTime/ns << "nsec" << G4endl;
80  G4cout << "Angle between spin and momentum:" << cos_theta << G4endl;
81  G4Exception("SteppingAction::UserSteppingAction","Error",
83  "Angle between spin and momentum too large");
84  }
85  }
86  }
87 }
const G4ThreeVector & GetPolarization() const
G4GLOB_DLL std::ostream G4cout
G4double GetGlobalTime() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4ThreeVector & GetMomentumDirection() const
G4StepPoint * GetPostStepPoint() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const
#define ns
Definition: xmlparse.cc:614

Here is the call graph for this function:


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