Belle II Software light-2406-ragdoll
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 {
29 class ParticleStatsModule : public Module {
30 private:
32 bool m_printPassMatrix = true;
34 int m_nPass = 0;
36 unsigned m_nLists = 0;
38 int m_nParticles = 0;
40 std::vector<std::string> m_strParticleLists;
42 TMatrix* m_PassMatrix = nullptr;
44 TMatrix* m_MultiplicityMatrix = nullptr;
50 std::string m_outputFile;
51
52 public:
56 virtual void initialize() override;
58 virtual void event() override;
60 virtual void terminate() override;
61 };
63} // end namespace Belle2
64
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.
Definition: ClusterUtils.h:24