Message: Why don't I see neutron from deuteron on deuterium gas target Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Why don't I see neutron from deuteron on deuterium gas target 

Forum: Hadronic Processes
Date: 25 Feb, 2008
From: gin chen <gin chen>

This is related to the previous discussion on
deuteron on Deuterium gas. #454 on Physics List.
To create neutron from  20 MeV  deuteron on Deuterium gas, I
have placed the modified PhysicsList.cc file (attached)
and ran a simple program (modified the
 geant4.9.1/examples/extended/hadronic/Hadr01)

(DetectorConstruction.cc is attached). Using
StackingAction.cc print out the secondaries
for the reaction
 deuteron + Deuterium -> n + He3

and I get follwing output showing only He3, no neutron.(for 20 MeV deuteron)./vis/scene/notifyHandlers (for few beamOn events)

### Run 2 start
Start Run processing.
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Track #2 of He3[11316.3] E(MeV)= 13.33901 ID= 1
Run terminated.
Run Summary
  Number of events processed : 100000
  User=23.11s Real=30.88s Sys=0.75s
RunAction: End of run actions are started
/vis/viewer/update
WARNING: G4VisManager::EndOfRun: Event keeping was suspended.
  The number of events in the run exceeded the maximum to be kept, 100.
  The number of events to be kept can be changed with
  "/vis/scene/endOfEventAction accumulate <N>", where N is the
  maximum number you wish to allow.  N < 0 means "unlimited".
100 events have been kept for refreshing and/or reviewing.

========================================================

When I replced material of targetD2 to air, I can see low energy neutrons coming out into the output.

### Run 2 start
/vis/scene/notifyHandlers
Start Run processing.
Track #2 of alpha E(MeV)= 6.840125 ID= 1
Track #3 of proton E(MeV)= 2.2081953 ID= 1
Track #4 of C13[0.0] E(MeV)= 4.509528 ID= 1
Track #5 of gamma E(MeV)= 1.9802774 ID= 1
Track #2 of proton E(MeV)= 11.569889 ID= 1
Track #3 of neutron E(MeV)= 0.54794485 ID= 1
Track #4 of gamma E(MeV)= 2.0934609 ID= 1
Track #5 of gamma E(MeV)= 2.312695 ID= 1
Track #6 of N14[0.0] E(MeV)= 1.2757792 ID= 1
Track #7 of gamma E(MeV)= 0.000205 ID= 1
Track #8 of e- E(MeV)= 0.0001634 ID= 7
 neutron
Run terminated.
Run Summary
  Number of events processed : 10000
  User=2.39s Real=3.2s Sys=0.06s
RunAction: End of run actions are started
/vis/viewer/update
WARNING: G4VisManager::EndOfRun: Event keeping was suspended.
  The number of events in the run exceeded the maximum to be kept, 1000.
  The number of events to be kept can be changed with
  "/vis/scene/endOfEventAction accumulate <N>", where N is the
  maximum number you wish to allow.  N < 0 means "unlimited".
1000 events have been kept for refreshing and/or
================================================================
Also,
If I changed the target material as tantalum, I get printout as:

Track #2 of proton E(MeV)= 18.020909 ID= 1
Track #3 of gamma E(MeV)= 1.8875873 ID= 1
Track #4 of gamma E(MeV)= 1.6023882 ID= 1
Track #5 of gamma E(MeV)= 0.96302274 ID= 1
Track #6 of gamma E(MeV)= 0.2208 ID= 1
Track #7 of gamma E(MeV)= 0.9428 ID= 1
Track #8 of gamma E(MeV)= 0.0589247 ID= 1
Track #9 of gamma E(MeV)= 0.1143153 ID= 1
Track #10 of Ta182[0.0] E(MeV)= 0.027499118 ID= 1
Track #11 of e- E(MeV)= 0.0468993 ID= 9
Track #12 of e- E(MeV)= 0.0020106157 ID= 8
Track #13 of e- E(MeV)= 0.045232084 ID= 8
Track #14 of e- E(MeV)= 0.153384 ID= 6
Track #2 of neutron E(MeV)= 2.2500426 ID= 1
Track #3 of neutron E(MeV)= 0.27396435 ID= 1
Track #4 of neutron E(MeV)= 1.7350955 ID= 1
Track #5 of gamma E(MeV)= 1.6578496 ID= 1
Track #6 of gamma E(MeV)= 0.6045 ID= 1
Track #7 of gamma E(MeV)= 0.5897 ID= 1
Track #8 of gamma E(MeV)= 0.5875 ID= 1
Track #9 of gamma E(MeV)= 0.57102 ID= 1
Track #10 of gamma E(MeV)= 0.52572 ID= 1
Track #11 of gamma E(MeV)= 0.450016 ID= 1
Track #12 of gamma E(MeV)= 0.3509 ID= 1
Track #13 of gamma E(MeV)= 0.233987 ID= 1
Track #14 of gamma E(MeV)= 0.103557 ID= 1
Track #15 of W180[0.0] E(MeV)= 0.17473482 ID= 1
Track #16 of e- E(MeV)= 0.036141 ID= 14
Track #17 of e- E(MeV)= 0.166571 ID= 13
Track #18 of e- E(MeV)= 0.16491728 ID= 12
Track #19 of e- E(MeV)= 0.11856672 ID= 12
Track #20 of e- E(MeV)= 0.38000078 ID= 9
Track #21 of e- E(MeV)= 0.079642993 ID= 9
Track #22 of e- E(MeV)= 0.043960225 ID= 9
Track #23 of e- E(MeV)= 0.37931561 ID= 7
Track #24 of e- E(MeV)= 0.14296839 ID= 7
Track #2 of neutron E(MeV)= 2.3282838 ID= 1
Track #3 of neutron E(MeV)= 0.58066997 ID= 1
Track #4 of neutron E(MeV)= 1.7183982 ID= 1
Track #5 of gamma E(MeV)= 1.821527 ID= 1
Track #6 of gamma E(MeV)= 0.5897 ID= 1
Track #7 of gamma E(MeV)= 0.5875 ID= 1
Track #8 of gamma E(MeV)= 0.57102 ID= 1
Track #9 of gamma E(MeV)= 0.52572 ID= 1
Track #10 of gamma E(MeV)= 0.450016 ID= 1
Track #11 of gamma E(MeV)= 0.3509 ID= 1
Track #12 of gamma E(MeV)= 0.233987 ID= 1
Track #13 of gamma E(MeV)= 0.103557 ID= 1
Track #14 of W180[0.0] E(MeV)= 0.24925396 ID= 1
Track #15 of e- E(MeV)= 0.036141 ID= 13
 neutron
