BOSS
7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/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 "EvtGenBase/EvtPatches.hh"
22
#include <stdlib.h>
23
#include "EvtGenBase/EvtParticle.hh"
24
#include "EvtGenBase/EvtGenKine.hh"
25
#include "EvtGenBase/EvtPDL.hh"
26
#include "EvtGenBase/EvtReport.hh"
27
#include "EvtGenModels/EvtmPhsp.hh"
28
#include <string>
29
using
std::endl;
30
31
EvtmPhsp::~EvtmPhsp
() {}
32
33
void
EvtmPhsp::getName
(std::string& model_name){
34
35
model_name=
"mPHSP"
;
36
37
}
38
39
EvtDecayBase
*
EvtmPhsp::clone
(){
40
41
return
new
EvtmPhsp
;
42
43
}
44
45
46
void
EvtmPhsp::init
(){
47
48
if
(
getNArg
()==3) {
49
nd1=
getArg
(0);
//assign the first nd1 particle in the son list
50
ma1=
getArg
(1);
// the lower mass for the nd1 son cluster
51
ma2=
getArg
(2);
// the upper mass for the nd1 son cluster
52
}
else
if
(
getNArg
()==6){
53
nd1=
getArg
(0);
//assign the first nd1 particle in the son list
54
ma1=
getArg
(1);
// the lower mass for the nd1 son cluster
55
ma2=
getArg
(2);
// the upper mass for the nd1 son cluster
56
nd2=
getArg
(3);
//assign the first nd1 particle in the son list
57
mb1=
getArg
(4);
// the lower mass for the nd2 son cluster
58
mb2=
getArg
(5);
// the upper mass for the nd2 son cluster
59
}
else
{
60
61
report
(
ERROR
,
"EvtGen"
) <<
"EvtmPHSP generator expected "
62
<<
" 3 or 6 arguments but found:"
<<
getNArg
()<<endl;
63
report
(
ERROR
,
"EvtGen"
) <<
"Will terminate execution!"
<<endl;
64
::abort();
65
}
66
67
}
68
69
void
EvtmPhsp::initProbMax
(){
70
71
noProbMax
();
72
73
}
74
75
void
EvtmPhsp::decay
(
EvtParticle
*p ){
76
EvtVector4R
pt,pt2;
77
loop:
78
79
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
());
80
81
pt=p->
getDaug
(0)->
getP4Lab
();
82
for
(
int
ii=1;ii<nd1;ii++){
83
pt=pt+p->
getDaug
(ii)->
getP4Lab
();
84
}
85
xmass1=pt.
mass
();
86
87
if
(
getNArg
()==6) {
88
pt2=p->
getDaug
(nd1)->
getP4Lab
();
89
for
(
int
jj=nd1+1;jj<nd1+nd2;jj++) pt2=pt2+p->
getDaug
(jj)->
getP4Lab
();
90
}
91
xmass2=pt2.
mass
();
92
93
// std::cout<<"xmass1= "<<xmass1<<std::endl;
94
95
if
(
getNArg
()==3 && (xmass1<ma1||xmass1>ma2) )
goto
loop;
96
if
(
getNArg
()==6 && (xmass1<ma1||xmass1>ma2 || xmass2<mb1 || xmass2>mb2) )
goto
loop;
97
98
return ;
99
}
100
101
report
ostream & report(Severity severity, const char *facility)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtReport.cc:36
ERROR
@ ERROR
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtReport.hh:49
EvtDecayBase
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:33
EvtDecayBase::getArg
double getArg(int j)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.cc:564
EvtDecayBase::noProbMax
void noProbMax()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.cc:304
EvtDecayBase::getNDaug
int getNDaug()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:64
EvtDecayBase::getNArg
int getNArg()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:67
EvtDecayBase::getDaugs
EvtId * getDaugs()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:65
EvtParticle
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.hh:42
EvtParticle::getP4Lab
EvtVector4R getP4Lab()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:685
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:85
EvtParticle::initializePhaseSpace
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:1071
EvtVector4R
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVector4R.cc:39
EvtmPhsp::initProbMax
void initProbMax()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtmPhsp.cc:69
EvtmPhsp::init
void init()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtmPhsp.cc:46
EvtmPhsp::getName
void getName(std::string &name)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtmPhsp.cc:33
EvtmPhsp::~EvtmPhsp
virtual ~EvtmPhsp()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtmPhsp.cc:31
EvtmPhsp::decay
void decay(EvtParticle *p)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtmPhsp.cc:75
EvtmPhsp::EvtmPhsp
EvtmPhsp()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtmPhsp.hh:35
EvtmPhsp::clone
EvtDecayBase * clone()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtmPhsp.cc:39
source
Generator
BesEvtGen
bak-BesEvtGen-00-04-08
src
EvtGen
EvtGenModels
EvtmPhsp.cc
Generated by
1.9.6