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

#include <G4RadioactivityTable.hh>

Public Member Functions

 G4RadioactivityTable ()
 
virtual ~G4RadioactivityTable ()
 
void AddIsotope (G4int, G4int, G4double, G4double, G4double)
 
G4TwoVector GetRate (G4int, G4int, G4double)
 
G4int Entries () const
 
map< G4ThreeVector, G4TwoVector > * GetTheMap ()
 

Detailed Description

Definition at line 57 of file G4RadioactivityTable.hh.

Constructor & Destructor Documentation

◆ G4RadioactivityTable()

G4RadioactivityTable::G4RadioactivityTable ( )

Definition at line 52 of file G4RadioactivityTable.cc.

53{
54}

◆ ~G4RadioactivityTable()

G4RadioactivityTable::~G4RadioactivityTable ( )
virtual

Definition at line 57 of file G4RadioactivityTable.cc.

58{
59 fRadioactivity.clear();
60}

Member Function Documentation

◆ AddIsotope()

void G4RadioactivityTable::AddIsotope ( G4int  Z,
G4int  A,
G4double  E,
G4double  rate,
G4double  weight 
)

Definition at line 70 of file G4RadioactivityTable.cc.

71{
72 G4double drate = rate*weight;
73 G4double derror = drate*rate;
74 G4TwoVector entry = G4TwoVector(drate,derror);
75 std::map<G4ThreeVector,G4TwoVector>::iterator it;
76 it = fRadioactivity.find(G4ThreeVector(Z,A,E));
77 if (it == fRadioactivity.end()) {
78 fRadioactivity[G4ThreeVector(Z,A,E)] = entry;
79 } else {
80 fRadioactivity[G4ThreeVector(Z,A,E)] += entry;
81 }
82}
CLHEP::Hep3Vector G4ThreeVector
CLHEP::Hep2Vector G4TwoVector
Definition: G4TwoVector.hh:36
double G4double
Definition: G4Types.hh:83
const G4int Z[17]
const G4double A[17]

◆ Entries()

G4int G4RadioactivityTable::Entries ( ) const

Definition at line 64 of file G4RadioactivityTable.cc.

65{
66 return (G4int) fRadioactivity.size();
67}
int G4int
Definition: G4Types.hh:85

◆ GetRate()

G4TwoVector G4RadioactivityTable::GetRate ( G4int  Z,
G4int  A,
G4double  E 
)

Definition at line 85 of file G4RadioactivityTable.cc.

86{
87 if (fRadioactivity.end() == fRadioactivity.find(G4ThreeVector(Z,A,E))) {
88 G4cout << G4ThreeVector(Z,A,E) << " is not in the map" << G4endl;
89 G4TwoVector rate = G4TwoVector(0.,0.);
90 return rate ;
91 }
92 else
93 return fRadioactivity[G4ThreeVector(Z,A,E)];
94}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ GetTheMap()

map< G4ThreeVector, G4TwoVector > * G4RadioactivityTable::GetTheMap ( )

Definition at line 97 of file G4RadioactivityTable.cc.

98{
99 return &fRadioactivity;
100}

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