Belle II Software development
ParticleStatsModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10#include <framework/core/Module.h>
11#include <framework/datastore/StoreArray.h>
12
13#include <analysis/DecayDescriptor/DecayDescriptor.h>
14#include <string>
15#include <TMatrix.h>
16
17namespace Belle2 {
26 class ParticleStatsModule : public Module {
27 private:
29 bool m_printPassMatrix = true;
31 int m_nPass = 0;
33 unsigned m_nLists = 0;
35 int m_nParticles = 0;
37 std::vector<std::string> m_strParticleLists;
39 TMatrix* m_PassMatrix = nullptr;
41 TMatrix* m_MultiplicityMatrix = nullptr;
47 std::string m_outputFile;
48
49 public:
53 virtual void initialize() override;
55 virtual void event() override;
57 virtual void terminate() override;
58 };
60} // end namespace Belle2
61
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Base class for Modules.
Definition: Module.h:72
This module summarises the ParticleLists in the event.
TMatrix * m_PassMatrix
Pass matrix for the particle lists.
TMatrix * m_MultiplicityMatrix
Particle multiplicities for the particle lists.
bool m_printPassMatrix
Shall we also calculate and print out the pass matrix?
virtual void initialize() override
Initialises the module.
virtual void event() override
Fill the particle stats matrices for each event.
std::string m_outputFile
Name of output file.
StoreArray< Particle > m_particles
StoreArray of Particles.
virtual void terminate() override
Print out the arrays as a table in B2INFO.
std::vector< std::string > m_strParticleLists
The particle lists to produce statistics about.
int m_nParticles
Count the total number of particles.
unsigned m_nLists
The number of particle lists.
int m_nPass
Number of events with Particle candidates.
DecayDescriptor m_decaydescriptor
Decay descriptor of the particle being selected.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.