Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PolarizationManager Class Reference

#include <G4PolarizationManager.hh>

Public Member Functions

virtual ~G4PolarizationManager ()
 
void ListVolumes ()
 
void Clean ()
 
void SetVolumePolarization (G4LogicalVolume *lVol, const G4ThreeVector &pol)
 
void SetVolumePolarization (const G4String &lVolName, const G4ThreeVector &pol)
 
const G4ThreeVectorGetVolumePolarization (G4LogicalVolume *lVol) const
 
bool IsPolarized (G4LogicalVolume *lVol) const
 
void SetVerbose (G4int val)
 
G4int GetVerbose () const
 
void SetActivated (G4bool val)
 
bool IsActivated () const
 

Static Public Member Functions

static G4PolarizationManagerGetInstance ()
 
static void Dispose ()
 

Detailed Description

Definition at line 60 of file G4PolarizationManager.hh.

Constructor & Destructor Documentation

◆ ~G4PolarizationManager()

G4PolarizationManager::~G4PolarizationManager ( )
virtual

Definition at line 73 of file G4PolarizationManager.cc.

74{
75}

Member Function Documentation

◆ Clean()

void G4PolarizationManager::Clean ( )
inline

Definition at line 127 of file G4PolarizationManager.hh.

127{ volumePolarizations.clear(); }

◆ Dispose()

void G4PolarizationManager::Dispose ( )
static

Definition at line 58 of file G4PolarizationManager.cc.

59{
60 if (instance != 0)
61 {
62 delete instance;
63 instance = 0;
64 }
65}

◆ GetInstance()

◆ GetVerbose()

G4int G4PolarizationManager::GetVerbose ( ) const
inline

Definition at line 118 of file G4PolarizationManager.hh.

118{ return verboseLevel; }

Referenced by G4PolarizationMessenger::GetCurrentValue().

◆ GetVolumePolarization()

const G4ThreeVector & G4PolarizationManager::GetVolumePolarization ( G4LogicalVolume lVol) const
inline

◆ IsActivated()

bool G4PolarizationManager::IsActivated ( ) const
inline

Definition at line 123 of file G4PolarizationManager.hh.

123{ return activated; }

◆ IsPolarized()

◆ ListVolumes()

void G4PolarizationManager::ListVolumes ( )

Definition at line 77 of file G4PolarizationManager.cc.

78{
79 if (volumePolarizations.size()==0) return;
80 G4cout<<" Polarization for "<<volumePolarizations.size()
81 <<" registered volume(s) : "<<G4endl;
82 if (!activated)
83 G4cout<<" but polarization deactivated "<<G4endl;
84 for (PolarizationMap::const_iterator cit=volumePolarizations.begin();
85 cit!=volumePolarizations.end();cit++) {
86 G4cout<<cit->first->GetName()<<" : "<<cit->second<<G4endl;
87 }
88}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

Referenced by G4PolarizationMessenger::SetNewValue().

◆ SetActivated()

void G4PolarizationManager::SetActivated ( G4bool  val)
inline

Definition at line 122 of file G4PolarizationManager.hh.

122{ activated = val; }

Referenced by G4PolarizationMessenger::SetNewValue().

◆ SetVerbose()

void G4PolarizationManager::SetVerbose ( G4int  val)
inline

Definition at line 117 of file G4PolarizationManager.hh.

117{ verboseLevel = val; }

Referenced by G4PolarizationMessenger::SetNewValue().

◆ SetVolumePolarization() [1/2]

void G4PolarizationManager::SetVolumePolarization ( const G4String lVolName,
const G4ThreeVector pol 
)

Definition at line 98 of file G4PolarizationManager.cc.

99{
100 for (PolarizationMap::iterator it=volumePolarizations.begin();
101 it!=volumePolarizations.end();it++) {
102 if (it->first->GetName()==lVolName) {
103 it->second=pol;
104 if (verboseLevel>=1) G4cout<<" SetVolumePolarization "
105 <<lVolName<<" "
106 <<pol<<G4endl;
107 return;
108 }
109 }
110 G4cout<<" logical volume '"<<lVolName<<"'not registerd yet \n"
111 <<" please register before using '/polarization/volume/set' "<<G4endl;
112}

◆ SetVolumePolarization() [2/2]

void G4PolarizationManager::SetVolumePolarization ( G4LogicalVolume lVol,
const G4ThreeVector pol 
)

Definition at line 90 of file G4PolarizationManager.cc.

91{
92 volumePolarizations[lVol]=pol;
93 if (verboseLevel>=1) G4cout<<" SetVolumePolarization "
94 <<lVol->GetName()<<" "
95 <<pol<<G4endl;
96}
G4String GetName() const

Referenced by G4PolarizationMessenger::SetNewValue().


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