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

#include <G4SDKineticEnergyFilter.hh>

+ Inheritance diagram for G4SDKineticEnergyFilter:

Public Member Functions

 G4SDKineticEnergyFilter (G4String name, G4double elow=0.0, G4double ehigh=DBL_MAX)
 
virtual ~G4SDKineticEnergyFilter ()
 
virtual G4bool Accept (const G4Step *) const
 
void SetKineticEnergy (G4double elow, G4double ehigh)
 
void SetLowEnergy (G4double elow)
 
void SetHighEnergy (G4double ehigh)
 
void show ()
 
- Public Member Functions inherited from G4VSDFilter
 G4VSDFilter (G4String name)
 
virtual ~G4VSDFilter ()
 
virtual G4bool Accept (const G4Step *) const =0
 
G4String GetName () const
 

Additional Inherited Members

- Protected Attributes inherited from G4VSDFilter
G4String filterName
 

Detailed Description

Definition at line 50 of file G4SDKineticEnergyFilter.hh.

Constructor & Destructor Documentation

◆ G4SDKineticEnergyFilter()

G4SDKineticEnergyFilter::G4SDKineticEnergyFilter ( G4String  name,
G4double  elow = 0.0,
G4double  ehigh = DBL_MAX 
)

Definition at line 43 of file G4SDKineticEnergyFilter.cc.

46 :G4VSDFilter(name),fLowEnergy(elow),fHighEnergy(ehigh)
47{;}

◆ ~G4SDKineticEnergyFilter()

G4SDKineticEnergyFilter::~G4SDKineticEnergyFilter ( )
virtual

Definition at line 49 of file G4SDKineticEnergyFilter.cc.

50{;}

Member Function Documentation

◆ Accept()

G4bool G4SDKineticEnergyFilter::Accept ( const G4Step aStep) const
virtual

Implements G4VSDFilter.

Definition at line 52 of file G4SDKineticEnergyFilter.cc.

53{
54 G4double kinetic = aStep->GetPreStepPoint()->GetKineticEnergy();
55 if ( kinetic < fLowEnergy ) return FALSE;
56 if ( kinetic >= fHighEnergy ) return FALSE;
57 return TRUE;
58}
double G4double
Definition: G4Types.hh:83
#define TRUE
Definition: Globals.hh:27
#define FALSE
Definition: Globals.hh:23
G4double GetKineticEnergy() const
G4StepPoint * GetPreStepPoint() const

Referenced by G4SDParticleWithEnergyFilter::Accept().

◆ SetHighEnergy()

void G4SDKineticEnergyFilter::SetHighEnergy ( G4double  ehigh)

◆ SetKineticEnergy()

void G4SDKineticEnergyFilter::SetKineticEnergy ( G4double  elow,
G4double  ehigh 
)

Definition at line 60 of file G4SDKineticEnergyFilter.cc.

60 {
61 fLowEnergy = elow;
62 fHighEnergy = ehigh;
63}

Referenced by G4SDParticleWithEnergyFilter::SetKineticEnergy().

◆ SetLowEnergy()

void G4SDKineticEnergyFilter::SetLowEnergy ( G4double  elow)

◆ show()

void G4SDKineticEnergyFilter::show ( )

Definition at line 65 of file G4SDKineticEnergyFilter.cc.

65 {
66 G4cout << " G4SDKineticEnergyFilter:: " << GetName()
67 << " LowE " << G4BestUnit(fLowEnergy,"Energy")
68 << " HighE " << G4BestUnit(fHighEnergy,"Energy")
69 <<G4endl;
70}
#define G4BestUnit(a, b)
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4String GetName() const
Definition: G4VSDFilter.hh:56

Referenced by G4SDParticleWithEnergyFilter::show().


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