Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4NucleusLimits Class Reference

#include <G4NucleusLimits.hh>

Public Member Functions

 G4NucleusLimits ()
 
 G4NucleusLimits (G4int aMin1, G4int aMax1, G4int zMin1, G4int zMax1)
 
 ~G4NucleusLimits ()
 
G4int GetAMin () const
 
G4int GetAMax () const
 
G4int GetZMin () const
 
G4int GetZMax () const
 

Friends

std::ostream & operator<< (std::ostream &s, const G4NucleusLimits &q)
 

Detailed Description

Definition at line 58 of file G4NucleusLimits.hh.

Constructor & Destructor Documentation

G4NucleusLimits::G4NucleusLimits ( )

Definition at line 56 of file G4NucleusLimits.cc.

57  : aMin(1), aMax(250), zMin(0), zMax(100)
58  //
59  // Default constructor sets the limits to cover all nuclei with Z<100.
60  //
61 {;}
G4NucleusLimits::G4NucleusLimits ( G4int  aMin1,
G4int  aMax1,
G4int  zMin1,
G4int  zMax1 
)

Definition at line 65 of file G4NucleusLimits.cc.

66 {
67  //
68  // check that aMin1 is within [1, 250].
69  //
70  if (aMin1 < 1) {aMin = 1;}
71  //else if (aMin1 > 250) {aMin = 240;}
72  else {aMin = aMin1;}
73 
74  //
75  // check that aMax1 is within [1, 250].
76  //
77  if (aMax1 < 1) {aMax = 1;}
78  //else if (aMax1 > 250) {aMax = 250;}
79  else {aMax = aMax1;}
80 
81  //
82  // If aMin > aMax then swap them.
83  //
84  if (aMin > aMax) {
85  G4int t = aMin;
86  aMin = aMax;
87  aMax = t;
88  }
89  //
90  // check that zMin1 is within [0, 100].
91  //
92  if (zMin1 < 0) {zMin = 0;}
93  //else if (zMin1 > 100) {zMin = 100;}
94  else {zMin = zMin1;}
95 
96  //
97  // check that zMax1 is within [0, 100].
98  //
99  if (zMax1 < 0) {zMax = 0;}
100  //else if (zMax1 > 100) {zMax = 100;}
101  else {zMax = zMax1;}
102 
103  //
104  // If zMin > zMax then swap them.
105  //
106  if (zMin > zMax) {
107  G4int t = zMin;
108  zMin = zMax;
109  zMax = t;
110  }
111 }
int G4int
Definition: G4Types.hh:78
G4NucleusLimits::~G4NucleusLimits ( )

Definition at line 114 of file G4NucleusLimits.cc.

115 {;}

Member Function Documentation

G4int G4NucleusLimits::GetAMax ( ) const
inline

Definition at line 94 of file G4NucleusLimits.hh.

94 {return aMax;}

Here is the caller graph for this function:

G4int G4NucleusLimits::GetAMin ( ) const
inline

Definition at line 91 of file G4NucleusLimits.hh.

91 {return aMin;}

Here is the caller graph for this function:

G4int G4NucleusLimits::GetZMax ( ) const
inline

Definition at line 100 of file G4NucleusLimits.hh.

100 {return zMax;}

Here is the caller graph for this function:

G4int G4NucleusLimits::GetZMin ( ) const
inline

Definition at line 97 of file G4NucleusLimits.hh.

97 {return zMin;}

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const G4NucleusLimits q 
)
friend

Definition at line 118 of file G4NucleusLimits.cc.

119 {
120  // Definition of the insertion operator << to provide the nucleus limits to
121  // ostream
122  strm << "Atomic weight: " << q.GetAMin() << "->" << q.GetAMax()
123  << "Atomic number: " << q.GetZMin() << "->" << q.GetZMax();
124  return strm;
125 }
G4int GetZMax() const
G4int GetAMin() const
G4int GetAMax() const
G4int GetZMin() const

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