EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
src
EvtGenBase
EvtPartProp.cpp
Go to the documentation of this file.
1
2
/***********************************************************************
3
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4
* *
5
* This file is part of EvtGen. *
6
* *
7
* EvtGen is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* EvtGen is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19
***********************************************************************/
20
21
#include "
EvtGenBase/EvtPartProp.hh
"
22
23
#include "
EvtGenBase/EvtAbsLineShape.hh
"
24
#include "
EvtGenBase/EvtFlatLineShape.hh
"
25
#include "
EvtGenBase/EvtManyDeltaFuncLineShape.hh
"
26
#include "
EvtGenBase/EvtRelBreitWignerBarrierFact.hh
"
27
28
#include <ctype.h>
29
#include <fstream>
30
#include <iostream>
31
#include <stdlib.h>
32
#include <string>
33
using
std::fstream;
34
35
EvtPartProp::EvtPartProp
() :
36
m_id
( -1, -1 ),
m_idchgconj
( -1, -1 ),
m_chg3
( 0 ),
m_stdhep
( 0 ),
m_lundkc
( 0 )
37
{
38
m_ctau
= 0.0;
39
m_name
=
"*******"
;
40
m_spintype
=
EvtSpinType::SCALAR
;
41
}
42
43
EvtPartProp::EvtPartProp
(
const
EvtPartProp
& x )
44
{
45
m_lineShape
.reset( x.
m_lineShape
? x.
m_lineShape
->clone() :
nullptr
);
46
m_ctau
= x.
m_ctau
;
47
m_name
= x.
m_name
;
48
m_spintype
= x.
m_spintype
;
49
m_id
= x.
m_id
;
50
m_idchgconj
= x.
m_idchgconj
;
51
m_chg3
= x.
m_chg3
;
52
m_stdhep
= x.
m_stdhep
;
53
m_lundkc
= x.
m_lundkc
;
54
}
55
56
void
EvtPartProp::setName
( std::string pname )
57
{
58
m_name
= pname;
59
}
60
61
EvtPartProp
&
EvtPartProp::operator=
(
const
EvtPartProp
& x )
62
{
63
m_lineShape
.reset( x.
m_lineShape
? x.
m_lineShape
->clone() :
nullptr
);
64
65
m_ctau
= x.
m_ctau
;
66
m_name
= x.
m_name
;
67
m_chg3
= x.
m_chg3
;
68
m_spintype
= x.
m_spintype
;
69
return
*
this
;
70
}
71
72
void
EvtPartProp::initLineShape
(
double
mass,
double
width,
double
maxRange )
73
{
74
m_lineShape
= std::make_unique<EvtRelBreitWignerBarrierFact>( mass, width,
75
maxRange,
76
m_spintype
);
77
}
78
79
void
EvtPartProp::newLineShape
( std::string type )
80
{
81
double
m =
m_lineShape
->getMass();
82
double
w =
m_lineShape
->getWidth();
83
double
mR =
m_lineShape
->getMaxRange();
84
EvtSpinType::spintype
st =
m_lineShape
->getSpinType();
85
if
( type ==
"RELBW"
) {
86
m_lineShape
= std::make_unique<EvtRelBreitWignerBarrierFact>( m, w, mR,
87
st );
88
}
else
if
( type ==
"NONRELBW"
) {
89
m_lineShape
= std::make_unique<EvtAbsLineShape>( m, w, mR, st );
90
}
else
if
( type ==
"FLAT"
) {
91
m_lineShape
= std::make_unique<EvtFlatLineShape>( m, w, mR, st );
92
}
else
if
( type ==
"MANYDELTAFUNC"
) {
93
m_lineShape
= std::make_unique<EvtManyDeltaFuncLineShape>( m, w, mR, st );
94
}
else
{
95
m_lineShape
.reset();
96
}
97
}
98
99
void
EvtPartProp::reSetMass
(
double
mass )
100
{
101
if
( !
m_lineShape
)
102
::abort();
103
m_lineShape
->reSetMass( mass );
104
}
105
void
EvtPartProp::reSetWidth
(
double
width )
106
{
107
if
( !
m_lineShape
)
108
::abort();
109
m_lineShape
->reSetWidth( width );
110
}
111
112
void
EvtPartProp::setPWForDecay
(
int
spin,
EvtId
d1,
EvtId
d2 )
113
{
114
if
( !
m_lineShape
)
115
::abort();
116
m_lineShape
->setPWForDecay( spin, d1, d2 );
117
}
118
119
void
EvtPartProp::setPWForBirthL
(
int
spin,
EvtId
par,
EvtId
othD )
120
{
121
if
( !
m_lineShape
)
122
::abort();
123
m_lineShape
->setPWForBirthL( spin, par, othD );
124
}
125
126
void
EvtPartProp::reSetMassMin
(
double
mass )
127
{
128
if
( !
m_lineShape
)
129
::abort();
130
m_lineShape
->reSetMassMin( mass );
131
}
132
void
EvtPartProp::reSetMassMax
(
double
mass )
133
{
134
if
( !
m_lineShape
)
135
::abort();
136
m_lineShape
->reSetMassMax( mass );
137
}
138
void
EvtPartProp::reSetBlatt
(
double
blatt )
139
{
140
if
( !
m_lineShape
)
141
::abort();
142
m_lineShape
->reSetBlatt( blatt );
143
}
144
void
EvtPartProp::reSetBlattBirth
(
double
blatt )
145
{
146
if
( !
m_lineShape
)
147
::abort();
148
m_lineShape
->reSetBlattBirth( blatt );
149
}
150
void
EvtPartProp::includeBirthFactor
(
bool
yesno )
151
{
152
if
( !
m_lineShape
)
153
::abort();
154
m_lineShape
->includeBirthFactor( yesno );
155
}
156
void
EvtPartProp::includeDecayFactor
(
bool
yesno )
157
{
158
if
( !
m_lineShape
)
159
::abort();
160
m_lineShape
->includeDecayFactor( yesno );
161
}
EvtAbsLineShape.hh
EvtFlatLineShape.hh
EvtManyDeltaFuncLineShape.hh
EvtPartProp.hh
EvtRelBreitWignerBarrierFact.hh
EvtId
Definition
EvtId.hh:27
EvtPartProp::initLineShape
void initLineShape(double mass, double width, double maxRange)
Definition
EvtPartProp.cpp:72
EvtPartProp::reSetBlatt
void reSetBlatt(double blatt)
Definition
EvtPartProp.cpp:138
EvtPartProp::setName
void setName(std::string pname)
Definition
EvtPartProp.cpp:56
EvtPartProp::reSetMassMin
void reSetMassMin(double mass)
Definition
EvtPartProp.cpp:126
EvtPartProp::EvtPartProp
EvtPartProp()
Definition
EvtPartProp.cpp:35
EvtPartProp::setPWForDecay
void setPWForDecay(int spin, EvtId d1, EvtId d2)
Definition
EvtPartProp.cpp:112
EvtPartProp::m_spintype
EvtSpinType::spintype m_spintype
Definition
EvtPartProp.hh:106
EvtPartProp::m_lineShape
std::unique_ptr< EvtAbsLineShape > m_lineShape
Definition
EvtPartProp.hh:101
EvtPartProp::setPWForBirthL
void setPWForBirthL(int spin, EvtId par, EvtId othD)
Definition
EvtPartProp.cpp:119
EvtPartProp::m_chg3
int m_chg3
Definition
EvtPartProp.hh:107
EvtPartProp::m_ctau
double m_ctau
Definition
EvtPartProp.hh:103
EvtPartProp::includeDecayFactor
void includeDecayFactor(bool yesno)
Definition
EvtPartProp.cpp:156
EvtPartProp::m_name
std::string m_name
Definition
EvtPartProp.hh:110
EvtPartProp::m_id
EvtId m_id
Definition
EvtPartProp.hh:104
EvtPartProp::includeBirthFactor
void includeBirthFactor(bool yesno)
Definition
EvtPartProp.cpp:150
EvtPartProp::operator=
EvtPartProp & operator=(const EvtPartProp &x)
Definition
EvtPartProp.cpp:61
EvtPartProp::reSetMass
void reSetMass(double mass)
Definition
EvtPartProp.cpp:99
EvtPartProp::reSetWidth
void reSetWidth(double width)
Definition
EvtPartProp.cpp:105
EvtPartProp::newLineShape
void newLineShape(std::string type)
Definition
EvtPartProp.cpp:79
EvtPartProp::m_lundkc
int m_lundkc
Definition
EvtPartProp.hh:109
EvtPartProp::reSetBlattBirth
void reSetBlattBirth(double blatt)
Definition
EvtPartProp.cpp:144
EvtPartProp::m_stdhep
int m_stdhep
Definition
EvtPartProp.hh:108
EvtPartProp::m_idchgconj
EvtId m_idchgconj
Definition
EvtPartProp.hh:105
EvtPartProp::reSetMassMax
void reSetMassMax(double mass)
Definition
EvtPartProp.cpp:132
EvtSpinType::spintype
spintype
Definition
EvtSpinType.hh:29
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
Generated by
1.17.0