BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPto3P.cc
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// File and Version Information:
3// $Id: EvtPto3P.cc,v 1.1.1.2 2007/10/26 05:03:14 pingrg Exp $
4//
5// Environment:
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.
9//
10// Copyright Information:
11// Copyright (C) 1998 Caltech, UCSB
12//
13// Module creator:
14// Alexei Dvoretskii, Caltech, 2001-2002.
15//-----------------------------------------------------------------------
17
21#include "EvtPto3P.hh"
22using namespace EvtCyclic3;
23
25 // There must be 3 daughters. All particles must be pseudoscalars.
26 // Charge must be conserved. Number of arguments must be non-zero.
27
28 EvtId parent = getParentId();
29 assert( getNDaug() == 3 );
30 EvtId dau0 = getDaug( 0 );
31 EvtId dau1 = getDaug( 1 );
32 EvtId dau2 = getDaug( 2 );
33
34 assert( EvtPDL::getSpinType( parent ) == EvtSpinType::SCALAR );
35 assert( EvtPDL::getSpinType( dau0 ) == EvtSpinType::SCALAR );
36 assert( EvtPDL::getSpinType( dau1 ) == EvtSpinType::SCALAR );
37 assert( EvtPDL::getSpinType( dau2 ) == EvtSpinType::SCALAR );
38 assert( EvtPDL::chg3( parent ) ==
39 EvtPDL::chg3( dau0 ) + EvtPDL::chg3( dau1 ) + EvtPDL::chg3( dau2 ) );
40 assert( getNArg() > 0 );
41
42 return EvtDalitzPlot( EvtPDL::getMass( dau0 ), EvtPDL::getMass( dau1 ),
43 EvtPDL::getMass( dau2 ), EvtPDL::getMass( parent ) );
44}
45
47 // Compute the interval size
48
49 EvtDalitzPlot plot = dp();
51 fact->build( parser, 10000 );
52 return fact;
53}
54
55std::vector<EvtVector4R> EvtPto3P::initDaughters( const EvtDalitzPoint& x ) const {
56 std::vector<EvtVector4R> v;
57 assert( x.isValid() );
58
59 // Calculate in the r.f. of AB
60
61 double eA = x.e( A, AB );
62 double eB = x.e( B, AB );
63 double eC = x.e( C, AB );
64 double pA = x.p( A, AB );
65 double pC = x.p( C, AB );
66 double cos = x.cosTh( CA, AB );
67 double sin = sqrt( 1.0 - cos * cos );
68
69 EvtVector4R vA( eA, 0, 0, pA );
70 EvtVector4R vB( eB, 0, 0, -pA );
71 EvtVector4R vC( eC, 0, pC * sin, pC * cos );
72
73 // Boost from rest frame of AB to rest-frame of decaying particle
74 // vboost is the 4-momentum of frame being boosted from in the frame
75 // being boosted into.
76
77 EvtVector4R vboost = vA + vB + vC;
78 vboost.set( 1, -vboost.get( 1 ) );
79 vboost.set( 2, -vboost.get( 2 ) );
80 vboost.set( 3, -vboost.get( 3 ) );
81 vA.applyBoostTo( vboost );
82 vB.applyBoostTo( vboost );
83 vC.applyBoostTo( vboost );
84
85 // Rotate
86
88 double beta = acos( EvtRandom::Flat( -1.0, 1.0 ) );
89 double gamma = EvtRandom::Flat( EvtConst::twoPi );
90
91 vA.applyRotateEuler( alpha, beta, gamma );
92 vB.applyRotateEuler( alpha, beta, gamma );
93 vC.applyRotateEuler( alpha, beta, gamma );
94
95 // Fill vector
96
97 assert( v.size() == 0 );
98 v.push_back( vA );
99 v.push_back( vB );
100 v.push_back( vC );
101
102 return v;
103}
double alpha
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
virtual void build(const EvtMultiChannelParser &parser, int nItg)
static const double twoPi
Definition EvtConst.hh:28
EvtId getParentId()
EvtId getDaug(int i)
Definition EvtId.hh:27
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66
static int chg3(EvtId i)
Definition EvtPDL.hh:65
static double getMass(EvtId i)
Definition EvtPDL.hh:44
EvtDalitzPlot dp()
Definition EvtPto3P.cc:24
virtual std::vector< EvtVector4R > initDaughters(const EvtDalitzPoint &p) const
Definition EvtPto3P.cc:55
virtual EvtAmpFactory< EvtDalitzPoint > * createFactory(const EvtMultiChannelParser &parser)
Definition EvtPto3P.cc:46
static double Flat()
Definition EvtRandom.cc:69
static double Flat(double min, double max)
Definition EvtRandom.cc:55
void applyRotateEuler(double alpha, double beta, double gamma)
double get(int i) const
void set(int i, double d)
void applyBoostTo(const EvtVector4R &p4)