Belle II Software development
PhysicsList Class Reference

The basf2 physics list. More...

#include <PhysicsList.h>

Inheritance diagram for PhysicsList:

Public Member Functions

 PhysicsList (const std::string &physicsListName)
 The PhysicsList constructor.
 
virtual ~PhysicsList ()
 The PhysicsList destructor.
 
void SetCuts ()
 Sets the Cuts on the physics list.
 
void setProductionCutValue (double productionCut)
 Sets the production cut value.
 
void registerOpticalPhysicsList ()
 Registers the optical physics list.
 

Detailed Description

The basf2 physics list.

Uses the Geant4 standard lists, specified by a string and adds optical processes if requested.

Definition at line 30 of file PhysicsList.h.

Constructor & Destructor Documentation

◆ PhysicsList()

PhysicsList ( const std::string &  physicsListName)
explicit

The PhysicsList constructor.

Loads the physics list specified by its name.

Parameters
physicsListNameThe name of the physics list which should be loaded.

Definition at line 28 of file PhysicsList.cc.

28 : G4VModularPhysicsList()
29{
30 defaultCutValue = 0.7 * CLHEP::mm; //Default production cut value. Unit given in Geant4 units.
31
32 //First register the physics form Geant4 predefined PhysicsList.
33 G4PhysListFactory physListFactory;
34 G4VModularPhysicsList* physList = NULL;
35
36 if (physListFactory.IsReferencePhysList(physicsListName)) physList = physListFactory.GetReferencePhysList(physicsListName);
37 if (physList == NULL) B2FATAL("Could not load the physics list " << physicsListName);
38
39 int iPhysList = 1;
40 G4VPhysicsConstructor* regPhys = const_cast<G4VPhysicsConstructor*>(physList->GetPhysics(0));
41 while (regPhys != NULL) {
42 B2DEBUG(10, "RegisterPhysics: " << regPhys->GetPhysicsName());
43 RegisterPhysics(regPhys);
44 regPhys = const_cast<G4VPhysicsConstructor*>(physList->GetPhysics(iPhysList++));
45 }
46 // LEP: Append the geant4e-specific physics constructor to the list
47 RegisterPhysics(new ExtPhysicsConstructor);
48}

◆ ~PhysicsList()

~PhysicsList ( )
virtual

The PhysicsList destructor.

Definition at line 51 of file PhysicsList.cc.

52{
53
54}

Member Function Documentation

◆ registerOpticalPhysicsList()

void registerOpticalPhysicsList ( )

Registers the optical physics list.

Definition at line 86 of file PhysicsList.cc.

87{
88 RegisterPhysics(new G4OpticalPhysics());
89}

◆ SetCuts()

void SetCuts ( )

Sets the Cuts on the physics list.

Definition at line 57 of file PhysicsList.cc.

58{
59 B2INFO("B4PhysicsList::SetCuts, CutLength: " << G4BestUnit(defaultCutValue, "Length"));
60
61 // Set cuts to the defaultCutValue.
62 SetCutsWithDefault();
63 // // LEP: For geant4e-specific particles, set a big step so that AlongStep computes
64 // // all the energy (as is done in G4ErrorPhysicsList)
65 // G4ParticleTable* myParticleTable = G4ParticleTable::GetParticleTable();
66 // // theParticleIterator is a Geant4 macro since version 10.
67 // G4ParticleTable::G4PTblDicIterator* myParticleIterator = myParticleTable->GetIterator();
68 // myParticleIterator->reset();
69 // while ((*myParticleIterator)()) {
70 // G4ParticleDefinition* particle = myParticleIterator->value();
71 // if (particle->GetParticleName().substr(0, 4) == "g4e_") {
72 // SetParticleCuts(1.0E+9 * CLHEP::cm, particle);
73 // }
74 // }
75
76 if (LogSystem::Instance().getCurrentLogLevel() == LogConfig::c_Debug) DumpCutValuesTable();
77}
@ c_Debug
Debug: for code development.
Definition: LogConfig.h:26
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition: LogSystem.cc:31

◆ setProductionCutValue()

void setProductionCutValue ( double  productionCut)

Sets the production cut value.

If a primary particle has no longer enough energy to produce secondaries which travel at least the specified productionCut distance, two things happen: 1) Discrete energy loss ceases (no more secondaries will be produced) 2) The primary particle is tracked down to zero energy using continuous energy loss

Parameters
productionCutThe production cut value in [cm].

Definition at line 80 of file PhysicsList.cc.

81{
82 defaultCutValue = (productionCut / Unit::mm) * CLHEP::mm;
83}
static const double mm
[millimeters]
Definition: Unit.h:70

The documentation for this class was generated from the following files: