46 if(fInstance ==
nullptr)
53 if(fInstance !=
nullptr)
60G4PolarizationManager::G4PolarizationManager()
72 if(fVolumePolarizations.empty())
74 G4cout <<
" Polarization for " << fVolumePolarizations.size()
75 <<
" registered volume(s) : " <<
G4endl;
78 for(
auto& vp : fVolumePolarizations)
80 G4cout << vp.first->GetName() <<
" : " << vp.second <<
G4endl;
87 fVolumePolarizations[lVol] = pol;
88 if(fVerboseLevel >= 1)
89 G4cout <<
" SetVolumePolarization " << lVol->
GetName() <<
" " << pol
96 for(
auto& vp : fVolumePolarizations)
98 if(vp.first->GetName() == lVolName)
101 if(fVerboseLevel >= 1)
102 G4cout <<
" SetVolumePolarization " << lVolName <<
" " << pol <<
G4endl;
107 ed <<
" Logical volume '" << lVolName <<
"'not registered yet.\n"
108 <<
" Please register before using '/polarization/volume/set'\n";
109 G4Exception(
"G4PolarizationManager::SetVolumePolarization",
"pol040",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
void SetVolumePolarization(G4LogicalVolume *lVol, const G4ThreeVector &pol)
static G4PolarizationManager * GetInstance()