1 //-----------------------------------------------------------------------
2 // File and Version Information:
3 // $Id: EvtPto3P.cc,v 1.13 2004/12/21 22:16:05 ryd Exp $
6 // This software is part of the EvtGen package developed jointly
7 // for the BaBar and CLEO collaborations. If you use all or part
8 // of it, please give an appropriate acknowledgement.
10 // Copyright Information:
11 // Copyright (C) 1998 Caltech, UCSB
14 // Alexei Dvoretskii, Caltech, 2001-2002.
15 //-----------------------------------------------------------------------
16 #include "EvtGenBase/EvtPatches.hh"
18 #include "EvtGenBase/EvtPatches.hh"
19 #include "EvtGenBase/EvtPDL.hh"
20 #include "EvtGenModels/EvtPto3P.hh"
21 #include "EvtGenBase/EvtPto3PAmpFactory.hh"
22 using namespace EvtCyclic3;
24 EvtDalitzPlot EvtPto3P::dp()
26 // There must be 3 daughters. All particles must be pseudoscalars.
27 // Charge must be conserved. Number of arguments must be non-zero.
29 EvtId parent = getParentId();
30 assert(getNDaug() == 3);
31 EvtId dau0 = getDaug(0);
32 EvtId dau1 = getDaug(1);
33 EvtId dau2 = getDaug(2);
35 assert(EvtPDL::getSpinType(parent) == EvtSpinType::SCALAR);
36 assert(EvtPDL::getSpinType(dau0) == EvtSpinType::SCALAR);
37 assert(EvtPDL::getSpinType(dau1) == EvtSpinType::SCALAR);
38 assert(EvtPDL::getSpinType(dau2) == EvtSpinType::SCALAR);
39 assert(EvtPDL::chg3(parent) == EvtPDL::chg3(dau0) + EvtPDL::chg3(dau1) + EvtPDL::chg3(dau2));
40 assert(getNArg() > 0);
42 return EvtDalitzPlot(EvtPDL::getMass(dau0),EvtPDL::getMass(dau1),EvtPDL::getMass(dau2),EvtPDL::getMass(parent));
45 EvtAmpFactory<EvtDalitzPoint>* EvtPto3P::createFactory(const EvtMultiChannelParser& parser)
47 // Compute the interval size
49 EvtDalitzPlot plot = dp();
50 EvtAmpFactory<EvtDalitzPoint>* fact = new EvtPto3PAmpFactory(plot);
51 fact->build(parser,10000);
56 std::vector<EvtVector4R> EvtPto3P::initDaughters(const EvtDalitzPoint& x) const
58 std::vector<EvtVector4R> v;
61 // Calculate in the r.f. of AB
63 double eA = x.e(A,AB);
64 double eB = x.e(B,AB);
65 double eC = x.e(C,AB);
66 double pA = x.p(A,AB);
67 double pC = x.p(C,AB);
68 double cos = x.cosTh(CA,AB);
69 double sin = sqrt(1.0-cos*cos);
71 EvtVector4R vA(eA,0,0,pA);
72 EvtVector4R vB(eB,0,0,-pA);
73 EvtVector4R vC(eC,0,pC*sin,pC*cos);
75 // Boost from rest frame of AB to rest-frame of decaying particle
76 // vboost is the 4-momentum of frame being boosted from in the frame
77 // being boosted into.
79 EvtVector4R vboost = vA + vB + vC;
80 vboost.set(1,-vboost.get(1));
81 vboost.set(2,-vboost.get(2));
82 vboost.set(3,-vboost.get(3));
83 vA.applyBoostTo(vboost);
84 vB.applyBoostTo(vboost);
85 vC.applyBoostTo(vboost);
89 double alpha = EvtRandom::Flat( EvtConst::twoPi );
90 double beta = acos(EvtRandom::Flat( -1.0, 1.0 ));
91 double gamma = EvtRandom::Flat( EvtConst::twoPi );
93 vA.applyRotateEuler( alpha, beta, gamma );
94 vB.applyRotateEuler( alpha, beta, gamma );
95 vC.applyRotateEuler( alpha, beta, gamma );
99 assert(v.size() == 0);