MyDecayPhysics Class Reference

#include <MyDecayPhysics.hh>

List of all members.

Public Member Functions

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

Private Attributes

G4Decay * fDecayProcess
G4int verbose
G4bool wasActivated

Detailed Description

Definition at line 50 of file MyDecayPhysics.hh.


Constructor & Destructor Documentation

MyDecayPhysics::MyDecayPhysics ( G4int  ver = 1  ) 

Definition at line 62 of file MyDecayPhysics.cc.

References fDecayProcess.

00063   :  G4VPhysicsConstructor("Decay"), verbose(ver), wasActivated(false)
00064 {
00065   fDecayProcess = 0;
00066 }

MyDecayPhysics::MyDecayPhysics ( const G4String &  name,
G4int  ver = 1 
)

Definition at line 68 of file MyDecayPhysics.cc.

References fDecayProcess.

00069   :  G4VPhysicsConstructor(name), verbose(ver), wasActivated(false)
00070 {
00071   fDecayProcess = 0;
00072 }

MyDecayPhysics::~MyDecayPhysics (  )  [virtual]

Definition at line 74 of file MyDecayPhysics.cc.

References fDecayProcess.

00075 {
00076   delete fDecayProcess;
00077 }


Member Function Documentation

void MyDecayPhysics::ConstructParticle (  )  [virtual]

Definition at line 79 of file MyDecayPhysics.cc.

00080 {
00081 
00082 // G4cout << "MyDecayPhysics::ConstructParticle" << G4endl;
00083   G4BosonConstructor  pBosonConstructor;
00084   pBosonConstructor.ConstructParticle();
00085 
00086   G4LeptonConstructor pLeptonConstructor;
00087   pLeptonConstructor.ConstructParticle();
00088 
00089   G4MesonConstructor pMesonConstructor;
00090   pMesonConstructor.ConstructParticle();
00091 
00092   G4BaryonConstructor pBaryonConstructor;
00093   pBaryonConstructor.ConstructParticle();
00094 
00095   G4IonConstructor pIonConstructor;
00096   pIonConstructor.ConstructParticle();
00097 
00098   G4ShortLivedConstructor pShortLivedConstructor;
00099   pShortLivedConstructor.ConstructParticle();  
00100 
00101         G4DecayTable* table;
00102         G4VDecayChannel* mode;
00103 
00104         table = new G4DecayTable();
00105         mode = new G4PhaseSpaceDecayChannel("pi-",0.999877,2,"mu-","anti_nu_mu");
00106         table->Insert(mode);
00107         //mode = new G4PhaseSpaceDecayChannel("pi-",1,2,"e-","anti_nu_e");
00108         mode = new G4PhaseSpaceDecayChannel("pi-",1.230e-4,2,"e-","anti_nu_e");
00109         table->Insert(mode);
00110         G4PionMinus::PionMinusDefinition()->SetDecayTable(table);
00111 
00112         table = new G4DecayTable();
00113         mode = new G4PhaseSpaceDecayChannel("pi+",0.999877,2,"mu+","nu_mu");
00114         table->Insert(mode);
00115         //mode = new G4PhaseSpaceDecayChannel("pi+",1,2,"e+","nu_e");
00116         mode = new G4PhaseSpaceDecayChannel("pi+",1.230e-4,2,"e+","nu_e");
00117         table->Insert(mode);
00118         G4PionPlus::PionPlusDefinition()->SetDecayTable(table);
00119 
00120 }

void MyDecayPhysics::ConstructProcess (  )  [virtual]

Definition at line 122 of file MyDecayPhysics.cc.

References fDecayProcess, and wasActivated.

00123 {
00124   if(wasActivated) { return; }
00125   wasActivated = true;
00126 
00127   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
00128 
00129   // Add Decay Process
00130   fDecayProcess = new G4Decay();
00131 // TODO:
00132 //  theParticleIterator->reset();
00133   G4ParticleDefinition* particle=0;
00134 
00135 //  while( (*theParticleIterator)() )
00136 //  {
00137 //    particle = theParticleIterator->value();
00138 //    if( fDecayProcess->IsApplicable(*particle) ) 
00139 //    { 
00140 //      if(verbose > 1) {
00141 //        G4cout << "### Decays for " << particle->GetParticleName() << G4endl;
00142 //      }
00143 //      ph->RegisterProcess(fDecayProcess, particle);
00144 //    }
00145 //  }
00146 
00147 }

virtual G4Decay* MyDecayPhysics::GetDecayProcess (  )  [inline, virtual]

Definition at line 67 of file MyDecayPhysics.hh.

References fDecayProcess.

00067 { return fDecayProcess; }


Member Data Documentation

G4Decay* MyDecayPhysics::fDecayProcess [private]
G4int MyDecayPhysics::verbose [private]

Definition at line 71 of file MyDecayPhysics.hh.

G4bool MyDecayPhysics::wasActivated [private]

Definition at line 72 of file MyDecayPhysics.hh.

Referenced by ConstructProcess().


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

Generated on 15 Jun 2016 for g4sim by  doxygen 1.6.1