1 // $Id: EvtBToDDalitzCPK.cpp,v 1.2 2009-03-16 16:28:42 robbep Exp $
3 #include "EvtGenBase/EvtPDL.hh"
4 #include "EvtGenBase/EvtParticle.hh"
5 #include "EvtGenBase/EvtVector4C.hh"
8 #include "EvtGenModels/EvtBToDDalitzCPK.hh"
10 //-----------------------------------------------------------------------------
11 // Implementation file for class : EvtBToDDalitzCPK
12 // Decay Model for B->D0K with D0->Ks pi+ pi-
13 // it is just a way to get the arguments...
14 // Works also for other B->D0K decays...
15 // 2003-12-08 : Patrick Robbe
16 //-----------------------------------------------------------------------------
18 //=============================================================================
19 // Standard destructor
20 //=============================================================================
21 EvtBToDDalitzCPK::~EvtBToDDalitzCPK ( ) { }
22 //=============================================================================
24 //=============================================================================
25 std::string EvtBToDDalitzCPK::getName( )
27 return "BTODDALITZCPK" ;
29 //=============================================================================
31 //=============================================================================
32 EvtDecayBase * EvtBToDDalitzCPK::clone ( )
34 return new EvtBToDDalitzCPK ;
36 //=============================================================================
37 // Initialisation method
38 //=============================================================================
39 void EvtBToDDalitzCPK::init ( )
41 // Check that there are 3 arguments
43 // Check that there are 2 daughters
45 // Check that the particles of the decay are :
46 // B+/- -> D0/bar K+/-
47 // B+/- -> K+/- D0/bar
48 // B0/bar -> K*0/bar D0/bar
49 // and nothing else ...
50 static EvtId BP = EvtPDL::getId( "B+" ) ;
51 static EvtId BM = EvtPDL::getId( "B-" ) ;
52 static EvtId B0 = EvtPDL::getId( "B0" ) ;
53 static EvtId B0B = EvtPDL::getId( "anti-B0" ) ;
54 static EvtId KP = EvtPDL::getId( "K+" ) ;
55 static EvtId KM = EvtPDL::getId( "K-" ) ;
56 static EvtId KS = EvtPDL::getId( "K*0" ) ;
57 static EvtId KSB = EvtPDL::getId( "anti-K*0" ) ;
58 static EvtId D0 = EvtPDL::getId( "D0" ) ;
59 static EvtId D0B = EvtPDL::getId( "anti-D0" ) ;
63 EvtId parent = getParentId() ;
64 EvtId d1 = getDaug( 0 ) ;
65 EvtId d2 = getDaug( 1 ) ;
67 if ( ( ( parent == BP ) || ( parent == BM ) ) &&
68 ( ( d1 == D0 ) || ( d1 == D0B ) ) &&
69 ( ( d2 == KP ) || ( d2 == KM ) ) ) {
73 else if ( ( ( parent == BP ) || ( parent == BM ) ) &&
74 ( ( d1 == KP ) || ( d1 == KM ) ) &&
75 ( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
79 else if ( ( ( parent == B0 ) || ( parent == B0B ) ) &&
80 ( ( d1 == KS ) || ( d1 == KSB ) ) &&
81 ( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
87 report( ERROR , "EvtGen" ) << "EvtBToDDalitzCPK : Invalid mode."
92 //=============================================================================
94 //=============================================================================
95 void EvtBToDDalitzCPK::initProbMax( )
101 else if ( _flag == 2 ) {
106 //=============================================================================
108 //=============================================================================
109 void EvtBToDDalitzCPK::decay( EvtParticle * p )
113 p -> initializePhaseSpace( getNDaug() , getDaugs() ) ;
116 else if ( _flag == 2 ) {
118 p->initializePhaseSpace(getNDaug(),getDaugs());
122 double massv = v->mass();
123 EvtVector4R momv = v->getP4();
124 EvtVector4R moms = p->getDaug(1)->getP4();
125 double m_parent = p->mass();
126 EvtVector4R p4_parent = momv+moms;
128 double norm=massv/(momv.d3mag()*m_parent);
129 p4_parent = norm*p4_parent;
130 vertex(0,p4_parent*(v->epsParent(0)));
131 vertex(1,p4_parent*(v->epsParent(1)));
132 vertex(2,p4_parent*(v->epsParent(2)));