Newer
Older
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
63
64
65
66
67
68
69
70
71
72
73
74
// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
//====================================================================
// AIDA Detector description implementation for LCD
//--------------------------------------------------------------------
//
// Author : M.Frank
//
//====================================================================
#include <algorithm>
#include "DD4hep/Printout.h"
#include "DD4hep/InstanceCount.h"
#include "DDG4/Geant4Context.h"
#include "DDG4/Geant4Kernel.h"
using namespace std;
using namespace DD4hep;
using namespace DD4hep::Simulation;
/// Default constructor
Geant4Context::Geant4Context(Geant4Kernel* kernel)
: m_kernel(kernel), m_trackMgr(0)
{
}
/// Default destructor
Geant4Context::~Geant4Context() {
}
/// Access to detector description
Geometry::LCDD& Geant4Context::lcdd() const {
return m_kernel->lcdd();
}
/// Create a user trajectory
G4VTrajectory* Geant4Context::createTrajectory(const G4Track* /* track */) const {
string err = DD4hep::format("Geant4Kernel","createTrajectory: Purely virtual method. requires overloading!");
DD4hep::printout(DD4hep::FATAL,"Geant4Kernel","createTrajectory: Purely virtual method. requires overloading!");
throw runtime_error(err);
}
/// Access to the main run action sequence from the kernel object
Geant4RunActionSequence& Geant4Context::runAction() const {
return m_kernel->runAction();
}
/// Access to the main event action sequence from the kernel object
Geant4EventActionSequence& Geant4Context::eventAction() const {
return m_kernel->eventAction();
}
/// Access to the main stepping action sequence from the kernel object
Geant4SteppingActionSequence& Geant4Context::steppingAction() const {
return m_kernel->steppingAction();
}
/// Access to the main tracking action sequence from the kernel object
Geant4TrackingActionSequence& Geant4Context::trackingAction() const {
return m_kernel->trackingAction();
}
/// Access to the main stacking action sequence from the kernel object
Geant4StackingActionSequence& Geant4Context::stackingAction() const {
return m_kernel->stackingAction();
}
/// Access to the main generator action sequence from the kernel object
Geant4GeneratorActionSequence& Geant4Context::generatorAction() const {
return m_kernel->generatorAction();
}
/// Access to the main generator action sequence from the kernel object
Geant4SensDetSequences& Geant4Context::sensitiveActions() const {
return m_kernel->sensitiveActions();
}