Belle II Software release-09-00-00
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 {
36
37 public:
38
44
46 virtual ~PhokharaInputModule();
47
49 virtual void generatorInitialize() override;
50
52 virtual void generatorEvent() override;
53
55 virtual void terminate() override;
56
57 protected:
58
66 int m_LO;
67 int m_NLO;
69 int m_QED;
71 int m_alpha;
78 int m_be_r;
80 double m_cmsEnergy = -1.0;
81 std::vector<double> m_ScatteringAngleRangePhoton;
89 double m_epsilon;
90 double m_beamres;
91 std::string m_ParameterFile;
98 template <typename T>
99 std::vector<T> make_vector(T const& t1, T const& t2);
101 template <typename T>
102 std::pair<T, T> vectorToPair(std::vector<T>& vec, const std::string& name = "");
103
104 private:
106 void initializeGenerator();
107
108 bool m_initialized{false};
113 };
115 template <typename T>
116 inline std::vector<T> PhokharaInputModule::make_vector(T const& t1, T const& t2)
117 {
118 std::vector<T> v;
119 v.push_back(t1);
120 v.push_back(t2);
121 return v;
122 }
123
124 template <typename T>
125 inline std::pair<T, T> PhokharaInputModule::vectorToPair(std::vector<T>& vec, const std::string& name)
126 {
127 std::pair<T, T> p;
128 if (vec.size() != 2) {
129 B2ERROR("The parameter " + name + " has to have exactly 2 elements !");
130 } else {
131 p.first = vec[0];
132 p.second = vec[1];
133 }
134 return p;
135 }
136
138} // 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.