Run terminated.
Run Summary
  Number of events processed : 10000
  User=23.55s Real=47.54s Sys=0.69s
RunAction: End of run actions are started
/vis/viewer/update
WARNING: G4VisManager::EndOfRun: Event keeping was suspended.
  The number of events in the run exceeded the maximum to be kept, 1000.
  The number of events to be kept can be changed with
  "/vis/scene/endOfEventAction accumulate <N>", where N is the
  maximum number you wish to allow.  N < 0 means "unlimited".
1000 events have been kept for refreshing and/or reviewing.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

My question is:
 Why don't I see neutron from 20 MeV deuteron on Deuterium gas.

Thank you,

Gin.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PhysicsList.cc XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX // // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: B01PhysicsList.cc,v 1.8 2007/06/05 18:20:09 ahoward Exp $ // GEANT4 tag $Name: geant4-09-01 $ //

#include "globals.hh"
#include <iomanip>

#include "PhysicsList.hh"

#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"

PhysicsList::PhysicsList():  G4VUserPhysicsList()
{
  SetVerboseLevel(1);
}

PhysicsList::~PhysicsList()
{
}
void PhysicsList::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.

  ConstructAllBosons();
  ConstructAllLeptons();
  ConstructAllMesons();
  ConstructAllBaryons();
  ConstructAllIons();
  ConstructAllShortLiveds();
}
 void PhysicsList::ConstructAllBosons()
{
  // Construct all bosons
  G4BosonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllLeptons()
{
  // Construct all leptons
  G4LeptonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllMesons()
{
  //  Construct all mesons
  G4MesonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllBaryons()
{
  //  Construct all barions
  G4BaryonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllIons()
{
  //  Construct light ions
  G4IonConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructAllShortLiveds()
{
  //  Construct  resonaces and quarks
  G4ShortLivedConstructor pConstructor;
  pConstructor.ConstructParticle();
}

void PhysicsList::ConstructProcess()
{
  AddTransportation();
//  AddScoringProcess();
  ConstructEM();
  ConstructLeptHad();
  ConstructHad();
  ConstructGeneral();
}

void PhysicsList::AddTransportation()
{
  G4VUserPhysicsList::AddTransportation();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"

#include "G4MultipleScattering.hh"

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

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

#include "G4hIonisation.hh"

#include "G4LowEnergyPhotoElectric.hh"
#include "G4LowEnergyCompton.hh"
#include "G4LowEnergyGammaConversion.hh"
#include "G4LowEnergyRayleigh.hh"

#include "G4LowEnergyIonisation.hh"
#include "G4LowEnergyBremsstrahlung.hh"

#include "G4hLowEnergyIonisation.hh"

  void PhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
    // gamma
      // Construct processes for gamma
/*
      pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
      pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
      pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
      pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
*/
      pmanager->AddDiscreteProcess(new G4GammaConversion());
      pmanager->AddDiscreteProcess(new G4ComptonScattering());
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());

    } else if (particleName == "e-") {
    //electron
      // Construct processes for electron
      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
      pmanager->AddProcess(new G4eIonisation(),-1,2,2);
      pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
    } else if (particleName == "e+") {
    //positron
      // Construct processes for positron
     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);

    } 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,-1,3);
     pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);

    }

