BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtmPhsp.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: EvtmPhsp.cc
12
//
13
// Description: Routine to decay a particle according th phase space
14
//
15
// Modification history:
16
//
17
// RYD January 8, 1997 Module created
18
//
19
//------------------------------------------------------------------------
20
//
21
#include "
EvtmPhsp.hh
"
22
#include "
../EvtGenBase/EvtGenKine.hh
"
23
#include "
../EvtGenBase/EvtPDL.hh
"
24
#include "
../EvtGenBase/EvtParticle.hh
"
25
#include "
../EvtGenBase/EvtPatches.hh
"
26
#include "
../EvtGenBase/EvtReport.hh
"
27
#include <stdlib.h>
28
#include <string>
29
using
std::endl;
30
31
EvtmPhsp::~EvtmPhsp
() {}
32
33
void
EvtmPhsp::getName
( std::string& model_name ) { model_name =
"mPHSP"
; }
34
35
EvtDecayBase
*
EvtmPhsp::clone
() {
return
new
EvtmPhsp
; }
36
37
void
EvtmPhsp::init
() {
38
39
if
(
getNArg
() == 3 )
40
{
41
nd1 =
getArg
( 0 );
// assign the first nd1 particle in the son list
42
ma1 =
getArg
( 1 );
// the lower mass for the nd1 son cluster
43
ma2 =
getArg
( 2 );
// the upper mass for the nd1 son cluster
44
}
45
else
if
(
getNArg
() == 6 )
46
{
47
nd1 =
getArg
( 0 );
// assign the first nd1 particle in the son list
48
ma1 =
getArg
( 1 );
// the lower mass for the nd1 son cluster
49
ma2 =
getArg
( 2 );
// the upper mass for the nd1 son cluster
50
nd2 =
getArg
( 3 );
// assign the first nd1 particle in the son list
51
mb1 =
getArg
( 4 );
// the lower mass for the nd2 son cluster
52
mb2 =
getArg
( 5 );
// the upper mass for the nd2 son cluster
53
}
54
else
55
{
56
57
report
(
ERROR
,
"EvtGen"
) <<
"EvtmPHSP generator expected "
58
<<
" 3 or 6 arguments but found:"
<<
getNArg
() << endl;
59
report
(
ERROR
,
"EvtGen"
) <<
"Will terminate execution!"
<< endl;
60
::abort();
61
}
62
}
63
64
void
EvtmPhsp::initProbMax
() {
noProbMax
(); }
65
66
void
EvtmPhsp::decay
(
EvtParticle
* p ) {
67
EvtVector4R
pt, pt2;
68
loop:
69
70
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
71
72
pt = p->
getDaug
( 0 )->
getP4Lab
();
73
for
(
int
ii = 1; ii < nd1; ii++ ) { pt = pt + p->
getDaug
( ii )->
getP4Lab
(); }
74
xmass1 = pt.
mass
();
75
76
if
(
getNArg
() == 6 )
77
{
78
pt2 = p->
getDaug
( nd1 )->
getP4Lab
();
79
for
(
int
jj = nd1 + 1; jj < nd1 + nd2; jj++ ) pt2 = pt2 + p->
getDaug
( jj )->
getP4Lab
();
80
}
81
xmass2 = pt2.
mass
();
82
83
// std::cout<<"xmass1= "<<xmass1<<std::endl;
84
85
if
(
getNArg
() == 3 && ( xmass1 < ma1 || xmass1 > ma2 ) )
goto
loop;
86
if
(
getNArg
() == 6 && ( xmass1 < ma1 || xmass1 > ma2 || xmass2 < mb1 || xmass2 > mb2 ) )
87
goto
loop;
88
89
return
;
90
}
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtPatches.hh
report
ostream & report(Severity severity, const char *facility)
Definition
EvtReport.cc:34
EvtReport.hh
ERROR
@ ERROR
Definition
EvtReport.hh:49
EvtmPhsp.hh
EvtDecayBase::getArg
double getArg(int j)
Definition
EvtDecayBase.cc:520
EvtDecayBase::EvtDecayBase
EvtDecayBase()
Definition
EvtDecayBase.cc:205
EvtDecayBase::noProbMax
void noProbMax()
Definition
EvtDecayBase.cc:267
EvtDecayBase::getNDaug
int getNDaug()
Definition
EvtDecayBase.hh:67
EvtDecayBase::getNArg
int getNArg()
Definition
EvtDecayBase.hh:70
EvtDecayBase::getDaugs
EvtId * getDaugs()
Definition
EvtDecayBase.hh:68
EvtParticle
Definition
EvtParticle.hh:42
EvtParticle::getP4Lab
EvtVector4R getP4Lab()
Definition
EvtParticle.cc:694
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition
EvtParticle.cc:80
EvtParticle::initializePhaseSpace
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition
EvtParticle.cc:1042
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition
EvtVector4R.cc:40
EvtmPhsp::initProbMax
void initProbMax()
Definition
EvtmPhsp.cc:64
EvtmPhsp::init
void init()
Definition
EvtmPhsp.cc:37
EvtmPhsp::getName
void getName(std::string &name)
Definition
EvtmPhsp.cc:33
EvtmPhsp::~EvtmPhsp
virtual ~EvtmPhsp()
Definition
EvtmPhsp.cc:31
EvtmPhsp::decay
void decay(EvtParticle *p)
Definition
EvtmPhsp.cc:66
EvtmPhsp::EvtmPhsp
EvtmPhsp()
Definition
EvtmPhsp.hh:34
EvtmPhsp::clone
EvtDecayBase * clone()
Definition
EvtmPhsp.cc:35
8.0.0
BOSS_Gen
BesEvtGen
src
EvtGen
EvtGenModels
EvtmPhsp.cc
Generated by
1.16.1