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
ParticleMassUpdaterModule.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2010 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Fernando Abudinen *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#include <analysis/modules/ParticleMassUpdater/ParticleMassUpdaterModule.h>
12
#include <analysis/dataobjects/ParticleList.h>
13
14
#include <framework/datastore/StoreObjPtr.h>
15
16
using namespace
std;
17
using namespace
Belle2
;
18
19
// Register module in the framework
20
REG_MODULE
(ParticleMassUpdater)
21
22
ParticleMassUpdaterModule
::
ParticleMassUpdaterModule
() :
Module
()
23
{
24
//Set module properties
25
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."
);
26
setPropertyFlags(c_ParallelProcessingCertified);
27
//Parameter definition
28
addParam(
"particleLists"
, m_strParticleLists,
"List of ParticleLists"
, vector<string>());
29
addParam(
"pdgCode"
, m_pdgCode,
"PDG code for mass reference"
, 22);
30
}
31
32
void
ParticleMassUpdaterModule::initialize()
33
{
34
}
35
36
void
ParticleMassUpdaterModule::event()
37
{
38
39
40
for
(
auto
& iList : m_strParticleLists) {
41
42
StoreObjPtr<ParticleList>
particlelist(iList);
43
if
(!particlelist) {
44
B2ERROR(
"ParticleList "
<< iList <<
" not found"
);
45
continue
;
46
}
else
{
47
if
(particlelist->getListSize() == 0)
continue
;
48
for
(
unsigned
int
i = 0; i < particlelist->getListSize(); ++i) {
49
Particle
* iParticle = particlelist->getParticle(i);
50
iParticle -> updateMass(m_pdgCode);
51
}
52
}
53
}
54
}
55
56
void
ParticleMassUpdaterModule::terminate()
57
{
58
}
59
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::StoreObjPtr
Type-safe access to single objects in the data store.
Definition:
ParticleList.h:33
Belle2::Particle
Class to store reconstructed particles.
Definition:
Particle.h:77
Belle2::ParticleMassUpdaterModule
This module replaces the mass of the particles inside the given particleLists with the invariant mass...
Definition:
ParticleMassUpdaterModule.h:35
analysis
modules
ParticleMassUpdater
src
ParticleMassUpdaterModule.cc
Generated on Tue Jan 4 2022 02:50:04 for Belle II Software by
1.8.17