blob: 93304a8b0c26cf85604c2f7f9bbb7dfb123e512f (
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
|
#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
}
|