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
EvtVtoSll.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/EvtPDL.hh"
32
33#include <iostream>
34#include <stdlib.h>
35#include <string>
36
37std::string EvtVtoSll::getName() const
38{
39 return "VTOSLL";
40}
41
43{
44 return new EvtVtoSll;
45}
46
48{
49 // check that there are 0 arguments
50 checkNArg( 0 );
51 checkNDaug( 3 );
52
54
58
59 // Work out whether we have electron mode
60 const EvtIdSet leptons{ "e-", "e+" };
61 if ( leptons.contains( getDaug( 1 ) ) || leptons.contains( getDaug( 2 ) ) ) {
62 m_electronMode = true;
63 EvtGenReport( EVTGEN_INFO, "EvtGen" )
64 << " EvtVtoSll has dielectron final state" << std::endl;
65 }
66}
67
69{
70 EvtGenReport( EVTGEN_INFO, "EvtGen" )
71 << " EvtVtoSll is finding maximum probability ... " << std::endl;
72
73 double theProbMax = 0;
74 double theProbMax_q2 = 0;
75 double theProbMax_theta = 0;
76
77 EvtVectorParticle parent{};
78 parent.noLifeTime();
79 parent.init( getParentId(),
80 EvtVector4R( EvtPDL::getMass( getParentId() ), 0, 0, 0 ) );
82
83 EvtAmp amp;
84 EvtId daughters[3] = { getDaug( 0 ), getDaug( 1 ), getDaug( 2 ) };
85 amp.init( getParentId(), 3, daughters );
86 parent.makeDaughters( 3, daughters );
87 EvtParticle* scalar = parent.getDaug( 0 );
88 EvtParticle* lep1 = parent.getDaug( 1 );
89 EvtParticle* lep2 = parent.getDaug( 2 );
90 scalar->noLifeTime();
91 lep1->noLifeTime();
92 lep2->noLifeTime();
93
95 rho.setDiag( parent.getSpinStates() );
96
97 const double M0 = EvtPDL::getMass( getParentId() );
98 const double mL = EvtPDL::getMass( getDaug( 0 ) );
99 const double m1 = EvtPDL::getMass( getDaug( 1 ) );
100 const double m2 = EvtPDL::getMass( getDaug( 2 ) );
101
102 const double m12Sum = m1 + m2;
103 const double m12Del = m1 - m2;
104
105 const double q2min = ( m1 + m2 ) * ( m1 + m2 );
106 const double q2max = ( M0 - mL ) * ( M0 - mL );
107 const double mSqSum = M0 * M0 + mL * mL;
108
109 EvtVector4R p4scalar, p4lep1, p4lep2, boost;
110
111 EvtGenReport( EVTGEN_INFO, "EvtGen" )
112 << " EvtVtoSll is probing whole phase space ..." << std::endl;
113
114 double prob = 0;
115 const int nsteps = 5000;
116 for ( int i = 0; i <= nsteps; i++ ) {
117 const double q2 = q2min + i * ( q2max - q2min ) / nsteps;
118 const double eScalar = ( mSqSum - q2 ) / ( 2 * M0 );
119 const double pstar = i == 0 ? 0
120 : sqrt( q2 - m12Sum * m12Sum ) *
121 sqrt( q2 - m12Del * m12Del ) /
122 ( 2 * sqrt( q2 ) );
123
124 boost.set( M0 - eScalar, 0, 0, +sqrt( eScalar * eScalar - mL * mL ) );
125 if ( i != nsteps ) {
126 p4scalar.set( eScalar, 0, 0, -sqrt( eScalar * eScalar - mL * mL ) );
127 } else {
128 p4scalar.set( mL, 0, 0, 0 );
129 }
130
131 const double pstarSq = pstar * pstar;
132 const double E1star = sqrt( pstarSq + m1 * m1 );
133 const double E2star = sqrt( pstarSq + m2 * m2 );
134
135 for ( int j = 0; j <= 45; j++ ) {
136 const double theta = j * EvtConst::pi / 45;
137
138 const double pstarT = pstar * sin( theta );
139 const double pstarZ = pstar * cos( theta );
140
141 p4lep1.set( E1star, 0, pstarT, pstarZ );
142 p4lep2.set( E2star, 0, -pstarT, -pstarZ );
143
144 if ( i != nsteps ) // At maximal q2 we are already in correct frame as scalar child and W/Zvirtual are at rest
145 {
146 p4lep1 = boostTo( p4lep1, boost );
147 p4lep2 = boostTo( p4lep2, boost );
148 }
149 scalar->init( getDaug( 0 ), p4scalar );
150 lep1->init( getDaug( 1 ), p4lep1 );
151 lep2->init( getDaug( 2 ), p4lep2 );
152 calcAmp( parent, amp );
153 prob = rho.normalizedProb( amp.getSpinDensity() );
154 // In case of electron mode add pole
155 if ( m_electronMode ) {
156 prob /= 1.0 + m_poleSize / ( q2 * q2 );
157 }
158
159 if ( prob > theProbMax ) {
160 theProbMax = prob;
161 theProbMax_q2 = q2;
162 theProbMax_theta = theta;
163 }
164 }
165 }
166
167 theProbMax *= 1.01;
168
169 setProbMax( theProbMax );
170 EvtGenReport( EVTGEN_INFO, "EvtGen" )
171 << " EvtVtoSll set up maximum probability to " << theProbMax
172 << " found at q2 = " << theProbMax_q2 << " ("
173 << nsteps * ( theProbMax_q2 - q2min ) / ( q2max - q2min )
174 << " %) and theta = " << theProbMax_theta * 180 / EvtConst::pi
175 << std::endl;
176}
177
179{
180 // Phase space initialization depends on what leptons are
181 if ( m_electronMode ) {
182 setWeight( parent->initializePhaseSpace( getNDaug(), getDaugs(), false,
183 m_poleSize, 1, 2 ) );
184 } else {
185 parent->initializePhaseSpace( getNDaug(), getDaugs() );
186 }
187
188 calcAmp( *parent, m_amp2 );
189}
190
191void EvtVtoSll::calcAmp( const EvtParticle& parent, EvtAmp& amp ) const
192{
193 const EvtParticle& l1 = *parent.getDaug( 1 );
194 const EvtParticle& l2 = *parent.getDaug( 2 );
195
196 const EvtVector4C l11 = EvtLeptonVCurrent( l1.spParent( 0 ),
197 l2.spParent( 0 ) );
198 const EvtVector4C l12 = EvtLeptonVCurrent( l1.spParent( 0 ),
199 l2.spParent( 1 ) );
200 const EvtVector4C l21 = EvtLeptonVCurrent( l1.spParent( 1 ),
201 l2.spParent( 0 ) );
202 const EvtVector4C l22 = EvtLeptonVCurrent( l1.spParent( 1 ),
203 l2.spParent( 1 ) );
204
205 const EvtVector4C eps0 = parent.eps( 0 );
206 const EvtVector4C eps1 = parent.eps( 1 );
207 const EvtVector4C eps2 = parent.eps( 2 );
208
209 const EvtVector4R P = parent.getP4Restframe();
210 const EvtVector4R k = l1.getP4() + l2.getP4();
211 const double k2 = k * k;
212
213 const EvtTensor4C T(
214 dual( EvtGenFunctions::directProd( P, ( 1.0 / k2 ) * k ) ) );
215
216 double M2 = parent.mass();
217 M2 *= M2;
218 double m2 = l1.mass();
219 m2 *= m2;
220
221 const double norm = 1.0 / sqrt( 2 * M2 + 4 * m2 - 4 * m2 * m2 / M2 );
222
223 amp.vertex( 0, 0, 0, norm * ( eps0 * T.cont2( l11 ) ) );
224 amp.vertex( 0, 0, 1, norm * ( eps0 * T.cont2( l12 ) ) );
225 amp.vertex( 0, 1, 0, norm * ( eps0 * T.cont2( l21 ) ) );
226 amp.vertex( 0, 1, 1, norm * ( eps0 * T.cont2( l22 ) ) );
227
228 amp.vertex( 1, 0, 0, norm * ( eps1 * T.cont2( l11 ) ) );
229 amp.vertex( 1, 0, 1, norm * ( eps1 * T.cont2( l12 ) ) );
230 amp.vertex( 1, 1, 0, norm * ( eps1 * T.cont2( l21 ) ) );
231 amp.vertex( 1, 1, 1, norm * ( eps1 * T.cont2( l22 ) ) );
232
233 amp.vertex( 2, 0, 0, norm * ( eps2 * T.cont2( l11 ) ) );
234 amp.vertex( 2, 0, 1, norm * ( eps2 * T.cont2( l12 ) ) );
235 amp.vertex( 2, 1, 0, norm * ( eps2 * T.cont2( l21 ) ) );
236 amp.vertex( 2, 1, 1, norm * ( eps2 * T.cont2( l22 ) ) );
237
238 return;
239}
EvtVector4C EvtLeptonVCurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_INFO
Definition EvtReport.hh:52
EvtTensor4C dual(const EvtTensor4C &t2)
void vertex(const EvtComplex &amp)
Definition EvtAmp.cpp:453
EvtSpinDensity getSpinDensity() const
Definition EvtAmp.cpp:141
void init(EvtId p, int ndaug, const EvtId *daug)
Definition EvtAmp.cpp:67
static const double pi
Definition EvtConst.hh:26
void setWeight(double weight)
EvtAmp m_amp2
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
int getNDaug() const
void checkSpinParent(EvtSpinType::spintype sp)
void setProbMax(double prbmx)
EvtId getParentId() const
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)
const EvtId * getDaugs() const
bool contains(const EvtId &id) const
Definition EvtIdSet.cpp:46
Definition EvtId.hh:27
static double getMass(EvtId i)
Definition EvtPDL.cpp:311
void noLifeTime()
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
EvtVector4R getP4Restframe() const
virtual EvtDiracSpinor spParent(int) const
int getSpinStates() const
void setDiagonalSpinDensity()
const EvtVector4R & getP4() const
EvtParticle * getDaug(const int i)
double mass() const
virtual EvtVector4C eps(int i) const
void makeDaughters(size_t ndaug, const EvtId *id)
double normalizedProb(const EvtSpinDensity &d)
void setDiag(int n)
EvtVector4C cont2(const EvtVector4C &v4) const
void set(int i, double d)
void init(EvtId part_n, double e, double px, double py, double pz)
void init() override
Definition EvtVtoSll.cpp:47
void calcAmp(const EvtParticle &parent, EvtAmp &amp) const
void decay(EvtParticle *parent) override
bool m_electronMode
Definition EvtVtoSll.hh:42
void initProbMax() override
Definition EvtVtoSll.cpp:68
std::string getName() const override
Definition EvtVtoSll.cpp:37
EvtDecayBase * clone() const override
Definition EvtVtoSll.cpp:42
static constexpr double m_poleSize
Definition EvtVtoSll.hh:41
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)