| Rev | Line | |
|---|
| [807] | 1 | // %%%%%%%%%%
|
|---|
| 2 | // G4 headers
|
|---|
| 3 | // %%%%%%%%%%
|
|---|
| 4 | //#include "G4ParticleDefinition.hh"
|
|---|
| 5 | #include "G4ProcessManager.hh"
|
|---|
| 6 | #include "G4Decay.hh"
|
|---|
| 7 |
|
|---|
| 8 | // %%%%%%%%%%%%
|
|---|
| 9 | // gemc headers
|
|---|
| 10 | // %%%%%%%%%%%%
|
|---|
| 11 | #include "GeneralPhysics.h"
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | GeneralPhysics::GeneralPhysics(gemc_opts Opt) : G4VPhysicsConstructor("General Physics")
|
|---|
| 15 | {
|
|---|
| 16 | gemcOpt = Opt;
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | GeneralPhysics::~GeneralPhysics(){}
|
|---|
| 20 |
|
|---|
| 21 | void GeneralPhysics::ConstructParticle()
|
|---|
| 22 | {
|
|---|
| 23 | // Decay will apply to all particles built so far
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | void GeneralPhysics::ConstructProcess()
|
|---|
| 27 | {
|
|---|
| 28 | string hd_msg = gemcOpt.args["LOG_MSG"].args + " General Physics List: <<< ";
|
|---|
| 29 | double VERB = gemcOpt.args["PHY_VERBOSITY"].arg ;
|
|---|
| 30 | cout << hd_msg << " Building Decay processes " << endl;
|
|---|
| 31 |
|
|---|
| 32 | G4Decay*fDecayProcess = new G4Decay();
|
|---|
| 33 |
|
|---|
| 34 | // Add Decay Process
|
|---|
| 35 | theParticleIterator->reset();
|
|---|
| 36 | while( (*theParticleIterator)() )
|
|---|
| 37 | {
|
|---|
| 38 | G4ParticleDefinition* particle = theParticleIterator->value();
|
|---|
| 39 | G4ProcessManager* pmanager = particle->GetProcessManager();
|
|---|
| 40 | string pname = particle->GetParticleName();
|
|---|
| 41 | if (fDecayProcess->IsApplicable(*particle))
|
|---|
| 42 | {
|
|---|
| 43 | if(VERB > 2) cout << hd_msg << " Adding Decay Process for " << pname << endl;
|
|---|
| 44 | pmanager ->AddProcess(fDecayProcess);
|
|---|
| 45 | // set ordering for PostStepDoIt and AtRestDoIt
|
|---|
| 46 | pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
|
|---|
| 47 | pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
|
|---|
| 48 | }
|
|---|
| 49 | }
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.