Belle II Software  release-08-01-10
analysis
Collaboration diagram for analysis:

Modules

 analysis data objects
 
 analysis modules
 

Classes

class  ClusterUtils
 Class to provide momentum-related information from ECLClusters. More...
 
class  CleoCones
 Class to calculate the Cleo clone variables. More...
 
class  FoxWolfram
 Class to calculate the Fox-Wolfram moments up to order 8. More...
 
class  HarmonicMoments
 Class to calculate the Harmonic moments up to order 8 with respect to a given axis. More...
 
class  KsfwMoments
 Moment-calculation of the k_sfw improved Super-Fox-Wolfram moments. More...
 
class  SphericityEigenvalues
 Class to calculate the Sphericity tensor eigenvalues and eigenvectors starting from an array of 3-momenta The tensor itself is not stored, only its eigenvalues and eigenvectors are. More...
 
class  Thrust
 Class to calculate the thrust axis. More...
 
class  ChargedPidMVAWeights
 Class to contain the payload of MVA weightfiles needed for charged particle identification. More...
 
class  ParticleWeightingAxis
 Class for handling LookUp tables. More...
 
class  ParticleWeightingBinLimits
 Just pair of numbers - min and max values of bin border. More...
 
class  ParticleWeightingKeyMap
 Class for handling KeyMap. More...
 
class  ParticleWeightingLookUpTable
 Class for handling LookUp tables. More...
 
class  PIDCalibrationWeight
 Class for handling the PID calibration weight matrix. More...
 
class  PIDDetectorWeights
 Class for handling the PID weights per detector, used to calculate the track helix isolation score per particle. More...
 
class  PIDNeuralNetworkParameters
 Class for handling the parameters for the neural-network PID. More...
 
class  PIDPriors
 A database class to hold the prior probability for the particle identification. More...
 
class  PIDPriorsTable
 This class holds the prior distribution for a single particle species. More...
 
class  DecayDescriptor
 The DecayDescriptor stores information about a decay tree or parts of a decay tree. More...
 
class  DecayDescriptorParticle
 Represents a particle in the DecayDescriptor. More...
 
struct  DecayStringDecay
 Holds the information of a decay. More...
 
struct  DecayStringGrammar< Iterator >
 This class describes the grammar and the syntax elements of decay strings. More...
 
struct  DecayStringParticle
 Holds the information of a particle in the decay string. More...
 
class  ParticleListHelper
 Class to help managing creation and adding to ParticleLists. More...
 
class  ParticleIndexGenerator
 ParticleIndexGenerator is a generator for all the combinations of the particle indices stored in the particle lists. More...
 
class  ListIndexGenerator
 ListIndexGenerator is a generator for all the combinations of the sublists (FlavorSpecificParticle = 0, SelfConjugatedParticle = 1) of a set of particle lists. More...
 
class  ParticleGenerator
 ParticleGenerator is a generator for all the particles combined from the given ParticleLists. More...
 
class  ChargedParticleIdentificatorTest
 Test the MVA-based charged PID. More...
 
class  eventShapeCoreAlgorithmTest
 
class  PIDPriorsTest
 
class  TrackIsoScoreCalculatorTest
 Test the calculation of the track helix-based isolation score per particle. More...
 
class  AnalysisConfiguration
 Singleton class keeping configurables of analysis components. More...
 
class  DecayForest
 Contains several DecayTree objects, which belong all to the same candidate. More...
 
class  DecayNode
 DecayNode describes the decay of a particle identified by its pdg code, into list of daughters. More...
 
class  DecayTree< T >
 This is a helper class for the MCDecayFinderModule. More...
 
class  DetSurfCylBoundaries
 Simple class to encapsulate a detector surface's boundaries in cylindrical coordinates. More...
 
struct  DetectorSurface
 Detector surfaces information. More...
 
class  GenB0Tag
 Class to determine generated decay mode of B0 and B0bar. More...
 
class  GenBplusTag
 Class to determine generated decay modes of B+ and B-. More...
 
class  GenBsTag
 Class to determine generated decay mode of Bs0 and Bs0bar. More...
 
class  GenDTag
 Class to determine generated decay mode of D*, Ds, D0, D+, and their anti-particles. More...
 
class  GenTauTag
 Class to determine generated decay mode of tau+ and tau-. More...
 
struct  KlongCalculatorUtils
 Utility class to calculate the Klong kinematics. More...
 
struct  MCMatching
 Functions to perform Monte Carlo matching for reconstructed Particles. More...
 
class  ParticleSubset
 Specialised SelectSubset<Particle> that also fixes daughter indices and all ParticleLists. More...
 
