BOSS
7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSinglePoint.cc
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
//
3
//
4
// Module: EvtSinglePoint.cc
5
//
6
// Description: Special model to generate single particles with fixed momentu.
7
//
8
// Modification history:
9
//
10
// RYD Febuary 17,1998 Module created
11
//
12
//------------------------------------------------------------------------
13
//
14
#include "EvtGenBase/EvtPatches.hh"
15
#include <stdlib.h>
16
#include "EvtGenBase/EvtParticle.hh"
17
#include "EvtGenBase/EvtRandom.hh"
18
#include "EvtGenBase/EvtPDL.hh"
19
#include "EvtGenModels/EvtSinglePoint.hh"
20
#include "EvtGenBase/EvtReport.hh"
21
#include <string>
22
#include "EvtGenBase/EvtConst.hh"
23
using
std::endl;
24
25
EvtSinglePoint::~EvtSinglePoint
() {}
26
27
void
EvtSinglePoint::getName
(std::string& model_name){
28
29
model_name=
"SinglePoint"
;
30
31
}
32
33
EvtDecayBase
*
EvtSinglePoint::clone
(){
34
35
return
new
EvtSinglePoint
();
36
37
}
38
39
void
EvtSinglePoint::init
(){
40
41
42
//turn off checks for charge conservation
43
disableCheckQ
();
44
45
if
((
getNArg
()==3)) {
46
px =
getArg
(0);
47
py =
getArg
(1);
48
pz =
getArg
(2);
49
50
}
else
{
51
std::cout<<
"expected three parameters: px, py, pz, but find "
<<
getNArg
()<<
" parameters"
<<std::endl;
52
::abort();
53
}
54
55
}
56
57
void
EvtSinglePoint::decay
(
EvtParticle
*p ){
58
59
EvtParticle
*d;
60
EvtVector4R
p4;
61
62
double
mass
=
EvtPDL::getMass
(
getDaug
(0));
63
64
p->
makeDaughters
(
getNDaug
(),
getDaugs
());
65
d=p->
getDaug
(0);
66
67
//generate flat distribution in p
68
//we are now in the parents restframe! This means the
69
//restframe of the e+e- collison.
70
71
double
pmag;
72
pmag = sqrt(px*px + py*py + py*pz);
73
74
75
p4.
set
(sqrt(
mass
*
mass
+pmag*pmag),px,py,pz);
76
d->
init
(
getDaug
(0),p4);
77
return ;
78
}
79
80
81
mass
double mass
Definition:
CosmicGenerator.cxx:138
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::disableCheckQ
void disableCheckQ()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:62
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
EvtDecayBase::getDaug
EvtId getDaug(int i)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:66
EvtPDL::getMass
static double getMass(EvtId i)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtPDL.hh:46
EvtParticle
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.hh:42
EvtParticle::makeDaughters
void makeDaughters(int ndaug, EvtId *id)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:1177
EvtParticle::init
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:85
EvtSinglePoint::clone
EvtDecayBase * clone()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSinglePoint.cc:33
EvtSinglePoint::getName
void getName(std::string &name)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSinglePoint.cc:27
EvtSinglePoint::EvtSinglePoint
EvtSinglePoint()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSinglePoint.hh:26
EvtSinglePoint::init
void init()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSinglePoint.cc:39
EvtSinglePoint::~EvtSinglePoint
virtual ~EvtSinglePoint()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSinglePoint.cc:25
EvtSinglePoint::decay
void decay(EvtParticle *p)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSinglePoint.cc:57
EvtVector4R
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVector4R.hh:29
EvtVector4R::set
void set(int i, double d)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVector4R.hh:183
source
Generator
BesEvtGen
BesEvtGen-00-04-08
src
EvtGen
EvtGenModels
EvtSinglePoint.cc
Generated by
1.9.6