Loading...
Searching...
No Matches
ExTGRCRegionData.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27/// \file persistency/P03/src/ExTGRCRegionData.cc
28/// \brief Implementation of the ExTGRCRegionData class
29
30#include "ExTGRCRegionData.hh"
31#include "G4tgrUtils.hh"
32#include "G4UIcommand.hh"
33
34//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35ExTGRCRegionData::ExTGRCRegionData(const std::vector<G4String>& wl )
36{
37 if( wl.size() < 2 )
38 {
39 G4Exception("ExTGRCRegionData::ExTGRCRegionData()",
40 "InvalidArgument", FatalErrorInArgument,
41 G4UIcommand::ConvertToString( G4int(wl.size()) ) );
42 }
43 fRegionName = wl[0];
44 for( size_t ii = 1; ii < wl.size(); ii++ )
45 {
46 fLVNames.push_back( wl[ii] );
47 }
48 fbCutsSet = false;
49 fGammaCut = 1.;
50 fElectronCut = 1.;
51 fPositronCut = 1.;
52}
53
54//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60void ExTGRCRegionData::SetCutsData( const std::vector<G4String>& rc )
61{
62 if( (rc.size() != 3) && (rc.size() != 4) )
63 {
64 G4cerr << "ERROR - ExTGRCRegionData::SetCutsData()" << G4endl
65 << " Must have 3 or 4 arguments : "
66 << "REGION_NAME, gamma_CUT, e-_CUT (e+_CUT)." << G4endl
67 << " It has only " << rc.size() << " !" << G4endl;
68 G4Exception("ExTGRCRegionCutsMgr::AddRegionCuts()",
69 "InvalidArgument", FatalErrorInArgument,
70 G4UIcommand::ConvertToString( G4int(rc.size()) ) );
71 }
72
73 if( fbCutsSet )
74 {
75 G4Exception("ExTGRCRegionData::SetCutsData()",
76 "InvalidArgument", JustWarning,
77 G4String("Cuts are already set for region " + fRegionName).c_str() );
78 }
79
80 fGammaCut = G4tgrUtils::GetDouble( rc[1] );
81 fElectronCut = G4tgrUtils::GetDouble( rc[2] );
82 if( rc.size() == 3 )
83 {
85 }
86 else
87 {
88 fPositronCut = G4tgrUtils::GetDouble( rc[3] );
89 }
90
91 fbCutsSet = true;
92}
Definition of the ExTGRCRegionData class.
void SetCutsData(const std::vector< G4String > &cu)
std::vector< G4String > fLVNames
ExTGRCRegionData(const std::vector< G4String > &rd)

Applications | User Support | Publications | Collaboration