// else if ( particleName == "GenericIon" ) {
//      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
//      pmanager->AddProcess(new G4hIonisation(),-1,2,2);
//   }
// {
//      if ((particle->GetPDGCharge() != 0.0) &&
//          (particle->GetParticleName() != "deuteron")&&
//          (!particle->IsShortLived()) ) {
//     // all others charged particles except geantino
//       pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
//      pmanager->AddProcess(new G4hIonisation(),-1,2,2);
//     }
//    }
  }
}

// Hadron Processes

#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"

#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh

// Low-energy Models

#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"

#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"

// -- generator models

#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"

#include "G4CascadeInterface.hh"

#include "G4BinaryCascade.hh"
#include "G4BinaryLightIonReaction.hh"

//HPNeutron

#include "G4NeutronHPElastic.hh"
#include "G4NeutronHPElasticData.hh"
#include "G4NeutronHPCapture.hh"
#include "G4NeutronHPCaptureData.hh"
#include "G4NeutronHPInelastic.hh"
#include "G4NeutronHPInelasticData.hh"

//c-s

#include "G4TripathiCrossSection.hh"
#include "G4IonsShenCrossSection.hh"
#include "G4TripathiLightCrossSection.hh"
#include "G4ProtonInelasticCrossSection.hh"
#include "G4NeutronInelasticCrossSection.hh"

// RadioactiveDecay

#include "G4RadioactiveDecay.hh"
#include "G4GenericIon.hh"

// // ConstructHad() // // Makes discrete physics processes for the hadrons, at present limited // to those particles with GHEISHA interactions (INTRC > 0). // The processes are: Elastic scattering, Inelastic scattering, // Fission (for neutron only), and Capture (neutron). // // F.W.Jones 06-JUL-1998 //

void PhysicsList::ConstructHad() {

//     G4ProcessManager * pManager = 0;
    // this will be the model class for high energies
    G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;

    // all models for treatment of thermal nucleus
    G4Evaporation * theEvaporation = new G4Evaporation;
    G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
    G4StatMF * theMF = new G4StatMF;

    // Evaporation logic
    G4ExcitationHandler * theHandler = new G4ExcitationHandler;
        theHandler->SetEvaporation(theEvaporation);
        theHandler->SetFermiModel(theFermiBreakUp);
        theHandler->SetMultiFragmentation(theMF);
        theHandler->SetMaxAandZForFermiBreakUp(2, 1);
        theHandler->SetMinEForMultiFrag(3*MeV);

    // Pre equilibrium stage
    G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);

    // a no-cascade generator-precompound interaface
    G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
            theCascade->SetDeExcitation(thePreEquilib);

    // here come the high energy parts
    // the string model; still not quite according to design - Explicite use of
the forseen interfaces
    // will be tested and documented in this program by beta-02 at latest.
    G4VPartonStringModel * theStringModel;
    theStringModel = new G4FTFModel;
    theTheoModel->SetTransport(theCascade);
    theTheoModel->SetHighEnergyGenerator(theStringModel);
    theTheoModel->SetMinEnergy(10*GeV);
    theTheoModel->SetMaxEnergy(100*TeV);

      G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
      G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
      theStringModel->SetFragmentationModel(theStringDecay);

theElasticProcess.RegisterMe(new G4LElastic()); // done with the generator model (most of the above is also available as default)

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

                                    new G4HadronElasticProcess;
