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.
EvtBTo4piCP.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/EvtPatches.hh"
30 #include "EvtGenBase/EvtReport.hh"
32 
33 #include <stdlib.h>
34 #include <string>
35 
36 EvtComplex EvtAmpA2( const EvtVector4R& p4pi1, const EvtVector4R& p4pi2,
37  const EvtVector4R& p4pi3, const EvtVector4R& p4pi4 )
38 {
39  //added by Lange Jan4,2000
40  static EvtId A2M = EvtPDL::getId( "a_2-" );
41  static EvtId RHO0 = EvtPDL::getId( "rho0" );
42 
43  EvtVector4R p4a2, p4rho, p4b;
44 
45  p4rho = p4pi1 + p4pi2;
46 
47  p4a2 = p4rho + p4pi3;
48 
49  p4b = p4a2 + p4pi4;
50 
51  EvtVector4R p4b_a2, p4rho_a2, p4pi1_a2, p4a2_a2;
52 
53  p4b_a2 = boostTo( p4b, p4a2 );
54  p4rho_a2 = boostTo( p4rho, p4a2 );
55  p4pi1_a2 = boostTo( p4pi1, p4a2 );
56  p4a2_a2 = boostTo( p4a2, p4a2 );
57 
58  EvtVector4R p4pi1_rho;
59 
60  p4pi1_rho = boostTo( p4pi1_a2, p4rho_a2 );
61 
62  EvtVector4R vb, vrho, vpi, t;
63 
64  vb = p4b_a2 / p4b_a2.d3mag();
65  vrho = p4rho_a2 / p4rho_a2.d3mag();
66  vpi = p4pi1_rho / p4pi1_rho.d3mag();
67 
68  t.set( 1.0, 0.0, 0.0, 0.0 );
69 
70  // EvtComplex amp_a1,amp_a2;
71  EvtComplex amp_a2;
72 
73  // double bwm_a1=EvtPDL::getMeanMass(A1M);
74  // double gamma_a1=EvtPDL::getWidth(A1M);
75  double bwm_a2 = EvtPDL::getMeanMass( A2M );
76  double gamma_a2 = EvtPDL::getWidth( A2M );
77  double bwm_rho = EvtPDL::getMeanMass( RHO0 );
78  double gamma_rho = EvtPDL::getWidth( RHO0 );
79 
80  amp_a2 =
81  ( sqrt( gamma_a2 / EvtConst::twoPi ) /
82  ( ( p4a2 ).mass() - bwm_a2 - EvtComplex( 0.0, 0.5 * gamma_a2 ) ) ) *
83  ( sqrt( gamma_rho / EvtConst::twoPi ) /
84  ( ( p4rho ).mass() - bwm_rho - EvtComplex( 0.0, 0.5 * gamma_rho ) ) );
85 
86  return amp_a2 *
87  ( vb.get( 1 ) * vrho.get( 1 ) + vb.get( 2 ) * vrho.get( 2 ) +
88  vb.get( 3 ) * vrho.get( 3 ) ) *
89  ( vpi.get( 1 ) *
90  ( vb.get( 2 ) * vrho.get( 3 ) - vb.get( 3 ) * vrho.get( 2 ) ) +
91  vpi.get( 2 ) *
92  ( vb.get( 3 ) * vrho.get( 1 ) - vb.get( 1 ) * vrho.get( 3 ) ) +
93  vpi.get( 3 ) *
94  ( vb.get( 1 ) * vrho.get( 2 ) - vb.get( 2 ) * vrho.get( 1 ) ) );
95 }
96 
97 EvtComplex EvtAmpA1( const EvtVector4R& p4pi1, const EvtVector4R& p4pi2,
98  const EvtVector4R& p4pi3, const EvtVector4R& p4pi4 )
99 {
100  //added by Lange Jan4,2000
101  static EvtId A1M = EvtPDL::getId( "a_1-" );
102  static EvtId RHO0 = EvtPDL::getId( "rho0" );
103 
104  EvtVector4R p4a1, p4rho, p4b;
105 
106  p4rho = p4pi1 + p4pi2;
107 
108  p4a1 = p4rho + p4pi3;
109 
110  p4b = p4a1 + p4pi4;
111 
112  EvtVector4R p4b_a1, p4rho_a1, p4pi1_a1, p4a1_a1;
113 
114  p4b_a1 = boostTo( p4b, p4a1 );
115  p4rho_a1 = boostTo( p4rho, p4a1 );
116  p4pi1_a1 = boostTo( p4pi1, p4a1 );
117  p4a1_a1 = boostTo( p4a1, p4a1 );
118 
119  EvtVector4R p4pi1_rho;
120 
121  p4pi1_rho = boostTo( p4pi1_a1, p4rho_a1 );
122 
123  EvtVector4R vb, vrho, vpi, t;
124 
125  vb = p4b_a1 / p4b_a1.d3mag();
126  vrho = p4rho_a1 / p4rho_a1.d3mag();
127  vpi = p4pi1_rho / p4pi1_rho.d3mag();
128 
129  t.set( 1.0, 0.0, 0.0, 0.0 );
130 
131  EvtComplex amp_a1;
132 
133  double bwm_a1 = EvtPDL::getMeanMass( A1M );
134  double gamma_a1 = EvtPDL::getWidth( A1M );
135  // double bwm_a2=EvtPDL::getMeanMass(A2M);
136  // double gamma_a2=EvtPDL::getWidth(A2M);
137  double bwm_rho = EvtPDL::getMeanMass( RHO0 );
138  double gamma_rho = EvtPDL::getWidth( RHO0 );
139 
140  amp_a1 =
141  ( sqrt( gamma_a1 / EvtConst::twoPi ) /
142  ( ( p4a1 ).mass() - bwm_a1 - EvtComplex( 0.0, 0.5 * gamma_a1 ) ) ) *
143  ( sqrt( gamma_rho / EvtConst::twoPi ) /
144  ( ( p4rho ).mass() - bwm_rho - EvtComplex( 0.0, 0.5 * gamma_rho ) ) );
145 
146  return amp_a1 * ( vb.get( 1 ) * vpi.get( 1 ) + vb.get( 2 ) * vpi.get( 2 ) +
147  vb.get( 3 ) * vpi.get( 3 ) );
148 }
149 
150 std::string EvtBTo4piCP::getName()
151 {
152  return "BTO4PI_CP";
153 }
154 
156 {
157  return new EvtBTo4piCP;
158 }
159 
161 {
162  // check that there are 18 arguments
163  checkNArg( 18 );
164  checkNDaug( 4 );
165 
167 
172 }
173 
175 {
176  //added by Lange Jan4,2000
177  static EvtId B0 = EvtPDL::getId( "B0" );
178  static EvtId B0B = EvtPDL::getId( "anti-B0" );
179 
180  double t;
181  EvtId other_b;
182 
183  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
184 
186  EvtVector4R mom1 = p->getDaug( 0 )->getP4();
187  EvtVector4R mom2 = p->getDaug( 1 )->getP4();
188  EvtVector4R mom3 = p->getDaug( 2 )->getP4();
189  EvtVector4R mom4 = p->getDaug( 3 )->getP4();
190 
191  // double alpha=getArg(0);
192  //double dm=getArg(1);
193 
194  EvtComplex amp;
195 
196  EvtComplex A, Abar;
197 
198  EvtComplex A_a1p, Abar_a1p, A_a2p, Abar_a2p;
199  EvtComplex A_a1m, Abar_a1m, A_a2m, Abar_a2m;
200 
201  A_a1p = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
202  getArg( 2 ) * sin( getArg( 3 ) ) );
203  Abar_a1p = EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
204  getArg( 4 ) * sin( getArg( 5 ) ) );
205 
206  A_a2p = EvtComplex( getArg( 6 ) * cos( getArg( 7 ) ),
207  getArg( 6 ) * sin( getArg( 7 ) ) );
208  Abar_a2p = EvtComplex( getArg( 8 ) * cos( getArg( 9 ) ),
209  getArg( 8 ) * sin( getArg( 9 ) ) );
210 
211  A_a1m = EvtComplex( getArg( 10 ) * cos( getArg( 11 ) ),
212  getArg( 10 ) * sin( getArg( 11 ) ) );
213  Abar_a1m = EvtComplex( getArg( 12 ) * cos( getArg( 13 ) ),
214  getArg( 12 ) * sin( getArg( 13 ) ) );
215 
216  A_a2m = EvtComplex( getArg( 14 ) * cos( getArg( 15 ) ),
217  getArg( 14 ) * sin( getArg( 15 ) ) );
218  Abar_a2m = EvtComplex( getArg( 16 ) * cos( getArg( 17 ) ),
219  getArg( 16 ) * sin( getArg( 17 ) ) );
220 
221  EvtComplex a2p_amp = EvtAmpA2( mom1, mom2, mom3, mom4 ) +
222  EvtAmpA2( mom1, mom4, mom3, mom2 ) +
223  EvtAmpA2( mom3, mom2, mom1, mom4 ) +
224  EvtAmpA2( mom3, mom4, mom1, mom2 );
225 
226  EvtComplex a2m_amp = EvtAmpA2( mom2, mom3, mom4, mom1 ) +
227  EvtAmpA2( mom2, mom1, mom4, mom3 ) +
228  EvtAmpA2( mom4, mom3, mom2, mom1 ) +
229  EvtAmpA2( mom4, mom1, mom2, mom3 );
230 
231  EvtComplex a1p_amp = EvtAmpA1( mom1, mom2, mom3, mom4 ) +
232  EvtAmpA1( mom1, mom4, mom3, mom2 ) +
233  EvtAmpA1( mom3, mom2, mom1, mom4 ) +
234  EvtAmpA1( mom3, mom4, mom1, mom2 );
235 
236  EvtComplex a1m_amp = EvtAmpA1( mom2, mom3, mom4, mom1 ) +
237  EvtAmpA1( mom2, mom1, mom4, mom3 ) +
238  EvtAmpA1( mom4, mom3, mom2, mom1 ) +
239  EvtAmpA1( mom4, mom1, mom2, mom3 );
240 
241  A = A_a2p * a2p_amp + A_a1p * a1p_amp + A_a2m * a2m_amp + A_a1m * a1m_amp;
242  Abar = Abar_a2p * a2p_amp + Abar_a1p * a1p_amp + Abar_a2m * a2m_amp +
243  Abar_a1m * a1m_amp;
244 
245  if ( other_b == B0B ) {
246  amp = A * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
247  EvtComplex( cos( -2.0 * getArg( 0 ) ), sin( -2.0 * getArg( 0 ) ) ) *
248  getArg( 2 ) * EvtComplex( 0.0, 1.0 ) * Abar *
249  sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
250  }
251  if ( other_b == B0 ) {
252  amp = A * EvtComplex( cos( 2.0 * getArg( 0 ) ), sin( 2.0 * getArg( 0 ) ) ) *
253  EvtComplex( 0.0, 1.0 ) *
254  sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
255  getArg( 2 ) * Abar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
256  }
257 
258  vertex( amp );
259 
260  return;
261 }
EvtComplex EvtAmpA1(const EvtVector4R &p4pi1, const EvtVector4R &p4pi2, const EvtVector4R &p4pi3, const EvtVector4R &p4pi4)
Definition: EvtBTo4piCP.cpp:97
void init() override
double getArg(unsigned int j)
static const double twoPi
Definition: EvtConst.hh:27
static double getMeanMass(EvtId i)
Definition: EvtPDL.cpp:314
std::string getName() override
void set(int i, double d)
Definition: EvtVector4R.hh:167
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
double get(int i) const
Definition: EvtVector4R.hh:162
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
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
const EvtVector4R & getP4() const
void decay(EvtParticle *p) override
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
static double getWidth(EvtId i)
Definition: EvtPDL.cpp:352
double d3mag() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtBTo4piCP * clone() override
EvtComplex EvtAmpA2(const EvtVector4R &p4pi1, const EvtVector4R &p4pi2, const EvtVector4R &p4pi3, const EvtVector4R &p4pi4)
Definition: EvtBTo4piCP.cpp:36