Belle II Software development
TrepsInputModule.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/datastore/StoreArray.h>
12
13#include <generators/modules/GeneratorBaseModule.h>
14#include <generators/treps/Treps3B.h>
15#include <generators/treps/UtrepsB.h>
16
17#include <mdst/dataobjects/MCParticle.h>
18#include <mdst/dataobjects/MCParticleGraph.h>
19#include <generators/utilities/InitialParticleGeneration.h>
20#include <string>
21
22namespace Belle2 {
31
32 public:
37
39 virtual void generatorInitialize() override;
40
42 virtual void terminate() override;
43
45 virtual void generatorEvent() override;
46
48 double simulateW();
49
51 double getCrossSection(double W);
52
55
56 private:
57
59 UtrepsB m_generator;
60
62 std::string m_parameterFile;
63
65 std::string m_wListTableFile;
66
69
85
91
94
97
103
104 bool m_initialized{false};
106 };
108}
109
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
The base module for generator modules, which sets the generator information as EventExtraInfo.
Class to build, validate and sort a particle decay chain.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Input from TREPS generator for ee->eeff.
std::string m_parameterFile
Parameter file which configures the setting of beam, production particle etc.
UtrepsB m_generator
Treps generator.
std::string m_differentialCrossSectionFile
Differential cross section table file.
double m_maximalQ2
Maximal Q^2 = -q^2, where q is the difference between the initial and final electron or positron mome...
DBObjPtr< BeamParameters > m_beamParams
BeamParameter.
bool m_initialized
True if generator has been initialized.
double getCrossSection(double W)
Returns the differential cross section for given W [GeV].
bool m_useDiscreteAndSortedW
if it is true, W-list table is used for discrete and sorted W
double m_minimalTransverseMomentum
Minimal transverse momentum of the final-state particles.
StoreArray< MCParticle > m_mcparticles
MCParticle collection.
virtual void terminate() override
initialization for trepsinput
bool m_applyCosThetaCutCharged
Whether to apply cut on |cos(theta)| for charged particles only.
virtual void generatorInitialize() override
initialization for trepsinput
double simulateW()
Simulate W distribution according to given input file of cross section table.
TrepsInputModule()
Constructor: Sets the description, the properties and the parameters of the module.
double m_maximalAbsCosTheta
Maximal |cos(theta)|, where theta is the final-state particle polar angle.
InitialParticleGeneration m_initial
initial particle used by BeamParameter class
MCParticleGraph m_mpg
An instance of the MCParticle graph.
std::string m_wListTableFile
W-List table file.
void initializeGenerator()
Initialize the TREPS generator
bool m_applyTransverseMomentumCutCharged
Whether to apply cut on the minimal transverse momentum for charged particles only.
virtual void generatorEvent() override
input event from TREPS
Abstract base class for different kinds of events.