aboutsummaryrefslogtreecommitdiffstats
path: root/src/G4BeamTestGeneralPhysics.cxx
diff options
context:
space:
mode:
authorshivesh <s.p.mandalia@qmul.ac.uk>2018-08-16 14:01:19 +0100
committershivesh <s.p.mandalia@qmul.ac.uk>2018-08-16 14:01:19 +0100
commit3a83ec3bce239359f1cd71d1c0bfbf23b61d0db8 (patch)
tree7b75a539576992ec9a82ec0add0d0e9b565347dd /src/G4BeamTestGeneralPhysics.cxx
downloadG4BeamTest-3a83ec3bce239359f1cd71d1c0bfbf23b61d0db8.tar.gz
G4BeamTest-3a83ec3bce239359f1cd71d1c0bfbf23b61d0db8.zip
initial commit
Diffstat (limited to 'src/G4BeamTestGeneralPhysics.cxx')
-rw-r--r--src/G4BeamTestGeneralPhysics.cxx62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/G4BeamTestGeneralPhysics.cxx b/src/G4BeamTestGeneralPhysics.cxx
new file mode 100644
index 0000000..2def9b4
--- /dev/null
+++ b/src/G4BeamTestGeneralPhysics.cxx
@@ -0,0 +1,62 @@
+/*
+ * copyright (C) 2010
+ * The Icecube Collaboration
+ *
+ * $Id: G4BeamTestGeneralPhysics.cxx 152849 2017-01-20 21:44:25Z jgonzalez $
+ *
+ * @version $Revision: 152849 $
+ * @date $LastChangedDate: 2017-01-20 21:44:25 +0000 (Fri, 20 Jan 2017) $
+ * @author Fabian Kislat <fabian.kislat@desy.de> Last changed by: $LastChangedBy: jgonzalez $
+ */
+
+#include "G4BeamTestGeneralPhysics.h"
+
+#include <iomanip>
+
+#include <globals.hh>
+#include <G4ios.hh>
+#include <G4ParticleDefinition.hh>
+#include <G4ProcessManager.hh>
+// Bosons
+#include <G4ChargedGeantino.hh>
+#include <G4Geantino.hh>
+#include <G4Version.hh>
+
+G4BeamTestGeneralPhysics::G4BeamTestGeneralPhysics()
+ : G4VPhysicsConstructor("general")
+{}
+
+
+G4BeamTestGeneralPhysics::~G4BeamTestGeneralPhysics()
+{}
+
+
+void G4BeamTestGeneralPhysics::ConstructParticle()
+{
+ // pseudo-particles
+ G4Geantino::GeantinoDefinition();
+ G4ChargedGeantino::ChargedGeantinoDefinition();
+}
+
+
+void G4BeamTestGeneralPhysics::ConstructProcess()
+{
+ //AddTransportation();
+
+// Decay processes are set somewhere else now
+#if G4VERSION_NUMBER < 1000
+ // Add Decay Process
+ theParticleIterator->reset();
+ while ((*theParticleIterator)()) {
+ G4ParticleDefinition *particle = theParticleIterator->value();
+ G4ProcessManager *pmanager = particle->GetProcessManager();
+ if (decay.IsApplicable(*particle)) {
+ pmanager->AddProcess(&decay);
+ // set ordering for PostStepDoIt and AtRestDoIt
+ pmanager->SetProcessOrdering(&decay, idxPostStep);
+ pmanager->SetProcessOrdering(&decay, idxAtRest);
+ }
+ }
+#endif
+}
+