Message: hangup on G4NeutronHPCaptureData::GetCrossSection() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None hangup on G4NeutronHPCaptureData::GetCrossSection() 

Forum: Hadronic Processes
Date: 15 Jan, 2007
From: qinglin zeng <zengq@ornl.gov>

Hi, There:

I am simulating detection efficiency with neutron energy between 0-999Mev. The neutron is shooted from a fix target, the detector is shielded by concrete wall and iron block. The detector is scintillator.

The problem I met is that when running several thousands event, sometimes hang up there. With GDB help, I only can find this information, but deep reason I could not figure out.

Finished Running Event # 2000

^C Program received signal SIGINT, Interrupt. 0x035b2524 in G4NeutronHPCaptureData::GetCrossSection () (gdb) Quit (gdb) where

#0  0x035b2524 in G4NeutronHPCaptureData::GetCrossSection ()
#1  0x046d2398 in G4CrossSectionDataStore::GetCrossSection ()
#2  0x0404f660 in G4HadronicProcess::GetMeanFreePath () at /geant4.8.1.p01/source/global/management/include/G4ReferenceCountedHandle.hh:315
#3  0x00215f3c in G4VDiscreteProcess::PostStepGetPhysicalInteractionLength ()
#4  0x049d4854 in G4SteppingManager::DefinePhysicalStepLength ()
#5  0x049d3038 in G4SteppingManager::Stepping ()
#6  0x049d9fa4 in G4TrackingManager::ProcessOneTrack ()
#7  0x04923514 in G4EventManager::DoProcessing ()
#8  0x043a442c in G4RunManager::DoEventLoop ()
#9  0x043a2d1c in G4RunManager::BeamOn ()
#10 0x043a8370 in G4RunMessenger::SetNewValue ()
#11 0x0518fc1c in G4UIcommand::DoIt ()
#12 0x05195658 in G4UImanager::ApplyCommand ()
#13 0x0518400c in G4UIbatch::SessionStart ()
#14 0x051942cc in G4UImanager::ExecuteMacroFile ()
#15 0x05192b40 in G4UIcontrolMessenger::SetNewValue ()
#16 0x0518fc1c in G4UIcommand::DoIt ()
#17 0x05195658 in G4UImanager::ApplyCommand ()
#18 0x000062b8 in main ()
(gdb)

////////////////////////

the physicslist I used is as following:

ScintillatorPhysicsList::ScintillatorPhysicsList(): G4VUserPhysicsList() { // defaultCutValue = 1.0*mm;

        theCerenkovProcess           = 0;
        theScintillationProcess      = 0;
        theAbsorptionProcess         = 0;
        theRayleighScatteringProcess = 0;
        theBoundaryProcess           = 0;

        SetVerboseLevel(0);

}

ScintillatorPhysicsList::~ScintillatorPhysicsList() {// I do not have to delete the phsyics lists made above? Nope. }

void ScintillatorPhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructGeneral();
  ConstructEM();
  ConstructOp();
  ConstructNeutronProcess();
}