class  PCmsLabTransform
 Class to hold Lorentz transformations from/to CMS and boost vector. More...
 
class  PIDCalibrationWeightUtil
 Class to call calibration weight matrix. More...
 
class  PIDNeuralNetwork
 Class to call PID neural network. More...
 
class  ReferenceFrame
 Abstract base class of all reference frames. More...
 
class  RestFrame
 Rest frame of a particle. More...
 
class  LabFrame
 Lab frame. More...
 
class  CMSFrame
 CMS frame. More...
 
class  RotationFrame
 Rotation frame around vector. More...
 
class  CMSRotationFrame
 Stack frame for cms and Rotation frame. More...
 
class  UseReferenceFrame< T >
 A template class to apply the reference frame. More...
 
struct  VariableFormulaConstructor
 Struct to construct new variable function objects from a name or a double value or to apply operations on these variable function objects. More...
 

Macros

#define MAKE_DEPRECATED(name, make_fatal, version, description)    static DeprecateProxy VARMANAGER_MAKE_UNIQUE(_deprecateproxy)(std::string(name), bool(make_fatal), std::string(version), std::string(description));
 Registers a variable as deprecated.
 

Typedefs

typedef std::map< int, ParticleWeightingBinLimits * > BinMap
 Map of keys with bin limits.
 
typedef std::pair< std::vector< int >, int > MultiDimBin
 Multidimensional bin: first element contains combination of bin IDs from 1D axis, second elements contain ID ("key") associated with this combination.
 
typedef std::map< std::string, ParticleWeightingBinLimits * > NDBin
 N-dim bin: pairs of bin limits with name of the axis variable.
 
typedef std::map< std::string, double > WeightInfo
 Weight information: a line from the weight lookup table.
 
typedef std::map< int, WeightInfoWeightMap
 Weight map: the whole lookup table

 
typedef std::vector< std::vector< double > > WeightMatrix
 PID calibration weight matrix, 6 (particle type) x 6 (detectors). More...
 
typedef std::vector< std::tuple< size_t, float > > PIDNNMissingInputs
 Stores information on how to handle missing inputs, i.e. More...
 
typedef std::vector< std::tuple< size_t, size_t, double, double, double > > PIDNNInputsToCut
 Stores information on whether and how to overwrite certain inputs. More...
 
typedef boost::variant< boost::recursive_wrapper< DecayStringDecay >, DecayStringParticleDecayString
 The DecayStringElement can be either a DecayStringDecay or a vector of mother particles. More...
 

Functions

void addContinuumSuppression (const Particle *particle, const std::string &maskName)
 Adds continuum suppression variables.
 
double legendre (const double z, const int i)
 Legendre polynomials.
 
 TEST_F (ChargedParticleIdentificatorTest, TestDBRep)
 Test correct storage of weightfiles in the database representation inner structure.
 
 TEST_F (eventShapeCoreAlgorithmTest, Thrust)
 Test the calculation of a thrust axis.
 
 TEST_F (eventShapeCoreAlgorithmTest, CleoCones)
 Test the calculation of the CleoClones variables.
 
 TEST_F (eventShapeCoreAlgorithmTest, FoxWolfram)
 Test the calculation of the Fox-Wolfram moments.
 
 TEST_F (eventShapeCoreAlgorithmTest, HarmonicMoments)
 Test the calculation of the Harmonic moments.
 
 TEST_F (eventShapeCoreAlgorithmTest, Sphericity)
 Test the calculation of the Sphericity eigenvalues and eigenvectors.
 
 TEST_F (PIDPriorsTest, PIDPriorsTableTest)
 Test of the PIDPriorsTable class.
 
 TEST_F (PIDPriorsTest, PIDPriorTest)
 Test the PIDPriors dbobject.
 
 TEST_F (TrackIsoScoreCalculatorTest, TestDBRep)
 Test correct retrieval of information from the database representation inner structure.
 
bool operator== (const DecayNode &node1, const DecayNode &node2)
 Compare two Decay Nodes: They are equal if All daughter decay nodes are equal or one of the daughter lists is empty (which means "inclusive") More...
 
bool operator!= (const DecayNode &node1, const DecayNode &node2)
 Not equal: See operator==.
 
 CleoCones (const std::vector< ROOT::Math::XYZVector > &p3_cms_all, const std::vector< ROOT::Math::XYZVector > &p3_cms_roe, const ROOT::Math::XYZVector &thrustB, bool calc_CleoCones_with_all, bool calc_CleoCones_with_roe)
 Constructor.
 
 KsfwMoments (double Hso0_max, std::vector< std::pair< ROOT::Math::XYZVector, int >> p3_cms_q_sigA, std::vector< std::pair< ROOT::Math::XYZVector, int >> p3_cms_q_sigB, std::vector< std::pair< ROOT::Math::XYZVector, int >> p3_cms_q_roe, const ROOT::Math::PxPyPzEVector &p_cms_missA, const ROOT::Math::PxPyPzEVector &p_cms_missB, const double et[2])
 Constructor.
 
