Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExTGRCRegionData Class Reference

#include <ExTGRCRegionData.hh>

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
 

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 ( 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:372
int G4int
Definition: G4Types.hh:78
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

ExTGRCRegionData::~ExTGRCRegionData ( )

Definition at line 56 of file ExTGRCRegionData.cc.

57 {
58 }

Member Function Documentation

G4bool ExTGRCRegionData::CutsAreSet ( ) const
inline

Definition at line 58 of file ExTGRCRegionData.hh.

58 { return fbCutsSet; }
G4double ExTGRCRegionData::GetElectronCut ( ) const
inline

Definition at line 56 of file ExTGRCRegionData.hh.

56 { return fElectronCut; }
G4double ExTGRCRegionData::GetGammaCut ( ) const
inline

Definition at line 55 of file ExTGRCRegionData.hh.

55 { return fGammaCut; }
std::vector<G4String> ExTGRCRegionData::GetLVNames ( )
inline

Definition at line 54 of file ExTGRCRegionData.hh.

54 { return fLVNames; }
G4double ExTGRCRegionData::GetPositronCut ( ) const
inline

Definition at line 57 of file ExTGRCRegionData.hh.

57 { return fPositronCut; }
G4String ExTGRCRegionData::GetRegionName ( ) const
inline

Definition at line 53 of file ExTGRCRegionData.hh.

53 { return fRegionName; }
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 
81  fGammaCut = G4tgrUtils::GetDouble( rc[1] );
82  fElectronCut = G4tgrUtils::GetDouble( rc[2] );
83  if( rc.size() == 3 )
84  {
85  fPositronCut = fElectronCut;
86  }
87  else
88  {
89  fPositronCut = G4tgrUtils::GetDouble( rc[3] );
90  }
91 
92  fbCutsSet = true;
93 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
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:


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