00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #include "G4QStoppingPhysics.hh"
00041
00042 #include "G4SystemOfUnits.hh"
00043 #include "G4QCaptureAtRest.hh"
00044 #include "G4MuonMinusCaptureAtRest.hh"
00045
00046 #include "G4ParticleDefinition.hh"
00047 #include "G4ProcessManager.hh"
00048
00049 #include "G4LeptonConstructor.hh"
00050 #include "G4MesonConstructor.hh"
00051 #include "G4BaryonConstructor.hh"
00052 #include "G4MuonMinus.hh"
00053 #include "G4HadronicDeprecate.hh"
00054
00055
00056 G4QStoppingPhysics::G4QStoppingPhysics(G4int ver)
00057 : G4VPhysicsConstructor("stopping")
00058 , muProcess(0), hProcess(0)
00059 , verbose(ver), wasActivated(false) ,
00060 useMuonMinusCapture(true)
00061 {
00062 G4HadronicDeprecate("G4QStoppingPhysics");
00063 if(verbose > 1) G4cout << "### G4QStoppingPhysics" << G4endl;
00064 }
00065
00066 G4QStoppingPhysics::G4QStoppingPhysics(const G4String& name, G4int ver,
00067 G4bool UseMuonMinusCapture)
00068 : G4VPhysicsConstructor(name)
00069 , muProcess(0), hProcess(0)
00070 , verbose(ver), wasActivated(false) ,
00071 useMuonMinusCapture(UseMuonMinusCapture)
00072 {
00073 G4HadronicDeprecate("G4QStoppingPhysics");
00074 if(verbose > 1) G4cout << "### G4QStoppingPhysics" << G4endl;
00075 }
00076
00077 G4QStoppingPhysics::~G4QStoppingPhysics()
00078 {
00079 if(wasActivated) {
00080 if ( muProcess ) delete muProcess;
00081 delete hProcess;
00082 }
00083 }
00084
00085 void G4QStoppingPhysics::ConstructParticle()
00086 {
00087
00088 G4LeptonConstructor pLeptonConstructor;
00089 pLeptonConstructor.ConstructParticle();
00090
00091 G4MesonConstructor pMesonConstructor;
00092 pMesonConstructor.ConstructParticle();
00093
00094 G4BaryonConstructor pBaryonConstructor;
00095 pBaryonConstructor.ConstructParticle();
00096
00097 }
00098
00099 void G4QStoppingPhysics::ConstructProcess()
00100 {
00101 if(verbose > 1) G4cout << "### G4QStoppingPhysics::ConstructProcess "
00102 << wasActivated << G4endl;
00103 if(wasActivated) return;
00104 wasActivated = true;
00105
00106 if ( useMuonMinusCapture )
00107 {
00108 muProcess = new G4MuonMinusCaptureAtRest();
00109 } else {
00110 muProcess = 0;
00111 }
00112 hProcess = new G4QCaptureAtRest();
00113
00114 G4double mThreshold = 130.*MeV;
00115
00116
00117 G4ParticleDefinition* particle=0;
00118 G4ProcessManager* pmanager=0;
00119
00120 theParticleIterator->reset();
00121 while( (*theParticleIterator)() )
00122 {
00123 particle = theParticleIterator->value();
00124 pmanager = particle->GetProcessManager();
00125 if(particle == G4MuonMinus::MuonMinus()) {
00126 if ( useMuonMinusCapture )
00127 {
00128 pmanager->AddRestProcess(muProcess);
00129 if(verbose > 1)
00130 G4cout << "### QStoppingPhysics added G4MuonMinusCaptureAtRest for "
00131 << particle->GetParticleName() << G4endl;
00132 } else {
00133 pmanager->AddRestProcess(hProcess);
00134 if(verbose > 1)
00135 G4cout << "### QStoppingPhysics added G4QCaptureAtRest for "
00136 << particle->GetParticleName() << G4endl;
00137 }
00138 }
00139 if(particle->GetPDGCharge() < 0.0 &&
00140 particle->GetPDGMass() > mThreshold &&
00141 !particle->IsShortLived() &&
00142 hProcess->IsApplicable(*particle) )
00143 {
00144 pmanager->AddRestProcess(hProcess);
00145 if(verbose > 1)
00146 G4cout << "### QStoppingPhysics added for "
00147 << particle->GetParticleName() << G4endl;
00148 }
00149 }
00150 }
00151
00152