BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtCBTo3piMPP.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtCBTo3piMPP.cc
12//
13// Description: Routine to decay B+/-->pi+ pi- pi+/-
14// and has CP violation.
15//
16// Modification history:
17//
18// RYD/Versille May 6, 1997 Module created
19//
20//------------------------------------------------------------------------
21//
22#include "EvtCBTo3piMPP.hh"
29#include <stdlib.h>
30#include <string>
31
32// Below you will have do modify the declaration to be appropriate
33// for your new routine for the calculation of the amplitude
34
35extern "C" void evt3pionsmpp_( double*, int*, double*, double*, double*, double*, double*,
36 double*, double* );
37
39
40void EvtCBTo3piMPP::getName( std::string& model_name ) { model_name = "CB3PI-MPP"; }
41
43
45
46 // check that there are 1 argument
47 checkNArg( 1 );
48 checkNDaug( 3 );
49
51
55}
56
58
60
61 // added by Lange Jan4,2000
62 static EvtId BM = EvtPDL::getId( "B-" );
63 static EvtId BP = EvtPDL::getId( "B+" );
64
65 EvtParticle *pi1, *pi2, *pi3;
66
68 pi1 = p->getDaug( 0 );
69 pi2 = p->getDaug( 1 );
70 pi3 = p->getDaug( 2 );
71
72 EvtVector4R p4[3];
73 double alpha = getArg( 0 );
74
75 int iset;
76
77 static int first = 1;
78
79 if ( first == 1 )
80 {
81 iset = 10000;
82 first = 0;
83 }
84 else { iset = 0; }
85
86 double p4pi1[4], p4pi2[4], p4pi3[4];
87
88 double realA, imgA, realbarA, imgbarA;
89
90 evt3pionsmpp_( &alpha, &iset, p4pi1, p4pi2, p4pi3, &realA, &imgA, &realbarA, &imgbarA );
91
92 p4[0].set( p4pi1[3], p4pi1[0], p4pi1[1], p4pi1[2] );
93 p4[1].set( p4pi2[3], p4pi2[0], p4pi2[1], p4pi2[2] );
94 p4[2].set( p4pi3[3], p4pi3[0], p4pi3[1], p4pi3[2] );
95
96 pi1->init( getDaug( 0 ), p4[0] );
97 pi2->init( getDaug( 1 ), p4[1] );
98 pi3->init( getDaug( 2 ), p4[2] );
99
100 EvtComplex A( realA, imgA );
101 EvtComplex Abar( realbarA, imgbarA );
102
103 // amp is filled just to make sure the compiler will
104 // do its job!! but one has to define amp differently
105 // if one wants the B+ or the B- to decay to 3pi!
106 //
107
108 EvtComplex amp;
109 if ( p->getId() == BP ) { amp = A; }
110 if ( p->getId() == BM ) { amp = Abar; }
111
112 vertex( amp );
113
114 return;
115}
character *LEPTONflag integer iresonances real pi2
void evt3pionsmpp_(double *, int *, double *, double *, double *, double *, double *, double *, double *)
double alpha
EvtDecayBase * clone()
void decay(EvtParticle *p)
virtual ~EvtCBTo3piMPP()
void getName(std::string &name)
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void setProbMax(double prbmx)
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
Definition EvtId.hh:27
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
EvtParticle * getDaug(int i)
void set(int i, double d)