 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/FrameworkExceptions.h>
45 invalidDetector = 0x0,
216 void checkSet()
const {
if (!ASetType::set().
contains(*
this))
throw InvalidDetectorTypeError();}
476 throw std::runtime_error(
"Given ParticleType is not a charged stable particle!");
488 throw std::runtime_error(
"Given PDG code is not a charged stable particle!");
513 throw std::runtime_error(
"Given ParticleType is not a cluster particle!");
525 throw std::runtime_error(
"Given PDG code is not a cluster particle!");
void checkSet() const
Check of set validity.
static const DetectorSet c_set
The set of valid tracking detectors.
RestrictedDetectorSet< ClusterDetectors > ClusterDetectorSet
Typedef for set of VXD detectors.
std::string __repr__() const
String for printing in python.
static const ParticleType photon
photon particle
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
static DetectorSet set()
Accessor for the set of valid detector IDs.
static const DetectorSet c_set
The set of valid tracking detectors.
static const ParticleType unspecifiedParticle
Unspecified particle, used when no other particle type fits.
static const double uTherm
Thermal Voltage at room temperature.
RestrictedDetectorSet< VXDDetectors > VXDDetectorSet
Typedef for set of VXD detectors.
static const ParticleType invalidParticle
Invalid particle, used internally.
static const ParticleType Kshort
K^0_S particle.
virtual ~DetectorSet()
Destructor.
ParticleType & operator++()
Prefix increment.
static const ChargedStable electron
electron particle
static const ParticleType Klong
K^0_L particle.
static const double kBoltzmann
Boltzmann constant in GeV/K.
RestrictedDetectorSet & operator+=(const DetectorSet &set)
Addition of another set to this one.
A class that defines the valid set of PID detectors.
FourVector operator-(const FourVector &lhs, const FourVector &rhs)
Difference of two four vectors.
static const Cluster clusterjunk
junk cluster
static const ParticleSet chargedStableSet
set of charged stable particles
int getPDGCode() const
PDG code.
ChargedStable(const ParticleType &p)
Constructor from the more general ParticleType.
static const Cluster clusterelectron
electron cluster
The DetectorSet class for sets of detector IDs in the form of EDetector values.
FourVector operator+(const FourVector &lhs, const FourVector &rhs)
Sum of two four vectors.
static unsigned short getBit(EDetector det)
Conversion of detector ID to bit pattern.
static const DetectorSet c_set
The set of valid tracking detectors.
static const double eMobilitySi
Electron mobility in intrinsic Silicon at room temperature.
A set of ParticleType objects, with defined order.
DetectorSet(EDetector det)
Constructor for a set containig one detector ID.
static const double deuteronMass
deuteron mass
static const double permSi
Permittivity of Silicon.
ParticleSet()=default
Emtpy constructor.
EDetector
Enum for identifying the detector components (detector and subdetector).
ChargedStable(int pdg)
Constructor from PDG code.
DetectorSet(unsigned short bits)
Constructor.
RestrictedDetectorSet< PIDDetectors > PIDDetectorSet
Typedef for set of PID detectors.
static const double electronMass
electron mass
ParticleType(int pdgCode, const ParticleSet *set=NULL, int index=-1)
Constructor.
DetectorSet & operator+=(const DetectorSet &set)
Addition of another set to this one.
static const Cluster clustermuon
muon cluster
Cluster(int pdg)
Constructor from PDG code.
DetectorSet & operator=(const DetectorSet &)=default
Assignment operator.
static const ChargedStable kaon
charged kaon particle
ParticleSet & operator=(const ParticleSet &other)
Assignment operator.
bool operator==(const DetectorSet &set) const
Equality operator.
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
static const double neutronMass
neutron mass
static const Cluster clusterKlong
K^0_L cluster.
bool contains(const ParticleType &p) const
Returns true if and only if the set contains 'p'.
A class for sets of detector IDs whose content is limited to restricted set of valid detector IDs.
static const double speedOfLight
[cm/ns]
static const ChargedStable pion
charged pion particle
static const DetectorSet allDetectors
The set of all detectors.
void add(const ParticleType &p)
Add a copy of the given ParticleType to this set.
RestrictedDetectorSet< TrackingDetectors > TrackingDetectorSet
Typedef for set of tracking detectors.
Provides a type-safe way to pass members of the clusterSet set.
ParticleType begin() const
Returns first particle.
const ParticleType & find(int pdg) const
Returns particle in set with given PDG code, or invalidParticle if not found.
Abstract base class for different kinds of events.
A class that defines the valid set of tracking detectors.
static const ChargedStable deuteron
deuteron particle
const ParticleType & at(unsigned int index) const
Return particle at given index, or end() if out of range.
static const DetectorSet c_set
The set of valid PID detectors.
A class that defines the valid set of VXD detectors.
EDetector operator[](int index) const
Accessor for a detector ID in this set.
static const ParticleType pi0
neutral pion particle
bool operator!=(const ParticleType &o) const
Test inequality.
static const size_t c_size
Number of PID detectors, temporary workaround.
DetectorSet & operator-=(const DetectorSet &set)
Subtraction of another set from this one.
static const double protonMass
proton mass
static const ParticleType antiLambda
Anti-Lambda particle.
static const ParticleType neutron
neutron particle
bool operator!=(const DetectorSet &set) const
Inequality operator.
Cluster(const ParticleType &p)
Constructor from the more general ParticleType.
ParticleType & operator*()
dummy dereferencing for range-based for.
int m_pdgCode
PDG code of the particle.
static const double pionMass
charged pion mass
static const double kaonMass
charged kaon mass
bool operator==(const ParticleType &o) const
Test equality.
static EDetector getDetector(unsigned short bit)
Conversion of bit pattern to detector ID.
ParticleSet(const ParticleSet &other)
Copy constructor to make sure particles belong to correct set.
int m_index
index in the associated set, -1 if there's no set.
ParticleType end() const
Returns an invalid particle to check if iteration should be stopped.
bool operator<(const ParticleType &other) const
Comparison operator to be usable in sets.
static const double K0Mass
neutral kaon mass
unsigned int size() const
Returns number of particles in this set.
static const Cluster clusterpion
charged hadron cluster
The ParticleType class for identifying different particle types.
static const ChargedStable proton
proton particle
Const()=delete
no Const instances allowed.
Provides a type-safe way to pass members of the chargedStableSet set.
static const size_t c_size
Number of PID detectors, temporary workaround.
const ParticleSet * m_set
set this particle belongs to, or NULL if stand-alone.
static const double muonMass
muon mass
bool contains(const DetectorSet &set) const
Check whether this set contains another set.
static const ChargedStable muon
muon particle
static const Cluster clusterphoton
photon cluster
ParticleType & operator=(const ParticleType &)=default
Assignment Operator.
#define BELLE2_DEFINE_EXCEPTION(ClassName, Message)
Macro that defines an exception with the given message template.
This class provides a set of constants for the framework.
DetectorSet()
Default constructor.
int getIndex(EDetector det) const
Getter for the index of a given detector in this set.
unsigned short m_bits
The internal representation of the set as bit pattern.
size_t size() const
Getter for number of detector IDs in this set.
static const double fineStrConst
The fine structure constant.
A class that defines the valid set of Cluster detectors.
int getIndex() const
This particle's index in the associated set.
RestrictedDetectorSet(EDetector det)
Constructor for a set containg one detector ID.
std::string __repr__() const
String for printing in python.
std::vector< ParticleType > m_particles
Actual particles.
static const ParticleType Lambda
Lambda particle.
const TParticlePDG * getParticlePDG() const
Accessor for ROOT TParticlePDG object.
static const double ehEnergy
Energy needed to create an electron-hole pair in Si at std.
RestrictedDetectorSet(const DetectorSet &set)
(Copy) constructor.
static const ParticleSet clusterSet
set of cluster particles
double getMass() const
Particle mass.
static const double pi0Mass
neutral pion mass