herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Hadronization
HadronInfo.h
1
namespace
Herwig
{
2
using namespace
ThePEG
;
3
25
class
HadronInfo
{
26
27
public
:
28
36
HadronInfo
(
long
idin=0,
tPDPtr
datain=
tPDPtr
(),
37
double
swtin=1., Energy massin=
ZERO
)
38
:
id
(idin),
ptrData
(datain),
swtef
(swtin),
wt
(1.0),
overallWeight
(0.0),
39
mass
(massin)
40
{}
41
45
bool
operator<
(
const
HadronInfo
&x)
const
{
46
if
(
mass
!=x.
mass
)
return
mass
< x.
mass
;
47
else
return
id
< x.
id
;
48
}
49
53
long
id
;
54
58
tPDPtr
ptrData
;
59
63
double
swtef
;
64
68
double
wt
;
69
73
double
overallWeight
;
74
78
Energy
mass
;
79
83
void
rescale
(
double
x)
const
{
84
const_cast<
HadronInfo
*
>
(
this
)->
overallWeight
*= x;
85
}
86
90
friend
PersistentOStream
&
operator<<
(
PersistentOStream
& os,
91
const
HadronInfo
& hi ) {
92
os << hi.
id
<< hi.
ptrData
<< hi.
swtef
<< hi.
wt
93
<< hi.
overallWeight
<<
ounit
(hi.
mass
,GeV);
94
return
os;
95
}
96
100
friend
ostream &
operator<<
(ostream & os,
const
HadronInfo
& hi ) {
101
os << std::scientific << std::showpoint
102
<< std::setprecision(4)
103
<< setw(2)
104
<< hi.
id
<<
'\t'
105
<< hi.
swtef
<<
'\t'
106
<< hi.
wt
<<
'\t'
107
<< hi.
overallWeight
<<
'\t'
108
<<
ounit
(hi.
mass
,GeV);
109
return
os;
110
}
111
115
friend
PersistentIStream
&
operator>>
(
PersistentIStream
& is,
116
HadronInfo
& hi ) {
117
is >> hi.
id
>> hi.
ptrData
>> hi.
swtef
>> hi.
wt
118
>> hi.
overallWeight
>>
iunit
(hi.
mass
,GeV);
119
return
is;
120
}
121
};
122
130
typedef
set<HadronInfo>
KupcoData
;
132
136
typedef
map<pair<long,long>,
KupcoData
>
HadronTable
;
137
}
Herwig::HadronInfo
Class used to store all the hadron information for easy access.
Definition:
HadronInfo.h:25
Herwig::HadronInfo::id
long id
The hadrons id.
Definition:
HadronInfo.h:53
Herwig::HadronInfo::operator>>
friend PersistentIStream & operator>>(PersistentIStream &is, HadronInfo &hi)
Friend method used to read in the value of a table element.
Definition:
HadronInfo.h:115
Herwig::HadronInfo::operator<
bool operator<(const HadronInfo &x) const
Comparision operator on mass.
Definition:
HadronInfo.h:45
Herwig::HadronInfo::rescale
void rescale(double x) const
Rescale the weight for a given hadron.
Definition:
HadronInfo.h:83
Herwig::HadronInfo::ptrData
tPDPtr ptrData
pointer to ParticleData, to get the spin, etc...
Definition:
HadronInfo.h:58
Herwig::HadronInfo::wt
double wt
mixing factor
Definition:
HadronInfo.h:68
Herwig::HadronInfo::HadronInfo
HadronInfo(long idin=0, tPDPtr datain=tPDPtr(), double swtin=1., Energy massin=ZERO)
Constructor.
Definition:
HadronInfo.h:36
Herwig::HadronInfo::operator<<
friend PersistentOStream & operator<<(PersistentOStream &os, const HadronInfo &hi)
Friend method used to print the value of a table element.
Definition:
HadronInfo.h:90
Herwig::HadronInfo::swtef
double swtef
singlet/decuplet/orbital factor
Definition:
HadronInfo.h:63
Herwig::HadronInfo::overallWeight
double overallWeight
(2*J+1)*wt*swtef
Definition:
HadronInfo.h:73
Herwig::HadronInfo::mass
Energy mass
The hadrons mass.
Definition:
HadronInfo.h:78
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::HadronTable
map< pair< long, long >, KupcoData > HadronTable
The hadron table type.
Definition:
HadronInfo.h:136
Herwig::KupcoData
set< HadronInfo > KupcoData
Type defs.
Definition:
HadronInfo.h:130
ThePEG
ThePEG::tPDPtr
ThePEG::Ptr< ParticleData >::transient_pointer tPDPtr
ThePEG::iunit
IUnit< T, UT > iunit(T &t, const UT &ut)
ThePEG::ZERO
constexpr ZeroUnit ZERO
ThePEG::ounit
OUnit< T, UT > ounit(const T &t, const UT &ut)
Generated on Thu Jun 20 2024 17:50:52 for Herwig by
1.9.6