Belle II Software
release-06-02-00
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
ParticleListName.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
#include <analysis/DecayDescriptor/DecayDescriptor.h>
9
#include <analysis/DecayDescriptor/ParticleListName.h>
10
11
#include <analysis/utility/EvtPDLUtil.h>
12
13
#include <stdexcept>
14
15
using namespace
Belle2
;
16
17
std::string
ParticleListName::antiParticleListName
(
const
std::string& listName)
18
{
19
DecayDescriptor
decayDescriptor;
20
bool
valid = decayDescriptor.init(listName);
21
if
(!valid)
22
throw
std::runtime_error(
"Invalid ParticleList name: '"
+ listName +
"' Should be EVTPDLNAME[:LABEL], e.g. B+ or B+:mylist."
);
23
24
int
nProducts = decayDescriptor.getNDaughters();
25
if
(nProducts > 0)
26
throw
std::runtime_error(
"Invalid ParticleList name "
+ listName
27
+
". DecayString should not contain any daughters, only the mother particle."
);
28
29
const
DecayDescriptorParticle
* mother = decayDescriptor.getMother();
30
const
int
pdgCode = mother->getPDGCode();
31
32
bool
isSelfConjugatedParticle = !(
EvtPDLUtil::hasAntiParticle
(pdgCode));
33
if
(isSelfConjugatedParticle)
34
return
listName;
35
else
36
return
EvtPDLUtil::antiParticleListName
(pdgCode, mother->getLabel());
37
}
38
Belle2::DecayDescriptorParticle
Represents a particle in the DecayDescriptor.
Definition:
DecayDescriptorParticle.h:27
Belle2::DecayDescriptor
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Definition:
DecayDescriptor.h:33
Belle2::EvtPDLUtil::antiParticleListName
std::string antiParticleListName(int pdgCode, const std::string &label)
Returns the name of the anti-particle ParticleList for particles with given pdg code and with given l...
Definition:
EvtPDLUtil.cc:30
Belle2::EvtPDLUtil::hasAntiParticle
bool hasAntiParticle(int pdgCode)
Checks if the particle with given pdg code has an anti-particle or not.
Definition:
EvtPDLUtil.cc:12
Belle2::ParticleListName::antiParticleListName
std::string antiParticleListName(const std::string &listName)
Returns name of anti-particle-list corresponding to listName.
Definition:
ParticleListName.cc:17
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
analysis
DecayDescriptor
src
ParticleListName.cc
Generated on Thu Dec 28 2023 02:17:22 for Belle II Software by
1.9.1