aboutsummaryrefslogtreecommitdiffstats
path: root/src/G4BeamTestGeneralPhysics.cxx
blob: 2def9b41cbe41d9f9fdc34d3d2cda65ac944eaa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
}