Belle II Software  release-05-02-19
MCDecayFinderModule.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 *
7 * *
8 * This software is provided "as is" without any warranty. *
9 **************************************************************************/
10 
11 #pragma once
12 #include <framework/core/Module.h>
13 #include <analysis/modules/MCDecayFinder/DecayTree.h>
14 #include <analysis/DecayDescriptor/DecayDescriptor.h>
15 
16 namespace Belle2 {
24  class MCDecayFinderModule : public Module {
25  private:
26 
27  DecayDescriptor m_decaydescriptor;
28  std::string m_strDecay;
29  std::string m_listName;
30  std::string m_antiListName;
32  bool m_writeOut;
33  std::string m_particleStore;
35  public:
41  virtual void initialize() override;
43  virtual void event() override;
45  DecayTree<MCParticle>* match(const MCParticle* mcp, const DecayDescriptor* d, bool isCC);
49  void appendParticles(const MCParticle* gen, std::vector<const MCParticle*>& children);
52  };
54 }
Belle2::MCDecayFinderModule::m_listName
std::string m_listName
Name of output particle list.
Definition: MCDecayFinderModule.h:37
Belle2::MCDecayFinderModule::write
int write(DecayTree< MCParticle > *decay)
Create Particle from matched MCParticle and write to Particle list.
Definition: MCDecayFinderModule.cc:233
Belle2::MCDecayFinderModule::m_antiListName
std::string m_antiListName
Name of output anti-particle list.
Definition: MCDecayFinderModule.h:38
Belle2::MCDecayFinderModule::MCDecayFinderModule
MCDecayFinderModule()
Constructor.
Definition: MCDecayFinderModule.cc:31
Belle2::DecayTree
This is a helper class for the MCDecayFinderModule.
Definition: DecayTree.h:30
Belle2::MCDecayFinderModule::match
DecayTree< MCParticle > * match(const MCParticle *mcp, const DecayDescriptor *d, bool isCC)
Search for MCParticles matching the given DecayString.
Definition: MCDecayFinderModule.cc:104
Belle2::MCDecayFinderModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of decays to look for.
Definition: MCDecayFinderModule.h:35
Belle2::MCDecayFinderModule::m_writeOut
bool m_writeOut
toggle output particle list btw.
Definition: MCDecayFinderModule.h:40
Belle2::MCDecayFinderModule::appendParticles
void appendParticles(const MCParticle *gen, std::vector< const MCParticle * > &children)
Recursively gather all MC daughters of gen.
Definition: MCDecayFinderModule.cc:257
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::MCDecayFinderModule::getNDaughtersRecursive
int getNDaughtersRecursive(const DecayDescriptor *d)
Recursively get number of daughters of given DecayDescriptor.
Definition: MCDecayFinderModule.cc:269
Belle2::MCDecayFinderModule::~MCDecayFinderModule
~MCDecayFinderModule()
Destructor.
Definition: MCDecayFinderModule.h:47
Belle2::MCDecayFinderModule::m_particleStore
std::string m_particleStore
name of Particle store array
Definition: MCDecayFinderModule.h:41
Belle2::DecayDescriptor
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Definition: DecayDescriptor.h:43
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:43
Belle2::MCDecayFinderModule::m_isSelfConjugatedParticle
bool m_isSelfConjugatedParticle
Is the particle list for a self-conjugated particle.
Definition: MCDecayFinderModule.h:39
Belle2::MCDecayFinderModule::event
virtual void event() override
Method called for each event.
Definition: MCDecayFinderModule.cc:72
Belle2::MCDecayFinderModule::m_strDecay
std::string m_strDecay
Decay string to build the decay descriptor.
Definition: MCDecayFinderModule.h:36
Belle2::MCDecayFinderModule::initialize
virtual void initialize() override
Initialises the module.
Definition: MCDecayFinderModule.cc:42