Belle II Software development
PhokharaInputModule.h
1
2/**************************************************************************
3 * basf2 (Belle II Analysis Software Framework) *
4 * Author: The Belle II Collaboration *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9
10#pragma once
11
12#include <framework/logging/Logger.h>
13
14#include <generators/modules/GeneratorBaseModule.h>
15#include <generators/phokhara/Phokhara.h>
16#include <generators/utilities/InitialParticleGeneration.h>
17
18#include <mdst/dataobjects/MCParticleGraph.h>
19
20#include <vector>
21
22namespace Belle2 {
33
34 public:
35
41
43 virtual ~PhokharaInputModule();
44
46 virtual void generatorInitialize() override;
47
49 virtual void generatorEvent() override;
50
52 virtual void terminate() override;
53
54 protected:
55
63 int m_LO;
64 int m_NLO;
66 int m_QED;
68 int m_alpha;
75 int m_be_r;
77 double m_cmsEnergy = -1.0;
78 std::vector<double> m_ScatteringAngleRangePhoton;
86 double m_epsilon;
87 double m_beamres;
88 std::string m_ParameterFile;
95 template <typename T>
96 std::vector<T> make_vector(T const& t1, T const& t2);
98 template <typename T>
99 std::pair<T, T> vectorToPair(std::vector<T>& vec, const std::string& name = "");
100
101 private:
103 void initializeGenerator();
104
105 bool m_initialized{false};
110 };
112 template <typename T>
113 inline std::vector<T> PhokharaInputModule::make_vector(T const& t1, T const& t2)
114 {
115 std::vector<T> v;
116 v.push_back(t1);
117 v.push_back(t2);
118 return v;
119 }
120
121 template <typename T>
122 inline std::pair<T, T> PhokharaInputModule::vectorToPair(std::vector<T>& vec, const std::string& name)
123 {
124 std::pair<T, T> p;
125 if (vec.size() != 2) {
126 B2ERROR("The parameter " + name + " has to have exactly 2 elements !");
127 } else {
128 p.first = vec[0];
129 p.second = vec[1];
130 }
131 return p;
132 }
133
135} // end namespace Belle2
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.
The Phokhara Generator module.vectorToPair.
double m_beamres
beam resolution for chi2 studies
int m_pionstructure
for pi+pi- only: f0+f0(600): K+K- model(0), "no structure" model(1), no f0+f0(600)(2),...
int m_LO
LO: ph0 Born: 1ph(0), Born: 0ph(1), only Born: 0ph(-1)
std::vector< double > m_ScatteringAngleRangePhoton
Minimal/Maximal photon angle/missing momentum angle.
bool m_ForceMinInvMassHadronsCut
Force application of the above cut.
int m_finalState
Module parameters.
int m_QED
ISR only(0), ISR+FSR(1), ISR+INT+FSR(2)
DBObjPtr< BeamParameters > m_beamParams
BeamParameter.
bool m_initialized
True if generator has been initialized.
int m_narres
narr_res: no narrow resonances (0), J/psi (1) and psi(2S) (2) only for m_finalState = 0,...
int m_alpha
vacuum polarization switch: off (0), on (1,[by Fred Jegerlehner]), on (2,[by Thomas Teubner])
int m_chi_sw
chi_sw: Radiative return(0), Chi production(1), Radiative return + Chi production (2)
double m_epsilon
Soft/hard photon separator.
int m_pionff
FF_pion: KS PionFormFactor(0),GS old (1),GS new (2)
virtual ~PhokharaInputModule()
Destructor.
virtual void terminate() override
Method is called at the end of the event processing.
int m_protonff
ProtonFormFactor old(0), ProtonFormFactor new(1)
int m_IFSNLO
IFSNLO: no(0), yes(1)
int m_nSearchMax
Events used to search maximum of differential cross section.
int m_nMaxTrials
Events before loop is aborted.
int m_be_r
be_r: without beam resolution(0), with beam resolution(1)
virtual void generatorInitialize() override
Initializes the module.
double m_MinInvMassHadronsGamma
m_MinInvMassHadronsGamma [GeV^2].
std::string m_ParameterFile
file that holds all resonance parameters
MCParticleGraph m_mcGraph
The MCParticle graph object.
std::vector< double > m_ScatteringAngleRangeFinalStates
Minimal/Maximal pions(muons,nucleons,kaons) momentum angle.
int m_kaonff
FF_kaon: KaonFormFactor constrained(0), KaonFormFactor unconstrained(1) KaonFormFactor old(2)
InitialParticleGeneration m_initial
initial particle used by BeamParameter class
int m_weighted
generate weighted events
int m_NLO
1 photon : Born(0), NLO(1)
double m_MaxInvMassHadrons
m_MaxInvMassHadrons [GeV^2]
int m_fullNLO
full NLO : No(0), Yes(1)
double m_MinEnergyGamma
m_MinEnergyGamma [GeV].
double m_MinInvMassHadrons
m_MinInvMassHadrons [GeV^2].
void initializeGenerator()
Method is called to initialize the generator.
bool m_BeamEnergySpread
Simulate beam-energy spread.
virtual void generatorEvent() override
Method is called for each event.
bool m_replaceMuonsByVirtualPhoton
Replace muons by a virtual photon.
C++ Interface for the Fortran generator PHOKHARA.
Definition: Phokhara.h:27
std::pair< T, T > vectorToPair(std::vector< T > &vec, const std::string &name="")
std::vector< T > make_vector(T const &t1, T const &t2)
make_vector.
Abstract base class for different kinds of events.