Message: NO Scintillation Happening!? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question NO Scintillation Happening!? 

Forum: Event and Track Management
Date: 16 Oct, 2013
From: Madax <Madax>

Hi. I am trying to model sodium iodide detector. I have found using following lines of code in stacking action class that, optical photons are generated through cerenkov but not scintillation.

 if(aTrack->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition())
  { // particle is optical photon
    if(aTrack->GetParentID()>0)
     //   if(volume == aTrack->GetVolume()->GetName())
       if(aTrack->GetCreatorProcess()->GetProcessName()=="Scintillation")
            gammaCounter++;

  }

My physics list is as follows. I know its long to read, but please help me out if I am doing something wrong. Thank you for your time.

---Physics List---

#include "Example1PhysicsList.hh"
#include "G4ParticleTypes.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4GammaConversion.hh"
#include "G4ComptonScattering.hh"
#include "G4VModularPhysicsList.hh"
#include "G4PhysicsListHelper.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecay.hh"
#include "G4EmStandardPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
#include "Example1PhysicsListMessenger.hh"

Example1PhysicsList::Example1PhysicsList()
    :G4VUserPhysicsList(), QuasiElastic(true), ProjectileDiffraction(false)
{
    defaultcut = 1.*mm;

    theCerenkovProcess           = NULL;
    theScintillationProcess      = NULL;
    theAbsorptionProcess         = NULL;
    theRayleighScatteringProcess = NULL;
    theMieHGScatteringProcess    = NULL;
    theBoundaryProcess           = NULL;

    pMessenger = new Example1PhysicsListMessenger(this);

    const G4double minute = 60*second;
    const G4double hour   = 60*minute;
    const G4double day    = 24*hour;
    const G4double year   = 365*day;
    new G4UnitDefinition("minute", "min", "Time", minute);
    new G4UnitDefinition("hour",   "h",   "Time", hour);
    new G4UnitDefinition("day",    "d",   "Time", day);
    new G4UnitDefinition("year",   "y",   "Time", year);

    // Default physics
//    new G4DecayPhysics();

    // Radioactive decay
//    new G4RadioactiveDecayPhysics();

    // EM physics
//    new G4EmStandardPhysics();
        SetVerboseLevel(0);
}

Example1PhysicsList::~Example1PhysicsList()
{
    if(theNeutrons) { delete theNeutrons; }
    if(theLEPNeutron) { delete theLEPNeutron; }
    if(theQGSPNeutron) { delete theQGSPNeutron; }
    if(theBertiniNeutron) { delete theBertiniNeutron; }
    if(theINCLXXNeutron) { delete theINCLXXNeutron; }

    if(thePiK) { delete thePiK; }
    if(theLEPPiK) { delete  theLEPPiK; }
    if(theQGSPPiK) { delete theQGSPPiK; }
    if(theBertiniPiK) delete theBertiniPiK;
    if(theINCLXXPiK) delete theINCLXXPiK;

    if(thePro) delete thePro;
    if(theLEPPro) delete theLEPPro;
    if(theQGSPPro) delete theQGSPPro;
    if(theBertiniPro) delete theBertiniPro;
    if(theINCLXXPro) delete theINCLXXPro;

    delete pMessenger;
}

#include "G4BosonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4ShortLivedConstructor.hh"

void Example1PhysicsList::ConstructParticle()
{
  // In this method, static member functions should be called
  // for all particles which you want to use.
  // This ensures that objects of these particle types will be
  // created in the program.
    G4BosonConstructor bosons;
    bosons.ConstructParticle();
    G4LeptonConstructor lepton;
    lepton.ConstructParticle();
    G4BaryonConstructor baryon;
    baryon.ConstructParticle();
    G4IonConstructor ion;
    ion.ConstructParticle();
    G4ShortLivedConstructor shortL;
    shortL.ConstructParticle();
    G4MesonConstructor meson;
    meson.ConstructParticle();

}

#include "G4Gamma.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleDefinition.hh"
#include "G4PhysicsListHelper.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4ComptonScattering.hh"

#include "G4SeltzerBergerModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4MuMultipleScattering.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"

#include "G4hMultipleScattering.hh"
#include "G4hIonisation.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"

#include "G4ionIonisation.hh"

#include "G4EmProcessOptions.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4LossTableManager.hh"

