Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
P6DExtDecayerPhysics Class Reference

The builder for external decayer. More...

#include <Doxymodules_eventgenerator.h>

Inheritance diagram for P6DExtDecayerPhysics:
G4VPhysicsConstructor

Public Member Functions

 P6DExtDecayerPhysics (const G4String &name="ExtDecayer")
 
virtual ~P6DExtDecayerPhysics ()
 

Protected Member Functions

virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 

Private Member Functions

 P6DExtDecayerPhysics (const P6DExtDecayerPhysics &right)
 Not implemented.
 
P6DExtDecayerPhysicsoperator= (const P6DExtDecayerPhysics &right)
 Not implemented.
 

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 115 of file Doxymodules_eventgenerator.h.

Constructor & Destructor Documentation

◆ P6DExtDecayerPhysics() [1/2]

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

Standard constructor

Definition at line 41 of file P6DExtDecayerPhysics.cc.

43{
44/// Standard constructor
45}

◆ ~P6DExtDecayerPhysics()

P6DExtDecayerPhysics::~P6DExtDecayerPhysics ( )
virtual

Destructor

Definition at line 49 of file P6DExtDecayerPhysics.cc.

50{
51/// Destructor
52}

◆ P6DExtDecayerPhysics() [2/2]

P6DExtDecayerPhysics::P6DExtDecayerPhysics ( const P6DExtDecayerPhysics right)
private

Not implemented.

Member Function Documentation

◆ ConstructParticle()

void P6DExtDecayerPhysics::ConstructParticle ( )
protectedvirtual

Nothing to be done here

Definition at line 60 of file P6DExtDecayerPhysics.cc.

61{
62/// Nothing to be done here
63}

◆ ConstructProcess()

void P6DExtDecayerPhysics::ConstructProcess ( )
protectedvirtual

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

Definition at line 67 of file P6DExtDecayerPhysics.cc.

68{
69/// Loop over all particles instantiated and add external decayer
70/// to all decay processes if External decayer is set
71
72 // Create Geant4 external decayer
73 G4Pythia6Decayer* extDecayer = new G4Pythia6Decayer();
74 extDecayer->SetVerboseLevel(1);
75 // The extDecayer will be deleted in G4Decay destructor
76
77 G4bool isSet = false;
78 // One G4Decay object is shared by all unstable particles (per thread).
79 // Thus, we need to set the external decayer only once.
80
81 auto particleIterator=GetParticleIterator();
82 particleIterator->reset();
83 while ((*particleIterator)())
84 {
85 if (isSet) break;
86
87 G4ParticleDefinition* particle = particleIterator->value();
88 G4ProcessManager* pmanager = particle->GetProcessManager();
89
90 if ( verboseLevel > 1 ) {
91 G4cout << "Setting ext decayer for: "
92 << particleIterator->value()->GetParticleName()
93 << G4endl;
94 }
95
96 G4ProcessVector* processVector = pmanager->GetProcessList();
97 for (std::size_t i=0; i<processVector->length(); i++) {
98
99 G4Decay* decay = dynamic_cast<G4Decay*>((*processVector)[i]);
100 if ( decay ) {
101 decay->SetExtDecayer(extDecayer);
102 isSet = true;
103 }
104 }
105 }
106
107 if ( verboseLevel > 0 ) {
108 G4cout << "External decayer physics constructed." << G4endl;
109 }
110}
void SetVerboseLevel(G4int verboseLevel)
ParticleList decay(Cluster *const c)

◆ operator=()

P6DExtDecayerPhysics & P6DExtDecayerPhysics::operator= ( const P6DExtDecayerPhysics right)
private

Not implemented.


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

Applications | User Support | Publications | Collaboration