*/
   theParticleIterator->reset();
   while ((*theParticleIterator)()) {
      G4ParticleDefinition* particle = theParticleIterator->value();
//      G4ProcessManager* pmanager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();

   if (particleName != "neutron") {
      G4ProcessManager* pmanager = particle->GetProcessManager();
      if (particle->GetPDGMass() > 110.*MeV && theElasticProcess.IsApplicable(*particle)
          && !particle->IsShortLived()) {
        pmanager->AddDiscreteProcess(&theElasticProcess);
        //
        //      G4cout << "### Elastic model are registered for "
        //       << particle->GetParticleName()
        //       << G4endl;
      }
    }
}
  // Proton
  G4ProcessManager* pmanager = G4Proton::Proton()->GetProcessManager();
    // add inelastic process
  // Binary Cascade
  G4BinaryCascade * theBC = new G4BinaryCascade;
  theBC->SetMaxEnergy(10.5*GeV);
  theProtonInelastic.RegisterMe(theBC);
  // Higher energy
  theProtonInelastic.RegisterMe(theTheoModel);
  // now the cross-sections.
  G4ProtonInelasticCrossSection * theProtonData = new G4ProtonInelasticCrossSection;
  theProtonInelastic.AddDataSet(theProtonData);
  pmanager->AddDiscreteProcess(&theProtonInelastic);
  //
  //
  // Neutron
   pmanager = G4Neutron::Neutron()->GetProcessManager();
  // add process
  // elastic scattering
  theNeutronElasticProcess =
    new G4HadronElasticProcess();
  G4LElastic* theElasticModel1 = new G4LElastic;
  G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic;
  theNeutronElasticProcess->RegisterMe(theElasticModel1);
  theElasticModel1->SetMinEnergy(19.*MeV);
  theNeutronElasticProcess->RegisterMe(theElasticNeutron);
  theElasticNeutron->SetMaxEnergy(20.*MeV);

  G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData;
  theNeutronElasticProcess->AddDataSet(theNeutronData);
  pmanager->AddDiscreteProcess(theNeutronElasticProcess);
  // inelastic
  G4NeutronHPInelastic * theHPNeutronInelasticModel =
    new G4NeutronHPInelastic;
  theHPNeutronInelasticModel->SetMaxEnergy(20.*MeV);
  theNeutronInelastic.RegisterMe(theHPNeutronInelasticModel);
  G4NeutronHPInelasticData * theNeutronData1 = new G4NeutronHPInelasticData;
  theNeutronInelastic.AddDataSet(theNeutronData1);

  // binary
  G4BinaryCascade * neutronBC = new G4BinaryCascade;
  neutronBC->SetMinEnergy(19.*MeV);
  neutronBC->SetMaxEnergy(10.5*GeV);
  theNeutronInelastic.RegisterMe(neutronBC);
  // higher energy
  theNeutronInelastic.RegisterMe(theTheoModel);
  // now the cross-sections.
  G4NeutronInelasticCrossSection * theNeutronData2 = new G4NeutronInelasticCrossSection;
  theNeutronInelastic.AddDataSet(theNeutronData2);
  pmanager->AddDiscreteProcess(&theNeutronInelastic);
  // fission
  theFissionProcess =
    new G4HadronFissionProcess;
  G4LFission* theFissionModel = new G4LFission;
  theFissionProcess->RegisterMe(theFissionModel);
  pmanager->AddDiscreteProcess(theFissionProcess);
  //capture
  theCaptureProcess =
    new G4HadronCaptureProcess;
  G4LCapture* theCaptureModel = new G4LCapture;
  theCaptureProcess->RegisterMe(theCaptureModel);
  theCaptureModel->SetMinEnergy(19.*MeV);
  G4NeutronHPCapture * theHPNeutronCaptureModel = new G4NeutronHPCapture;
  theCaptureProcess->RegisterMe(theHPNeutronCaptureModel);
  G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData;
  theCaptureProcess->AddDataSet(theNeutronData3);
  pmanager->AddDiscreteProcess(theCaptureProcess);

  // now light ions
  // light Ion BC
  G4BinaryLightIonReaction * theIonBC= new G4BinaryLightIonReaction;
  theIonBC->SetMinEnergy(1*MeV);
  theIonBC->SetMaxEnergy(30*GeV);
//  G4TripathiCrossSection * TripathiCrossSection= new G4TripathiCrossSection;
  G4TripathiLightCrossSection * TripathiLightCrossSection
                       = new G4TripathiLightCrossSection;
  G4IonsShenCrossSection * aShen = new G4IonsShenCrossSection;

  // deuteron
  pmanager = G4Deuteron::Deuteron()->GetProcessManager();
  theDeuteronInelasticProcess =
    new G4DeuteronInelasticProcess("inelastic");
  //  G4LEDeuteronInelastic* theDeuteronInelasticModel =
  //   new G4LEDeuteronInelastic;
  // theDeuteronInelasticModel->SetMaxEnergy(100*MeV);
  theDeuteronInelasticProcess->AddDataSet(TripathiLightCrossSection);
//  theDeuteronInelasticProcess->AddDataSet(aShen);
  //  theDeuteronInelasticProcess->RegisterMe(theDeuteronInelasticModel);
  theDeuteronInelasticProcess->RegisterMe(theIonBC);
  theDeuteronInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theDeuteronInelasticProcess);
  // triton
  pmanager = G4Triton::Triton()->GetProcessManager();
  theTritonInelasticProcess =
    new G4TritonInelasticProcess("inelastic");
  //  G4LETritonInelastic* theTritonInelasticModel =
  //  new G4LETritonInelastic;
  //theTritonInelasticModel->SetMaxEnergy(100*MeV);
  theTritonInelasticProcess->AddDataSet(TripathiLightCrossSection);
  theTritonInelasticProcess->AddDataSet(aShen);
  //  theTritonInelasticProcess->RegisterMe(theTritonInelasticModel);
  theTritonInelasticProcess->RegisterMe(theIonBC);
  theTritonInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theTritonInelasticProcess);
  // alpha
  pmanager = G4Alpha::Alpha()->GetProcessManager();
  theAlphaInelasticProcess =
    new G4AlphaInelasticProcess("inelastic");
  // G4LEAlphaInelastic* theAlphaInelasticModel =
  //  new G4LEAlphaInelastic;
  //theAlphaInelasticModel->SetMaxEnergy(100*MeV);
