DD4hep
1.31.0
Detector Description Toolkit for High Energy Physics
Main Page
Related Pages
Modules
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
_
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
u
Enumerator
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
b
d
g
o
p
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
x
Functions
_
c
d
g
h
i
l
m
n
o
p
r
s
u
Variables
Typedefs
_
a
c
d
e
f
g
j
l
o
p
r
s
t
u
v
x
Enumerations
Enumerator
Macros
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
DDG4
src
Geant4InteractionVertexBoost.cpp
Go to the documentation of this file.
1
//==========================================================================
2
// AIDA Detector description implementation
3
//--------------------------------------------------------------------------
4
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5
// All rights reserved.
6
//
7
// For the licensing terms see $DD4hepINSTALL/LICENSE.
8
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9
//
10
// Author : M.Frank
11
//
12
//==========================================================================
13
14
// Framework include files
15
#include <
DD4hep/Printout.h
>
16
#include <
DD4hep/InstanceCount.h
>
17
#include <
DDG4/Geant4InputHandling.h
>
18
#include <
DDG4/Geant4InteractionVertexBoost.h
>
19
20
using namespace
dd4hep::sim
;
21
23
Geant4InteractionVertexBoost::Geant4InteractionVertexBoost
(
Geant4Context
* ctxt,
const
std::string& nam)
24
:
Geant4GeneratorAction
(ctxt, nam)
25
{
26
InstanceCount::increment
(
this
);
27
declareProperty(
"Angle"
, m_angle = 0);
28
declareProperty(
"Mask"
, m_mask = 1);
29
m_needsControl =
true
;
30
}
31
33
Geant4InteractionVertexBoost::~Geant4InteractionVertexBoost
() {
34
InstanceCount::decrement
(
this
);
35
}
36
38
void
Geant4InteractionVertexBoost::boost
(Interaction* inter)
const
{
39
if
( inter ) {
40
boostInteraction
(
this
, inter,
m_angle
);
41
return
;
42
}
43
print
(
"+++ No interaction of type %d present."
,
m_mask
);
44
}
45
47
void
Geant4InteractionVertexBoost::operator()
(G4Event*) {
48
typedef
std::vector<Geant4PrimaryInteraction*> _I;
49
Geant4PrimaryEvent
* evt =
context
()->
event
().
extension
<
Geant4PrimaryEvent
>();
50
51
if
(
m_mask
>= 0 ) {
52
Interaction
* inter = evt->
get
(
m_mask
);
53
boost
(inter);
54
return
;
55
}
56
_I interactions = evt->
interactions
();
57
for
(_I::iterator i=interactions.begin(); i != interactions.end(); ++i)
58
boost
(*i);
59
}
dd4hep::sim::Geant4InteractionVertexBoost::Geant4InteractionVertexBoost
Geant4InteractionVertexBoost()=delete
Inhibit default constructor.
dd4hep::sim::Geant4InteractionVertexBoost::boost
void boost(Interaction *interaction) const
Action routine to boost one single interaction according to the properties.
dd4hep::sim::Geant4PrimaryEvent
Class modelling a complete primary event with multiple interactions.
Definition:
Geant4Primary.h:143
dd4hep::sim::Geant4PrimaryEvent::interactions
std::vector< Geant4PrimaryInteraction * > interactions() const
Retrieve all interactions.
Definition:
Geant4Primary.cpp:113
dd4hep::sim::Geant4InteractionVertexBoost::Interaction
Geant4PrimaryInteraction Interaction
Interaction definition.
Definition:
Geant4InteractionVertexBoost.h:48
dd4hep::sim::Geant4InteractionVertexBoost::m_mask
int m_mask
Property: Unique identifier of the interaction to be modified.
Definition:
Geant4InteractionVertexBoost.h:54
dd4hep::InstanceCount::increment
static void increment(T *)
Increment count according to type information.
Definition:
InstanceCount.h:98
dd4hep::sim::Geant4Context::event
Geant4Event & event() const
Access the geant4 event – valid only between BeginEvent() and EndEvent()!
Definition:
Geant4Context.cpp:84
Geant4InputHandling.h
dd4hep::sim::Geant4Event::extension
T * extension(bool alert=true)
Access to type safe extension object. Exception is thrown if the object is invalid.
Definition:
Geant4Context.h:151
dd4hep::sim::Geant4InteractionVertexBoost::~Geant4InteractionVertexBoost
virtual ~Geant4InteractionVertexBoost()
Default destructor.
dd4hep::InstanceCount::decrement
static void decrement(T *)
Decrement count according to type information.
Definition:
InstanceCount.h:102
dd4hep::sim::Geant4GeneratorAction
Concrete implementation of the Geant4 generator action base class.
Definition:
Geant4GeneratorAction.h:47
dd4hep::sim::Geant4InteractionVertexBoost::operator()
virtual void operator()(G4Event *event) override
Callback to generate primary particles.
dd4hep::sim::Geant4InteractionVertexBoost::m_angle
double m_angle
Property: The constant Lorentz transformation angle.
Definition:
Geant4InteractionVertexBoost.h:52
dd4hep::sim::Geant4Action::print
void print(const char *fmt,...) const
Support for messages with variable output level using output level.
Definition:
Geant4Action.cpp:144
dd4hep::sim
Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
Definition:
EDM4hepFileReader.cpp:41
dd4hep::sim::boostInteraction
int boostInteraction(const Geant4Action *caller, Geant4PrimaryEvent::Interaction *inter, double alpha)
Boost particles of one interaction identified by its mask.
Definition:
Geant4InputHandling.cpp:257
InstanceCount.h
Printout.h
Geant4InteractionVertexBoost.h
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition:
Geant4Context.h:201
dd4hep::sim::Geant4Action::context
Geant4Context * context() const
Access the context.
Definition:
Geant4Action.h:270
dd4hep::sim::Geant4PrimaryEvent::get
Geant4PrimaryInteraction * get(int id) const
Retrieve an interaction by its ID.
Definition:
Geant4Primary.cpp:107
Generated on Tue Apr 15 2025 16:54:27 for DD4hep by
1.8.18