Belle II Software
release-05-02-19
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
h
i
l
m
n
p
r
s
t
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
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
j
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
q
r
s
t
u
v
w
x
y
z
Typedefs
_
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
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
SmearPrimaryVertexModule.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2020 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Anze Zupanc, Giacomo De Pietro *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
/* Own header. */
12
#include <generators/modules/SmearPrimaryVertexModule.h>
13
14
/* Belle II headers. */
15
#include <framework/dataobjects/MCInitialParticles.h>
16
#include <framework/datastore/StoreArray.h>
17
#include <framework/logging/Logger.h>
18
#include <mdst/dataobjects/MCParticle.h>
19
20
/* ROOT headers. */
21
#include <TVector3.h>
22
23
using namespace
Belle2
;
24
25
REG_MODULE
(SmearPrimaryVertex)
26
27
SmearPrimaryVertexModule
::
SmearPrimaryVertexModule
() :
Module
(),
28
m_Initial(
BeamParameters
::c_smearVertex)
29
{
30
/* Module description. */
31
setDescription(
"Smears primary vertex and all subsequent vertices of all the MCParticles using the informations stored in BeamParameters."
);
32
/* Parameters definition. */
33
addParam(
"MCParticlesStoreArrayName"
, m_MCParticlesName,
"Name of the MCParticles StoreArray."
, std::string(
""
));
34
}
35
36
SmearPrimaryVertexModule::~SmearPrimaryVertexModule
()
37
{
38
}
39
40
void
SmearPrimaryVertexModule::initialize
()
41
{
42
StoreArray<MCParticle>
mcParticles(
m_MCParticlesName
);
43
mcParticles.isRequired(
m_MCParticlesName
);
44
m_Initial
.
initialize
();
45
}
46
47
void
SmearPrimaryVertexModule::event
()
48
{
49
StoreArray<MCParticle>
mcParticles(
m_MCParticlesName
);
50
// smear the primary vertex if not already done
51
TVector3 shift =
m_Initial
.
updateVertex
();
52
if
(shift == TVector3{0, 0, 0})
return
;
53
for
(
MCParticle
& mcParticle : mcParticles) {
54
/* Shift the production vertex. */
55
mcParticle.setProductionVertex(mcParticle.getProductionVertex() + shift);
56
/* Shift also the decay vertex only if the MCParticle has a daughter. */
57
if
(mcParticle.getNDaughters() > 0)
58
mcParticle.setDecayVertex(mcParticle.getDecayVertex() + shift);
59
}
60
}
Belle2::InitialParticleGeneration::updateVertex
TVector3 updateVertex(bool force=false)
Update the vertex position:
Definition:
InitialParticleGeneration.cc:118
Belle2::SmearPrimaryVertexModule::m_Initial
InitialParticleGeneration m_Initial
Initial particle generation.
Definition:
SmearPrimaryVertexModule.h:76
Belle2::SmearPrimaryVertexModule::~SmearPrimaryVertexModule
virtual ~SmearPrimaryVertexModule()
Destructor.
Definition:
SmearPrimaryVertexModule.cc:36
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition:
Module.h:652
Belle2::Module
Base class for Modules.
Definition:
Module.h:74
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::InitialParticleGeneration::initialize
void initialize()
function to be executed on initialize()
Definition:
InitialParticleGeneration.cc:29
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition:
MCParticle.h:43
Belle2::SmearPrimaryVertexModule
This module smears the primary vertex (the interaction point) according to the values stored in BeamP...
Definition:
SmearPrimaryVertexModule.h:42
Belle2::StoreArray< MCParticle >
Belle2::BeamParameters
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...
Definition:
BeamParameters.h:33
Belle2::SmearPrimaryVertexModule::m_MCParticlesName
std::string m_MCParticlesName
Name of the MCParticles StoreArray.
Definition:
SmearPrimaryVertexModule.h:71
Belle2::SmearPrimaryVertexModule::event
virtual void event() override
This method is called for each event.
Definition:
SmearPrimaryVertexModule.cc:47
Belle2::SmearPrimaryVertexModule::initialize
virtual void initialize() override
Initialize the module.
Definition:
SmearPrimaryVertexModule.cc:40
generators
modules
src
SmearPrimaryVertexModule.cc
Generated on Tue Jan 4 2022 02:58:20 for Belle II Software by
1.8.17