mirguest / MirguestIssueReport

5 stars 3 forks source link

[#104]引入 #88 后,neutron事例的时间很长 #110

Open mirguest opened 11 years ago

mirguest commented 11 years ago

neutron-long-time

mirguest commented 11 years ago

是因为 #88 的原因吗?

mirguest commented 11 years ago

是否可以考虑使用Geant4自带的一些代码?

mirguest commented 11 years ago

我先尝试使用geant4提供的G4RadioactiveDecay

mirguest commented 11 years ago

Li9He8Decay这个文件中的数据,考虑提取到一个文件中,用于读取?

mirguest commented 11 years ago

我将一些代码改成使用Geant4自带的,然后得到如下结果: after-mod-neutron-hittime

mirguest commented 11 years ago

此处,我的事例数只有5000.

mirguest commented 11 years ago
ihep@ihep:~/doc/work/geant4/Dyb2Sim$ git diff lintao-issue-109..lintao-issue-110
diff --git a/DetSim/PhysiSim/src/DsPhysConsGeneral.cc b/DetSim/PhysiSim/src/DsPhysConsGeneral.cc
index 35f576d..1493b0b 100644
--- a/DetSim/PhysiSim/src/DsPhysConsGeneral.cc
+++ b/DetSim/PhysiSim/src/DsPhysConsGeneral.cc
@@ -45,8 +45,8 @@ void DsPhysConsGeneral::ConstructProcess()

     const G4IonTable* theIonTable 
         = G4ParticleTable::GetParticleTable()->GetIonTable();
-    //G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
-    DsG4RadioactiveDecay* theRadioactiveDecay = new DsG4RadioactiveDecay();
+    G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
+    //DsG4RadioactiveDecay* theRadioactiveDecay = new DsG4RadioactiveDecay();
     for (G4int i=0; i<theIonTable->Entries(); i++) {
         G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
         if (particleName == "GenericIon") {
diff --git a/DetSim/PhysiSim/src/DsPhysConsHadron.cc b/DetSim/PhysiSim/src/DsPhysConsHadron.cc
index 54df02b..fbe9d73 100644
--- a/DetSim/PhysiSim/src/DsPhysConsHadron.cc
+++ b/DetSim/PhysiSim/src/DsPhysConsHadron.cc
@@ -105,7 +105,7 @@
 #include "G4NeutronHPInelastic.hh"
 #include "G4NeutronHPFission.hh"
 //#include "G4NeutronHPCapture.hh"
-#include "DsG4NeutronHPCapture.h" // modified class from G4NeutronHPCapture 
+#include "G4NeutronHPCapture.hh" // modified class from G4NeutronHPCapture 

 #include "G4NeutronHPCaptureData.hh"
 #include "G4NeutronHPFissionData.hh"
@@ -113,9 +113,9 @@
 #include "G4NeutronHPInelasticData.hh"

 //add thermal scattering
-#include "DsG4NeutronHPThermalScatteringData.hh"
+#include "G4NeutronHPThermalScatteringData.hh"
 //#include "G4NeutronHPThermalScattering.hh"
-#include "DsG4NeutronHPThermalScattering.hh"
+#include "G4NeutronHPThermalScattering.hh"

 // Stopping processes
 #include "G4AntiProtonAnnihilationAtRest.hh"
@@ -481,9 +481,9 @@ void DsPhysConsHadron::ConstructProcess()
     theNeutronElasticModel->SetMinEnergy(m_neutronElasticEnergyBoundary);

     //add thermal scattering
-    DsG4NeutronHPThermalScatteringData* theHPThermalScatteringData = new DsG4NeutronHPThermalScatteringData();
+    G4NeutronHPThermalScatteringData* theHPThermalScatteringData = new G4NeutronHPThermalScatteringData();
     theHadronElasticProcess->AddDataSet(theHPThermalScatteringData);
-    DsG4NeutronHPThermalScattering* theNeutronThermalElasticModel = new DsG4NeutronHPThermalScattering();
+    G4NeutronHPThermalScattering* theNeutronThermalElasticModel = new G4NeutronHPThermalScattering();
     theNeutronThermalElasticModel->SetMaxEnergy(4.0*eV);

     theHadronElasticProcess->RegisterMe(theNeutronHPElastic);
@@ -536,7 +536,7 @@ void DsPhysConsHadron::ConstructProcess()
     G4HadronCaptureProcess* theNeutronCaptureProcess = new G4HadronCaptureProcess();
     G4LCapture* theNeutronLCapture = new G4LCapture();

-    DsG4NeutronHPCapture* theNeutronHPCapture = new DsG4NeutronHPCapture();
+    G4NeutronHPCapture* theNeutronHPCapture = new G4NeutronHPCapture();

     //theNeutronHPCapture->SetMaxEnergy( 20.*MeV );
     theNeutronHPCapture->SetMaxEnergy(m_captureEnergyBoundary);