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

#include <GB01BOptrChangeCrossSection.hh>

Inheritance diagram for GB01BOptrChangeCrossSection:
Collaboration diagram for GB01BOptrChangeCrossSection:

Public Member Functions

 GB01BOptrChangeCrossSection (G4String particleToBias, G4String name="ChangeXS")
 
virtual ~GB01BOptrChangeCrossSection ()
 
virtual void StartRun ()
 
- Public Member Functions inherited from G4VBiasingOperator
 G4VBiasingOperator (G4String name)
 
virtual ~G4VBiasingOperator ()
 
virtual void Configure ()
 
virtual void ConfigureForWorker ()
 
virtual void StartTracking (const G4Track *)
 
virtual void EndTracking ()
 
const G4String GetName () const
 
void AttachTo (const G4LogicalVolume *)
 
G4BiasingAppliedCase GetPreviousBiasingAppliedCase () const
 
G4VBiasingOperationGetProposedOccurenceBiasingOperation (const G4Track *track, const G4BiasingProcessInterface *callingProcess)
 
G4VBiasingOperationGetProposedFinalStateBiasingOperation (const G4Track *track, const G4BiasingProcessInterface *callingProcess)
 
G4VBiasingOperationGetProposedNonPhysicsBiasingOperation (const G4Track *track, const G4BiasingProcessInterface *callingProcess)
 
void ExitingBiasing (const G4Track *track, const G4BiasingProcessInterface *callingProcess)
 
void ReportOperationApplied (const G4BiasingProcessInterface *callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation *operationApplied, const G4VParticleChange *particleChangeProduced)
 
void ReportOperationApplied (const G4BiasingProcessInterface *callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation *occurenceOperationApplied, G4double weightForOccurenceInteraction, G4VBiasingOperation *finalStateOperationApplied, const G4VParticleChange *particleChangeProduced)
 
const G4VBiasingOperationGetPreviousNonPhysicsAppliedOperation ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VBiasingOperator
static const std::vector
< G4VBiasingOperator * > & 
GetBiasingOperators ()
 
static G4VBiasingOperatorGetBiasingOperator (const G4LogicalVolume *)
 
- Protected Member Functions inherited from G4VBiasingOperator
virtual void OperationApplied (const G4BiasingProcessInterface *callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation *operationApplied, const G4VParticleChange *particleChangeProduced)
 
virtual void ExitBiasing (const G4Track *track, const G4BiasingProcessInterface *callingProcess)
 

Detailed Description

Definition at line 55 of file GB01BOptrChangeCrossSection.hh.

Constructor & Destructor Documentation

GB01BOptrChangeCrossSection::GB01BOptrChangeCrossSection ( G4String  particleToBias,
G4String  name = "ChangeXS" 
)

Definition at line 43 of file GB01BOptrChangeCrossSection.cc.

45  : G4VBiasingOperator(name),
46  fSetup(true)
47 {
48  fParticleToBias = G4ParticleTable::GetParticleTable()->FindParticle(particleName);
49 
50  if ( fParticleToBias == 0 )
51  {
53  ed << "Particle `" << particleName << "' not found !" << G4endl;
54  G4Exception("GB01BOptrChangeCrossSection(...)",
55  "exGB01.01",
57  ed);
58  }
59 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ParticleTable * GetParticleTable()
G4VBiasingOperator(G4String name)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

GB01BOptrChangeCrossSection::~GB01BOptrChangeCrossSection ( )
virtual

Definition at line 63 of file GB01BOptrChangeCrossSection.cc.

64 {
65  for ( std::map< const G4BiasingProcessInterface*, G4BOptnChangeCrossSection* >::iterator
66  it = fChangeCrossSectionOperations.begin() ;
67  it != fChangeCrossSectionOperations.end() ;
68  it++ ) delete (*it).second;
69 }

Member Function Documentation

void GB01BOptrChangeCrossSection::StartRun ( )
virtual

Reimplemented from G4VBiasingOperator.

Definition at line 73 of file GB01BOptrChangeCrossSection.cc.

74 {
75  // --------------
76  // -- Setup stage:
77  // ---------------
78  // -- Start by collecting processes under biasing, create needed biasing
79  // -- operations and associate these operations to the processes:
80  if ( fSetup )
81  {
82  const G4ProcessManager* processManager = fParticleToBias->GetProcessManager();
83  const G4BiasingProcessSharedData* sharedData =
85  if ( sharedData ) // -- sharedData tested, as is can happen a user attaches an operator to a
86  // -- volume but without defined BiasingProcessInterface processes.
87  {
88  for ( size_t i = 0 ; i < (sharedData->GetPhysicsBiasingProcessInterfaces()).size(); i++ )
89  {
90  const G4BiasingProcessInterface* wrapperProcess =
91  (sharedData->GetPhysicsBiasingProcessInterfaces())[i];
92  G4String operationName = "XSchange-" +
93  wrapperProcess->GetWrappedProcess()->GetProcessName();
94  fChangeCrossSectionOperations[wrapperProcess] =
95  new G4BOptnChangeCrossSection(operationName);
96  }
97  }
98  fSetup = false;
99  }
100 }
const std::vector< const G4BiasingProcessInterface * > & GetPhysicsBiasingProcessInterfaces() const
G4VProcess * GetWrappedProcess() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4ProcessManager * GetProcessManager() const
const G4BiasingProcessSharedData * GetSharedData() const

Here is the call graph for this function:


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