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.
EvtPVVCPLH.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/EvtConst.hh"
25 #include "EvtGenBase/EvtGenKine.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 <stdlib.h>
35 #include <string>
36 
37 std::string EvtPVVCPLH::getName()
38 {
39  return "PVV_CPLH";
40 }
41 
43 {
44  return new EvtPVVCPLH;
45 }
46 
48 {
49  // check that there are 8 arguments (deltaMs no argument anymore)
50  checkNArg( 8 );
51  checkNDaug( 2 );
52 
54 
57 }
58 
60 {
61  //This is probably not quite right, but it should do as a start...
62  //Anders
63 
64  setProbMax( 2 * ( getArg( 2 ) * getArg( 2 ) + getArg( 4 ) * getArg( 4 ) +
65  getArg( 6 ) * getArg( 6 ) ) );
66 }
67 
69 {
70  //added by Lange Jan4,2000
71  static EvtId BS0 = EvtPDL::getId( "B_s0" );
72  static EvtId BSB = EvtPDL::getId( "anti-B_s0" );
73 
74  //This is only to get tag-ID
75  //Mixing is not relevant
76  //Lifetime is made correctly later
77  //Tristan
78  EvtId other_b;
79  double t;
80 
81  // To generate integrated CP asymmetry, EvtGen uses the "flipping".
82  // CP-asymmetry in this channel very small, since:
83  // deltaMs large ..and..
84  // CPV-phase small
85  EvtCPUtil::getInstance()->OtherB( p, t, other_b );
86 
87  //Here we're gonna generate and set the "envelope" lifetime
88  //So we take the longest living component (for positive deltaGamma: tauH)
89  //The double exponent will be taken care of later, by the amplitudes
90  //Tristan
91 
92  static double Gamma = EvtConst::c / ( EvtPDL::getctau( BS0 ) );
93  static double deltaGamma = EvtCPUtil::getInstance()->getDeltaGamma( BS0 );
94  static double ctauLong = EvtConst::c / ( Gamma - fabs( deltaGamma ) / 2 );
95  // if dG>0: tauLong=tauH(CP-odd) is then largest
96 
97  //This overrules the lifetimes made in OtherB
98  t = -log( EvtRandom::Flat() ) *
99  ( ctauLong ); //ctauLong has same dimensions as t
100  if ( isBsMixed( p ) ) {
101  p->getParent()->setLifetime( t );
102  } else {
103  p->setLifetime( t );
104  }
105 
106  //These should be filled with the transversity amplitudes at t=0 //Tristan
107  EvtComplex G0P, G1P, G1M;
108  G1P = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
109  getArg( 2 ) * sin( getArg( 3 ) ) );
110  G0P = EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
111  getArg( 4 ) * sin( getArg( 5 ) ) );
112  G1M = EvtComplex( getArg( 6 ) * cos( getArg( 7 ) ),
113  getArg( 6 ) * sin( getArg( 7 ) ) );
114 
115  EvtComplex lambda_km =
116  EvtComplex( cos( 2 * getArg( 0 ) ),
117  sin( 2 * getArg( 0 ) ) ); //was een min in oude versie
118 
119  //deltaMs is no argument anymore
120  //Tristan
121 
122  static double deltaMs = EvtCPUtil::getInstance()->getDeltaM( BS0 );
123 
124  EvtComplex cG0P, cG1P, cG1M;
125 
126  double mt = exp( -std::max( 0., deltaGamma ) * t / ( 2 * EvtConst::c ) );
127  double pt = exp( +std::min( 0., deltaGamma ) * t / ( 2 * EvtConst::c ) );
128 
129  EvtComplex gplus =
130  ( mt * EvtComplex( cos( deltaMs * t / ( 2 * EvtConst::c ) ),
131  sin( deltaMs * t / ( 2 * EvtConst::c ) ) ) +
132  pt * EvtComplex( cos( deltaMs * t / ( 2 * EvtConst::c ) ),
133  sin( -deltaMs * t / ( 2 * EvtConst::c ) ) ) ) /
134  2;
135  EvtComplex gminus =
136  ( mt * EvtComplex( cos( deltaMs * t / ( 2 * EvtConst::c ) ),
137  sin( deltaMs * t / ( 2 * EvtConst::c ) ) ) -
138  pt * EvtComplex( cos( deltaMs * t / ( 2 * EvtConst::c ) ),
139  sin( -deltaMs * t / ( 2 * EvtConst::c ) ) ) ) /
140  2;
141  ;
142 
143  if ( other_b == BSB ) {
144  //These are the right equations for the transversity formalism
145  //cGOP is de 0-component, CP-even, so lives shorter: mainly lifetime tauL
146  //cG1P is the //-component, also CP-even, also mainly smaller exponent
147  //cG1M is the transverse component, CP-odd, so has mainly longer lifetime tauH
148  //Tristan
149  cG0P = G0P * ( gplus + lambda_km * gminus );
150  cG1P = G1P * ( gplus + lambda_km * gminus );
151  cG1M = G1M * ( gplus - lambda_km * gminus );
152  } else if ( other_b == BS0 ) {
153  //The equations for BsBar
154  //Note the minus-sign difference
155  //Tristan
156  cG0P = G0P * ( gplus + ( 1.0 / lambda_km ) * gminus );
157  cG1P = G1P * ( gplus + ( 1.0 / lambda_km ) * gminus );
158  cG1M = -G1M * ( gplus - ( 1.0 / lambda_km ) * gminus );
159 
160  } else {
161  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
162  << "other_b was not BSB or BS0!" << std::endl;
163  ::abort();
164  }
165 
166  EvtComplex A0, AP, AM;
167  //Converting the transversity amplitudes
168  //to helicity amplitudes
169  //(to plug them into SVVHelAmp)
170  A0 = cG0P;
171  AP = ( cG1P + cG1M ) / sqrt( 2.0 );
172  AM = ( cG1P - cG1M ) / sqrt( 2.0 );
173 
174  EvtSVVHelAmp::SVVHel( p, _amp2, getDaug( 0 ), getDaug( 1 ), AP, A0, AM );
175 
176  return;
177 }
178 
180 {
181  if ( !( p->getParent() ) )
182  return false;
183 
184  static EvtId BS0 = EvtPDL::getId( "B_s0" );
185  static EvtId BSB = EvtPDL::getId( "anti-B_s0" );
186 
187  if ( ( p->getId() != BS0 ) && ( p->getId() != BSB ) )
188  return false;
189 
190  if ( ( p->getParent()->getId() == BS0 ) || ( p->getParent()->getId() == BSB ) )
191  return true;
192 
193  return false;
194 }
EvtParticle * getParent() const
Definition: EvtParticle.cpp:96
double getArg(unsigned int j)
static void SVVHel(EvtParticle *parent, EvtAmp &amp, EvtId n_v1, EvtId n_v2, const EvtComplex &hp, const EvtComplex &h0, const EvtComplex &hm)
void init() override
Definition: EvtPVVCPLH.cpp:47
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
double getDeltaGamma(const EvtId id)
Definition: EvtCPUtil.cpp:529
void initProbMax() override
Definition: EvtPVVCPLH.cpp:59
static double getctau(EvtId i)
Definition: EvtPDL.cpp:357
EvtDecayBase * clone() override
Definition: EvtPVVCPLH.cpp:42
EvtId getId() const
bool isBsMixed(EvtParticle *p)
Definition: EvtPVVCPLH.cpp:179
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
void setLifetime(double tau)
void setProbMax(double prbmx)
Definition: EvtId.hh:27
void decay(EvtParticle *p) override
Definition: EvtPVVCPLH.cpp:68
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
Definition: EvtPVVCPLH.cpp:37
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67