Geant4 11.1.1
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)
 
 G4SDParticleWithEnergyFilter (const G4SDParticleWithEnergyFilter &)
 
G4SDParticleWithEnergyFilteroperator= (const G4SDParticleWithEnergyFilter &)
 
 ~G4SDParticleWithEnergyFilter () override
 
G4bool Accept (const G4Step *) const override
 
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 50 of file G4SDParticleWithEnergyFilter.hh.

Constructor & Destructor Documentation

◆ G4SDParticleWithEnergyFilter() [1/2]

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

Definition at line 45 of file G4SDParticleWithEnergyFilter.cc.

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

◆ G4SDParticleWithEnergyFilter() [2/2]

G4SDParticleWithEnergyFilter::G4SDParticleWithEnergyFilter ( const G4SDParticleWithEnergyFilter rhs)

Definition at line 86 of file G4SDParticleWithEnergyFilter.cc.

89{
90 fParticleFilter = new G4SDParticleFilter(*rhs.fParticleFilter);
91 fKineticFilter = new G4SDKineticEnergyFilter(*rhs.fKineticFilter);
92}
G4String filterName
Definition: G4VSDFilter.hh:52

◆ ~G4SDParticleWithEnergyFilter()

G4SDParticleWithEnergyFilter::~G4SDParticleWithEnergyFilter ( )
override

Definition at line 54 of file G4SDParticleWithEnergyFilter.cc.

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

Member Function Documentation

◆ Accept()

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

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}
G4bool Accept(const G4Step *) const override
G4bool Accept(const G4Step *) const override

◆ 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)

◆ 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;
101 fParticleFilter = new G4SDParticleFilter(*(rhs.fParticleFilter));
102 delete fKineticFilter;
103 fKineticFilter = new G4SDKineticEnergyFilter(*(rhs.fKineticFilter));
104 return *this;
105}

◆ 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)

◆ show()

void G4SDParticleWithEnergyFilter::show ( )

Definition at line 80 of file G4SDParticleWithEnergyFilter.cc.

81{
82 fParticleFilter->show();
83 fKineticFilter->show();
84}

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