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

#include <CCalSteppingAction.hh>

Inheritance diagram for CCalSteppingAction:
G4UserSteppingAction

Public Member Functions

 ~CCalSteppingAction ()
 
virtual void UserSteppingAction (const G4Step *aStep)
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
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 61 of file CCalSteppingAction.cc.

References G4cout, and G4endl.

61  {
62  G4cout << "CCalSteppingAction deleted" << G4endl;
63 }
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 66 of file CCalSteppingAction.cc.

References python.hepunit::cm, G4StepPoint::GetGlobalTime(), G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), G4Step::GetTotalEnergyDeposit(), python.hepunit::GeV, G4INCL::Math::min(), python.hepunit::nanosecond, CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

66  {
67 
68  G4StepPoint* PostStepPoint= aStep->GetPostStepPoint();
69  G4StepPoint* PreStepPoint= aStep->GetPreStepPoint();
70  int TSliceID;
71 
72  if ( PostStepPoint->GetGlobalTime() / nanosecond > 1.0E9 ) TSliceID = 999999999;
73  else TSliceID = static_cast<int>( PostStepPoint->GetGlobalTime() / nanosecond );
74  TSliceID = TSliceID<timeHistoMaxBin ? TSliceID : timeHistoMaxBin-1;
75  timeDeposit[TSliceID] += aStep->GetTotalEnergyDeposit() / GeV;
76 
77  G4ThreeVector HitPoint = 0.5*(PostStepPoint->GetPosition()+
78  PreStepPoint->GetPosition());
79  // Because the beam axis has been defined as the x-axis,
80  // the lateral displacement is given in terms of the y and z positions.
81  double perp = std::sqrt(HitPoint.y()*HitPoint.y()+HitPoint.z()*HitPoint.z());
82  int radialPosition = std::min(69,int(perp/cm));
83  LateralProfile[radialPosition] += aStep->GetTotalEnergyDeposit() / GeV;
84 
85 }
double z() const
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
int nanosecond
Definition: hepunit.py:82
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
G4double GetGlobalTime() const

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: