Belle II Software development
SVDVariablesToStorageModule.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
11#include <framework/core/Module.h>
12#include <reconstruction/persistenceManager/PersistenceManager.h>
13
18struct Counters {
19 int event;
20 int run;
23 int track;
24 int cluster;
25 unsigned int nClusters;
26};
27
28namespace Belle2::SVD {
29
30 namespace VPM = Belle2::VariablePersistenceManager;
31
41 public:
46
50 virtual ~SVDVariablesToStorageModule() = default;
51
58 virtual void initialize() override;
59
66 virtual void event() override;
67
74 virtual void terminate() override;
75
76 private:
77 std::string m_fileName;
78 std::string m_containerName;
79 std::string m_particleListName;
80
81 std::vector<std::string> m_variablesToNtuple;
82 std::vector<std::tuple<std::string, int, float, float>>
84 std::vector<std::string> m_variableNames;
85
86 std::unique_ptr<VPM::PersistenceManager> persistenceManager;
87 };
88
89} // namespace Belle2::SVD
Module()
Constructor.
Definition Module.cc:30
std::string m_particleListName
The name of the particle list to use for analysis (if applicable).
std::vector< std::tuple< std::string, int, float, float > > m_variablesToHistogram
List of (variableName, nBins, lowBin, highBin) defining histograms.
virtual void initialize() override
Initializes the module.
std::vector< std::string > m_variableNames
List of variable names for reference.
std::unique_ptr< VPM::PersistenceManager > persistenceManager
Manages the persistence of data (e.g., writing to file).
virtual void event() override
Processes each event in the main event loop.
virtual void terminate() override
Performs finalization steps after all events have been processed.
std::string m_containerName
The name of the container storing SVD data (e.g., clusters).
std::string m_fileName
The output file name for storing results (e.g., root file).
virtual ~SVDVariablesToStorageModule()=default
Destructor (default).
std::vector< std::string > m_variablesToNtuple
List of variables to store in an ntuple.
SVDVariablesToStorageModule()
Constructs the SVDVariablesToStorageModule and sets default parameter values.
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
Holds various counters for tracking event, run, and cluster data.
int experiment
Experiment number.
int production
Production number.
int cluster
Cluster number.
int event
Event number.
int track
Track number.
unsigned int nClusters
Total number of clusters.