Geant4  10.02.p03
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 ()
 
void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Private Member Functions

 CCalSteppingAction ()
 
void endOfEvent ()
 

Private Attributes

float LateralProfile [70]
 
float timeDeposit [200]
 
int timeHistoMaxBin
 

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::CCalSteppingAction ( )
private

Definition at line 44 of file CCalSteppingAction.cc.

44  {
45 
47  timeHistoMaxBin=analysis->maxbin();
48 
49  int i;
50  for (i=0; i<200; i++) {timeDeposit[i] = 0.;}
51  for (i=0; i<70; i++) {LateralProfile[i] = 0.;}
52 
53 }
Alternative here is a XML file.
Definition: CCalAnalysis.hh:44
static CCalAnalysis * getInstance()
Here is the call graph for this function:

◆ ~CCalSteppingAction()

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

◆ endOfEvent()

void CCalSteppingAction::endOfEvent ( )
private

Definition at line 83 of file CCalSteppingAction.cc.

83  {
84 
87  analysis->InsertTime(timeDeposit);
88 
89  int i=0;
90  for (i=0; i<70; i++){LateralProfile[i] = 0.;}
91  for (i=0; i<200; i++){timeDeposit[i] = 0.;}
92 
93  G4cout << " --- End of event --- " << G4endl;
94 
95 }
G4GLOB_DLL std::ostream G4cout
void InsertLateralProfile(float *)
Alternative here is a XML file.
Definition: CCalAnalysis.hh:44
static CCalAnalysis * getInstance()
#define G4endl
Definition: G4ios.hh:61
void InsertTime(float *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UserSteppingAction()

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 const double cm
Definition: G4SIunits.hh:118
static const double GeV
Definition: G4SIunits.hh:214
static const double nanosecond
Definition: G4SIunits.hh:157
double y() const
double z() const
Here is the call graph for this function:

Friends And Related Function Documentation

◆ CCalEndOfEventAction

friend class CCalEndOfEventAction
friend

Definition at line 39 of file CCalSteppingAction.hh.

Member Data Documentation

◆ LateralProfile

float CCalSteppingAction::LateralProfile[70]
private

Definition at line 51 of file CCalSteppingAction.hh.

◆ timeDeposit

float CCalSteppingAction::timeDeposit[200]
private

Definition at line 52 of file CCalSteppingAction.hh.

◆ timeHistoMaxBin

int CCalSteppingAction::timeHistoMaxBin
private

Definition at line 53 of file CCalSteppingAction.hh.


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