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