//  theAlphaInelasticProcess->AddDataSet(TripathiCrossSection);
  theAlphaInelasticProcess->AddDataSet(TripathiLightCrossSection);
  theAlphaInelasticProcess->AddDataSet(aShen);
  //  theAlphaInelasticProcess->RegisterMe(theAlphaInelasticModel);
  theAlphaInelasticProcess->RegisterMe(theIonBC);
  theAlphaInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theAlphaInelasticProcess);
  // GenericIon
  pmanager = G4GenericIon::GenericIon()->GetProcessManager();
  // need to add the elastic explicitly
  pmanager->AddDiscreteProcess(&theElasticProcess);
  theIonInelasticProcess =
    new G4IonInelasticProcess();
  theIonInelasticProcess->AddDataSet(TripathiLightCrossSection);
  theIonInelasticProcess->AddDataSet(aShen);
  //  G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
  // theGenIonBC->SetMinEnergy(0*MeV);
  //theGenIonBC->SetMaxEnergy(20*GeV);
  theIonInelasticProcess->RegisterMe(theIonBC);
  theIonInelasticProcess->RegisterMe(theTheoModel);
  pmanager->AddDiscreteProcess(theIonInelasticProcess);

// Add RadioactiveDecay Process // G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay(); // G4GenericIon* ion = G4GenericIon::GenericIon(); // pmanager->AddProcess(theRadioactiveDecay, 0, -1, 3); }

/*      if (particleName == "pi+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4PionPlusInelasticProcess* theInelasticProcess =
                                new G4PionPlusInelasticProcess("inelastic");
         G4LEPionPlusInelastic* theInelasticModel =
                                new G4LEPionPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "pi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4PionMinusInelasticProcess* theInelasticProcess =
                                new G4PionMinusInelasticProcess("inelastic");
         G4LEPionMinusInelastic* theInelasticModel =
                                new G4LEPionMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonPlusInelasticProcess* theInelasticProcess =
                                  new G4KaonPlusInelasticProcess("inelastic");
         G4LEKaonPlusInelastic* theInelasticModel = new G4LEKaonPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon0S") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonZeroSInelasticProcess* theInelasticProcess =
                             new G4KaonZeroSInelasticProcess("inelastic");
         G4LEKaonZeroSInelastic* theInelasticModel =
                             new G4LEKaonZeroSInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon0L") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonZeroLInelasticProcess* theInelasticProcess =
                             new G4KaonZeroLInelasticProcess("inelastic");
         G4LEKaonZeroLInelastic* theInelasticModel =
                             new G4LEKaonZeroLInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "kaon-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4KaonMinusInelasticProcess* theInelasticProcess =
                                 new G4KaonMinusInelasticProcess("inelastic");
         G4LEKaonMinusInelastic* theInelasticModel =
                                 new G4LEKaonMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "proton") {
        pmanager->AddDiscreteProcess(theElasticProcess);
         G4ProtonInelasticProcess* theInelasticProcess =
                                    new G4ProtonInelasticProcess("inelastic");
         G4LEProtonInelastic* theInelasticModel = new G4LEProtonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_proton") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiProtonInelasticProcess* theInelasticProcess =
                                new G4AntiProtonInelasticProcess("inelastic");
         G4LEAntiProtonInelastic* theInelasticModel =
                                new G4LEAntiProtonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "neutron") {
          // elastic scattering
         G4LElastic* theElasticModel1 = new G4LElastic;
         theElasticProcess1->RegisterMe(theElasticModel1);
         pmanager->AddDiscreteProcess(theElasticProcess1);
          // inelastic scattering
         G4NeutronInelasticProcess* theInelasticProcess =
                                    new G4NeutronInelasticProcess("inelastic");
         G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
          // fission
         G4HadronFissionProcess* theFissionProcess =
                                    new G4HadronFissionProcess;
         G4LFission* theFissionModel = new G4LFission;
         theFissionProcess->RegisterMe(theFissionModel);
         pmanager->AddDiscreteProcess(theFissionProcess);
         // capture
         G4HadronCaptureProcess* theCaptureProcess =
                                    new G4HadronCaptureProcess;
         G4LCapture* theCaptureModel = new G4LCapture;
         theCaptureProcess->RegisterMe(theCaptureModel);
         pmanager->AddDiscreteProcess(theCaptureProcess);
      }
      else if (particleName == "anti_neutron") {
        pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiNeutronInelasticProcess* theInelasticProcess =
                               new G4AntiNeutronInelasticProcess("inelastic");
         G4LEAntiNeutronInelastic* theInelasticModel =
                               new G4LEAntiNeutronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "lambda") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4LambdaInelasticProcess* theInelasticProcess =
                                    new G4LambdaInelasticProcess("inelastic");
         G4LELambdaInelastic* theInelasticModel = new G4LELambdaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_lambda") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiLambdaInelasticProcess* theInelasticProcess =
                                new G4AntiLambdaInelasticProcess("inelastic");
         G4LEAntiLambdaInelastic* theInelasticModel =
                                new G4LEAntiLambdaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "sigma+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4SigmaPlusInelasticProcess* theInelasticProcess =
                                 new G4SigmaPlusInelasticProcess("inelastic");
         G4LESigmaPlusInelastic* theInelasticModel =
                                 new G4LESigmaPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "sigma-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4SigmaMinusInelasticProcess* theInelasticProcess =
                                 new G4SigmaMinusInelasticProcess("inelastic");
         G4LESigmaMinusInelastic* theInelasticModel =
                                 new G4LESigmaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_sigma+") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
                             new G4AntiSigmaPlusInelasticProcess("inelastic");
         G4LEAntiSigmaPlusInelastic* theInelasticModel =
                                 new G4LEAntiSigmaPlusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_sigma-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
                            new G4AntiSigmaMinusInelasticProcess("inelastic");
         G4LEAntiSigmaMinusInelastic* theInelasticModel =
                                 new G4LEAntiSigmaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "xi0") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4XiZeroInelasticProcess* theInelasticProcess =
                            new G4XiZeroInelasticProcess("inelastic");
         G4LEXiZeroInelastic* theInelasticModel =
                                 new G4LEXiZeroInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "xi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4XiMinusInelasticProcess* theInelasticProcess =
                            new G4XiMinusInelasticProcess("inelastic");
         G4LEXiMinusInelastic* theInelasticModel =
                                 new G4LEXiMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_xi0") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiXiZeroInelasticProcess* theInelasticProcess =
                            new G4AntiXiZeroInelasticProcess("inelastic");
         G4LEAntiXiZeroInelastic* theInelasticModel =
                                 new G4LEAntiXiZeroInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_xi-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiXiMinusInelasticProcess* theInelasticProcess =
                            new G4AntiXiMinusInelasticProcess("inelastic");
         G4LEAntiXiMinusInelastic* theInelasticModel =
                                 new G4LEAntiXiMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "deuteron") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4DeuteronInelasticProcess* theInelasticProcess =
                            new G4DeuteronInelasticProcess("inelastic");
         G4LEDeuteronInelastic* theInelasticModel =
                                 new G4LEDeuteronInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "triton") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4TritonInelasticProcess* theInelasticProcess =
                            new G4TritonInelasticProcess("inelastic");
         G4LETritonInelastic* theInelasticModel =
                                 new G4LETritonInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "alpha") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AlphaInelasticProcess* theInelasticProcess =
                            new G4AlphaInelasticProcess("inelastic");
         G4LEAlphaInelastic* theInelasticModel =
                                 new G4LEAlphaInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "omega-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4OmegaMinusInelasticProcess* theInelasticProcess =
                            new G4OmegaMinusInelasticProcess("inelastic");
         G4LEOmegaMinusInelastic* theInelasticModel =
                                 new G4LEOmegaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
      else if (particleName == "anti_omega-") {
         pmanager->AddDiscreteProcess(theElasticProcess);
         G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
                            new G4AntiOmegaMinusInelasticProcess("inelastic");
         G4LEAntiOmegaMinusInelastic* theInelasticModel =
                                 new G4LEAntiOmegaMinusInelastic;
         theInelasticProcess->RegisterMe(theInelasticModel);
         theInelasticProcess->RegisterMe(theTheoModel);
         pmanager->AddDiscreteProcess(theInelasticProcess);
      }
   }
}
*/

