Belle II Software  release-06-02-00
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  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  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  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  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  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 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.
 
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< TVector3 > &p3_cms_all, const std::vector< TVector3 > &p3_cms_roe, const TVector3 &thrustB, bool calc_CleoCones_with_all, bool calc_CleoCones_with_roe)
 Constructor.
 
 KsfwMoments (double Hso0_max, std::vector< std::pair< TVector3, int >> p3_cms_q_sigA, std::vector< std::pair< TVector3, int >> p3_cms_q_sigB, std::vector< std::pair< TVector3, int >> p3_cms_q_roe, const TLorentzVector &p_cms_missA, const TLorentzVector &p_cms_missB, 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.

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 473 of file ParticleCombiner.cc.

474  {
475  std::vector<Particle*> stack = m_particles;
476  static std::vector<int> sources; // stack for particle sources
477  sources.clear();
478 
479  // recursively check all daughters and daughters of daughters
480  while (!stack.empty()) {
481  Particle* p = stack.back();
482  stack.pop_back();
483  const std::vector<int>& daughters = p->getDaughterIndices();
484 
485  if (daughters.empty()) {
486  int source = p->getMdstSource();
487  for (int i : sources) {
488  if (source == i) return false;
489  }
490  sources.push_back(source);
491  } else {
492  for (int daughter : daughters) stack.push_back(m_particleArray[daughter]);
493  }
494  }
495  return true;
496  }
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 521 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 499 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 285 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 573 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 26 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 78 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 233 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 512 of file ParticleCombiner.cc.

◆ loadNext() [1/3]

bool loadNext ( )

Loads the next combination.

Returns false if there is no next combination

Definition at line 49 of file ParticleCombiner.cc.

◆ loadNext() [2/3]

bool loadNext ( )

Loads the next combination.

Returns false if there is no next combination

Definition at line 88 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 324 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 361 of file ParticleCombiner.cc.

◆ loadNextSelfConjugatedParticle()

bool loadNextSelfConjugatedParticle ( )
private

Loads the next combination.

Returns false if there is no next combination

Definition at line 405 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 165 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 108 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.