evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
23 #include "EvtGenBase/EvtCPUtil.hh"
24 #include "EvtGenBase/EvtComplex.hh"
25 #include "EvtGenBase/EvtConst.hh"
26 #include "EvtGenBase/EvtId.hh"
27 #include "EvtGenBase/EvtPDL.hh"
29 #include "EvtGenBase/EvtRandom.hh"
30 #include "EvtGenBase/EvtReport.hh"
31 
33 
34 #include <iostream>
35 #include <stdlib.h>
36 
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 EvtId BS0 = EvtPDL::getId( "B_s0" );
67  //static 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 EvtId BSH = EvtPDL::getId( "B_s0H" );
88  static double ctauH = EvtPDL::getctau( BSH );
89  static double gammaH = 1.0 / ctauH;
90 
91  static double deltaGamma = EvtCPUtil::getInstance()->getDeltaGamma( BS0 );
92 
93  //Here we're gonna generate and set the "envelope" lifetime, so we take the longest living component (for positive deltaGamma: tauH)
94  //t is initialized following a e^(gammaH*t) lifetime distribution. When computing the amplitudes a factor e^(gammaH*t/2) should be substracted.
95  double t = -log( EvtRandom::Flat() ) *
96  ( 1.0 / gammaH ); //This overrules the lifetimes made by the program performing the mixing (CPUtil)
97  if ( EvtCPUtil::getInstance()->isBsMixed( p ) ) {
98  p->getParent()->setLifetime( t );
99  } else {
100  p->setLifetime( t );
101  }
102 
103  static double deltaMs = EvtCPUtil::getInstance()->getDeltaM( BS0 );
104  double mt = exp( -std::max( 0.0, deltaGamma ) * t / ( 2.0 * EvtConst::c ) );
105  double pt = exp( +std::min( 0.0, deltaGamma ) * t / ( 2.0 * EvtConst::c ) );
106 
107  //Using the same sign convention as in J.P. Silva, hep-ph/0410351 (2004)
108  EvtComplex qp = EvtComplex( cos( -2.0 * getArg( 4 ) ),
109  sin( -2.0 * getArg( 4 ) ) ); // q/p=e^(-2*beta_s)
110  EvtComplex gplus =
111  ( mt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
112  sin( deltaMs * t / ( 2.0 * EvtConst::c ) ) ) +
113  pt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
114  sin( -deltaMs * t / ( 2.0 * EvtConst::c ) ) ) ) /
115  2.0;
116  EvtComplex gminus =
117  ( +mt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
118  sin( deltaMs * t / ( 2.0 * EvtConst::c ) ) ) -
119  pt * EvtComplex( cos( deltaMs * t / ( 2.0 * EvtConst::c ) ),
120  sin( -deltaMs * t / ( 2.0 * EvtConst::c ) ) ) ) /
121  2.0;
122 
123  //These should be filled with the helicity amplitudes at t=0
124  EvtComplex arg_hm, arg_hp;
125  arg_hp = EvtComplex( getArg( 0 ) * cos( getArg( 1 ) ),
126  getArg( 0 ) * sin( getArg( 1 ) ) );
127  arg_hm = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
128  getArg( 2 ) * sin( getArg( 3 ) ) );
129 
130  //Time-dependent amplitudes H+(t) and H-(t) are computed for a Bs and Anti-Bs in the initial state
131  EvtComplex hp, hm;
132  if ( Initial_state == 0 ) { //These are the equations for Bs
133 
134  hp = arg_hp * gplus + qp * conj( arg_hm ) * gminus;
135  hm = arg_hm * gplus + qp * conj( arg_hp ) * gminus;
136 
137  } else if ( Initial_state == 1 ) { //The equations for Anti-Bs
138 
139  hp = conj( arg_hm ) * gplus + ( 1.0 / qp ) * arg_hp * gminus;
140  hm = conj( arg_hp ) * gplus + ( 1.0 / qp ) * arg_hm * gminus;
141 
142  } else {
143  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
144  << "Initial state was not BSB or BS0!" << std::endl;
145  ::abort();
146  }
147 
148  //Compute the decay amplitudes from the time-dependent helicity amplitudes
149  EvtSVPHelAmp::SVPHel( p, _amp2, getDaug( 0 ), getDaug( 1 ), hp, hm );
150 
151  return;
152 }
EvtDecayBase * clone() override
void decay(EvtParticle *p) override
void init() override
void initProbMax() override
EvtParticle * getParent() const
Definition: EvtParticle.cpp:96
double getArg(unsigned int j)
bool isBsMixed(EvtParticle *)
Definition: EvtCPUtil.cpp:292
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
double getDeltaGamma(const EvtId id)
Definition: EvtCPUtil.cpp:529
Evt3Rank3C conj(const Evt3Rank3C &t2)
Definition: Evt3Rank3C.cpp:172
static void SVPHel(EvtParticle *parent, EvtAmp &amp, EvtId n_v1, EvtId n_ph, const EvtComplex &hp, const EvtComplex &hm)
static double getctau(EvtId i)
Definition: EvtPDL.cpp:357
EvtId getId() const
void setLifetime(double tau)
void setProbMax(double prbmx)
Definition: EvtId.hh:27
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
static double Flat()
Definition: EvtRandom.cpp:72
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static const double c
Definition: EvtConst.hh:30
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:240
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
double getDeltaM(const EvtId id)
Definition: EvtCPUtil.cpp:549
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
std::string getName() override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67