void ScintillatorPhysicsList::SetCuts()
{
//  " G4VUserPhysicsList::SetCutsWithDefault" method sets
//   the default cut value for all particle types
        defaultCutValue = 0.1 * mm;
        SetCutsWithDefault();

// const G4double gammaCut = 0.00001*mm; // const G4double electronCut = 0.00001*mm; // SetCutValue(gammaCut, "gamma"); // SetCutValue(electronCut, "e-"); // SetCutValue(electronCut, "e+"); }

void ScintillatorPhysicsList::ConstructParticle()
{
  // pseudo-particles
  G4Geantino::GeantinoDefinition();
  G4ChargedGeantino::ChargedGeantinoDefinition();

// gamma
  G4Gamma::GammaDefinition();

// optical photon
  G4OpticalPhoton::OpticalPhotonDefinition();

// leptons
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();
  G4MuonPlus::MuonPlusDefinition();
  G4MuonMinus::MuonMinusDefinition();

  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
  G4NeutrinoMu::NeutrinoMuDefinition();
  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();

// mesons
  G4MesonConstructor mConstructor;
  mConstructor.ConstructParticle();

// barions
  G4BaryonConstructor bConstructor;
  bConstructor.ConstructParticle();

// ions
  G4IonConstructor iConstructor;
  iConstructor.ConstructParticle();

}

//Processes
void ScintillatorPhysicsList::ConstructGeneral()
{
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pManager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) {
      pManager ->AddProcess(theDecayProcess);
      pManager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pManager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

void ScintillatorPhysicsList::ConstructEM()
{
        theParticleIterator->reset();

        while( (*theParticleIterator)() )
        {
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pManager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

        if (particleName == "gamma")
        {
          //gamma
                pManager->AddDiscreteProcess( new G4LowEnergyPhotoElectric() );
                pManager->AddDiscreteProcess( new G4LowEnergyCompton() );
                pManager->AddDiscreteProcess( new G4GammaConversion() );

//              G4Scintillation* m_Scintillation = new G4Scintillation();
//              pManager->AddProcess( m_Scintillation );
//              pManager->SetProcessOrderingToLast( m_Scintillation , idxAtRest);
//              pManager->SetProcessOrderingToLast( m_Scintillation , idxPostStep);
        }
        else if (particleName == "e-")
        {
          //electron
                pManager->AddProcess(new G4MultipleScattering(),-1, 1,1);
                pManager->AddProcess(new G4eIonisation(),       -1, 2,2);
                pManager->AddProcess(new G4eBremsstrahlung(),   -1,-1,3);

//              pManager->AddContinuousProcess( new G4Cerenkov() );
//              G4Scintillation* m_Scintillation = new G4Scintillation();
//              pManager->AddProcess( m_Scintillation );// ADD TO GAMMA PHYSICS?
//              pManager->SetProcessOrderingToLast( m_Scintillation , idxAtRest);
//              pManager->SetProcessOrderingToLast( m_Scintillation , idxPostStep);
        }
        else if (particleName == "e+")
        {
                pManager->AddProcess(new G4MultipleScattering(),-1, 1,1);
                pManager->AddProcess(new G4eIonisation(),       -1, 2,2);
                pManager->AddProcess(new G4eBremsstrahlung(),   -1,-1,3);
                pManager->AddProcess(new G4eplusAnnihilation(),  0,-1,4);

//              pManager->AddContinuousProcess( new G4Cerenkov() );
//              G4Scintillation* m_Scintillation = new G4Scintillation();
//              pManager->AddProcess( m_Scintillation );// ADD TO GAMMA PHYSICS?
//              pManager->SetProcessOrderingToLast( m_Scintillation , idxAtRest);
//              pManager->SetProcessOrderingToLast( m_Scintillation , idxPostStep);
        }
//      else if (particleName == "opticalphoton")
//      {
//              pManager->AddDiscreteProcess( new G4OpAbsorption() );
//              pManager->AddDiscreteProcess( new G4OpRayleigh() );
//              pManager->AddDiscreteProcess( new G4OpBoundaryProcess() );
//      }
        else if( particleName == "mu+" || particleName == "mu-"    ) 
        {
                //muon
                // Construct processes for muon
                pManager->AddProcess(new G4MultipleScattering(), -1, 1, 1);
                pManager->AddProcess(new G4MuIonisation(),       -1, 2, 2);
                pManager->AddProcess(new G4MuBremsstrahlung(),   -1, 3, 3);
                pManager->AddProcess(new G4MuPairProduction(),   -1, 4, 4);
        }
        else if( (!particle->IsShortLived()) &&
               (particle->GetPDGCharge() != 0.0) &&
               (particle->GetParticleName() != "chargedgeantino") )
        {
          //all others charged particles except geantino
                pManager->AddProcess(new G4MultipleScattering(),-1,1,1);

                G4double demax = 0.05;  // try to lose at most 3% of the energy in
          //    a single step (in limit of large energies)
                G4double stmin = 1.e-9 * m;  // length of the final step: 10 angstrom
          // reproduced angular distribution of TRIM

                G4hLowEnergyIonisation* lowEIonisation = new G4hLowEnergyIonisation();
                pManager->AddProcess( lowEIonisation, -1,2,2);
                lowEIonisation->SetStepFunction( demax, stmin );
                }
        }
}

void ScintillatorPhysicsList::ConstructOp()
{
  theCerenkovProcess           = new G4Cerenkov("Cerenkov");
  theScintillationProcess = new G4Scintillation("Scintillation");
  theAbsorptionProcess     = new G4OpAbsorption();
  theRayleighScatteringProcess = new G4OpRayleigh();
  theBoundaryProcess  = new G4OpBoundaryProcess();

// theCerenkovProcess->DumpPhysicsTable(); // theScintillationProcess->DumpPhysicsTable(); // theAbsorptionProcess->DumpPhysicsTable(); // theRayleighScatteringProcess->DumpPhysicsTable();

  SetVerbose(0);

  theCerenkovProcess->SetMaxNumPhotonsPerStep(300);
  theCerenkovProcess->SetTrackSecondariesFirst(true);

  theScintillationProcess->SetScintillationYieldFactor(1.);
  theScintillationProcess->SetTrackSecondariesFirst(true);

  G4OpticalSurfaceModel themodel = unified;
  theBoundaryProcess->SetModel(themodel);

  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pManager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();
    if (theCerenkovProcess->IsApplicable(*particle)) {
      pManager->AddContinuousProcess(theCerenkovProcess);
    }
    if (theScintillationProcess->IsApplicable(*particle)) {
      pManager->AddProcess(theScintillationProcess);
      pManager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
      pManager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
    }
    if (particleName == "opticalphoton") {
      G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
      pManager->AddDiscreteProcess(theAbsorptionProcess);
      pManager->AddDiscreteProcess(theRayleighScatteringProcess);
      pManager->AddDiscreteProcess(theBoundaryProcess);
    }
  }
}

void ScintillatorPhysicsList::ConstructNeutronProcess() {
        theParticleIterator->reset();
        while( (*theParticleIterator)() ){
                G4ParticleDefinition* particle = theParticleIterator->value();
                G4ProcessManager* pManager = particle->GetProcessManager();
                G4String particleName = particle->GetParticleName();

                if (particleName == "neutron") 
        {

                        // elastic scattering
                        G4HadronElasticProcess* theNeutronElasticProcess = new G4HadronElasticProcess;
                        G4LElastic*             theElasticModel1 = new G4LElastic;
                        G4NeutronHPElastic *    theElasticNeutron = new G4NeutronHPElastic;

            theNeutronElasticProcess->RegisterMe(theElasticModel1);
            theElasticModel1->SetMinEnergy(19*MeV);
            theNeutronElasticProcess->RegisterMe(theElasticNeutron);

                        G4NeutronHPElasticData* theNeutronData = new G4NeutronHPElasticData;

            theNeutronElasticProcess->AddDataSet(theNeutronData);
                        theNeutronElasticProcess->DumpPhysicsTable(*particle);
            pManager->AddDiscreteProcess(theNeutronElasticProcess);

                        // inelastic scattering
                        G4NeutronInelasticProcess* theInelasticProcess = new G4NeutronInelasticProcess("inelastic");
                        G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;

            theInelasticModel->SetMinEnergy(19*MeV);
            theInelasticProcess->RegisterMe(theInelasticModel);

                        G4NeutronHPInelastic * theLENeutronInelasticModel = new G4NeutronHPInelastic;

            theInelasticProcess->RegisterMe(theLENeutronInelasticModel);

                        G4NeutronHPInelasticData * theNeutronData1 = new G4NeutronHPInelasticData;

            theInelasticProcess->AddDataSet(theNeutronData1);
            pManager->AddDiscreteProcess(theInelasticProcess);

                        // capture
                        G4HadronCaptureProcess* theCaptureProcess = new G4HadronCaptureProcess;
                        G4LCapture*             theCaptureModel = new G4LCapture;

            theCaptureModel->SetMinEnergy(19*MeV);
            theCaptureProcess->RegisterMe(theCaptureModel);

                        G4NeutronHPCapture* theLENeutronCaptureModel = new G4NeutronHPCapture;

            theCaptureProcess->RegisterMe(theLENeutronCaptureModel);

                        G4NeutronHPCaptureData* theNeutronData3 = new G4NeutronHPCaptureData;

            theCaptureProcess->AddDataSet(theNeutronData3);
            pManager->AddDiscreteProcess(theCaptureProcess);

        }
        else if (particleName == "anti_neutron") 
        {

                        G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
                        G4LElastic*             theElasticModel = new G4LElastic;

                        theElasticProcess->RegisterMe(theElasticModel);
                        pManager->AddDiscreteProcess(theElasticProcess);
                        G4AntiNeutronInelasticProcess*  theInelasticProcess = new G4AntiNeutronInelasticProcess("inelastic");
                        G4LEAntiNeutronInelastic*       theLEInelasticModel = new G4LEAntiNeutronInelastic;

            theInelasticProcess->RegisterMe(theLEInelasticModel);

                        G4HEAntiNeutronInelastic* theHEInelasticModel = new G4HEAntiNeutronInelastic;

            theInelasticProcess->RegisterMe(theHEInelasticModel);
            pManager->AddDiscreteProcess(theInelasticProcess);
        } 
        }
}

void ScintillatorPhysicsList::SetVerbose(G4int verbose)
{
  theCerenkovProcess->SetVerboseLevel(verbose);
  theScintillationProcess->SetVerboseLevel(verbose);
  theAbsorptionProcess->SetVerboseLevel(verbose);
  theRayleighScatteringProcess->SetVerboseLevel(verbose);
  theBoundaryProcess->SetVerboseLevel(verbose);  
}

////////////////////

your help is appreciated, lot thanks!

Qinglin

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: hangup on G4NeutronHPCaptureData::GetCrossSection()   (Dennis H. Wright - 23 Feb, 2007)
 Add Message Add Message
to: "hangup on G4NeutronHPCaptureData::GetCrossSection()"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]