#include <G4TrajectoryChargeFilter.hh>
Definition at line 39 of file G4TrajectoryChargeFilter.hh.
◆ Type
◆ MyCharge
◆ G4TrajectoryChargeFilter()
G4TrajectoryChargeFilter::G4TrajectoryChargeFilter |
( |
const G4String & |
name = "Unspecified" | ) |
|
◆ ~G4TrajectoryChargeFilter()
G4TrajectoryChargeFilter::~G4TrajectoryChargeFilter |
( |
| ) |
|
|
virtual |
◆ Accept()
Implements G4VFilter< G4VTrajectory >.
Definition at line 57 of file G4SmartFilter.hh.
105{
109 }
110
112
113
116 return true;
117 }
118
119
121
122
124
126
131 }
132
133 return passed;
134}
G4GLOB_DLL std::ostream G4cout
virtual G4bool Evaluate(const G4VTrajectory &) const=0
◆ Add() [1/2]
void G4TrajectoryChargeFilter::Add |
( |
const G4String & |
particle | ) |
|
Definition at line 63 of file G4TrajectoryChargeFilter.cc.
64{
66
69 ed << "Invalid charge "<<charge;
71 ("G4TrajectoryChargeFilter::Add(const G4String& charge)",
73 return;
74 }
75
77}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4bool ConvertToCharge(const G4String &, MyCharge &)
void Add(const G4String &particle)
References Add(), ConvertToCharge(), G4Exception(), and JustWarning.
Referenced by Add().
◆ Add() [2/2]
void G4TrajectoryChargeFilter::Add |
( |
const MyCharge & |
chgear | ) |
|
|
private |
◆ Clear()
void G4TrajectoryChargeFilter::Clear |
( |
| ) |
|
|
virtual |
◆ ConvertToCharge()
Definition at line 105 of file G4TrajectoryChargeFilter.cc.
106{
107 bool result(true);
108
110 std::istringstream is(string.c_str());
111 is >> charge;
112
113 switch (charge) {
114 case 1:
116 break;
117 case 0:
119 break;
120 case -1:
122 break;
123 default:
124 result = false;
125 }
126
127 return result;
128}
References Negative, Neutral, and Positive.
Referenced by Add().
◆ Evaluate()
bool G4TrajectoryChargeFilter::Evaluate |
( |
const G4VTrajectory & |
traj | ) |
const |
|
virtual |
◆ GetActive()
◆ GetInvert()
◆ GetName()
◆ GetVerbose()
◆ Name()
◆ Print()
void G4TrajectoryChargeFilter::Print |
( |
std::ostream & |
ostr | ) |
const |
|
virtual |
◆ PrintAll()
◆ Reset()
◆ SetActive()
◆ SetInvert()
◆ SetVerbose()
◆ fActive
◆ fCharges
std::vector<MyCharge> G4TrajectoryChargeFilter::fCharges |
|
private |
◆ fInvert
◆ fName
◆ fNPassed
◆ fNProcessed
◆ fVerbose
The documentation for this class was generated from the following files: