Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
P6DExtDecayerPhysics Class Reference

#include <P6DExtDecayerPhysics.hh>

Inheritance diagram for P6DExtDecayerPhysics:
G4VPhysicsConstructor

Public Member Functions

 P6DExtDecayerPhysics (const G4String &name="ExtDecayer")
 
virtual ~P6DExtDecayerPhysics ()
 
- Public Member Functions inherited from G4VPhysicsConstructor
 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 

Protected Member Functions

virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel
 
G4String namePhysics
 
G4int typePhysics
 
G4ParticleTabletheParticleTable
 
G4int g4vpcInstanceID
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

The builder for external decayer.

The external decayer is added to all instantiated decay processes

Author
I. Hrivnacova; IPN Orsay

Definition at line 48 of file P6DExtDecayerPhysics.hh.

Constructor & Destructor Documentation

P6DExtDecayerPhysics::P6DExtDecayerPhysics ( const G4String name = "ExtDecayer")

Standard constructor

Definition at line 42 of file P6DExtDecayerPhysics.cc.

43  : G4VPhysicsConstructor(name)
44 {
45 /// Standard constructor
46 }
G4VPhysicsConstructor(const G4String &="")
P6DExtDecayerPhysics::~P6DExtDecayerPhysics ( )
virtual

Destructor

Definition at line 50 of file P6DExtDecayerPhysics.cc.

51 {
52 /// Destructor
53 }

Member Function Documentation

void P6DExtDecayerPhysics::ConstructParticle ( void  )
protectedvirtual

Nothing to be done here

Implements G4VPhysicsConstructor.

Definition at line 61 of file P6DExtDecayerPhysics.cc.

62 {
63 /// Nothing to be done here
64 }
void P6DExtDecayerPhysics::ConstructProcess ( void  )
protectedvirtual

Loop over all particles instantiated and add external decayer to all decay processes if External decayer is set

Implements G4VPhysicsConstructor.

Definition at line 68 of file P6DExtDecayerPhysics.cc.

References aParticleIterator, G4INCL::ClusterDecay::decay(), G4cout, G4endl, G4ProcessManager::GetProcessList(), G4ParticleDefinition::GetProcessManager(), G4ProcessVector::length(), G4Decay::SetExtDecayer(), G4Pythia6Decayer::SetVerboseLevel(), and G4VPhysicsConstructor::verboseLevel.

69 {
70 /// Loop over all particles instantiated and add external decayer
71 /// to all decay processes if External decayer is set
72 
73  // Create Geant4 external decayer
74  G4Pythia6Decayer* extDecayer = new G4Pythia6Decayer();
75  extDecayer->SetVerboseLevel(1);
76  // The extDecayer will be deleted in G4Decay destructor
77 
78  aParticleIterator->reset();
79  while ((*aParticleIterator)())
80  {
81  G4ParticleDefinition* particle = aParticleIterator->value();
82  G4ProcessManager* pmanager = particle->GetProcessManager();
83 
84  if ( verboseLevel > 1 ) {
85  G4cout << "Setting ext decayer for: "
86  << aParticleIterator->value()->GetParticleName()
87  << G4endl;
88  }
89 
90  G4ProcessVector* processVector = pmanager->GetProcessList();
91  for (G4int i=0; i<processVector->length(); i++) {
92 
93  G4Decay* decay = dynamic_cast<G4Decay*>((*processVector)[i]);
94  if ( decay ) decay->SetExtDecayer(extDecayer);
95  }
96  }
97 
98  if ( verboseLevel > 0 ) {
99  G4cout << "External decayer physics constructed." << G4endl;
100  }
101 }
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
#define aParticleIterator
G4int length() const
void SetVerboseLevel(G4int verboseLevel)
#define G4endl
Definition: G4ios.hh:61
void SetExtDecayer(G4VExtDecayer *)
Definition: G4Decay.cc:458
G4ProcessVector * GetProcessList() const

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