Belle II Software
release-06-00-14
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
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
v
w
z
Typedefs
a
b
c
d
e
i
k
l
m
n
p
r
s
t
u
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
ParticleMassUpdaterModule.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
#include <analysis/modules/ParticleMassUpdater/ParticleMassUpdaterModule.h>
10
#include <analysis/dataobjects/ParticleList.h>
11
12
#include <framework/datastore/StoreObjPtr.h>
13
#include <framework/gearbox/Const.h>
14
15
using namespace
std;
16
using namespace
Belle2
;
17
18
// Register module in the framework
19
REG_MODULE
(ParticleMassUpdater)
20
21
ParticleMassUpdaterModule
::
ParticleMassUpdaterModule
() :
Module
()
22
{
23
//Set module properties
24
setDescription(
"This module replaces the mass of the particles inside the given particleLists with the invariant mass of the particle corresponding to the given pdgCode."
);
25
setPropertyFlags(c_ParallelProcessingCertified);
26
//Parameter definition
27
addParam(
"particleLists"
, m_strParticleLists,
"List of ParticleLists"
, vector<string>());
28
addParam(
"pdgCode"
, m_pdgCode,
"PDG code for mass reference"
, Const::photon.getPDGCode());
29
}
30
31
void
ParticleMassUpdaterModule::initialize()
32
{
33
}
34
35
void
ParticleMassUpdaterModule::event()
36
{
37
38
39
for
(
auto
& iList : m_strParticleLists) {
40
41
StoreObjPtr<ParticleList>
particlelist(iList);
42
if
(!particlelist) {
43
B2ERROR(
"ParticleList "
<< iList <<
" not found"
);
44
continue
;
45
}
else
{
46
if
(particlelist->getListSize() == 0)
continue
;
47
for
(
unsigned
int
i = 0; i < particlelist->getListSize(); ++i) {
48
Particle
* iParticle = particlelist->getParticle(i);
49
iParticle -> updateMass(m_pdgCode);
50
}
51
}
52
}
53
}
54
55
void
ParticleMassUpdaterModule::terminate()
56
{
57
}
58
Belle2::Module
Base class for Modules.
Definition:
Module.h:72
Belle2::ParticleMassUpdaterModule
This module replaces the mass of the particles inside the given particleLists with the invariant mass...
Definition:
ParticleMassUpdaterModule.h:25
Belle2::Particle
Class to store reconstructed particles.
Definition:
Particle.h:74
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition:
StoreObjPtr.h:95
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition:
Module.h:650
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
analysis
modules
ParticleMassUpdater
src
ParticleMassUpdaterModule.cc
Generated on Thu Jul 14 2022 07:51:31 for Belle II Software by
1.9.1