Geant4-11
Public Member Functions | Protected Attributes | Private Attributes
G4SDKineticEnergyFilter Class Reference

#include <G4SDKineticEnergyFilter.hh>

Inheritance diagram for G4SDKineticEnergyFilter:
G4VSDFilter

Public Member Functions

virtual G4bool Accept (const G4Step *) const
 
 G4SDKineticEnergyFilter (G4String name, G4double elow=0.0, G4double ehigh=DBL_MAX)
 
G4String GetName () const
 
void SetHighEnergy (G4double ehigh)
 
void SetKineticEnergy (G4double elow, G4double ehigh)
 
void SetLowEnergy (G4double elow)
 
void show ()
 
virtual ~G4SDKineticEnergyFilter ()
 

Protected Attributes

G4String filterName
 

Private Attributes

G4double fHighEnergy
 
G4double fLowEnergy
 

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 , fLowEnergy(elow)
47 , fHighEnergy(ehigh)
48{
49 ;
50}
G4VSDFilter(G4String name)
Definition: G4VSDFilter.cc:32
const char * name(G4int ptype)

◆ ~G4SDKineticEnergyFilter()

G4SDKineticEnergyFilter::~G4SDKineticEnergyFilter ( )
virtual

Definition at line 52 of file G4SDKineticEnergyFilter.cc.

52{ ; }

Member Function Documentation

◆ Accept()

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

Implements G4VSDFilter.

Definition at line 54 of file G4SDKineticEnergyFilter.cc.

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

References FALSE, fHighEnergy, fLowEnergy, G4StepPoint::GetKineticEnergy(), G4Step::GetPreStepPoint(), and TRUE.

Referenced by G4SDParticleWithEnergyFilter::Accept().

◆ GetName()

G4String G4VSDFilter::GetName ( ) const
inlineinherited

Definition at line 55 of file G4VSDFilter.hh.

55{ return filterName; }
G4String filterName
Definition: G4VSDFilter.hh:52

References G4VSDFilter::filterName.

Referenced by G4VScoringMesh::List(), G4VScoringMesh::SetFilter(), and show().

◆ SetHighEnergy()

void G4SDKineticEnergyFilter::SetHighEnergy ( G4double  ehigh)

◆ SetKineticEnergy()

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

Definition at line 64 of file G4SDKineticEnergyFilter.cc.

65{
66 fLowEnergy = elow;
67 fHighEnergy = ehigh;
68}

References fHighEnergy, and fLowEnergy.

Referenced by G4SDParticleWithEnergyFilter::SetKineticEnergy().

◆ SetLowEnergy()

void G4SDKineticEnergyFilter::SetLowEnergy ( G4double  elow)

◆ show()

void G4SDKineticEnergyFilter::show ( )

Definition at line 70 of file G4SDKineticEnergyFilter.cc.

71{
72 G4cout << " G4SDKineticEnergyFilter:: " << GetName() << " LowE "
73 << G4BestUnit(fLowEnergy, "Energy") << " HighE "
74 << G4BestUnit(fHighEnergy, "Energy") << G4endl;
75}
#define G4BestUnit(a, b)
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4String GetName() const
Definition: G4VSDFilter.hh:55

References fHighEnergy, fLowEnergy, G4BestUnit, G4cout, G4endl, and G4VSDFilter::GetName().

Referenced by G4SDParticleWithEnergyFilter::show().

Field Documentation

◆ fHighEnergy

G4double G4SDKineticEnergyFilter::fHighEnergy
private

Definition at line 72 of file G4SDKineticEnergyFilter.hh.

Referenced by Accept(), SetKineticEnergy(), and show().

◆ filterName

G4String G4VSDFilter::filterName
protectedinherited

Definition at line 52 of file G4VSDFilter.hh.

Referenced by G4VSDFilter::GetName().

◆ fLowEnergy

G4double G4SDKineticEnergyFilter::fLowEnergy
private

Definition at line 71 of file G4SDKineticEnergyFilter.hh.

Referenced by Accept(), SetKineticEnergy(), and show().


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