Message: Writing a physics list Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Writing a physics list 

Forum: Physics List
Date: May 10, 09:01
From: Francesca <Francesca>

Dear all,

     I have been using GEANT4 borrowing physics lists from web and examples, but would like to learn how to proper create a physics list. 
As far as i understood there are at least 2 methods:
- old fashion (build everything yourself)
- modular physics list

I find a lot of material about physics lists, but is there any step by step tutorial about how to properly create it, please?

For example, in the following physics list i borrowed from a colleague, there is no

  G4LeptonConstructor pLeptonConstructor;
  pLeptonConstructor.ConstructParticle();

I was told that the ConstructParticle of the decPhysicsList already creates leptons. Where can I find a good step by step tutorial to understand what I am creating/activating, to learn how to properly create a physics list with all the particles and processes I need and to discard everything that is not necessary to my case, please? Thx, regards, franciuska

#include "G4PhysicsListHelper.hh"

#include "PhysicsList.hh" 
#include "G4hMultipleScattering.hh"
#include "G4ParticleDefinition.hh"
#include "G4PhysListFactory.hh"
#include "G4VPhysicsConstructor.hh"

// Physic lists (contained inside the Geant4 distribution)

#include "G4EmStandardPhysics_option3.hh" /// use for "standard EM". Designed for any applications required higher accuracy of electrons, hadrons and ion tracking without magnetic field. 
#include "G4EmLivermorePhysics.hh" /// Precise LE physics
#include "G4EmPenelopePhysics.hh"/// Penelope 2008
#include "G4EmProcessOptions.hh"

#include "G4DecayPhysics.hh"
#include "G4Decay.hh"

#include "G4HadronElasticPhysics.hh"
#include "G4HadronDElasticPhysics.hh"
#include "G4HadronHElasticPhysics.hh"
#include "G4HadronInelasticQBBC.hh"
#include "G4HadronPhysicsQGSP_BIC_HP.hh"
#include "G4HadronPhysicsQGSP_BIC.hh"
//#include "G4QStoppingPhysics.hh" #include "G4IonBinaryCascadePhysics.hh"

#include "G4ionIonisation.hh"
#include "G4LossTableManager.hh"
#include "G4UnitsTable.hh"
#include "G4ProcessManager.hh"
#include "G4IonConstructor.hh"
#include "G4GenericIon.hh"
#include "G4DynamicParticle.hh"

#include "G4StoppingPhysics.hh"
#include "G4IonBinaryCascadePhysics.hh"
#include "G4IonFluctuations.hh"
#include "G4IonParametrisedLossModel.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"

#include "G4RadioactiveDecayPhysics.hh"
#include "G4BraggIonGasModel.hh"
#include "G4BetheBlochIonGasModel.hh"
// For units of measurements
#include "G4LossTableManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"

PhysicsList::PhysicsList(): G4VModularPhysicsList()

{
  defaultCutValue = 1e-3* mm;
  SetVerboseLevel(0);

  //---------------------  
  // EM physics
  //---------------------
  emPhysicsList = new G4EmLivermorePhysics(0);
  //---------------------
  // Decay physics 
  //---------------------
  decPhysicsList = new G4DecayPhysics();
  //---------------------
  //Hadronic Physics
  //---------------------
   hadronPhys.push_back(new G4HadronInelasticQBBC());
}

PhysicsList::~PhysicsList()
{
  delete emPhysicsList;
  delete decPhysicsList;
  //if (hadPhysicsList) delete hadPhysicsList;
  for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
}

/////////////////////////////////////////////////////////////////////////////
void PhysicsList::ConstructParticle()
{
  decPhysicsList->ConstructParticle();

}

void PhysicsList::ConstructProcess()
{
  // transportation
  //
  AddTransportation();

  // electromagnetic physics list
  //
  emPhysicsList->ConstructProcess();
  em_config.AddModels();

  // decay physics list
  //
  decPhysicsList->ConstructProcess();

  // hadronic physics lists

  //   ConstructHad();

     for(size_t i=0; i<hadronPhys.size(); i++) {
        hadronPhys[i]->ConstructProcess();
      }
}

void PhysicsList::SetCuts()
{
  G4VUserPhysicsList::SetCutsWithDefault();
  if (verboseLevel>0) DumpCutValuesTable();
}

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

1 Idea: Re: Writing a physics list   (Vladimir Ivanchenko - May 11, 10:32) newest
 Add Message Add Message
to: "Writing a physics list"

 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 ]