Belle II Software  release-05-02-19
PhokharaInputModule.h
1 
2 /**************************************************************************
3  * BASF2 (Belle Analysis Framework 2) *
4  * Copyright(C) 2014 Belle II Collaboration *
5  * *
6  * Author: The Belle II Collaboration *
7  * Contributors: Torben Ferber *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #ifndef PHOKHARAINPUTMODULE_H
13 #define PHOKHARAINPUTMODULE_H
14 
15 #include <framework/core/Module.h>
16 #include <framework/logging/Logger.h>
17 
18 #include <generators/phokhara/Phokhara.h>
19 #include <generators/utilities/InitialParticleGeneration.h>
20 
21 #include <mdst/dataobjects/MCParticleGraph.h>
22 
23 #include <vector>
24 
25 namespace Belle2 {
38  class PhokharaInputModule : public Module {
39 
40  public:
41 
47 
49  virtual ~PhokharaInputModule();
50 
52  virtual void initialize() override;
53 
55  virtual void event() override;
56 
58  virtual void terminate() override;
59 
60  protected:
61 
63  int m_finalState;
65  int m_nMaxTrials;
66  int m_nSearchMax;
68  int m_LO;
69  int m_NLO;
70  int m_QED;
71  int m_NLOIFI;
72  int m_alpha;
73  int m_pionff;
75  int m_kaonff;
76  int m_narres;
77  int m_protonff;
79  double m_cmsEnergy = -1.0;
80  std::vector<double> m_ScatteringAngleRangePhoton;
81  std::vector<double> m_ScatteringAngleRangeFinalStates;
86  double m_MinEnergyGamma;
88 // int m_finalState; /**< Final state: mu+mu-(0), pi+pi-(1), 2pi0pi+pi-(2), 2pi+2pi-(3), ppbar(4), nnbar(5), K+K-(6), K0K0bar(7), pi+pi-pi0(8), lamb(->pi-p)lambbar(->pi+pbar)(9), eta pi+ pi- (10) */
89  double m_epsilon;
90  std::string m_ParameterFile;
91 // std::string m_InputFile; /**< file that holds all input parameters - NOT USED IN BELLE II IMPLEMENTATION!!!*/
99 // TFile* m_fileExtraInfo;
100 // TH1D* m_th1dSDif;
101 
102  template <typename T>
103  std::vector<T> make_vector(T const& t1, T const& t2);
105  template <typename T>
106  std::pair<T, T> vectorToPair(std::vector<T>& vec, const std::string& name = "");
107 
108  private:
110  void initializeGenerator();
111 
112  bool m_initialized{false};
117  };
119  template <typename T>
120  inline std::vector<T> PhokharaInputModule::make_vector(T const& t1, T const& t2)
121  {
122  std::vector<T> v;
123  v.push_back(t1);
124  v.push_back(t2);
125  return v;
126  }
127 
128  template <typename T>
129  inline std::pair<T, T> PhokharaInputModule::vectorToPair(std::vector<T>& vec, const std::string& name)
130  {
131  std::pair<T, T> p;
132  if (vec.size() != 2) {
133  B2ERROR("The parameter " + name + " has to have exactly 2 elements !");
134  } else {
135  p.first = vec[0];
136  p.second = vec[1];
137  }
138  return p;
139  }
140 
142 } // end namespace Belle2
143 
144 #endif /* PHOKHARAINPUTMODULE_H */
Belle2::PhokharaInputModule::m_kaonff
int m_kaonff
FF_kaon: KaonFormFactor constrained(0), KaonFormFactor unconstrained(1) KaonFormFactor old(2)
Definition: PhokharaInputModule.h:83
Belle2::PhokharaInputModule::m_ParameterFile
std::string m_ParameterFile
file that holds all resonance parameters
Definition: PhokharaInputModule.h:98
Belle2::PhokharaInputModule::m_generator
Phokhara m_generator
Variables.
Definition: PhokharaInputModule.h:103
Belle2::PhokharaInputModule::m_NLOIFI
int m_NLOIFI
IFSNLO: no(0), yes(1)
Definition: PhokharaInputModule.h:79
Belle2::Phokhara
C++ Interface for the Fortran generator Phokhara.
Definition: Phokhara.h:37
Belle2::PhokharaInputModule::m_mcGraph
MCParticleGraph m_mcGraph
The MCParticle graph object.
Definition: PhokharaInputModule.h:104
Belle2::PhokharaInputModule::m_nSearchMax
int m_nSearchMax
Events used to search maximum of differential cross section.
Definition: PhokharaInputModule.h:74
Belle2::PhokharaInputModule::m_ScatteringAngleRangeFinalStates
std::vector< double > m_ScatteringAngleRangeFinalStates
Minimal/Maximal pions(muons,nucleons,kaons) momentum angle.
Definition: PhokharaInputModule.h:89
Belle2::PhokharaInputModule::m_ScatteringAngleRangePhoton
std::vector< double > m_ScatteringAngleRangePhoton
Minimal/Maximal photon angle/missing momentum angle.
Definition: PhokharaInputModule.h:88
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition: MCParticleGraph.h:48
Belle2::PhokharaInputModule::m_cmsEnergy
double m_cmsEnergy
CMS energy.
Definition: PhokharaInputModule.h:87
Belle2::PhokharaInputModule::m_replaceMuonsByVirtualPhoton
bool m_replaceMuonsByVirtualPhoton
Replace muons by a virtual photon.
Definition: PhokharaInputModule.h:72
Belle2::PhokharaInputModule::m_QED
int m_QED
ISR only(0), ISR+FSR(1), ISR+INT+FSR(2)
Definition: PhokharaInputModule.h:78
Belle2::PhokharaInputModule::m_alpha
int m_alpha
vacuum polarization switch: off (0), on (1,[by Fred Jegerlehner]), on (2,[by Thomas Teubner])
Definition: PhokharaInputModule.h:80
Belle2::PhokharaInputModule::m_epsilon
double m_epsilon
Soft/hard photon separator.
Definition: PhokharaInputModule.h:97
Belle2::PhokharaInputModule::m_BeamEnergySpread
bool m_BeamEnergySpread
Simulate beam-energy spread.
Definition: PhokharaInputModule.h:100
Belle2::PhokharaInputModule::m_initialized
bool m_initialized
True if generator has been initialized.
Definition: PhokharaInputModule.h:120
Belle2::PhokharaInputModule::terminate
virtual void terminate() override
Method is called at the end of the event processing.
Definition: PhokharaInputModule.cc:171
Belle2::PhokharaInputModule::m_ForceMinInvMassHadronsCut
bool m_ForceMinInvMassHadronsCut
Force application of the above cut.
Definition: PhokharaInputModule.h:92
Belle2::PhokharaInputModule::~PhokharaInputModule
virtual ~PhokharaInputModule()
Destructor.
Definition: PhokharaInputModule.cc:86
Belle2::InitialParticleGeneration
Generate Collision.
Definition: InitialParticleGeneration.h:35
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::PhokharaInputModule::PhokharaInputModule
PhokharaInputModule()
Constructor.
Definition: PhokharaInputModule.cc:28
Belle2::PhokharaInputModule::m_narres
int m_narres
narr_res: no narrow resonances (0), J/psi (1) and psi(2S) (2) only for m_finalState = 0,...
Definition: PhokharaInputModule.h:84
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PhokharaInputModule::event
virtual void event() override
Method is called for each event.
Definition: PhokharaInputModule.cc:130
Belle2::PhokharaInputModule::m_pionff
int m_pionff
FF_pion: KS PionFormFactor(0),GS old (1),GS new (2)
Definition: PhokharaInputModule.h:81
Belle2::PhokharaInputModule::make_vector
std::vector< T > make_vector(T const &t1, T const &t2)
Variables.
Definition: PhokharaInputModule.h:128
Belle2::PhokharaInputModule::m_MinInvMassHadronsGamma
double m_MinInvMassHadronsGamma
m_MinInvMassHadronsGamma [GeV^2].
Definition: PhokharaInputModule.h:90
Belle2::PhokharaInputModule::initializeGenerator
void initializeGenerator()
Method is called to initialize the generator.
Definition: PhokharaInputModule.cc:177
Belle2::PhokharaInputModule::initialize
virtual void initialize() override
Initializes the module.
Definition: PhokharaInputModule.cc:94
Belle2::PhokharaInputModule::m_MaxInvMassHadrons
double m_MaxInvMassHadrons
m_MaxInvMassHadrons [GeV^2]
Definition: PhokharaInputModule.h:93
Belle2::PhokharaInputModule::m_beamParams
DBObjPtr< BeamParameters > m_beamParams
BeamParameter.
Definition: PhokharaInputModule.h:121
Belle2::PhokharaInputModule::vectorToPair
std::pair< T, T > vectorToPair(std::vector< T > &vec, const std::string &name="")
Definition: PhokharaInputModule.h:137
Belle2::PhokharaInputModule::m_LO
int m_LO
LO: 1ph(0, default), Born: 0ph(1), only Born: 0ph(-1)
Definition: PhokharaInputModule.h:76
Belle2::PhokharaInputModule::m_nMaxTrials
int m_nMaxTrials
Events before loop is aborted.
Definition: PhokharaInputModule.h:73
Belle2::PhokharaInputModule::m_finalState
int m_finalState
Module parameters.
Definition: PhokharaInputModule.h:71
Belle2::PhokharaInputModule::m_MinEnergyGamma
double m_MinEnergyGamma
m_MinEnergyGamma [GeV].
Definition: PhokharaInputModule.h:94
Belle2::PhokharaInputModule::m_pionstructure
int m_pionstructure
for pi+pi- only: f0+f0(600): K+K- model(0), "no structure" model(1), no f0+f0(600)(2),...
Definition: PhokharaInputModule.h:82
Belle2::PhokharaInputModule::m_initial
InitialParticleGeneration m_initial
initial particle used by BeamParameter class
Definition: PhokharaInputModule.h:123
Belle2::PhokharaInputModule::m_MinInvMassHadrons
double m_MinInvMassHadrons
m_MinInvMassHadrons [GeV^2].
Definition: PhokharaInputModule.h:91
Belle2::PhokharaInputModule::m_NLO
int m_NLO
NLO, for 1ph only: off (0, default), on (1)
Definition: PhokharaInputModule.h:77
Belle2::PhokharaInputModule::m_protonff
int m_protonff
ProtonFormFactor old(0), ProtonFormFactor new(1)
Definition: PhokharaInputModule.h:85