|
EvtGen
2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
|
Go to the documentation of this file. 53 printf( "Make %samplitude\n", conj ? "CP conjugate" : "" ); 55 for ( i = 0; i < vv.size(); i++ ) 56 printf( "%s\n", vv[i]. c_str() ); 60 std::unique_ptr<EvtAmplitude<EvtDalitzPoint>> amp; 61 std::unique_ptr<EvtPdf<EvtDalitzPoint>> pdf; 69 if ( vv[0] == "PHASESPACE" ) { 70 pdf = std::make_unique<EvtDalitzFlatPdf>( _dp ); 71 amp = std::make_unique<EvtFlatAmp<EvtDalitzPoint>>(); 73 } else if ( !vv[0].find( "NONRES" ) ) { 76 if ( vv[0] == "NONRES_LIN" ) { 79 } else if ( vv[0] == "NONRES_EXP" ) { 82 alpha = strtod( vv[2]. c_str(), 0 ); 85 pdf = std::make_unique<EvtDalitzFlatPdf>( _dp ); 86 amp = std::make_unique<EvtNonresonantAmp>( &_dp, typeNRes, pairRes, 88 } else if ( vv[0] == "LASS" || vv[0] == "LASS_ELASTIC" || 89 vv[0] == "LASS_RESONANT" ) { 91 double m0 = strtod( vv[2]. c_str(), 0 ); 92 double g0 = strtod( vv[3]. c_str(), 0 ); 93 double a = strtod( vv[4]. c_str(), 0 ); 94 double r = strtod( vv[5]. c_str(), 0 ); 95 double cutoff = strtod( vv[6]. c_str(), 0 ); 96 pdf = std::make_unique<EvtDalitzResPdf>( _dp, m0, g0, pairRes ); 97 amp = std::make_unique<EvtLASSAmp>( &_dp, pairRes, m0, g0, a, r, cutoff, 104 else if ( vv[0] == "RESONANCE" ) { 105 std::unique_ptr<EvtPto3PAmp> partAmp; 115 printf( "Particles %s form %sresonance %s\n", vv[1]. c_str(), 121 if ( resId. getId() == -1 ) { 122 switch ( atoi( vv[2]. c_str() ) ) { 149 mR = strtod( vv[3]. c_str(), 0 ); 150 gR = strtod( vv[4]. c_str(), 0 ); 163 if ( vv[3] != "ANGULAR" ) { 165 printf( "Setting m(%s)=%s g(%s)=%s\n", vv[2]. c_str(), 168 mR = strtod( vv[3]. c_str(), 0 ); 169 gR = strtod( vv[4]. c_str(), 0 ); 176 if ( vv[++i] != "ANGULAR" ) { 177 printf( "%s instead of ANGULAR\n", vv[i]. c_str() ); 182 printf( "Angle is measured between particles %s\n", vv[i]. c_str() ); 186 std::string typeName = vv[++i]; 187 assert( typeName == "TYPE" ); 188 std::string type = vv[++i]; 190 printf( "Propagator type %s\n", vv[i]. c_str() ); 192 if ( type == "NBW" ) { 194 partAmp = std::make_unique<EvtPto3PAmp>( _dp, pairAng, pairRes, spinR, 196 } else if ( type == "RBW_ZEMACH" ) { 198 partAmp = std::make_unique<EvtPto3PAmp>( _dp, pairAng, pairRes, 201 } else if ( type == "RBW_KUEHN" ) { 203 partAmp = std::make_unique<EvtPto3PAmp>( _dp, pairAng, pairRes, 206 } else if ( type == "RBW_CLEO" ) { 208 partAmp = std::make_unique<EvtPto3PAmp>( _dp, pairAng, pairRes, 211 } else if ( type == "FLATTE" ) { 212 double m1a = _dp.m( first( pairRes ) ); 213 double m1b = _dp.m( second( pairRes ) ); 215 double g2 = strtod( vv[++i]. c_str(), 0 ); 216 double m2a = strtod( vv[++i]. c_str(), 0 ); 217 double m2b = strtod( vv[++i]. c_str(), 0 ); 219 partAmp = std::make_unique<EvtPto3PAmp>( _dp, pairAng, pairRes, spinR, 226 if ( i < vv.size() - 1 ) { 227 if ( vv[i + 1] == "DVFF" ) { 229 if ( vv[++i] == "BLATTWEISSKOPF" ) { 230 double R = strtod( vv[++i]. c_str(), 0 ); 231 partAmp->set_fd( R ); 237 if ( i < vv.size() - 1 ) { 238 if ( vv[i + 1] == "BVFF" ) { 240 if ( vv[++i] == "BLATTWEISSKOPF" ) { 242 printf( "BVFF=%s\n", vv[i]. c_str() ); 243 double R = strtod( vv[++i]. c_str(), 0 ); 244 partAmp->set_fb( R ); 250 const int minwidths = 5; 252 if ( i < vv.size() - 1 ) { 253 if ( vv[i + 1] == "CUTOFF" ) { 255 if ( vv[i + 1] == "MIN" ) { 257 double min = strtod( vv[++i]. c_str(), 0 ); 259 std::cout << "CUTOFF MIN = " << min << " " << minwidths 262 assert( min < ( mR - minwidths * gR ) ); 263 partAmp->setmin( min ); 264 } else if ( vv[i + 1] == "MAX" ) { 266 double max = strtod( vv[++i]. c_str(), 0 ); 268 std::cout << "CUTOFF MAX = " << max << " " << minwidths 271 assert( max > ( mR + minwidths * gR ) ); 272 partAmp->setmax( max ); 279 if ( i < vv.size() - 1 ) { 280 if ( vv[i + 1] == "CUTOFF" ) { 282 if ( vv[i + 1] == "MIN" ) { 284 double min = strtod( vv[++i]. c_str(), 0 ); 286 std::cout << "CUTOFF MIN = " << min << std::endl; 288 assert( min < ( mR - minwidths * gR ) ); 289 partAmp->setmin( min ); 290 } else if ( vv[i + 1] == "MAX" ) { 292 double max = strtod( vv[++i]. c_str(), 0 ); 294 std::cout << "CUTOFF MAX = " << max << std::endl; 296 assert( max > ( mR + minwidths * gR ) ); 297 partAmp->setmax( max ); 305 pdf = std::make_unique<EvtDalitzResPdf>( _dp, mR, gR, pairRes ); 306 amp = std::move( partAmp ); 312 double scale = matchIsobarCoef( *_amp, *pdf, pairRes ); 315 _amp->addOwnedTerm( c, std::move( amp ) ); 317 _ampConj->addOwnedTerm( c, std::move( amp ) ); 319 _pc->addOwnedTerm( abs2( c ) * scale, std::move( pdf ) ); 321 _names.push_back( name ); 341 double di = ( _dp.qAbsMax( ipair ) - _dp.qAbsMin( ipair ) ) / ( ( double)N ); 343 double siMin = _dp.qAbsMin( ipair ); 346 for ( int i = 1; i < N; i++ ) { 347 s[ipair] = siMin + di * i; 348 s[jpair] = _dp.q( jpair, 0.9999, ipair, s[ipair] ); 349 s[kpair] = _dp.bigM() * _dp.bigM() - s[ipair] - s[jpair] + 350 _dp.mA() * _dp.mA() + _dp.mB() * _dp.mB() + 356 if ( !point.isValid() ) 359 double p = point. p( other( ipair ), ipair ); 360 double q = point.p( first( ipair ), ipair ); 362 double itg = abs2( amp. evaluate( point ) ) * di * 4 * q * p; 366 std::cout << "integral = " << Iamp2 << " pdf=" << Ipdf << std::endl; 368 assert( Ipdf > 0 && Iamp2 > 0 );
const char * c_str(Index i)
static EvtSpinType::spintype getSpinType(EvtId i)
EvtComplex evaluate(const T &p) const
Evt3Rank3C conj(const Evt3Rank3C &t2)
double matchIsobarCoef(EvtAmplitude< EvtDalitzPoint > &, EvtPdf< EvtDalitzPoint > &pdf, EvtCyclic3::Pair i)
static double getMeanMass(EvtId i)
double abs2(const EvtComplex &c)
virtual EvtValError compute_integral() const
static EvtId getId(const std::string &name)
static double getWidth(EvtId i)
Pair strToPair(const char *str)
void processAmp(EvtComplex c, std::vector< std::string > vv, bool conj) override
double p(EvtCyclic3::Index i, EvtCyclic3::Pair j) const
Index other(Index i, Index j)
|