void PhysicsList::ConstructLeptHad() {;}

#include "G4Decay.hh"
void PhysicsList::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 PhysicsList::SetCuts()
{
  if (verboseLevel >0)
  {
    G4cout << "PhysicsList::SetCuts:";
    G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
  }
  //   "G4VUserPhysicsList::SetCutsWithDefault" method sets
  //   the default cut value for all particle types
  SetCutsWithDefault();
}

/*#include "G4ParallelWorldScoringProcess.hh" void PhysicsList::AddScoringProcess(){

  G4int npw = paraWorldName.size();
  for ( G4int i = 0; i < npw; i++){
    G4ParallelWorldScoringProcess* theParallelWorldScoringProcess
      = new G4ParallelWorldScoringProcess("ParaWorldScoringProc");
    theParallelWorldScoringProcess->SetParallelWorld(paraWorldName[i]);

    theParticleIterator->reset();
    while( (*theParticleIterator)() ){
      G4ParticleDefinition* particle = theParticleIterator->value();
      if ( !particle->IsShortLived() ){
        G4ProcessManager* pmanager = particle->GetProcessManager();
        pmanager->AddProcess(theParallelWorldScoringProcess);
        pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxAtRest);
        pmanager->SetProcessOrdering(theParallelWorldScoringProcess,idxAlongStep,1);
        pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess,idxPostStep);
      }
    }
  }

} */

XXXXXXXXXXXXXXXXXXXXX DETECTORcoNSTRUCTION.CC XXXXXXXXXXX

// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // $Id: DetectorConstruction.cc,v 1.6 2006/10/04 09:56:03 vnivanch Exp $ // GEANT4 tag $Name: geant4-09-01 $ // ///////////////////////////////////////////////////////////////////////// // // DetectorConstruction // // Created: 31.01.2003 V.Ivanchenko // // Modified: // 04.06.2006 Adoptation of hadr01 (V.Ivanchenko) // //////////////////////////////////////////////////////////////////////// //

#include "DetectorConstruction.hh"

