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.
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 //=============================================================================
39 {
40  return "BTODDALITZCPK";
41 }
42 //=============================================================================
43 // Clone method
44 //=============================================================================
46 {
47  return new EvtBToDDalitzCPK;
48 }
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 EvtId BP = EvtPDL::getId( "B+" );
64  static EvtId BM = EvtPDL::getId( "B-" );
65  static EvtId B0 = EvtPDL::getId( "B0" );
66  static EvtId B0B = EvtPDL::getId( "anti-B0" );
67  static EvtId KP = EvtPDL::getId( "K+" );
68  static EvtId KM = EvtPDL::getId( "K-" );
69  static EvtId KS = EvtPDL::getId( "K*0" );
70  static EvtId KSB = EvtPDL::getId( "anti-K*0" );
71  static EvtId D0 = EvtPDL::getId( "D0" );
72  static EvtId D0B = EvtPDL::getId( "anti-D0" );
73 
74  _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  _flag = 1;
83  // PHSP Decay
84  } else if ( ( ( parent == BP ) || ( parent == BM ) ) &&
85  ( ( d1 == KP ) || ( d1 == KM ) ) &&
86  ( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
87  _flag = 1;
88  // also PHSP decay
89  } else if ( ( ( parent == B0 ) || ( parent == B0B ) ) &&
90  ( ( d1 == KS ) || ( d1 == KSB ) ) &&
91  ( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
92  _flag = 2;
93  // SVS Decay
94  }
95 
96  if ( _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 ( _flag == 1 ) {
108  // PHSP
109  setProbMax( 0. );
110  } else if ( _flag == 2 ) {
111  // SVS
112  setProbMax( 1.0 );
113  }
114 }
115 //=============================================================================
116 // decay particle
117 //=============================================================================
119 {
120  if ( _flag == 1 ) {
121  // PHSP
123  vertex( 0. );
124  } else if ( _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 m_parent = p->mass();
134  EvtVector4R p4_parent = momv + moms;
135 
136  double norm = massv / ( momv.d3mag() * m_parent );
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 }
void decay(EvtParticle *p) override
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
std::string getName() override
EvtBToDDalitzCPK * clone() override
void setProbMax(double prbmx)
Definition: EvtId.hh:27
EvtId getParentId() const
Definition: EvtDecayBase.hh:61
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
virtual EvtVector4C epsParent(int i) const
void init() override
void checkNDaug(int d1, int d2=-1)
void initProbMax() override
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
double mass() const
double d3mag() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67