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

#include <G4SDParticleWithEnergyFilter.hh>

Inheritance diagram for G4SDParticleWithEnergyFilter:
G4VSDFilter

Public Member Functions

virtual G4bool Accept (const G4Step *) const
 
void add (const G4String &particleName)
 
 G4SDParticleWithEnergyFilter (const G4SDParticleWithEnergyFilter &)
 
 G4SDParticleWithEnergyFilter (G4String name, G4double elow=0.0, G4double ehigh=DBL_MAX)
 
G4String GetName () const
 
G4SDParticleWithEnergyFilteroperator= (const G4SDParticleWithEnergyFilter &)
 
void SetKineticEnergy (G4double elow, G4double ehigh)
 
void show ()
 
virtual ~G4SDParticleWithEnergyFilter ()
 

Protected Attributes

G4String filterName
 

Private Attributes

G4SDKineticEnergyFilterfKineticFilter
 
G4SDParticleFilterfParticleFilter
 

Detailed Description

Definition at line 50 of file G4SDParticleWithEnergyFilter.hh.

Constructor & Destructor Documentation

◆ G4SDParticleWithEnergyFilter() [1/2]

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

◆ ~G4SDParticleWithEnergyFilter()

G4SDParticleWithEnergyFilter::~G4SDParticleWithEnergyFilter ( )
virtual

Definition at line 54 of file G4SDParticleWithEnergyFilter.cc.

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

References fKineticFilter, and fParticleFilter.

◆ G4SDParticleWithEnergyFilter() [2/2]

G4SDParticleWithEnergyFilter::G4SDParticleWithEnergyFilter ( const G4SDParticleWithEnergyFilter rhs)

Member Function Documentation

◆ Accept()

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

Implements G4VSDFilter.

Definition at line 60 of file G4SDParticleWithEnergyFilter.cc.

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

References G4SDKineticEnergyFilter::Accept(), G4SDParticleFilter::Accept(), FALSE, fKineticFilter, fParticleFilter, and TRUE.

◆ add()

void G4SDParticleWithEnergyFilter::add ( const G4String particleName)

Definition at line 69 of file G4SDParticleWithEnergyFilter.cc.

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

References G4SDParticleFilter::add(), and fParticleFilter.

Referenced by G4ScoreQuantityMessenger::FParticleWithEnergyCommand().

◆ GetName()

G4String G4VSDFilter::GetName ( ) const
inlineinherited

◆ operator=()

G4SDParticleWithEnergyFilter & G4SDParticleWithEnergyFilter::operator= ( const G4SDParticleWithEnergyFilter rhs)

Definition at line 94 of file G4SDParticleWithEnergyFilter.cc.

96{
97 if(this == &rhs)
98 return *this;
99 G4VSDFilter::operator=(rhs);
100 delete fParticleFilter;
102 delete fKineticFilter;
104 return *this;
105}

References fKineticFilter, and fParticleFilter.

◆ SetKineticEnergy()

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

Definition at line 74 of file G4SDParticleWithEnergyFilter.cc.

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

References fKineticFilter, and G4SDKineticEnergyFilter::SetKineticEnergy().

◆ show()

void G4SDParticleWithEnergyFilter::show ( )

Field Documentation

◆ filterName

G4String G4VSDFilter::filterName
protectedinherited

Definition at line 52 of file G4VSDFilter.hh.

Referenced by G4VSDFilter::GetName().

◆ fKineticFilter

G4SDKineticEnergyFilter* G4SDParticleWithEnergyFilter::fKineticFilter
private

◆ fParticleFilter

G4SDParticleFilter* G4SDParticleWithEnergyFilter::fParticleFilter
private

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