Belle II Software development
BelleMCOutputModule.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/* Basf2 headers. */
12#include <framework/core/Module.h>
13#include <framework/database/DBObjPtr.h>
14#include <framework/dataobjects/EventMetaData.h>
15#include <framework/dataobjects/MCInitialParticles.h>
16#include <framework/datastore/StoreArray.h>
17#include <framework/datastore/StoreObjPtr.h>
18#include <framework/dbobjects/BeamParameters.h>
19#include <mdst/dataobjects/MCParticle.h>
20#include <mdst/dataobjects/MCParticleGraph.h>
21
22/* Belle headers. */
23#include <belle_legacy/panther/panther_group.h>
24
25namespace Belle2 {
34 class BelleMCOutputModule : public Module {
35
36 public:
37
42
46 virtual ~BelleMCOutputModule();
47
51 virtual void initialize() override;
52
56 virtual void beginRun() override;
57
61 virtual void event() override;
62
66 virtual void endRun() override;
67
71 virtual void terminate() override;
72
73 private:
74
81 void addParticle(const MCParticle* particle,
83
85 std::string m_OutputFileName;
86
89
92
95
98
101
104
107
109 Belle::Panther_FileIO* m_BelleFile = nullptr;
110
111 };
112
114}
KLM digitization module.
void addParticle(const MCParticle *particle, MCParticleGraph::GraphParticle *mother)
Add particle to graph.
StoreObjPtr< MCInitialParticles > m_MCInitialParticles
Initial particles.
virtual void initialize() override
Initializer.
bool m_DecayKsInGenerator
Decay K_S0 in generator.
virtual void event() override
This method is called for each event.
Belle::Panther_FileIO * m_BelleFile
Belle file input-output handler.
virtual void endRun() override
This method is called if the current run ends.
virtual void terminate() override
This method is called at the end of the event processing.
virtual void beginRun() override
Called when entering a new run.
DBObjPtr< BeamParameters > m_BeamParameters
Beam parameters.
virtual ~BelleMCOutputModule()
Destructor.
bool m_DecayLambdaInGenerator
Decay Lambda in generator.
std::string m_OutputFileName
Output file name.
StoreObjPtr< EventMetaData > m_EventMetaData
Event metadata.
StoreArray< MCParticle > m_MCParticles
MC particles.
MCParticleGraph m_MCParticleGraph
MC particle graph.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to represent Particle data in graph.
Class to build, validate and sort a particle decay chain.
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.