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

#include <G4ErrorGeomVolumeTarget.hh>

+ Inheritance diagram for G4ErrorGeomVolumeTarget:

Public Member Functions

 G4ErrorGeomVolumeTarget (const G4String &name)
 
virtual ~G4ErrorGeomVolumeTarget ()
 
virtual G4bool TargetReached (const G4Step *aStep)
 
virtual void Dump (const G4String &msg) const
 
- Public Member Functions inherited from G4ErrorTarget
 G4ErrorTarget ()
 
virtual ~G4ErrorTarget ()=default
 
virtual G4double GetDistanceFromPoint (const G4ThreeVector &, const G4ThreeVector &) const
 
virtual G4double GetDistanceFromPoint (const G4ThreeVector &) const
 
G4ErrorTargetType GetType () const
 

Additional Inherited Members

- Protected Attributes inherited from G4ErrorTarget
G4ErrorTargetType theType {G4ErrorTarget_GeomVolume}
 

Detailed Description

Definition at line 47 of file G4ErrorGeomVolumeTarget.hh.

Constructor & Destructor Documentation

◆ G4ErrorGeomVolumeTarget()

G4ErrorGeomVolumeTarget::G4ErrorGeomVolumeTarget ( const G4String & name)

Definition at line 42 of file G4ErrorGeomVolumeTarget.cc.

43{
45 theName = name;
46}
@ G4ErrorTarget_GeomVolume
G4ErrorTargetType theType
const char * name(G4int ptype)

◆ ~G4ErrorGeomVolumeTarget()

virtual G4ErrorGeomVolumeTarget::~G4ErrorGeomVolumeTarget ( )
inlinevirtual

Definition at line 51 of file G4ErrorGeomVolumeTarget.hh.

51{}

Member Function Documentation

◆ Dump()

void G4ErrorGeomVolumeTarget::Dump ( const G4String & msg) const
virtual

Implements G4ErrorTarget.

Definition at line 77 of file G4ErrorGeomVolumeTarget.cc.

78{
79 G4cout << msg << " G4ErrorGeomVolumeTarget: Volume " << theName << G4endl;
80}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ TargetReached()

G4bool G4ErrorGeomVolumeTarget::TargetReached ( const G4Step * aStep)
virtual

Reimplemented from G4ErrorTarget.

Definition at line 49 of file G4ErrorGeomVolumeTarget.cc.

50{
51 if(aStep->GetTrack()->GetNextVolume() != 0)
52 {
53#ifdef G4VERBOSE
55 {
56 G4cout << " G4ErrorGeomVolumeTarget::TargetReached( "
57 << aStep->GetTrack()->GetNextVolume()->GetName() << " =? "
58 << theName << G4endl;
59 }
60#endif
61 if(aStep->GetTrack()->GetNextVolume()->GetName() == theName)
62 {
63 return 1;
64 }
65 else
66 {
67 return 0;
68 }
69 }
70 else
71 {
72 return 0;
73 }
74}
G4Track * GetTrack() const
G4VPhysicalVolume * GetNextVolume() const
const G4String & GetName() const

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