#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"

#include "G4RunManager.hh"

#include "G4GeometryManager.hh"
#include "G4PhysicalVolumeStore.hh"
#include "G4LogicalVolumeStore.hh"
#include "G4SolidStore.hh"

#include "G4VisAttributes.hh"
#include "G4Colour.hh"

#include "G4UnitsTable.hh"
#include "G4ios.hh"

#include "CheckVolumeSD.hh"
#include "TargetD2SD.hh"
#include "G4SDManager.hh"
#include "G4NistManager.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
DetectorConstruction::DetectorConstruction()
{
  logicTargetD2 = 0;
  logicCheck  = 0;
  logicWorld  = 0;

  targetMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Ta");
  worldMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic"); 
  // Prepare sensitive detectors
  checkSD = new CheckVolumeSD("checkSD");
  (G4SDManager::GetSDMpointer())->AddNewDetector( checkSD );

  targetD2SD = new TargetD2SD("targetD2SD");
  (G4SDManager::GetSDMpointer())->AddNewDetector( targetD2SD );

}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... DetectorConstruction::~DetectorConstruction() { }

  G4VPhysicalVolume* DetectorConstruction::Construct()
{
//
  ConstructMaterials();

// World

//  G4Box* solidW = new G4Box("World",1.2*m,1.2*m,1.2*m);
  G4Box* solidW = new G4Box("World",10.*cm,10.*cm,10.*cm);
  logicWorld = new G4LogicalVolume( solidW,worldMaterial,"World_L");
  G4VPhysicalVolume* world = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,0.*cm),
                                       logicWorld,"World_P",0,false,0);
// Check volume

  G4Box* solidC = new G4Box("Check",7.0*cm,7.0*cm,7.0*cm);
  logicCheck = new G4LogicalVolume( solidC,Vacuum,"Check_L");
   new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,0.*cm),logicCheck,"Check_P",logicWorld,false,0);
  logicCheck->SetSensitiveDetector(checkSD);

// Deuterium Gas volume
   G4Tubs* solidD2 = new G4Tubs("TargetD2",0.*cm,0.1603*cm,
                                              1.5*cm,0.,360.*deg);
  logicTargetD2 = new G4LogicalVolume(solidD2, //its Solid
//                                  DeuteriumGas, //its material
//                                   air,
                                   tantalum,
                                  "TargetD2",// its name
                                  0,0,0);
    new G4PVPlacement(0,G4ThreeVector(0.0*cm,0.0*cm,0.0*cm),
                logicTargetD2,"TargetD2",logicCheck,false,0);

  //

  logicTargetD2->SetSensitiveDetector(targetD2SD);

  // colors
  logicWorld->SetVisAttributes(G4VisAttributes::Invisible);

  G4VisAttributes* regWcolor = new G4VisAttributes(G4Colour(0.3, 0.3, 0.3));
  regWcolor->SetForceWireframe(true);
  logicCheck->SetVisAttributes(regWcolor);

  G4VisAttributes* regD2color = new G4VisAttributes(G4Colour(1.0, 0.0, 0.0));
  regD2color->SetForceWireframe(true);
  logicTargetD2->SetVisAttributes(regD2color);

