Geant4  10.02.p03
ExTGRCRegionData Class Reference

#include <ExTGRCRegionData.hh>

Collaboration diagram for ExTGRCRegionData:

Public Member Functions

 ExTGRCRegionData (const std::vector< G4String > &rd)
 
 ~ExTGRCRegionData ()
 
void SetCutsData (const std::vector< G4String > &cu)
 
G4String GetRegionName () const
 
std::vector< G4StringGetLVNames ()
 
G4double GetGammaCut () const
 
G4double GetElectronCut () const
 
G4double GetPositronCut () const
 
G4bool CutsAreSet () const
 

Private Attributes

G4String fRegionName
 
std::vector< G4StringfLVNames
 
G4double fGammaCut
 
G4double fElectronCut
 
G4double fPositronCut
 
G4bool fbCutsSet
 

Detailed Description

Stores cuts per region data

Changes: creation May 2007

Author
P. Arce

Definition at line 42 of file ExTGRCRegionData.hh.

Constructor & Destructor Documentation

◆ ExTGRCRegionData()

ExTGRCRegionData::ExTGRCRegionData ( const std::vector< G4String > &  rd)

Definition at line 36 of file ExTGRCRegionData.cc.

37 {
38  if( wl.size() < 2 )
39  {
40  G4Exception("ExTGRCRegionData::ExTGRCRegionData()",
41  "InvalidArgument", FatalErrorInArgument,
42  G4UIcommand::ConvertToString( G4int(wl.size()) ) );
43  }
44  fRegionName = wl[0];
45  for( size_t ii = 1; ii < wl.size(); ii++ )
46  {
47  fLVNames.push_back( wl[ii] );
48  }
49  fbCutsSet = false;
50  fGammaCut = 1.;
51  fElectronCut = 1.;
52  fPositronCut = 1.;
53 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
int G4int
Definition: G4Types.hh:78
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
std::vector< G4String > fLVNames
Here is the call graph for this function:

◆ ~ExTGRCRegionData()

ExTGRCRegionData::~ExTGRCRegionData ( )

Definition at line 56 of file ExTGRCRegionData.cc.

57 {
58 }

Member Function Documentation

◆ CutsAreSet()

G4bool ExTGRCRegionData::CutsAreSet ( ) const
inline

Definition at line 58 of file ExTGRCRegionData.hh.

58 { return fbCutsSet; }

◆ GetElectronCut()

G4double ExTGRCRegionData::GetElectronCut ( ) const
inline

Definition at line 56 of file ExTGRCRegionData.hh.

56 { return fElectronCut; }

◆ GetGammaCut()

G4double ExTGRCRegionData::GetGammaCut ( ) const
inline

Definition at line 55 of file ExTGRCRegionData.hh.

55 { return fGammaCut; }

◆ GetLVNames()

std::vector<G4String> ExTGRCRegionData::GetLVNames ( )
inline

Definition at line 54 of file ExTGRCRegionData.hh.

54 { return fLVNames; }
std::vector< G4String > fLVNames

◆ GetPositronCut()

G4double ExTGRCRegionData::GetPositronCut ( ) const
inline

Definition at line 57 of file ExTGRCRegionData.hh.

57 { return fPositronCut; }

◆ GetRegionName()

G4String ExTGRCRegionData::GetRegionName ( ) const
inline

Definition at line 53 of file ExTGRCRegionData.hh.

53 { return fRegionName; }

◆ SetCutsData()

void ExTGRCRegionData::SetCutsData ( const std::vector< G4String > &  cu)

Definition at line 61 of file ExTGRCRegionData.cc.

62 {
63  if( (rc.size() != 3) && (rc.size() != 4) )
64  {
65  G4cerr << "ERROR - ExTGRCRegionData::SetCutsData()" << G4endl
66  << " Must have 3 or 4 arguments : "
67  << "REGION_NAME, gamma_CUT, e-_CUT (e+_CUT)." << G4endl
68  << " It has only " << rc.size() << " !" << G4endl;
69  G4Exception("ExTGRCRegionCutsMgr::AddRegionCuts()",
70  "InvalidArgument", FatalErrorInArgument,
71  G4UIcommand::ConvertToString( G4int(rc.size()) ) );
72  }
73 
74  if( fbCutsSet )
75  {
76  G4Exception("ExTGRCRegionData::SetCutsData()",
77  "InvalidArgument", JustWarning,
78  G4String("Cuts are already set for region " + fRegionName).c_str() );
79  }
80 
83  if( rc.size() == 3 )
84  {
86  }
87  else
88  {
90  }
91 
92  fbCutsSet = true;
93 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
int G4int
Definition: G4Types.hh:78
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:205
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:

Member Data Documentation

◆ fbCutsSet

G4bool ExTGRCRegionData::fbCutsSet
private

Definition at line 65 of file ExTGRCRegionData.hh.

◆ fElectronCut

G4double ExTGRCRegionData::fElectronCut
private

Definition at line 64 of file ExTGRCRegionData.hh.

◆ fGammaCut

G4double ExTGRCRegionData::fGammaCut
private

Definition at line 64 of file ExTGRCRegionData.hh.

◆ fLVNames

std::vector<G4String> ExTGRCRegionData::fLVNames
private

Definition at line 63 of file ExTGRCRegionData.hh.

◆ fPositronCut

G4double ExTGRCRegionData::fPositronCut
private

Definition at line 64 of file ExTGRCRegionData.hh.

◆ fRegionName

G4String ExTGRCRegionData::fRegionName
private

Definition at line 62 of file ExTGRCRegionData.hh.


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