Belle II Software  release-05-01-25
ExtPhysicsList.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Leo Piilonen *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <globals.hh>
12 
13 #include <simulation/kernel/ExtPhysicsList.h>
14 #include <simulation/kernel/ExtPhysicsConstructor.h>
15 
16 #include <CLHEP/Units/SystemOfUnits.h>
17 
18 #include <G4ParticleDefinition.hh>
19 #include <G4ParticleTable.hh>
20 #include <G4Gamma.hh>
21 #include <G4Electron.hh>
22 #include <G4Positron.hh>
23 #include <G4MuonMinus.hh>
24 #include <G4MuonPlus.hh>
25 #include <G4PionPlus.hh>
26 #include <G4PionMinus.hh>
27 #include <G4KaonPlus.hh>
28 #include <G4KaonMinus.hh>
29 #include <G4Proton.hh>
30 #include <G4AntiProton.hh>
31 #include <G4Deuteron.hh>
32 #include <G4AntiDeuteron.hh>
33 #include <G4GenericIon.hh>
34 
35 using namespace std;
36 using namespace Belle2;
37 using namespace Belle2::Simulation;
38 
39 ExtPhysicsList::ExtPhysicsList() : G4VModularPhysicsList()
40 {
41  defaultCutValue = 0.7 * CLHEP::mm; //Default production cut value. Unit given in Geant4 units.
42  //defaultCutValue = 1.0E+9 * CLHEP::cm; // set big step so that AlongStep computes all the energy
43 
44  // Instead of calling G4EmStandardPhysics to create process tables for standard particles that
45  // will never be used, we just define the standard particles that are in Const::ChargedStable but
46  // don't assign any processes to them. Note that G4PhysicsListHelper::CheckParticleList requires
47  // G4Gamma and G4GenericIon. G4EmStandardPhysics() defines Gamma, Electron, Positron, MuonPlus,
48  // MuonMinus, PionPlus, PionMinus, KaonPlus, KaonMinus, Proton, AntiProton, Deuteron, Triton, He3,
49  // Alpha, and GenericIon -- but not AntiDeuteron.
50  //- G4AntiDeuteron::AntiDeuteron();
51  //- RegisterPhysics(new G4EmStandardPhysics);
52  G4Gamma::Gamma();
53  G4Electron::Electron();
54  G4Positron::Positron();
55  G4MuonMinus::MuonMinus();
56  G4MuonPlus::MuonPlus();
57  G4PionPlus::PionPlus();
58  G4PionMinus::PionMinus();
59  G4KaonPlus::KaonPlus();
60  G4KaonMinus::KaonMinus();
61  G4Proton::Proton();
62  G4AntiProton::AntiProton();
63  G4Deuteron::Deuteron();
64  G4AntiDeuteron::AntiDeuteron();
65  G4GenericIon::GenericIon();
66  RegisterPhysics(new Simulation::ExtPhysicsConstructor);
67  if (false) SetCuts();
68 }
69 
71 {
72 }
73 
75 {
76  // Set cuts to the defaultCutValue.
77  SetCutsWithDefault();
78  // LEP: For geant4e-specific particles, set a big step so that AlongStep computes
79  // all the energy (as is done in G4ErrorPhysicsList)
80  G4ParticleTable* myParticleTable = G4ParticleTable::GetParticleTable();
81  G4ParticleTable::G4PTblDicIterator* myParticleIterator = myParticleTable->GetIterator();
82  myParticleIterator->reset();
83  while ((*myParticleIterator)()) {
84  G4ParticleDefinition* particle = myParticleIterator->value();
85  if (particle->GetParticleName().substr(0, 4) == "g4e_") {
86  SetParticleCuts(1.0E+9 * CLHEP::cm, particle);
87  }
88  }
89 
90 }
Belle2::Simulation::ExtPhysicsConstructor
Define geant4e-specific physics.
Definition: ExtPhysicsConstructor.h:41
Belle2::Simulation::ExtPhysicsList::~ExtPhysicsList
virtual ~ExtPhysicsList()
Destructor.
Definition: ExtPhysicsList.cc:70
Belle2::Simulation::ExtPhysicsList::SetCuts
void SetCuts()
Required method: sets cutoff values for propagation.
Definition: ExtPhysicsList.cc:74
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19