Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PSEnergyDeposit3D Class Reference

#include <G4PSEnergyDeposit3D.hh>

+ Inheritance diagram for G4PSEnergyDeposit3D:

Public Member Functions

 G4PSEnergyDeposit3D (G4String name, G4int ni=1, G4int nj=1, G4int nk=1, G4int depi=2, G4int depj=1, G4int depk=0)
 
 G4PSEnergyDeposit3D (G4String name, const G4String &unit, G4int ni=1, G4int nj=1, G4int nk=1, G4int depi=2, G4int depj=1, G4int depk=0)
 
 ~G4PSEnergyDeposit3D () override=default
 
- Public Member Functions inherited from G4PSEnergyDeposit
 G4PSEnergyDeposit (G4String name, G4int depth=0)
 
 G4PSEnergyDeposit (G4String name, const G4String &unit, G4int depth=0)
 
 ~G4PSEnergyDeposit () override=default
 
void Initialize (G4HCofThisEvent *) override
 
void clear () override
 
void PrintAll () override
 
virtual void SetUnit (const G4String &unit)
 
- Public Member Functions inherited from G4VPrimitivePlotter
 G4VPrimitivePlotter (G4String name, G4int depth=0)
 
virtual ~G4VPrimitivePlotter ()
 
void Plot (G4int copyNo, G4int histID)
 
G4int GetNumberOfHist () const
 
- Public Member Functions inherited from G4VPrimitiveScorer
 G4VPrimitiveScorer (G4String name, G4int depth=0)
 
virtual ~G4VPrimitiveScorer ()
 
G4int GetCollectionID (G4int)
 
virtual void Initialize (G4HCofThisEvent *)
 
virtual void EndOfEvent (G4HCofThisEvent *)
 
virtual void clear ()
 
virtual void DrawAll ()
 
virtual void PrintAll ()
 
void SetUnit (const G4String &unit)
 
const G4StringGetUnit () const
 
G4double GetUnitValue () const
 
void SetMultiFunctionalDetector (G4MultiFunctionalDetector *d)
 
G4MultiFunctionalDetectorGetMultiFunctionalDetector () const
 
G4String GetName () const
 
void SetFilter (G4VSDFilter *f)
 
G4VSDFilterGetFilter () const
 
void SetVerboseLevel (G4int vl)
 
G4int GetVerboseLevel () const
 
void SetNijk (G4int i, G4int j, G4int k)
 

Protected Member Functions

G4int GetIndex (G4Step *) override
 
- Protected Member Functions inherited from G4PSEnergyDeposit
G4bool ProcessHits (G4Step *, G4TouchableHistory *) override
 
- Protected Member Functions inherited from G4VPrimitiveScorer
virtual G4bool ProcessHits (G4Step *, G4TouchableHistory *)=0
 
virtual G4int GetIndex (G4Step *)
 
void CheckAndSetUnit (const G4String &unit, const G4String &category)
 
G4VSolidComputeSolid (G4Step *aStep, G4int replicaIdx)
 
G4VSolidComputeCurrentSolid (G4Step *aStep)
 

Additional Inherited Members

- Protected Attributes inherited from G4VPrimitivePlotter
std::map< G4int, G4inthitIDMap
 
- Protected Attributes inherited from G4VPrimitiveScorer
G4String primitiveName
 
G4MultiFunctionalDetectordetector
 
G4VSDFilterfilter
 
G4int verboseLevel
 
G4int indexDepth
 
G4String unitName
 
G4double unitValue
 
G4int fNi
 
G4int fNj
 
G4int fNk
 

Detailed Description

Definition at line 41 of file G4PSEnergyDeposit3D.hh.

Constructor & Destructor Documentation

◆ G4PSEnergyDeposit3D() [1/2]

G4PSEnergyDeposit3D::G4PSEnergyDeposit3D ( G4String  name,
G4int  ni = 1,
G4int  nj = 1,
G4int  nk = 1,
G4int  depi = 2,
G4int  depj = 1,
G4int  depk = 0 
)

Definition at line 38 of file G4PSEnergyDeposit3D.cc.

41 : G4PSEnergyDeposit(name)
42 , fDepthi(depi)
43 , fDepthj(depj)
44 , fDepthk(depk)
45{
46 SetNijk(ni, nj, nk);
47}
void SetNijk(G4int i, G4int j, G4int k)

◆ G4PSEnergyDeposit3D() [2/2]

G4PSEnergyDeposit3D::G4PSEnergyDeposit3D ( G4String  name,
const G4String unit,
G4int  ni = 1,
G4int  nj = 1,
G4int  nk = 1,
G4int  depi = 2,
G4int  depj = 1,
G4int  depk = 0 
)

Definition at line 49 of file G4PSEnergyDeposit3D.cc.

52 : G4PSEnergyDeposit3D(name, ni, nj, nk, depi, depj, depk)
53{
54 SetUnit(unit);
55}
virtual void SetUnit(const G4String &unit)

◆ ~G4PSEnergyDeposit3D()

G4PSEnergyDeposit3D::~G4PSEnergyDeposit3D ( )
overridedefault

Member Function Documentation

◆ GetIndex()

G4int G4PSEnergyDeposit3D::GetIndex ( G4Step aStep)
overrideprotectedvirtual

Reimplemented from G4VPrimitiveScorer.

Definition at line 57 of file G4PSEnergyDeposit3D.cc.

58{
59 const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
60 G4int i = touchable->GetReplicaNumber(fDepthi);
61 G4int j = touchable->GetReplicaNumber(fDepthj);
62 G4int k = touchable->GetReplicaNumber(fDepthk);
63
64 if(i < 0 || j < 0 || k < 0)
65 {
67 ED << "GetReplicaNumber is negative" << G4endl
68 << "touchable->GetReplicaNumber(fDepthi) returns i,j,k = " << i << ","
69 << j << "," << k << " for volume "
70 << touchable->GetVolume(fDepthi)->GetName() << ","
71 << touchable->GetVolume(fDepthj)->GetName() << ","
72 << touchable->GetVolume(fDepthk)->GetName() << G4endl;
73 G4Exception("G4PSEnergyDeposit3D::GetIndex", "DetPS0006", JustWarning, ED);
74 }
75
76 return i * fNj * fNk + j * fNk + k;
77}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
const G4VTouchable * GetTouchable() const
G4StepPoint * GetPreStepPoint() const
const G4String & GetName() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:34
virtual G4int GetReplicaNumber(G4int depth=0) const
Definition: G4VTouchable.cc:50

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