void registerList (const std::string &listname, bool save=true)
 Register a list by name. More...
 
void registerList (const DecayDescriptor &decay, bool save=true)
 Register a list using a decay descriptor. More...
 
void create ()
 Create the list objects. More...
 
void init (const std::vector< unsigned int > &_sizes)
 Initialises the generator to produce combinations with the given sizes of each particle list. More...
 
bool loadNext ()
 Loads the next combination. More...
 
const std::vector< unsigned int > & getCurrentIndices () const
 Returns theindices of the current loaded combination.
 
void init (unsigned int _numberOfLists)
 Initialises the generator to produce the given type of sublist. More...
 
bool loadNext ()
 Loads the next combination. More...
 
const std::vector< ParticleList::EParticleType > & getCurrentIndices () const
 Returns the type of the sublist of the current loaded combination.
 
 ParticleGenerator (const std::string &decayString, const std::string &cutParameter="")
 Initialises the generator to produce the given type of sublist. More...
 
 ParticleGenerator (const DecayDescriptor &decaydescriptor, const std::string &cutParameter="")
 Initialises the generator to produce the given type of sublist. More...
 
void init ()
 Initialises the generator to produce the given type of sublist.
 
void initIndicesToUniqueIDMap ()
 In the case input daughter particle lists collide (two or more lists contain copies of Particles) the Particle's Store Array index can not be longer used as its unique identifier, which is needed to check for uniqueness of accpeted combinations. More...
 
void fillIndicesToUniqueIDMap (const std::vector< int > &listA, const std::vector< int > &listB, int &uniqueID)
 Assigns unique IDs to all particles in list A, which do not have the unique ID already assigned. More...
 
void fillIndicesToUniqueIDMap (const std::vector< int > &listA, int &uniqueID)
 Assigns unique IDs to all particles in list A, which do not have the unique ID already assigned.
 
bool loadNext (bool loadAntiParticle=true)
 Loads the next combination. More...
 
bool loadNextParticle (bool useAntiParticle)
 Loads the next combination. More...
 
bool loadNextSelfConjugatedParticle ()
 Loads the next combination. More...
 
Particle createCurrentParticle () const
 Create current particle object.
 
Particle getCurrentParticle () const
 Returns the particle.
 
bool currentCombinationHasDifferentSources ()
 Check that all FS particles of a combination differ. More...
 
bool currentCombinationIsUnique ()
 Check that the combination is unique. More...
 
bool inputListsCollide (const std::pair< unsigned, unsigned > &pair) const
 True if the pair of input lists collide. More...
 
bool currentCombinationIsECLCRUnique ()
 Check that: if the current combination has at least two particles from an ECL source, then they are from different connected regions or from the same connected region but have the same hypothesis. More...
 
int getUniqueID (int index) const
 Returns the unique ID assigned to Particle with given index from the IndicesToUniqueID map. More...
 
bool find_decay (const DecayNode &to_find) const
 Check if the decay node contains the given decay tree. More...
 
std::string print_node (unsigned int indent=0) const
 Output a single node. More...
 

Detailed Description

Typedef Documentation

◆ DecayString

typedef boost::variant< boost::recursive_wrapper<DecayStringDecay>, DecayStringParticle > DecayString

The DecayStringElement can be either a DecayStringDecay or a vector of mother particles.

User documentation is located at analysis/doc/DecayDescriptor.rst Please modify in accordingly to introduced changes.

Definition at line 23 of file DecayString.h.

◆ PIDNNInputsToCut

typedef std::vector< std::tuple<size_t, size_t, double, double, double> > PIDNNInputsToCut

Stores information on whether and how to overwrite certain inputs.

It is a vector of tuples of 5 elements:

  • Element 0: Index i of input to be overwritten
  • Element 1: Index j of input that defines if i is overwritten
  • [Element1, Element2] give the range in j in which i is overwritten
  • Element 4: Value to which i will be set For example, if input 0 should be overwritten to -1.0 if input 1 is within [1.0, 2.0]: (0, 1, 1.0, 2.0, -1.0)

Definition at line 40 of file PIDNeuralNetworkParameters.h.

◆ PIDNNMissingInputs

typedef std::vector<std::tuple<size_t, float> > PIDNNMissingInputs