void Example1PhysicsList::ConstructProcess()
{
    // Define transportation process

    AddTransportation();

    // Electromagnetic physics
    ConstructEM();
    // Decay Physics
    ConstructDecay();
    ConstructOp();

    // Hadron Physics
    CreateModels();
    G4cout << "ExamplePhysicsList :: Building Protons..." << G4endl;
    thePro->Build();
    G4cout << "ExamplePhysicsList :: Building Neutrons..." << G4endl;
    theNeutrons->Build();
    G4cout << "ExamplePhysicsList :: Building PiK..." << G4endl;
    thePiK->Build();
    //G4cout << "ExamplePhysicsList :: Building theMiscLHEP..." << G4endl;
    //theMiscLHEP->Build();
    ConstructHad();

    // Cuts
    SetCuts();

}

void Example1PhysicsList::SetCuts() {

    SetCutsWithDefault();
    SetCutValue(defaultcut, "e-");
    SetCutValue(defaultcut, "e+");
    SetCutValue(defaultcut, "proton");

}

#include "G4StepLimiter.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleTableIterator.hh"
#include "G4ParticleTypes.hh"
#include "G4GenericIon.hh"

void Example1PhysicsList::ConstructEM() {

    G4cout << "ExamplePhysicsList :: Constructing Electromagnetic Processes..." << G4endl;

// G4RadioactiveDecay* radioactiveDecay = new G4RadioactiveDecay(); // radioactiveDecay->SetHLThreshold(-1.*s); // radioactiveDecay->SetICM(true); //Internal Conversion // radioactiveDecay->SetARM(true); //Atomic Rearangement

    theParticleIterator->reset();
    G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();

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

        if (particleName == "gamma") {
            // gamma
            ph->RegisterProcess(new G4PhotoElectricEffect, particle);
            ph->RegisterProcess(new G4ComptonScattering,   particle);
            ph->RegisterProcess(new G4GammaConversion,     particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
        }
        else if (particleName == "e-") {
            //electron
            ph->RegisterProcess(new G4eMultipleScattering, particle);
            ph->RegisterProcess(new G4eIonisation,         particle);
            ph->RegisterProcess(new G4eBremsstrahlung,     particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
  //          ph->RegisterProcess(radioactiveDecay, G4GenericIon::GenericIon());
        } else if (particleName == "e+") {
            //positron
            ph->RegisterProcess(new G4eMultipleScattering, particle);
            ph->RegisterProcess(new G4eIonisation,         particle);
            ph->RegisterProcess(new G4eBremsstrahlung,     particle);
            ph->RegisterProcess(new G4eplusAnnihilation,   particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
        } else if( particleName == "mu+" ||
                  particleName == "mu-"    ) {
            //muon
            ph->RegisterProcess(new G4MuMultipleScattering, particle);
            ph->RegisterProcess(new G4MuIonisation,         particle);
            ph->RegisterProcess(new G4MuBremsstrahlung,     particle);
            ph->RegisterProcess(new G4MuPairProduction,     particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
        } else if( particleName == "proton" ||
                  particleName == "pi-" ||
                  particleName == "pi+"    ) {
            //proton
            ph->RegisterProcess(new G4hMultipleScattering, particle);
            ph->RegisterProcess(new G4hIonisation,         particle);
            ph->RegisterProcess(new G4hBremsstrahlung,     particle);
            ph->RegisterProcess(new G4hPairProduction,     particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
        } else if( particleName == "alpha" ||
                  particleName == "He3" )     {
            //alpha
            ph->RegisterProcess(new G4hMultipleScattering, particle);
            ph->RegisterProcess(new G4ionIonisation,       particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
        } else if( particleName == "GenericIon" ) {
            //Ions
            ph->RegisterProcess(new G4hMultipleScattering, particle);
            ph->RegisterProcess(new G4ionIonisation,       particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
        } else if ((!particle->IsShortLived()) &&
                   (particle->GetPDGCharge() != 0.0) &&
                   (particle->GetParticleName() != "chargedgeantino")) {
            //all others charged particles except geantino
            ph->RegisterProcess(new G4hMultipleScattering, particle);
            ph->RegisterProcess(new G4hIonisation,         particle);
            ph->RegisterProcess(new G4StepLimiter, particle);
        }

    }

    G4EmProcessOptions emproc;
    emproc.SetAuger(true);
    emproc.SetBuildCSDARange(true);
    emproc.SetFluo(true);
    emproc.SetIntegral(true);
    emproc.SetLossFluctuations(true);
    emproc.SetLPMFlag(true);
    emproc.SetMscLateralDisplacement(true);
    emproc.SetPIXE(true);
    emproc.SetRandomStep(true);
    emproc.SetSplineFlag(true);
    //emproc.SetSubCutoff(true);

    // Deexcitation
    //
    G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
    de->SetFluo(true);
    de->SetAuger(true);
    de->SetPIXE(true);
    G4LossTableManager::Instance()->SetAtomDeexcitation(de);

}

#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpMieHG.hh"
#include "G4OpBoundaryProcess.hh"

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

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

  //SetVerbose(1);

  theCerenkovProcess->SetMaxNumPhotonsPerStep(20);
  theCerenkovProcess->SetMaxBetaChangePerStep(10.0);
  theCerenkovProcess->SetTrackSecondariesFirst(true);

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

  // Use Birks Correction in the Scintillation process

  G4EmSaturation* emSaturation = G4LossTableManager::Instance()->EmSaturation();
  theScintillationProcess->AddSaturation(emSaturation);

  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();
    if (theCerenkovProcess->IsApplicable(*particle)) {
      pmanager->AddProcess(theCerenkovProcess);
      pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
    }
    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(theMieHGScatteringProcess);
      pmanager->AddDiscreteProcess(theBoundaryProcess);
    }
  }
}

#include "G4HadronicException.hh"

// proton

#include "G4PhysicsListHelper.hh"
#include "G4HadronicProcess.hh"
#include "G4HadronElasticProcess.hh"
#include "G4LElastic.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4ProtonInelasticCrossSection.hh"
#include "G4LEProtonInelastic.hh"
#include "G4HEProtonInelastic.hh"

// neutron

#include "G4NeutronInelasticProcess.hh"
#include "G4BinaryCascade.hh"
#include "G4LENeutronInelastic.hh"
#include "G4HENeutronInelastic.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"

#include "G4HadronicDeprecate.hh"
#include "G4HadronicInteraction.hh"
#include "G4HadronicProcess.hh"

#include "G4HadronElasticProcess.hh"
#include "G4BinaryLightIonReaction.hh"
#include "G4TripathiCrossSection.hh"
#include "G4IonsShenCrossSection.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4HadronInelasticProcess.hh"
#include "G4BinaryCascade.hh"
#include "G4NeutronHPElasticData.hh"
#include "G4NeutronHPThermalScatteringData.hh"
#include "G4NeutronHPThermalScattering.hh"
#include "G4NeutronHPJENDLHEData.hh"

#include "G4ProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4LEPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4INCLXXNeutronBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4LEPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4INCLXXProtonBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4LEPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4INCLXXPiKBuilder.hh"

void Example1PhysicsList::CreateModels() {

    G4cout << "ExamplePhysicsList :: Creating Models..." << G4endl;

    G4cout << "ExamplePhysicsList :: Building Neutrons..." << G4endl;
    // Neutron Builder - INCL/ABLA
    theNeutrons=new G4NeutronBuilder;
    theNeutrons->RegisterMe(theQGSPNeutron=new G4QGSPNeutronBuilder(QuasiElastic, ProjectileDiffraction));
    theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
    theLEPNeutron->SetMinInelasticEnergy(9.5*GeV);
    theLEPNeutron->SetMaxInelasticEnergy(25*GeV);

    theNeutrons->RegisterMe(theBertiniNeutron=new G4BertiniNeutronBuilder);
    theBertiniNeutron->SetMinEnergy(2.9*GeV);
    theBertiniNeutron->SetMaxEnergy(9.9*GeV);

    theNeutrons->RegisterMe(theINCLXXNeutron=new G4INCLXXNeutronBuilder);
    theINCLXXNeutron->SetMinEnergy(0.0*GeV);
    theINCLXXNeutron->SetMaxEnergy(3.0*GeV);

    G4cout << "ExamplePhysicsList :: Building Protons..." << G4endl;
    // Proton Builder - INCL/ABLA
    thePro=new G4ProtonBuilder();
    theQGSPPro=new G4QGSPProtonBuilder(QuasiElastic, ProjectileDiffraction);
    theLEPPro = new G4LEPProtonBuilder();
    theLEPPro->SetMinEnergy(9.5*GeV);
    theLEPPro->SetMaxEnergy(25*GeV);

    theBertiniPro = new G4BertiniProtonBuilder();
    theBertiniPro->SetMinEnergy(2.9*GeV);
    theBertiniPro->SetMaxEnergy(9.9*GeV);

    theINCLXXPro = new G4INCLXXProtonBuilder();
    theINCLXXPro->SetMinEnergy(0.0*GeV);
    theINCLXXPro->SetMaxEnergy(3.0*GeV);

    thePro->RegisterMe(theQGSPPro);
    thePro->RegisterMe(theLEPPro);
    thePro->RegisterMe(theBertiniPro);
    thePro->RegisterMe(theINCLXXPro);

    //ph->RegisterProcess(thePro,particle);
   // PiK Builder - INCL/ABLA
    thePiK=new G4PiKBuilder;
    thePiK->RegisterMe(theQGSPPiK=new G4QGSPPiKBuilder(QuasiElastic));
    thePiK->RegisterMe(theLEPPiK=new G4LEPPiKBuilder);
    theLEPPiK->SetMaxEnergy(25*GeV);
    theLEPPiK->SetMinEnergy(9.5*GeV);

    thePiK->RegisterMe(theBertiniPiK=new G4BertiniPiKBuilder);
    theBertiniPiK->SetMinEnergy(2.9*GeV);
    theBertiniPiK->SetMaxEnergy(9.9*GeV);

    thePiK->RegisterMe(theINCLXXPiK=new G4INCLXXPiKBuilder);
    theINCLXXPiK->SetMinEnergy(0.0*GeV);
    theINCLXXPiK->SetMaxEnergy(3.0*GeV);

    //theMiscLHEP = new G4MiscLHEPBuilder;
    //G4cout << "... 5" << G4endl;

}

void Example1PhysicsList::ConstructHad() {

    G4cout << "ExamplePhysicsList :: Constructing Hadron Processes..." << G4endl;

    theParticleIterator->reset();
    while( (*theParticleIterator)() )
    {
        G4ParticleDefinition* particle = theParticleIterator->value();
        G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();

        if (particle->GetParticleName() == "alpha")
        {

            G4HadronElasticProcess * theElasticProcess = new G4HadronElasticProcess;
            theElasticProcess->RegisterMe( new G4LElastic() );

            //G4cout<< "Error 1" << G4endl;

            // INELASTIC SCATTERING
            // Binary Cascade
            G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction();
            theBC -> SetMinEnergy(80.*MeV);
            theBC -> SetMaxEnergy(40.*GeV);

            // TRIPATHI CROSS SECTION
            // Implementation of formulas in analogy to NASA technical paper 3621 by
            // Tripathi, et al. Cross-sections for ion ion scattering
            G4TripathiCrossSection* TripathiCrossSection = new G4TripathiCrossSection;

            // IONS SHEN CROSS SECTION
            // Implementation of formulas
            // Shen et al. Nuc. Phys. A 491 130 (1989)
            // Total Reaction Cross Section for Heavy-Ion Collisions
            G4IonsShenCrossSection* aShen = new G4IonsShenCrossSection;

            // Final state production model for Alpha inelastic scattering below 20 GeV
            G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic;
            theAIModel -> SetMaxEnergy(100.*MeV);

            G4AlphaInelasticProcess * theIPalpha = new G4AlphaInelasticProcess;
            theIPalpha->AddDataSet(TripathiCrossSection);
            theIPalpha->AddDataSet(aShen);

            // Register the Alpha Inelastic and Binary Cascade Model
            theIPalpha->RegisterMe(theAIModel);
            theIPalpha->RegisterMe(theBC);

            // Activate the alpha inelastic scattering using the alpha inelastic and binary cascade model
            ph->RegisterProcess(theIPalpha, particle);

            // Activate the Hadron Elastic Process
            ph->RegisterProcess(theElasticProcess, particle);

        } else if (particle->GetParticleName() == "neutron") {

            /*
            //G4HadronElasticProcess* thenElasticProcess = new G4HadronElasticProcess();
            //G4LElastic* thenElasticModel = new G4LElastic();
            //thenElasticProcess->RegisterMe(thenElasticModel);
            //ph->RegisterProcess(thenElasticProcess, particle);

// G4cout<< "Error 2" << G4endl;

            G4HadronElasticProcess* theNeutronElasticProcess = new G4HadronElasticProcess();
            // Cross Section Data set
            G4NeutronHPElasticData* theHPElasticData = new G4NeutronHPElasticData();
            theNeutronElasticProcess->AddDataSet(theHPElasticData);

            // Cross Section Data set (HP < 20MeV < JENDL HE)
            G4NeutronHPJENDLHEData* theJENDLHEElasticData = new G4NeutronHPJENDLHEData();
            theNeutronElasticProcess->AddDataSet(theJENDLHEElasticData);

            G4NeutronHPThermalScatteringData* theHPThermalScatteringData = new G4NeutronHPThermalScatteringData();
            theNeutronElasticProcess->AddDataSet(theHPThermalScatteringData);
            // Models
            G4NeutronHPElastic* theNeutronElasticModel = new G4NeutronHPElastic();
            theNeutronElasticModel->SetMinEnergy(4.0*eV);
            theNeutronElasticModel->SetMaxEnergy(1*GeV);
            theNeutronElasticProcess->RegisterMe(theNeutronElasticModel);

            G4NeutronHPThermalScattering* theNeutronThermalElasticModel = new G4NeutronHPThermalScattering();
            theNeutronThermalElasticModel->SetMinEnergy(0.0*eV);
            theNeutronThermalElasticModel->SetMaxEnergy(4.0*eV);
            theNeutronElasticProcess->RegisterMe(theNeutronThermalElasticModel);

            //G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
            //pmanager->AddDiscreteProcess(theNeutronElasticProcess);
            ph->RegisterProcess(theNeutronElasticProcess,particle);
             */
            /*
            G4HadronFissionProcess* thenFission = new G4HadronFissionProcess();
            G4LFission* thenFissionModel = new G4LFission();
            thenFission->RegisterMe(thenFissionModel);
            ph->RegisterProcess(thenFission, particle);

            G4HadronCaptureProcess* thenCapture = new G4HadronCaptureProcess();
            G4LCapture* thenCaptureModel = new G4LCapture();
            thenCapture->RegisterMe(thenCaptureModel);
            ph->RegisterProcess(thenCapture, particle);*/

        }
    }

}

#include "G4Decay.hh"
#include "G4RadioactiveDecay.hh"

void Example1PhysicsList::ConstructDecay() {

    G4cout << "ExamplePhysicsList :: Constructing Decay Physics..." << G4endl;

    G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
    G4Decay* decay = new G4Decay();
    G4RadioactiveDecay* rdecay = new G4RadioactiveDecay();

    /*theParticleIterator->reset();
    while ((*theParticleIterator)()){
        G4ParticleDefinition* particle = theParticleIterator->value();
        if (rdecay->IsApplicable(*particle)) {
            ph->RegisterProcess(rdecay, particle);
        }
        if (decay->IsApplicable(*particle) && !particle->IsShortLived())
        {
            ph->RegisterProcess(decay, particle);
        }
    }*/

    // Add Decay Process

    theParticleIterator->reset();
    while ((*theParticleIterator)()){
        G4ParticleDefinition* particle = theParticleIterator->value();

        if (decay->IsApplicable(*particle) && !particle->IsShortLived()) { ph->RegisterProcess(decay, particle); }

    }

    // Declare radioactive decay to the GenericIon in the IonTable.
    const G4IonTable* theIonTable = G4ParticleTable::GetParticleTable()->GetIonTable();

    for (G4int i=0; i<theIonTable->Entries(); i++)
    {
        G4ParticleDefinition* particle = theIonTable->GetParticle(i);
        G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
        //G4String particleType = theIonTable->GetParticle(i)->GetParticleType();

        if (particleName == "GenericIon") {
            if (rdecay->IsApplicable(*particle)) { ph->RegisterProcess(rdecay, particle); }
            G4ProcessManager* pmanager = theIonTable->GetParticle(i)->GetProcessManager();
            pmanager->AddProcess(rdecay);
            pmanager->SetProcessOrdering(rdecay, idxPostStep);
            pmanager->SetProcessOrdering(rdecay, idxAtRest);
        }
    }
}

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

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void Example1PhysicsList::SetNbOfPhotonsCerenkov(G4int MaxNumber)
{
  theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumber);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/*
void Example1PhysicsList::SetCuts()
{
  //  " G4VUserPhysicsList::SetCutsWithDefault" method sets
  //   the default cut value for all particle types
  //
  SetCutsWithDefault();

  if (verboseLevel>0) DumpCutValuesTable();
}
*/

 Add Message Add Message
to: "NO Scintillation Happening!?"

 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 ]