Belle II Software  release-08-01-10
G4LongLivedNeutralPhysics.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 // modified from BelleII monopole simulation
10 
11 #include <simulation/longlivedneutral/G4LongLivedNeutralPhysics.h>
12 #include <simulation/longlivedneutral/G4LongLivedNeutral.h>
13 #include <simulation/longlivedneutral/G4LongLivedNeutralDecay.h>
14 #include <simulation/longlivedneutral/G4LongLivedNeutralTransportation.h>
15 #include <framework/logging/Logger.h>
16 
17 #include <G4ProcessManager.hh>
18 #include <CLHEP/Units/SystemOfUnits.h>
19 
20 using namespace std;
21 using namespace Belle2;
22 using namespace CLHEP;
23 
24 G4LongLivedNeutralPhysics::G4LongLivedNeutralPhysics()
25  : G4VPhysicsConstructor("LongLivedNeutralPhysics"),
26  fLLPN(0)
27 {
28 
29 }
30 
32 {
33 }
34 
36 {
37  fLLPN = new G4LongLivedNeutral("LongLivedNeutralParticle");
38 }
39 
40 
42 {
43  B2DEBUG(20, "G4LongLivedNeutralPhysics::ConstructProcess");
44 
45  G4ProcessManager* pmanager = fLLPN->GetProcessManager();
46 
47  // remove all processes added per default (em scintillation and transport)
48  for (int i = 0; i <= pmanager->GetProcessListLength(); ++i) {
49  pmanager->RemoveProcess(i);
50  }
51  pmanager->RemoveProcess(0);
52 
53  pmanager->AddProcess(new G4LongLivedNeutralTransportation(), -1, 0, 0);
54  pmanager->AddProcess(new G4LongLivedNeutralDecay(), 0, -1, 0);
55 }
This class is a decay process.
virtual void ConstructProcess()
This method will be invoked in the Construct() method.
G4LongLivedNeutral * fLLPN
Pointer to the neutral long lived definition in GEANT4.
virtual void ConstructParticle()
Adds monopole and anti-monopole to GEANT4 with a pdg of +/-99666 and parameters taken from current cl...
Concrete class that does the geometrical transport.
A class to hold long-lived neutral particle description.
Abstract base class for different kinds of events.