8 #ifndef Pythia8_DireSplittings_H 9 #define Pythia8_DireSplittings_H 11 #define DIRE_SPLITTINGS_VERSION "2.002" 13 #include "Pythia8/Basics.h" 14 #include "Pythia8/BeamParticle.h" 15 #include "Pythia8/ParticleData.h" 16 #include "Pythia8/PythiaStdlib.h" 17 #include "Pythia8/Settings.h" 18 #include "Pythia8/StandardModel.h" 19 #include "Pythia8/Info.h" 20 #include "Pythia8/DireSplitInfo.h" 21 #include "Pythia8/DireBasics.h" 34 OverheadInfo(
int nFinalIn,
int idIn,
double valIn,
double xIn,
double pT2In)
35 : nFinal(nFinalIn), id(idIn), val(valIn), x(xIn), pT2(pT2In) {}
40 bool match(
int idIn,
int nfIn) {
return (idIn==
id && nfIn==nFinal); }
42 string list ()
const {
44 os << scientific << setprecision(6)
45 <<
"pT2 " << setw(10) << pT2 <<
" x " << setw(10) << x
46 <<
" id " << setw(4) <<
id <<
" nf " << setw(4) << nFinal
59 id(
"void"), correctionOrder(0), settingsPtr(0),
60 particleDataPtr(0), rndmPtr(0), beamAPtr(0),
61 beamBPtr(0), coupSMPtr(0), infoPtr(0), direInfoPtr(0),
62 is_qcd(false), is_qed(false), is_ewk(false), is_fsr(false),
63 is_isr(false), is_dire(false), nameHash(0) {}
68 renormMultFac(0), id(idIn), correctionOrder(softRS),
69 settingsPtr(settings), particleDataPtr(particleData), rndmPtr(rndm),
70 beamAPtr(beamA), beamBPtr(beamB), coupSMPtr(coupSMPtrIn),
71 infoPtr(infoPtrIn), direInfoPtr(direInfo), is_qcd(
false), is_qed(
false),
72 is_ewk(
false), is_fsr(
false), is_isr(
false), is_dire(
false),
73 nameHash(0) { init(); splitInfo.storeName(name()); }
94 bool is_qcd, is_qed, is_ewk, is_fsr, is_isr, is_dire;
96 bool is( ulong pattern ) {
97 if (pattern == nameHash)
return true;
101 unordered_map<string,double> kernelVals;
103 string name () {
return id;}
105 virtual bool canRadiate (
const Event&, pair<int,int>,
106 unordered_map<string,bool> = unordered_map<string,bool>(),
114 virtual bool useFastFunctions() {
return false; }
115 virtual bool canRadiate (
const Event&,
int,
int,
133 virtual vector <int>
radAndEmt(
int,
int) {
return vector<int>(); }
134 virtual vector < pair<int,int> > radAndEmtCols(
int,
int,
Event)
135 {
return vector<pair<int,int> >(); }
136 virtual bool canUseForBranching() {
return false; }
137 virtual bool isPartial() {
return false; }
138 virtual int nEmissions() {
return 0; }
140 virtual bool swapRadEmt() {
return false; }
147 {
return vector<int>();}
154 {
return make_pair(0,0);}
175 virtual double coupling (
double = 0.,
double = 0.,
double = 0.,
176 double = -1., pair<int,bool> = pair<int,bool>(),
177 pair<int,bool> = pair<int,bool>()) {
180 virtual double couplingScale2 (
double = 0.,
double = 0.,
double = 0.,
181 pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
186 virtual double zSplit(
double,
double,
double) {
return 0.5;}
196 virtual double getKernel(
string =
"");
197 virtual unordered_map<string,double> getKernelVals() {
return kernelVals; }
198 virtual void clearKernels() { kernelVals.clear(); }
205 shared_ptr<DireSpace> isr;
206 shared_ptr<DireTimes> fsr;
207 shared_ptr<DireTimes> fsrDec;
208 void setTimesPtr(shared_ptr<DireTimes> fsrIn) { fsr=fsrIn;}
209 void setTimesDecPtr(shared_ptr<DireTimes> fsrIn) { fsrDec=fsrIn;}
210 void setSpacePtr(shared_ptr<DireSpace> isrIn) { isr=isrIn;}
219 PartonSystems* = 0) {
return unordered_map<string,double>(); }
223 virtual bool allow_pT2_endpoint_for_kinematics() {
return false; }
224 virtual bool allow_sai_endpoint_for_kinematics() {
return false; }
225 virtual bool allow_xa_endpoint_for_kinematics() {
return false; }
228 virtual void try_pT2_endpoint() {
return; }
229 virtual void try_sai_endpoint() {
return; }
230 virtual void try_xa_endpoint() {
return; }
233 virtual bool is_pT2_endpoint() {
return false; }
234 virtual bool is_sai_endpoint() {
return false; }
235 virtual bool is_xa_endpoint() {
return false; }
238 virtual double tdire_ff(
double,
double t,
double) {
return t; }
239 virtual double zdire_ff(
double z,
double,
double) {
return z; }
240 virtual double tdire_fi(
double,
double t,
double) {
return t; }
241 virtual double zdire_fi(
double z,
double,
double) {
return z; }
242 virtual double tdire_if(
double,
double t,
double) {
return t; }
243 virtual double zdire_if(
double z,
double,
double) {
return z; }
244 virtual double tdire_ii(
double,
double t,
double) {
return t; }
245 virtual double zdire_ii(
double z,
double,
double) {
return z; }
247 virtual bool hasMECBef(
const Event&,
double) {
return false; }
248 virtual bool hasMECAft(
const Event&,
double) {
return false; }
250 virtual void storeOverhead(
double pT2,
double x,
int radid,
int nf,
251 double val) { overhead_map.insert(make_pair(pT2,
OverheadInfo(nf, radid,
253 multimap<double,OverheadInfo> overhead_map;
255 virtual double overhead(
double pT2,
int idd,
int nf) {
257 if (overhead_map.empty())
return 1.;
259 multimap<double,OverheadInfo>::iterator lo = overhead_map.lower_bound(pT2);
260 if (lo != overhead_map.begin()) lo--;
261 if (lo != overhead_map.begin()) lo--;
262 multimap<double,OverheadInfo>::iterator hi = overhead_map.upper_bound(pT2);
263 if (hi != overhead_map.end()) hi++;
264 if (hi == overhead_map.end()) hi--;
268 for ( multimap<double,OverheadInfo>::iterator it = lo;
270 if (!it->second.match(idd,nf))
continue;
271 sum += it->second.val;
275 if (hi->second.match(idd,nf)) {
276 sum += hi->second.val;
280 return max(sum/max(1,n),1.);
virtual bool allow_z_endpoint_for_kinematics()
Treatment of additional virtual corrections.
Definition: DireSplittings.h:222
bool is_qcd
Some short-cuts and string hashes to help avoid string comparisons.
Definition: DireSplittings.h:94
virtual vector< int > recPositions(const Event &, int, int)
Definition: DireSplittings.h:146
virtual double symmetryFactor(int, int)
Return symmetry factor for splitting.
Definition: DireSplittings.h:160
virtual double coupling(double=0., double=0., double=0., double=-1., pair< int, bool >=pair< int, bool >(), pair< int, bool >=pair< int, bool >())
Definition: DireSplittings.h:175
The Event class holds all info on the generated event.
Definition: Event.h:453
Definition: BeamParticle.h:133
virtual double gaugeFactor(int, int)
Return color factor for splitting.
Definition: DireSplittings.h:157
Definition: DireSplittings.h:30
virtual double overestimateInt(double, double, double, double, int=-1)
New overestimates, z-integrated versions.
Definition: DireSplittings.h:189
Definition: DireBasics.h:374
virtual bool aboveCutoff(double, const Particle &, const Particle &, int, PartonSystems *=NULL)
Discard below the cut-off for the splitting.
Definition: DireSplittings.h:111
virtual int couplingType(int, int)
Definition: DireSplittings.h:169
virtual bool calc(const Event &=Event(), int=-1)
Functions to calculate the kernel from SplitInfo information.
Definition: DireSplittings.h:203
Definition: DireSplittings.h:53
virtual vector< int > radAndEmt(int, int)
Definition: DireSplittings.h:133
virtual int kinMap()
Definition: DireSplittings.h:123
virtual bool is_z_endpoint()
Return endpoint information.
Definition: DireSplittings.h:232
DireSplitting()
Constructor and destructor.
Definition: DireSplittings.h:58
virtual unordered_map< string, double > getPhasespaceVars(const Event &=Event(), PartonSystems *=0)
Map filled identical to shower state variables map.
Definition: DireSplittings.h:217
Definition: StandardModel.h:135
virtual double tdire_ff(double, double t, double)
Functions to calculate Dire variables from the evolution variables.
Definition: DireSplittings.h:238
virtual double overestimateDiff(double, double, int=-1)
Return kernel for new splitting.
Definition: DireSplittings.h:193
virtual void try_z_endpoint()
Functions to set if kernel should contribute to a kinematical endpoint.
Definition: DireSplittings.h:227
The PartonSystems class describes the whole set of subcollisions.
Definition: PartonSystems.h:42
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
Definition: DireSplitInfo.h:212
virtual double getJacobian(const Event &=Event(), PartonSystems *=0)
Definition: DireSplittings.h:214
virtual int radBefID(int, int)
Return id of recombined radiator (before splitting!)
Definition: DireSplittings.h:150
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
virtual pair< int, int > radBefCols(int, int, int, int)
Return colours of recombined radiator (before splitting!)
Definition: DireSplittings.h:153
virtual int sisterID(int)
Return id of emission.
Definition: DireSplittings.h:129
Definition: Settings.h:195
virtual double zSplit(double, double, double)
Pick z for new splitting.
Definition: DireSplittings.h:186
virtual int motherID(int)
Return id of mother after splitting.
Definition: DireSplittings.h:126