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

#include <G4SDParticleWithEnergyFilter.hh>

+ Inheritance diagram for G4SDParticleWithEnergyFilter:

Public Member Functions

 G4SDParticleWithEnergyFilter (G4String name, G4double elow=0.0, G4double ehigh=DBL_MAX)
 
virtual ~G4SDParticleWithEnergyFilter ()
 
virtual G4bool Accept (const G4Step *) const
 
void add (const G4String &particleName)
 
void SetKineticEnergy (G4double elow, 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 51 of file G4SDParticleWithEnergyFilter.hh.

Constructor & Destructor Documentation

◆ G4SDParticleWithEnergyFilter()

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

Definition at line 46 of file G4SDParticleWithEnergyFilter.cc.

49 :G4VSDFilter(name)
50{
51 fParticleFilter = new G4SDParticleFilter(name);
52 fKineticFilter = new G4SDKineticEnergyFilter(name,elow,ehigh);
53}

◆ ~G4SDParticleWithEnergyFilter()

G4SDParticleWithEnergyFilter::~G4SDParticleWithEnergyFilter ( )
virtual

Definition at line 55 of file G4SDParticleWithEnergyFilter.cc.

56{
57 delete fParticleFilter;
58 delete fKineticFilter;
59}

Member Function Documentation

◆ Accept()

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

Implements G4VSDFilter.

Definition at line 61 of file G4SDParticleWithEnergyFilter.cc.

62{
63 if ( ! fParticleFilter->Accept(aStep) ) return FALSE;
64 if ( ! fKineticFilter->Accept(aStep) ) return FALSE;
65 return TRUE;
66}
virtual G4bool Accept(const G4Step *) const
virtual G4bool Accept(const G4Step *) const
#define TRUE
Definition: globals.hh:55
#define FALSE
Definition: globals.hh:52

◆ add()

void G4SDParticleWithEnergyFilter::add ( const G4String particleName)

Definition at line 68 of file G4SDParticleWithEnergyFilter.cc.

69{
70 fParticleFilter->add(particleName);
71}
void add(const G4String &particleName)

Referenced by G4ScoreQuantityMessenger::FParticleWithEnergyCommand().

◆ SetKineticEnergy()

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

Definition at line 73 of file G4SDParticleWithEnergyFilter.cc.

75{
76 fKineticFilter->SetKineticEnergy(elow,ehigh);
77}
void SetKineticEnergy(G4double elow, G4double ehigh)

◆ show()

void G4SDParticleWithEnergyFilter::show ( )

Definition at line 79 of file G4SDParticleWithEnergyFilter.cc.

79 {
80 fParticleFilter->show();
81 fKineticFilter->show();
82}

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