Belle II Software  release-06-00-14
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 #ifndef PHOKHARAINPUTMODULE_H
11 #define PHOKHARAINPUTMODULE_H
12 
13 #include <framework/core/Module.h>
14 #include <framework/logging/Logger.h>
15 
16 #include <generators/phokhara/Phokhara.h>
17 #include <generators/utilities/InitialParticleGeneration.h>
18 
19 #include <mdst/dataobjects/MCParticleGraph.h>
20 
21 #include <vector>
22 
23 namespace Belle2 {
36  class PhokharaInputModule : public Module {
37 
38  public:
39 
45 
47  virtual ~PhokharaInputModule();
48 
50  virtual void initialize() override;
51 
53  virtual void event() override;
54 
56  virtual void terminate() override;
57 
58  protected:
59 
66  int m_weighted;
67  int m_LO;
68  int m_NLO;
69  int m_fullNLO;
70  int m_QED;
71  int m_IFSNLO;
72  int m_alpha;
73  int m_pionff;
75  int m_kaonff;
76  int m_narres;
77  int m_protonff;
78  int m_chi_sw;
79  int m_be_r;
81  double m_cmsEnergy = -1.0;
82  std::vector<double> m_ScatteringAngleRangePhoton;
83  std::vector<double> m_ScatteringAngleRangeFinalStates;
90  double m_epsilon;
91  double m_beamres;
92  std::string m_ParameterFile;
99  template <typename T>
100  std::vector<T> make_vector(T const& t1, T const& t2);
102  template <typename T>
103  std::pair<T, T> vectorToPair(std::vector<T>& vec, const std::string& name = "");
104 
105  private:
107  void initializeGenerator();
108 
109  bool m_initialized{false};
114  };
116  template <typename T>
117  inline std::vector<T> PhokharaInputModule::make_vector(T const& t1, T const& t2)
118  {
119  std::vector<T> v;
120  v.push_back(t1);
121  v.push_back(t2);
122  return v;
123  }
124 
125  template <typename T>
126  inline std::pair<T, T> PhokharaInputModule::vectorToPair(std::vector<T>& vec, const std::string& name)
127  {
128  std::pair<T, T> p;
129  if (vec.size() != 2) {
130  B2ERROR("The parameter " + name + " has to have exactly 2 elements !");
131  } else {
132  p.first = vec[0];
133  p.second = vec[1];
134  }
135  return p;
136  }
137 
139 } // end namespace Belle2
140 
141 #endif /* PHOKHARAINPUTMODULE_H */
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to build, validate and sort a particle decay chain.
Base class for Modules.
Definition: Module.h:72
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.
virtual void initialize() override
Initializes the module.
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])
virtual void event() override
Method is called for each event.
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)
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.
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.