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
EvtBToDDalitzCPK.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/EvtPDL.hh"
26
27//-----------------------------------------------------------------------------
28// Implementation file for class : EvtBToDDalitzCPK
29// Decay Model for B->D0K with D0->Ks pi+ pi-
30// it is just a way to get the arguments...
31// Works also for other B->D0K decays...
32// 2003-12-08 : Patrick Robbe
33//-----------------------------------------------------------------------------
34
35//=============================================================================
36// Name of the model
37//=============================================================================
38std::string EvtBToDDalitzCPK::getName() const
39{
40 return "BTODDALITZCPK";
41}
42//=============================================================================
43// Clone method
44//=============================================================================
49//=============================================================================
50// Initialisation method
51//=============================================================================
53{
54 // Check that there are 3 arguments
55 checkNArg( 3 );
56 // Check that there are 2 daughters
57 checkNDaug( 2 );
58 // Check that the particles of the decay are :
59 // B+/- -> D0/bar K+/-
60 // B+/- -> K+/- D0/bar
61 // B0/bar -> K*0/bar D0/bar
62 // and nothing else ...
63 static const EvtId BP = EvtPDL::getId( "B+" );
64 static const EvtId BM = EvtPDL::getId( "B-" );
65 static const EvtId B0 = EvtPDL::getId( "B0" );
66 static const EvtId B0B = EvtPDL::getId( "anti-B0" );
67 static const EvtId KP = EvtPDL::getId( "K+" );
68 static const EvtId KM = EvtPDL::getId( "K-" );
69 static const EvtId KS = EvtPDL::getId( "K*0" );
70 static const EvtId KSB = EvtPDL::getId( "anti-K*0" );
71 static const EvtId D0 = EvtPDL::getId( "D0" );
72 static const EvtId D0B = EvtPDL::getId( "anti-D0" );
73
74 m_flag = 0;
75
76 EvtId parent = getParentId();
77 EvtId d1 = getDaug( 0 );
78 EvtId d2 = getDaug( 1 );
79
80 if ( ( ( parent == BP ) || ( parent == BM ) ) &&
81 ( ( d1 == D0 ) || ( d1 == D0B ) ) && ( ( d2 == KP ) || ( d2 == KM ) ) ) {
82 m_flag = 1;
83 // PHSP Decay
84 } else if ( ( ( parent == BP ) || ( parent == BM ) ) &&
85 ( ( d1 == KP ) || ( d1 == KM ) ) &&
86 ( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
87 m_flag = 1;
88 // also PHSP decay
89 } else if ( ( ( parent == B0 ) || ( parent == B0B ) ) &&
90 ( ( d1 == KS ) || ( d1 == KSB ) ) &&
91 ( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
92 m_flag = 2;
93 // SVS Decay
94 }
95
96 if ( m_flag == 0 ) {
97 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
98 << "EvtBToDDalitzCPK : Invalid mode." << std::endl;
99 assert( 0 );
100 }
101}
102//=============================================================================
103// Set prob max
104//=============================================================================
106{
107 if ( m_flag == 1 ) {
108 // PHSP
109 setProbMax( 0. );
110 } else if ( m_flag == 2 ) {
111 // SVS
112 setProbMax( 1.0 );
113 }
114}
115//=============================================================================
116// decay particle
117//=============================================================================
119{
120 if ( m_flag == 1 ) {
121 // PHSP
123 vertex( 0. );
124 } else if ( m_flag == 2 ) {
125 // SVS
127
128 EvtParticle* v;
129 v = p->getDaug( 0 );
130 double massv = v->mass();
131 EvtVector4R momv = v->getP4();
132 EvtVector4R moms = p->getDaug( 1 )->getP4();
133 double parentMass = p->mass();
134 EvtVector4R p4_parent = momv + moms;
135
136 double norm = massv / ( momv.d3mag() * parentMass );
137 p4_parent = norm * p4_parent;
138 vertex( 0, p4_parent * ( v->epsParent( 0 ) ) );
139 vertex( 1, p4_parent * ( v->epsParent( 1 ) ) );
140 vertex( 2, p4_parent * ( v->epsParent( 2 ) ) );
141 }
142}
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
EvtBToDDalitzCPK * clone() const override
void initProbMax() override
void init() override
void decay(EvtParticle *p) override
std::string getName() const override
void vertex(const EvtComplex &amp)
int getNDaug() const
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
Definition EvtId.hh:27
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
virtual EvtVector4C epsParent(int i) const
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
const EvtVector4R & getP4() const
EvtParticle * getDaug(const int i)
double mass() const
double d3mag() const