Belle II Software  release-05-02-19
DecayDescriptorParticle.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Christian Oswald, Yo Sato *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <analysis/dataobjects/Particle.h>
14 
15 #include <string>
16 
17 namespace Belle2 {
22  struct DecayStringParticle;
23 
29  class DecayDescriptorParticle {
30  private:
32  std::string m_strName;
34  bool m_isSelected;
36  int m_properties;
38  std::string m_strLabel;
41  public:
44 
47 
50 
52  bool init(const DecayStringParticle& p);
54  std::string getName() const
55  {
56  return m_strName;
57  }
61  std::string getFullName() const
62  {
63  if (m_strLabel.empty())
64  return m_strName;
65  else
66  return m_strName + ":" + m_strLabel;
67  }
69  std::string getNameSimple() const;
71  bool isSelected() const
72  {
73  return m_isSelected;
74  }
76  std::string getLabel() const
77  {
78  return m_strLabel;
79  }
81  int getPDGCode() const
82  {
83  return m_iPDGCode;
84  }
86  int getProperty() const
87  {
88  return m_properties;
89  }
91  bool isUnspecified() const
92  {
93  return (m_properties & Particle::PropertyFlags::c_IsUnspecified);
94  }
96  bool isIgnoreMisID() const
97  {
98  return (m_properties & Particle::PropertyFlags::c_IsIgnoreMisID);
99  }
101  bool isIgnoreDecayInFlight() const
102  {
103  return (m_properties & Particle::PropertyFlags::c_IsIgnoreDecayInFlight);
104  }
105  };
107 }
108 
109 
Belle2::DecayDescriptorParticle::DecayDescriptorParticle
DecayDescriptorParticle()
Default ctor.
Definition: DecayDescriptorParticle.cc:22
Belle2::DecayDescriptorParticle::m_iPDGCode
int m_iPDGCode
PDG code of the decaying particle.
Definition: DecayDescriptorParticle.h:48
Belle2::DecayStringParticle
Holds the information of a particle in the decay string.
Definition: DecayStringParticle.h:32
Belle2::DecayDescriptorParticle::m_properties
int m_properties
Particle property.
Definition: DecayDescriptorParticle.h:44
Belle2::DecayDescriptorParticle::operator=
DecayDescriptorParticle & operator=(const DecayDescriptorParticle &)=default
Want the default assignment operator.
Belle2::DecayDescriptorParticle::getPDGCode
int getPDGCode() const
Return PDG code.
Definition: DecayDescriptorParticle.h:89
Belle2::DecayDescriptorParticle
Represents a particle in the DecayDescriptor.
Definition: DecayDescriptorParticle.h:37
Belle2::DecayDescriptorParticle::getNameSimple
std::string getNameSimple() const
Return the name from getName() without + - * or anti-.
Definition: DecayDescriptorParticle.cc:55
Belle2::DecayDescriptorParticle::isIgnoreDecayInFlight
bool isIgnoreDecayInFlight() const
Check if decayInFlight shall be ignored.
Definition: DecayDescriptorParticle.h:109
Belle2::DecayDescriptorParticle::m_strLabel
std::string m_strLabel
Label of this particle to distinguish e.g.
Definition: DecayDescriptorParticle.h:46
Belle2::DecayDescriptorParticle::m_isSelected
bool m_isSelected
Is particle selected?
Definition: DecayDescriptorParticle.h:42
Belle2::DecayDescriptorParticle::getLabel
std::string getLabel() const
The label of this particle, "default" returned, when no label set.
Definition: DecayDescriptorParticle.h:84
Belle2::DecayDescriptorParticle::getProperty
int getProperty() const
return property of the particle.
Definition: DecayDescriptorParticle.h:94
Belle2::DecayDescriptorParticle::getFullName
std::string getFullName() const
returns the full name of the particle full_name = name:label
Definition: DecayDescriptorParticle.h:69
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DecayDescriptorParticle::isIgnoreMisID
bool isIgnoreMisID() const
Check if misID shall be ignored.
Definition: DecayDescriptorParticle.h:104
Belle2::DecayDescriptorParticle::isSelected
bool isSelected() const
Is the particle selected in the decay string?
Definition: DecayDescriptorParticle.h:79
Belle2::DecayDescriptorParticle::m_strName
std::string m_strName
evt.pdl name of the particle.
Definition: DecayDescriptorParticle.h:40
Belle2::DecayDescriptorParticle::getName
std::string getName() const
evt.pdl name of the particle.
Definition: DecayDescriptorParticle.h:62
Belle2::DecayDescriptorParticle::isUnspecified
bool isUnspecified() const
Is the particle unspecified?
Definition: DecayDescriptorParticle.h:99
Belle2::DecayDescriptorParticle::init
bool init(const DecayStringParticle &p)
initialise member variables from std::string member variables contained in a DecayStringParticle stru...
Definition: DecayDescriptorParticle.cc:30