Stores information on how to handle missing inputs, i.e.

inputs that are NaN It is a vector of tuples of two elements, where the first element is the index i of the input variable and the second element is the value to which input i is set if it is NaN.

Definition at line 28 of file PIDNeuralNetworkParameters.h.

◆ WeightMatrix

typedef std::vector<std::vector<double> > WeightMatrix

PID calibration weight matrix, 6 (particle type) x 6 (detectors).

The particle types are sorted by their invariant mass (e, mu, pi, K, p, d), which is inherited from Const::chargedStableSet. Each vector<double> has 6 weights for different sub-detectors for a particle type. The order is as follows, [SVD, CDC, TOP, ARICH, ECL. KLM] that is inherited from Const::PIDDetectors.

Definition at line 30 of file PIDCalibrationWeight.h.

Function Documentation

◆ create()

void create ( )

Create the list objects.

Warning
This function should be called in Every event

Definition at line 40 of file ParticleListHelper.cc.

41  {
42  m_list.create();
43  m_list->initialize(m_pdg, m_list.getName());
44  if (m_antiList) {
45  m_antiList->create();
46  (*m_antiList)->initialize(-m_pdg, m_antiList->getName());
47  m_list->bindAntiParticleList(**m_antiList);
48  }
49  }
StoreObjPtr< ParticleList > m_list
Store object for the list.
int m_pdg
PDG code of the list.
std::optional< StoreObjPtr< ParticleList > > m_antiList
Optional store object for the conjugated list if that exists.

◆ currentCombinationHasDifferentSources()

bool currentCombinationHasDifferentSources ( )
private

Check that all FS particles of a combination differ.

The comparison is made at the MDST objects level. If for example a kaon and a pion Particle's are created from the same MSDT Track object, then these two Particles have the same source and the function will return false.

Returns
true if all FS particles of a combination differ

Definition at line 474 of file ParticleCombiner.cc.

475  {
476  std::vector<Particle*> stack = m_particles;
477  static std::vector<int> sources; // stack for particle sources
478  sources.clear();
479 
480  // recursively check all daughters and daughters of daughters
481  while (!stack.empty()) {
482  Particle* p = stack.back();
483  stack.pop_back();
484  const std::vector<int>& daughters = p->getDaughterIndices();
485 
486  if (daughters.empty()) {
487  int source = p->getMdstSource();
488  for (int i : sources) {
489  if (source == i) return false;
490  }
491  sources.push_back(source);
492  } else {
493  for (int daughter : daughters) stack.push_back(m_particleArray[daughter]);
494  }
495  }
496  return true;
497  }
std::vector< Particle * > m_particles
Pointers to the particle objects of the current combination.
const StoreArray< Particle > m_particleArray
Global list of particles.

◆ currentCombinationIsECLCRUnique()

bool currentCombinationIsECLCRUnique ( )
private

Check that: if the current combination has at least two particles from an ECL source, then they are from different connected regions or from the same connected region but have the same hypothesis.

Returns
true if indices not found in the stack; if true indices pushed to stack

Definition at line 522 of file ParticleCombiner.cc.

◆ currentCombinationIsUnique()

bool currentCombinationIsUnique ( )
private

Check that the combination is unique.

Especially in the case of reconstructing self conjugated decays we get combinations like M -> A B and M -> B A. These two particles are the same and hence only one combination of the two should be kept. This function takes care of this. It keeps track of all combinations that were already accepted (ordered set of unique IDs of daughter particles) and if the current combination is already found in the set it is discarded. The unique ID of daughter particles are either their StoreArray indices (if input lists do not collide) or specially set unique IDs during initialization phase (if input lists collide).

Returns
true if indices not found in the stack; if true indices pushed to stack

Definition at line 500 of file ParticleCombiner.cc.

◆ fillIndicesToUniqueIDMap()

void fillIndicesToUniqueIDMap ( const std::vector< int > &  listA,
const std::vector< int > &  listB,
int &  uniqueID 
)
private

Assigns unique IDs to all particles in list A, which do not have the unique ID already assigned.

The same unique ID is assigned to copies of particles from list A found in the list B. This function has to be executed first.

Definition at line 287 of file ParticleCombiner.cc.

◆ find_decay()

bool find_decay ( const DecayNode to_find) const

Check if the decay node contains the given decay tree.

Parameters
to_findDecayNode object describing the decay

Definition at line 19 of file DecayNode.cc.

20  {
21  if (to_find == (*this))
22  return true;
23  for (const auto& node : daughters) {
24  if (node.find_decay(to_find))
25  return true;
26  }
27  return false;
28  }
std::vector< DecayNode > daughters
daughter decay nodes
Definition: DecayNode.h:48

