Belle II Software development
Phokhara.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 <mdst/dataobjects/MCParticleGraph.h>
12#include <Math/LorentzRotation.h>
13#include <Math/Vector3D.h>
14#include <utility>
15
16namespace Belle2 {
27 class Phokhara {
28 public:
29
33 Phokhara();
34
36 ~Phokhara();
37
39 void setDefaultSettings();
40
44 void setLO(int LO) { m_LO = LO; }
45
49 void setWeighted(int weighted) { m_weighted = weighted; }
50
54 void setNLO(int NLO) { m_NLO = NLO; }
55
59 void setFullNLO(int FullNLO) { m_fullNLO = FullNLO; }
60
64 void setQED(int QED) { m_QED = QED; }
65
69 void setIFSNLO(int IFSNLO) { m_IFSNLO = IFSNLO; }
70
74 void setAlpha(int alpha) { m_alpha = alpha; }
75
79 void setPionFF(int pionff) { m_pionff = pionff; }
80
84 void setKaonFF(int kaonff) { m_kaonff = kaonff; }
85
89 void setPionStructure(int pionstructure) { m_pionstructure = pionstructure; }
90
94 void setNarrowRes(int narres) { m_narres = narres; }
95
99 void setProtonFF(int protonff) { m_protonff = protonff; }
100
104 void setChiSW(int chisw) { m_chi_sw = chisw; }
105
109 void setSwitchBeamResolution(int be_r) { m_be_r = be_r; }
110
114 void setBeamResolution(double beamres) { m_beamres = beamres; }
115
119 void setScatteringAngleRangePhoton(std::pair<double, double> angleRange) { m_ScatteringAngleRangePhoton = angleRange; }
120
124 void setScatteringAngleRangeFinalStates(std::pair<double, double> angleRange) { m_ScatteringAngleRangeFinalStates = angleRange; }
125
129 void setMinInvMassHadronsGamma(double MinInvMassHadronsGamma) { m_MinInvMassHadronsGamma = MinInvMassHadronsGamma; }
130
134 void setm_MinInvMassHadrons(double MinInvMassHadrons) { m_MinInvMassHadrons = MinInvMassHadrons; }
135
140 void setForceMinInvMassHadronsCut(bool forceMinInvMassHadronsCut)
141 { m_ForceMinInvMassHadronsCut = forceMinInvMassHadronsCut; }
142
146 void setm_MaxInvMassHadrons(double MaxInvMassHadrons) { m_MaxInvMassHadrons = MaxInvMassHadrons; }
147
151 void setMinEnergyGamma(double MinEnergyGamma) { m_MinEnergyGamma = MinEnergyGamma; }
152
156 void setCMSEnergy(double cmsEnergy) { m_cmsEnergy = cmsEnergy; }
157
161 void setNSearchMax(int nSearchMax) { m_nSearchMax = nSearchMax; }
162
166 void setEpsilon(double epsilon) { m_epsilon = epsilon; }
167
171 void setFinalState(int finalState) { m_finalState = finalState; }
172
176 void setReplaceMuonsByVirtualPhoton(bool replaceMuonsByVirtualPhoton)
177 { m_replaceMuonsByVirtualPhoton = replaceMuonsByVirtualPhoton; }
178
182 void setNMaxTrials(int nMaxTrials) { m_nMaxTrials = nMaxTrials; }
183
187 void init(const std::string& paramFile);
188
194 double generateEvent(MCParticleGraph& mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost);
195
200 void term();
201
202 protected:
203 //constants (unused in PHOKHARA yet!!!!!!!!!!!!!!)
204 double m_pi;
206 double m_alphaQED0;
208 double m_massMuon;
209 double m_massW;
210 double m_massZ;
211 double m_widthZ;
213 //PHOKHARA
218 double m_cmsEnergy;
219 double m_epsilon;
221 int m_LO;
222 int m_NLO;
224 int m_QED;
233 int m_be_r;
235 std::pair<double, double> m_ScatteringAngleRangePhoton;
236 std::pair<double, double> m_ScatteringAngleRangeFinalStates;
242 double m_beamres;
247 void applySettings();
248
258 void storeParticle(MCParticleGraph& mcGraph, const double* mom, int pdg, ROOT::Math::XYZVector vertex,
259 ROOT::Math::LorentzRotation boost,
260 bool isVirtual = false, bool isInitial = false);
261
262 private:
263
264 int m_npar[100];
265 double m_xpar[100];
266 };
268}
Class to build, validate and sort a particle decay chain.
C++ Interface for the Fortran generator PHOKHARA.
Definition: Phokhara.h:27
double m_beamres
beam resolution for chi2 studies
Definition: Phokhara.h:242
void setWeighted(int weighted)
Sets weighted mode.
Definition: Phokhara.h:49
int m_pionstructure
for pi+pi- only: f0+f0(600): K+K- model(0), "no structure" model(1), no f0+f0(600)(2),...
Definition: Phokhara.h:228
void setm_MinInvMassHadrons(double MinInvMassHadrons)
Sets the minimal inv.
Definition: Phokhara.h:134
int m_LO
LO: 1ph(0, default), Born: 0ph(1), only Born: 0ph(-1)
Definition: Phokhara.h:221
double m_alphaQED0
QED coupling constant at Q=0.
Definition: Phokhara.h:206
bool m_ForceMinInvMassHadronsCut
Force application of the above cut.
Definition: Phokhara.h:239
int m_finalState
final state, called 'pion' in Phokhara, dont get confused.
Definition: Phokhara.h:214
int m_npar[100]
Integer parameters for PHOKHARA.
Definition: Phokhara.h:264
double m_conversionFactor
Conversion factor for hbarc to nb.
Definition: Phokhara.h:205
std::pair< double, double > m_ScatteringAngleRangeFinalStates
Minimal/Maximal pions(muons,nucleons,kaons) momentum angle.
Definition: Phokhara.h:236
int m_QED
ISR only(0), ISR+FSR(1), ISR+INT+FSR(2)
Definition: Phokhara.h:224
void setNarrowRes(int narres)
Sets narrow resonances.
Definition: Phokhara.h:94
void setLO(int LO)
Sets LO correction mode.
Definition: Phokhara.h:44
void storeParticle(MCParticleGraph &mcGraph, const double *mom, int pdg, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost, bool isVirtual=false, bool isInitial=false)
Store a single generated particle into the MonteCarlo graph.
Definition: Phokhara.cc:344
void setDefaultSettings()
Sets the default settings for the PHOKHARA generator.
Definition: Phokhara.cc:98
Phokhara()
Constructor.
Definition: Phokhara.cc:83
int m_narres
narr_res: no narrow resonances (0), J/psi (1) and psi(2S) (2) only for m_finalState = 0,...
Definition: Phokhara.h:230
~Phokhara()
Destructor.
Definition: Phokhara.cc:93
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
Definition: Phokhara.h:218
int m_alpha
vacuum polarization switch: off (0), on (1,[by Fred Jegerlehner]), on (2,[by Thomas Teubner])
Definition: Phokhara.h:226
int m_chi_sw
chi_sw: Radiative return(0), Chi production(1), Radiative return + Chi production (2)
Definition: Phokhara.h:232
double m_epsilon
Soft/hard photon separator in units of CMS/2., called 'w' in Phokhara.
Definition: Phokhara.h:219
double m_massMuon
electron mass.
Definition: Phokhara.h:208
int m_pionff
FF_pion: KS PionFormFactor(0),GS old (1),GS new (2)
Definition: Phokhara.h:227
void setEpsilon(double epsilon)
Sets soft/hard photon energy separator.
Definition: Phokhara.h:166
void setKaonFF(int kaonff)
Sets kaon formfactors.
Definition: Phokhara.h:84
void setFinalState(int finalState)
Sets final state.
Definition: Phokhara.h:171
double m_massW
W mass [GeV] for on shell sin2theta and GF.
Definition: Phokhara.h:209
void setCMSEnergy(double cmsEnergy)
Sets the CMS energy.
Definition: Phokhara.h:156
void setScatteringAngleRangeFinalStates(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the final state particles.
Definition: Phokhara.h:124
void setPionStructure(int pionstructure)
Sets Pion Structure.
Definition: Phokhara.h:89
void setMinEnergyGamma(double MinEnergyGamma)
Sets the minimal photon energy/missing energy.
Definition: Phokhara.h:151
int m_protonff
ProtonFormFactor old(0), ProtonFormFactor new(1)
Definition: Phokhara.h:231
std::pair< double, double > m_ScatteringAngleRangePhoton
Minimal/Maximal photon angle/missing momentum angle.
Definition: Phokhara.h:235
double m_widthZ
Z width [GeV] (may be recalculated by EW library).
Definition: Phokhara.h:211
void term()
Terminates the generator.
Definition: Phokhara.cc:266
void setScatteringAngleRangePhoton(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the photon.
Definition: Phokhara.h:119
void setPionFF(int pionff)
Sets pion formfactors.
Definition: Phokhara.h:79
int m_IFSNLO
IFSNLO: no(0), yes(1)
Definition: Phokhara.h:225
int m_nSearchMax
Events used to search maximum of differential cross section.
Definition: Phokhara.h:217
int m_nMaxTrials
Events before loop is aborted.
Definition: Phokhara.h:216
double generateEvent(MCParticleGraph &mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
Generates one single event.
Definition: Phokhara.cc:181
int m_be_r
be_r: without beam resolution(0), with beam resolution(1)
Definition: Phokhara.h:233
void setProtonFF(int protonff)
Sets Proton formfactors.
Definition: Phokhara.h:99
double m_MinInvMassHadronsGamma
minimum mass of the hadron-gamma system [GeV^2]
Definition: Phokhara.h:237
void setSwitchBeamResolution(int be_r)
Switches beam resolution for Chi production.
Definition: Phokhara.h:109
void setAlpha(int alpha)
Sets alpha qed options.
Definition: Phokhara.h:74
void setMinInvMassHadronsGamma(double MinInvMassHadronsGamma)
Sets the minimal hadrons(muons)-gamma-inv mass squared.
Definition: Phokhara.h:129
void setNLO(int NLO)
Sets NLO mode.
Definition: Phokhara.h:54
double m_xpar[100]
Double parameters for PHOKHARA.
Definition: Phokhara.h:265
void setNSearchMax(int nSearchMax)
Sets the number of events used to search maximum.
Definition: Phokhara.h:161
double m_massZ
Z mass [GeV].
Definition: Phokhara.h:210
void setFullNLO(int FullNLO)
Sets Full NLO mode.
Definition: Phokhara.h:59
int m_kaonff
FF_kaon: KaonFormFactor constrained(0), KaonFormFactor unconstrained(1) KaonFormFactor old(2)
Definition: Phokhara.h:229
double m_pi
pi=3.1415....
Definition: Phokhara.h:204
void setForceMinInvMassHadronsCut(bool forceMinInvMassHadronsCut)
Sets whether to force the minimal invariant mass squared cut.
Definition: Phokhara.h:140
void setBeamResolution(double beamres)
Beam resolution for Chi production.
Definition: Phokhara.h:114
double m_massElectron
muon mass.
Definition: Phokhara.h:207
int m_weighted
generate weighted events
Definition: Phokhara.h:220
int m_NLO
NLO, for 1ph only: off (0, default), on (1)
Definition: Phokhara.h:222
double m_MaxInvMassHadrons
maximum mass of the hadron system [GeV^2]
Definition: Phokhara.h:240
int m_fullNLO
NLO, full NLO : No(0), Yes(1)
Definition: Phokhara.h:223
double m_MinEnergyGamma
minimum gamma energy [GeV]
Definition: Phokhara.h:241
double m_MinInvMassHadrons
minimum mass of the hadron system [GeV^2]
Definition: Phokhara.h:238
void setQED(int QED)
Sets QED corrections.
Definition: Phokhara.h:64
void setNMaxTrials(int nMaxTrials)
Sets number of trials per event.
Definition: Phokhara.h:182
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: Phokhara.cc:293
void setIFSNLO(int IFSNLO)
Sets IFSNLO options.
Definition: Phokhara.h:69
void setReplaceMuonsByVirtualPhoton(bool replaceMuonsByVirtualPhoton)
Sets whether to replace muons by a virtual photon.
Definition: Phokhara.h:176
void setChiSW(int chisw)
Sets Chi production.
Definition: Phokhara.h:104
void setm_MaxInvMassHadrons(double MaxInvMassHadrons)
Sets the maximal inv.
Definition: Phokhara.h:146
bool m_replaceMuonsByVirtualPhoton
Replace muons by a virtual photon.
Definition: Phokhara.h:215
Abstract base class for different kinds of events.