return world; }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
void DetectorConstruction::SetTargetMaterial(const G4String& mat)
{
  // search the material by its name
  G4Material* material = G4NistManager::Instance()->FindOrBuildMaterial(mat);

  if (material && material != targetMaterial) {
    targetMaterial = material;
    G4RunManager::GetRunManager()->PhysicsHasBeenModified();
  }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
void DetectorConstruction::SetWorldMaterial(const G4String& mat)
{
  // search the material by its name
  G4Material* material = G4NistManager::Instance()->FindOrBuildMaterial(mat);

  if (material && material != worldMaterial) {
    worldMaterial = material;
    if(logicWorld) logicWorld->SetMaterial(worldMaterial);
    G4RunManager::GetRunManager()->PhysicsHasBeenModified();
  }
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......                                                                                
void DetectorConstruction::UpdateGeometry()
{
  G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
void DetectorConstruction::ConstructMaterials()
{
  G4double a;
  G4double z;
  G4double density,pressure;
  G4double weightRatio,temperature;
  G4String name;
  G4String symbol;
  G4int nElem;

  // Deuterium Gas ( with pressure 7.0 atm and room temp 293.15K)

  DeuteriumGas = new G4Material("DeuteriumGas", z=1, a=2.014*g/mole,
            density= 1.24e-3*g/cm3,kStateGas, 293.15*kelvin, 7.0*atmosphere);

   // elements for mixtures and compounds
  a = 1.01*g/mole;
  G4Element* elH = new G4Element(name="Hydrogen", symbol="H", z=1., a);
  a = 12.01*g/mole;
  G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
  a = 14.01*g/mole;
  G4Element* elN = new G4Element(name="Nitrogen", symbol="N", z=7., a);
  a = 16.00*g/mole;
  G4Element* elO = new G4Element(name="Oxigen", symbol="O", z=8., a);
  a = 183.84*g/mole;
  G4Element* elW = new G4Element(name="Tungsten", symbol="W", z=74., a);
  a = 55.845*g/mole;
  G4Element* elFe = new G4Element(name="Iron", symbol="Fe", z=26., a);
  a = 58.9332*g/mole;
  G4Element* elCo = new G4Element(name="Cobalt", symbol="Co", z=27., a);
  a = 58.6934*g/mole;
  G4Element* elNi = new G4Element(name="Nickel", symbol="Ni", z=28., a);
  a = 54.9381*g/mole;
  G4Element* elMn = new G4Element(name="Manganese", symbol="Mn", z=25., a);
  a = 59.9961*g/mole;
  G4Element* elCr = new G4Element(name="Chromium", symbol="Cr", z=24., a);
  a = 95.94*g/mole;
  G4Element* elMo = new G4Element(name="Molybdenum", symbol="Mo", z=42., a);

// Vaccum
  density     = universe_mean_density;
  pressure    = 3.e-18*pascal;
  temperature = 2.73*kelvin;
  Vacuum = new G4Material(name="Galactic", z=1., a=1.01*g/mole,
                                  density,kStateGas,temperature,pressure);
  // Air
  density = 1.29*mg/cm3;
  air = new G4Material(name="Air", density, nElem=2);
  air->AddElement(elN, weightRatio=.7);
  air->AddElement(elO, weightRatio=.3);

  // Scintillator
  density = 1.032*g/cm3;
  scintillator = new G4Material(name="Scintillator", density, nElem=2);
  scintillator->AddElement(elC, 9);
  scintillator->AddElement(elH, 10);

 // Mouse material
   density = 1.00*g/cm3;
   MouseMat = new G4Material(name="MouseMat", density, nElem=2);
   MouseMat->AddElement(elH, 2);
   MouseMat->AddElement(elO, 1);

 // HavarFoil
  density = 8.30*g/cm3;
  HavarFoil = new G4Material(name="HavarFoil",density, nElem=8);
  HavarFoil->AddElement(elC, weightRatio=.002);
  HavarFoil->AddElement(elCo, weightRatio=.420);
  HavarFoil->AddElement(elNi, weightRatio=.127);
  HavarFoil->AddElement(elMn, weightRatio=.016);
  HavarFoil->AddElement(elCr, weightRatio=.195);
  HavarFoil->AddElement(elFe, weightRatio=.191);
  HavarFoil->AddElement(elW, weightRatio=.027);
  HavarFoil->AddElement(elMo, weightRatio=.022);
 // Tantalum
  a = 180.9479*g/mole;
  density = 16.4*g/cm3;
  tantalum = new G4Material(name="Tantalum", z=73., a, density);

// Stainless Steel
  a = 55.845*g/mole;
  density = 7.875*g/cm3;
  StainlessSteel = new G4Material(name="Iron", z=26., a, density);

  G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
}
void DetectorConstruction::DestroyMaterials()
{
  // Destroy all allocated elements and materials
  size_t i;
  G4MaterialTable* matTable = (G4MaterialTable*)G4Material::GetMaterialTable();
  for(i=0;i<matTable->size();i++)
  { delete (*(matTable))[i]; }
  matTable->clear();
  G4ElementTable* elemTable = (G4ElementTable*)G4Element::GetElementTable();
  for(i=0;i<elemTable->size();i++)
  { delete (*(elemTable))[i]; }
  elemTable->clear();
}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // $Id: StackingAction.cc,v 1.5 2006/10/04 09:56:03 vnivanch Exp $ // GEANT4 tag $Name: geant4-09-01 $ // ///////////////////////////////////////////////////////////////////////// // // StackingAction // // Created: 31.04.2006 V.Ivanchenko // // Modified: // 04.06.2006 Adoptation of hadr01 (V.Ivanchenko) // //////////////////////////////////////////////////////////////////////// //

#include "StackingAction.hh"

#include "StackingMessenger.hh"

#include "G4Track.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
StackingAction::StackingAction()
{
  stackMessenger = new StackingMessenger(this);
  killSecondary  = false;
  pname          = "";
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
StackingAction::~StackingAction()
{
  delete stackMessenger;
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
G4ClassificationOfNewTrack
StackingAction::ClassifyNewTrack(const G4Track* aTrack)
{
  G4ClassificationOfNewTrack status = fUrgent;

  const G4String name = aTrack->GetDefinition()->GetParticleName();
      if(aTrack->GetTrackID() >1){
  G4cout << "Track #" << aTrack->GetTrackID() << " of " << name
          << " E(MeV)= " << aTrack->GetKineticEnergy()/MeV
           << " ID= " << aTrack->GetParentID()
            << G4endl;
          }
  if(aTrack->GetTrackID() == 1) return status;

  //stack or delete secondaries
  if (killSecondary)      status = fKill;
  else if(pname == name)  status = fKill;

return status; }

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

 Add Message Add Message
to: "Why don't I see neutron from deuteron on deuterium gas target"

 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 ]