◆ getUniqueID()

int getUniqueID ( int  index) const

Returns the unique ID assigned to Particle with given index from the IndicesToUniqueID map.

If the Particle's index is not found in the map -1 is returned instead. If the map was never filled (inputListsCollide is false) 0 is returned.

Needed only for tests.

Definition at line 574 of file ParticleCombiner.cc.

◆ init() [1/2]

void init ( const std::vector< unsigned int > &  _sizes)

Initialises the generator to produce combinations with the given sizes of each particle list.

Parameters
_sizesthe sizes of the particle lists to combine

Definition at line 28 of file ParticleCombiner.cc.

◆ init() [2/2]

void init ( unsigned int  _numberOfLists)

Initialises the generator to produce the given type of sublist.

Parameters
_numberOfListsNumber of Particle Lists which shall be combined

Definition at line 80 of file ParticleCombiner.cc.

◆ initIndicesToUniqueIDMap()

void initIndicesToUniqueIDMap ( )
private

In the case input daughter particle lists collide (two or more lists contain copies of Particles) the Particle's Store Array index can not be longer used as its unique identifier, which is needed to check for uniqueness of accpeted combinations.

Instead unique identifier is created for all particles in the input particle lists and use those when checking for uniqueness of current combination.

Definition at line 235 of file ParticleCombiner.cc.

◆ inputListsCollide()

bool inputListsCollide ( const std::pair< unsigned, unsigned > &  pair) const

True if the pair of input lists collide.

Needed only for tests.

Definition at line 513 of file ParticleCombiner.cc.

◆ loadNext() [1/3]

bool loadNext ( )

Loads the next combination.

Returns false if there is no next combination

Definition at line 51 of file ParticleCombiner.cc.

◆ loadNext() [2/3]

bool loadNext ( )

Loads the next combination.

Returns false if there is no next combination

Definition at line 90 of file ParticleCombiner.cc.

◆ loadNext() [3/3]

bool loadNext ( bool  loadAntiParticle = true)

Loads the next combination.

Returns false if there is no next combination

Three cases are distinguished: First, particles matching the flavor specified in the decay string are used to form combinations. Secondly, the anti-particles of flavored particles are used, but only if requested. Lastly, self-conjugated particles are handled specifically.

Definition at line 326 of file ParticleCombiner.cc.

◆ loadNextParticle()

bool loadNextParticle ( bool  useAntiParticle)
private

Loads the next combination.

Returns false if there is no next combination

Definition at line 363 of file ParticleCombiner.cc.

◆ loadNextSelfConjugatedParticle()

bool loadNextSelfConjugatedParticle ( )
private

Loads the next combination.

Returns false if there is no next combination

Definition at line 407 of file ParticleCombiner.cc.

◆ operator==()

bool operator== ( const DecayNode node1,
const DecayNode node2 
)

Compare two Decay Nodes: They are equal if All daughter decay nodes are equal or one of the daughter lists is empty (which means "inclusive")

In particular the order of the daughter particles matter! 423 (--> 421 13) is not the same as 423 (--> 13 421)

Parameters
node1first node
node2second node

Definition at line 48 of file DecayNode.cc.

◆ ParticleGenerator() [1/2]

ParticleGenerator ( const DecayDescriptor decaydescriptor,
const std::string &  cutParameter = "" 
)
explicit

Initialises the generator to produce the given type of sublist.

Parameters
decaydescriptor
cutParameter

Definition at line 167 of file ParticleCombiner.cc.

◆ ParticleGenerator() [2/2]

ParticleGenerator ( const std::string &  decayString,
const std::string &  cutParameter = "" 
)
explicit

Initialises the generator to produce the given type of sublist.

Parameters
decayString
cutParameter

Definition at line 110 of file ParticleCombiner.cc.

◆ print_node()

std::string print_node ( unsigned int  indent = 0) const

Output a single node.

Used by to_string to convert tree into a string

Parameters
indent-ion level

Definition at line 30 of file DecayNode.cc.

◆ registerList() [1/2]

void registerList ( const DecayDescriptor decay,
bool  save = true 
)

Register a list using a decay descriptor.

Warning
should be called in initialize
Parameters
decaydecay descriptor to use for the list name
saveif true the list will be saved in the output file

Definition at line 27 of file ParticleListHelper.cc.

◆ registerList() [2/2]

void registerList ( const std::string &  listname,
bool  save = true 
)

Register a list by name.

Warning
should be called in initialize
Parameters
listnamefull list name in the form '{particlename}:{label}'
saveif true the list will be saved in the output file

Definition at line 18 of file ParticleListHelper.cc.