LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MyG4DecayPhysics Class Reference

#include "MyG4DecayPhysics.hh"

Inheritance diagram for MyG4DecayPhysics:

Public Member Functions

 MyG4DecayPhysics (G4int ver=1)
 
 MyG4DecayPhysics (const G4String &name, G4int ver=1)
 
virtual ~MyG4DecayPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
virtual G4Decay * GetDecayProcess ()
 

Private Attributes

G4int verbose
 

Static Private Attributes

static G4ThreadLocal G4Decay * fDecayProcess = 0
 
static G4ThreadLocal G4bool wasActivated = false
 

Detailed Description

Definition at line 50 of file MyG4DecayPhysics.hh.

Constructor & Destructor Documentation

MyG4DecayPhysics::MyG4DecayPhysics ( G4int  ver = 1)

Definition at line 65 of file MyG4DecayPhysics.cc.

66  : G4VPhysicsConstructor("Decay"), verbose(ver)
67 {
68 }
MyG4DecayPhysics::MyG4DecayPhysics ( const G4String name,
G4int  ver = 1 
)

Definition at line 70 of file MyG4DecayPhysics.cc.

71  : G4VPhysicsConstructor(name), verbose(ver)
72 {
73 }
MyG4DecayPhysics::~MyG4DecayPhysics ( )
virtual

Definition at line 75 of file MyG4DecayPhysics.cc.

76 {
77 }

Member Function Documentation

void MyG4DecayPhysics::ConstructParticle ( )
virtual

Definition at line 79 of file MyG4DecayPhysics.cc.

80 {
81 
82 // G4cout << "MyG4DecayPhysics::ConstructParticle" << G4endl;
83  G4BosonConstructor pBosonConstructor;
84  pBosonConstructor.ConstructParticle();
85 
86  G4LeptonConstructor pLeptonConstructor;
87  pLeptonConstructor.ConstructParticle();
88 
89  G4MesonConstructor pMesonConstructor;
90  pMesonConstructor.ConstructParticle();
91 
92  G4BaryonConstructor pBaryonConstructor;
93  pBaryonConstructor.ConstructParticle();
94 
95  G4IonConstructor pIonConstructor;
96  pIonConstructor.ConstructParticle();
97 
98  G4ShortLivedConstructor pShortLivedConstructor;
99  pShortLivedConstructor.ConstructParticle();
100 }
void MyG4DecayPhysics::ConstructProcess ( )
virtual

Definition at line 102 of file MyG4DecayPhysics.cc.

References fDecayProcess, verbose, and wasActivated.

103 {
104  if(wasActivated) { return; }
105  wasActivated = true;
106 
107  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
108 
109  // Add Decay Process
110  fDecayProcess = new G4Decay();
111  auto myParticleIterator=GetParticleIterator();
112  myParticleIterator->reset();
113  G4ParticleDefinition* particle=0;
114 
115  while( (*myParticleIterator)() )
116  {
117  particle = myParticleIterator->value();
118 
119  // -- check for mu+
120  bool isMuPlus = particle->GetParticleName() == "mu+";
121  if( fDecayProcess->IsApplicable(*particle) && !isMuPlus )
122  {
123  if(verbose > 1) {
124  G4cout << "### Decays for " << particle->GetParticleName() << G4endl;
125  }
126  ph->RegisterProcess(fDecayProcess, particle);
127  }
128  if (isMuPlus) {
129  G4cout << "MyG4DecayPhysics::ConstructProcess() mu+ decays will be disabled\n" << G4endl;
130  particle->DumpTable();
131  particle->GetProcessManager()->DumpInfo();
132  }
133  }
134 }
static G4ThreadLocal G4Decay * fDecayProcess
static G4ThreadLocal G4bool wasActivated
virtual G4Decay* MyG4DecayPhysics::GetDecayProcess ( )
inlinevirtual

Definition at line 67 of file MyG4DecayPhysics.hh.

References fDecayProcess.

67 { return fDecayProcess; }
static G4ThreadLocal G4Decay * fDecayProcess

Member Data Documentation

G4ThreadLocal G4Decay * MyG4DecayPhysics::fDecayProcess = 0
staticprivate

Definition at line 70 of file MyG4DecayPhysics.hh.

Referenced by ConstructProcess(), and GetDecayProcess().

G4int MyG4DecayPhysics::verbose
private

Definition at line 71 of file MyG4DecayPhysics.hh.

Referenced by ConstructProcess().

G4ThreadLocal G4bool MyG4DecayPhysics::wasActivated = false
staticprivate

Definition at line 72 of file MyG4DecayPhysics.hh.

Referenced by ConstructProcess().


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