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
EvtSVPHelCPMix.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
26#include "EvtGenBase/EvtId.hh"
27#include "EvtGenBase/EvtPDL.hh"
31
33
34#include <iostream>
35#include <stdlib.h>
36
37std::string EvtSVPHelCPMix::getName() const
38{
39 return "SVPHELCPMIX";
40}
41
43{
44 return new EvtSVPHelCPMix;
45}
46
48{
49 // check that there are 5 arguments
50 checkNArg( 5 );
51 checkNDaug( 2 );
52
54
57}
58
60{
61 setProbMax( 2.0 * ( getArg( 0 ) * getArg( 0 ) + getArg( 2 ) * getArg( 2 ) ) );
62}
63
65{
66 static const EvtId BS0 = EvtPDL::getId( "B_s0" );
67 //static const EvtId BSB = EvtPDL::getId("anti-B_s0");
68
69 //Flavour tagging of the initial state. Note that flavour mixing has already been applied out of this model
70 //Initial_state == 0 (Bs at the initial state) and Initial_state == 1 (Anti-Bs in the initial state)
71 int Initial_state( -1 );
72 if ( EvtCPUtil::getInstance()->isBsMixed(
73 p ) ) { //The decaying particle has suffered flavour mixing, thus the initial state is its antiparticle
74 if ( p->getId() == BS0 ) {
75 Initial_state = 1;
76 } else {
77 Initial_state = 0;
78 }
79 } else { //The decaying particle has NOT suffered flavour mixing, thus the initial state is itself
80 if ( p->getId() == BS0 ) {
81 Initial_state = 0;
82 } else {
83 Initial_state = 1;
84 }
85 }
86
87 static const EvtId BSH = EvtPDL::getId( "B_s0H" );
88 static const double ctauH = EvtPDL::getctau( BSH );
89 static const double gammaH = 1.0 / ctauH;
90
91 static const double deltaGamma = EvtCPUtil::getInstance()->getDeltaGamma(
92 BS0 );
93
94 //Here we're gonna generate and set the "envelope" lifetime, so we take the longest living component (for positive deltaGamma: tauH)
95 //t is initialized following a e^(gammaH*t) lifetime distribution. When computing the amplitudes a factor e^(gammaH*t/2) should be substracted.
96 double t = -log( EvtRandom::Flat() ) *
97 ( 1.0 / gammaH ); //This overrules the lifetimes made by the program performing the mixing (CPUtil)
98 if ( EvtCPUtil::getInstance()->isBsMixed( p ) ) {
99 p->getParent()->setLifetime( t );
100 } else {
101 p->setLifetime( t );
102 }
103
104 static const double deltaMs = EvtCPUtil::getInstance()->getDeltaM( BS0 );
105 double mt = exp( -std::max( 0.0, deltaGamma ) * t / ( 2.0 * EvtConst::c ) );
106 double pt = exp( +std::min( 0.0, deltaGamma ) * t / ( 2.0 * EvtConst::c ) );
107
108 //Using the same sign convention as in J.P. Silva, hep-ph/0410351 (2004)
109 EvtComplex qp = EvtComplex( cos( -2.0 * getArg( 4 ) ),
110 sin( -2.0 * getArg( 4 ) ) ); // q/p=e^(-2*beta_s)
111 EvtComplex gplus =
112 ( mt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
113 sin( deltaMs * t / ( 2.0 * EvtConst::c ) ) ) +
114 pt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
115 sin( -deltaMs * t / ( 2.0 * EvtConst::c ) ) ) ) /
116 2.0;
117 EvtComplex gminus =
118 ( +mt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
119 sin( deltaMs * t / ( 2.0 * EvtConst::c ) ) ) -
120 pt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
121 sin( -deltaMs * t / ( 2.0 * EvtConst::c ) ) ) ) /
122 2.0;
123
124 //These should be filled with the helicity amplitudes at t=0
125 EvtComplex arg_hm, arg_hp;
126 arg_hp = EvtComplex( getArg( 0 ) * cos( getArg( 1 ) ),
127 getArg( 0 ) * sin( getArg( 1 ) ) );
128 arg_hm = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
129 getArg( 2 ) * sin( getArg( 3 ) ) );
130
131 //Time-dependent amplitudes H+(t) and H-(t) are computed for a Bs and Anti-Bs in the initial state
132 EvtComplex hp, hm;
133 if ( Initial_state == 0 ) { //These are the equations for Bs
134
135 hp = arg_hp * gplus + qp * conj( arg_hm ) * gminus;
136 hm = arg_hm * gplus + qp * conj( arg_hp ) * gminus;
137
138 } else if ( Initial_state == 1 ) { //The equations for Anti-Bs
139
140 hp = conj( arg_hm ) * gplus + ( 1.0 / qp ) * arg_hp * gminus;
141 hm = conj( arg_hp ) * gplus + ( 1.0 / qp ) * arg_hm * gminus;
142
143 } else {
144 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
145 << "Initial state was not BSB or BS0!" << std::endl;
146 ::abort();
147 }
148
149 //Compute the decay amplitudes from the time-dependent helicity amplitudes
150 EvtSVPHelAmp::SVPHel( p, m_amp2, getDaug( 0 ), getDaug( 1 ), hp, hm );
151
152 return;
153}
EvtComplex conj(const EvtComplex &c)
EvtComplex exp(const EvtComplex &c)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
static EvtCPUtil * getInstance()
Definition EvtCPUtil.cpp:42
double getDeltaM(const EvtId id)
double getDeltaGamma(const EvtId id)
static const double c
Definition EvtConst.hh:30
EvtAmp m_amp2
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition EvtId.hh:27
static double getctau(EvtId i)
Definition EvtPDL.cpp:351
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
EvtId getId() const
void setLifetime(double tau)
EvtParticle * getParent() const
static double Flat()
Definition EvtRandom.cpp:95
static void SVPHel(EvtParticle *parent, EvtAmp &amp, EvtId n_v1, EvtId n_ph, const EvtComplex &hp, const EvtComplex &hm)
void decay(EvtParticle *p) override
EvtDecayBase * clone() const override
void init() override
void initProbMax() override
std::string getName() const override