EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
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
22
27
28#include <ctype.h>
29#include <fstream>
30#include <iostream>
31#include <stdlib.h>
32#include <string>
33using std::fstream;
34
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 = "*******";
41}
42
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;
49 m_id = x.m_id;
51 m_chg3 = x.m_chg3;
54}
55
56void EvtPartProp::setName( std::string pname )
57{
58 m_name = pname;
59}
60
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;
69 return *this;
70}
71
72void 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
79void 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
99void EvtPartProp::reSetMass( double mass )
100{
101 if ( !m_lineShape )
102 ::abort();
103 m_lineShape->reSetMass( mass );
104}
105void EvtPartProp::reSetWidth( double width )
106{
107 if ( !m_lineShape )
108 ::abort();
109 m_lineShape->reSetWidth( width );
110}
111
112void EvtPartProp::setPWForDecay( int spin, EvtId d1, EvtId d2 )
113{
114 if ( !m_lineShape )
115 ::abort();
116 m_lineShape->setPWForDecay( spin, d1, d2 );
117}
118
119void EvtPartProp::setPWForBirthL( int spin, EvtId par, EvtId othD )
120{
121 if ( !m_lineShape )
122 ::abort();
123 m_lineShape->setPWForBirthL( spin, par, othD );
124}
125
126void EvtPartProp::reSetMassMin( double mass )
127{
128 if ( !m_lineShape )
129 ::abort();
130 m_lineShape->reSetMassMin( mass );
131}
132void EvtPartProp::reSetMassMax( double mass )
133{
134 if ( !m_lineShape )
135 ::abort();
136 m_lineShape->reSetMassMax( mass );
137}
138void EvtPartProp::reSetBlatt( double blatt )
139{
140 if ( !m_lineShape )
141 ::abort();
142 m_lineShape->reSetBlatt( blatt );
143}
145{
146 if ( !m_lineShape )
147 ::abort();
148 m_lineShape->reSetBlattBirth( blatt );
149}
151{
152 if ( !m_lineShape )
153 ::abort();
154 m_lineShape->includeBirthFactor( yesno );
155}
157{
158 if ( !m_lineShape )
159 ::abort();
160 m_lineShape->includeDecayFactor( yesno );
161}
Definition EvtId.hh:27
void initLineShape(double mass, double width, double maxRange)
void reSetBlatt(double blatt)
void setName(std::string pname)
void reSetMassMin(double mass)
void setPWForDecay(int spin, EvtId d1, EvtId d2)
EvtSpinType::spintype m_spintype
std::unique_ptr< EvtAbsLineShape > m_lineShape
void setPWForBirthL(int spin, EvtId par, EvtId othD)
void includeDecayFactor(bool yesno)
std::string m_name
void includeBirthFactor(bool yesno)
EvtPartProp & operator=(const EvtPartProp &x)
void reSetMass(double mass)
void reSetWidth(double width)
void newLineShape(std::string type)
void reSetBlattBirth(double blatt)
EvtId m_idchgconj
void reSetMassMax(double mass)