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

#include <CCalSteppingAction.hh>

Inheritance diagram for CCalSteppingAction:
Collaboration diagram for CCalSteppingAction:

Public Member Functions

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

Friends

class CCalEndOfEventAction
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 37 of file CCalSteppingAction.hh.

Constructor & Destructor Documentation

CCalSteppingAction::~CCalSteppingAction ( )

Definition at line 56 of file CCalSteppingAction.cc.

56  {
57  G4cout << "CCalSteppingAction deleted" << G4endl;
58 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

void CCalSteppingAction::UserSteppingAction ( const G4Step aStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 61 of file CCalSteppingAction.cc.

61  {
62 
63  G4StepPoint* PostStepPoint= aStep->GetPostStepPoint();
64  G4StepPoint* PreStepPoint= aStep->GetPreStepPoint();
65  int TSliceID;
66 
67  if ( PostStepPoint->GetGlobalTime() / nanosecond > 1.0E9 ) TSliceID = 999999999;
68  else TSliceID = static_cast<int>( PostStepPoint->GetGlobalTime() / nanosecond );
69  TSliceID = TSliceID<timeHistoMaxBin ? TSliceID : timeHistoMaxBin-1;
70  timeDeposit[TSliceID] += aStep->GetTotalEnergyDeposit() / GeV;
71 
72  G4ThreeVector HitPoint = 0.5*(PostStepPoint->GetPosition()+
73  PreStepPoint->GetPosition());
74  // Because the beam axis has been defined as the x-axis,
75  // the lateral displacement is given in terms of the y and z positions.
76  double perp = std::sqrt(HitPoint.y()*HitPoint.y()+HitPoint.z()*HitPoint.z());
77  int radialPosition = std::min(69,int(perp/cm));
78  LateralProfile[radialPosition] += aStep->GetTotalEnergyDeposit() / GeV;
79 
80 }
static constexpr double nanosecond
Definition: G4SIunits.hh:158
double z() const
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
static constexpr double cm
Definition: G4SIunits.hh:119
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
double y() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double GeV
Definition: G4SIunits.hh:217
G4double GetGlobalTime() const

Here is the call graph for this function:

Friends And Related Function Documentation

friend class CCalEndOfEventAction
friend

Definition at line 39 of file CCalSteppingAction.hh.


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