herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
HwppSelector.h
1// -*- C++ -*-
2//
3// HwppSelector.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef HERWIG_HwppSelector_H
10#define HERWIG_HwppSelector_H
11//
12// This is the declaration of the HwppSelector class.
13//
14
15#include "HadronSelector.h"
16
17namespace Herwig {
18
19using namespace ThePEG;
20
29
30public:
31
36 _pwtDquark( 1.0 ),_pwtUquark( 1.0 ),_pwtSquark( 1.0 ),_pwtCquark( 0.0 ),
37 _pwtBquark( 0.0 ),_pwtDIquark(1.0 ),
38 _sngWt( 1.0 ), _decWt( 1.0 ),
39 _mode(1), _enhanceSProb(0), _m0Decay(1.*GeV),
41 {}
42
43public:
44
52
58 void persistentInput(PersistentIStream & is, int version);
60
67 static void Init();
68
69protected:
70
74 virtual double baryonWeight(long id) const;
75
79 std::tuple<bool,bool,bool> selectBaryon(const Energy cluMass, tcPDPtr par1, tcPDPtr par2) const;
80
84 virtual double strangeWeight(const Energy cluMass, tcPDPtr par1, tcPDPtr par2) const;
85
91 inline Energy massLightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const {
92 map<pair<long,long>,tcPDPair>::const_iterator lightest =
93 lightestBaryons_.find(make_pair(abs(ptr1->id()),abs(ptr2->id())));
94 assert(lightest!=lightestBaryons_.end());
95 return lightest->second.first->mass()+lightest->second.second->mass();
96 }
97
104
105protected:
106
113 virtual IBPtr clone() const;
114
119 virtual IBPtr fullclone() const;
121
122protected:
123
131 virtual void doinit();
133
134private:
135
141
142private:
143
152
157
162
167
172
178
186 double _sngWt;
187
191 double _decWt;
193
194private:
195
199 unsigned int _mode;
200
206
210 Energy _m0Decay;
211
217
222 const double _maxScale = 20.;
223
228
233
241 map<pair<long,long>,tcPDPair> lightestBaryons_;
243
244};
245
246}
247
248#endif /* HERWIG_HwppSelector_H */
This class selects the hadron flavours of a cluster decay.
The HwppSelector class selects the hadrons produced in cluster decay using the Herwig variant of the ...
Definition: HwppSelector.h:28
map< pair< long, long >, tcPDPair > lightestBaryons_
Caches of lightest pairs for speed.
Definition: HwppSelector.h:241
Energy massLightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const
Returns the mass of the lightest pair of baryons.
Definition: HwppSelector.h:91
tcPDPair lightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const
Returns the mass of the lightest pair of baryons.
virtual double baryonWeight(long id) const
Weights for baryons.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
double _pwtBquark
The probability of producting a bottom quark.
Definition: HwppSelector.h:171
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
double _pwtSquark
The probability of producting a strange quark.
Definition: HwppSelector.h:161
virtual double strangeWeight(const Energy cluMass, tcPDPtr par1, tcPDPtr par2) const
Strange quark weight.
HwppSelector & operator=(const HwppSelector &)=delete
The assignment operator is private and must never be called.
const double _maxScale
Constant variable that stops the scale in strangeness enhancement from becoming too large.
Definition: HwppSelector.h:222
double _pwtUquark
The probability of producting an up quark.
Definition: HwppSelector.h:156
static void Init()
The standard Init function used to initialize the interfaces.
int _enhanceSProb
Flag that switches between no strangeness enhancement, scaling enhancement, and exponential enhanceme...
Definition: HwppSelector.h:205
int _massMeasure
Flag that switches between mass measures used in strangeness enhancement: cluster mass,...
Definition: HwppSelector.h:216
double _sngWt
Singlet and Decuplet weights.
Definition: HwppSelector.h:186
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
double _scHadronWtFactor
Heavy strange-charm hadron wight coefficient.
Definition: HwppSelector.h:227
double _sbHadronWtFactor
Heavy strange-bottom hadron wight coefficient.
Definition: HwppSelector.h:232
HwppSelector()
The default constructor.
Definition: HwppSelector.h:35
double _pwtDquark
The weights for the different quarks and diquarks.
Definition: HwppSelector.h:151
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
double _pwtCquark
The probability of producting a charm quark.
Definition: HwppSelector.h:166
Energy _m0Decay
Parameter that governs the strangeness enhancement scaling.
Definition: HwppSelector.h:210
double _pwtDIquark
The probability of producting a diquark.
Definition: HwppSelector.h:176
virtual IBPtr clone() const
Make a simple clone of this object.
unsigned int _mode
Which algorithm to use.
Definition: HwppSelector.h:199
double _decWt
The decuplet weight.
Definition: HwppSelector.h:191
std::tuple< bool, bool, bool > selectBaryon(const Energy cluMass, tcPDPtr par1, tcPDPtr par2) const
Whether to select a meson or a baryon.
-*- C++ -*-
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
pair< tcPDPtr, tcPDPtr > tcPDPair
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr