BOSS
7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.cc
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
//
3
// Modification history:
4
//
5
// pingrg January 22, 2014 Module created
6
//
7
// -------- input file must take the form like:
8
// [number of final state particles in this event]
9
// [PDG ID of particle 1] [P_x] [P_y] [P_z] [E]
10
// [PDG ID of particle 2] [P_x] [P_y] [P_z] [E]
11
// and so on
12
//------------------------------------------------------------------------
13
//
14
#include "EvtGenBase/EvtPatches.hh"
15
#include <stdlib.h>
16
#include "EvtGenBase/EvtParticle.hh"
17
#include "EvtGenBase/EvtGenKine.hh"
18
#include "EvtGenBase/EvtPDL.hh"
19
#include "EvtGenBase/EvtReport.hh"
20
#include "EvtGenBase/EvtRandom.hh"
21
#include "
EvtLambdac2pKpi.hh
"
22
#include <string>
23
24
std::vector<std::vector<EvtVector4R> > EvtLambdac2pKpi::Evt;
25
EvtLambdac2pKpi::~EvtLambdac2pKpi
() {}
26
27
void
EvtLambdac2pKpi::getName
(std::string& model_name){
28
29
model_name=
"Lambdac2pKpi"
;
30
31
}
32
33
EvtDecayBase
*
EvtLambdac2pKpi::clone
(){
34
35
return
new
EvtLambdac2pKpi
;
36
37
}
38
39
40
void
EvtLambdac2pKpi::init
(){
41
42
// check that there are 0 arguments
43
checkNArg
(0);
44
bool
idp =
getDaugs
()[0]==
EvtPDL::getId
(std::string(
"p+"
)) ||
getDaugs
()[0]==
EvtPDL::getId
(std::string(
"anti-p-"
));
45
bool
idk =
getDaugs
()[1]==
EvtPDL::getId
(std::string(
"K+"
)) ||
getDaugs
()[1]==
EvtPDL::getId
(std::string(
"K-"
)) ||
getDaugs
()[1]==
EvtPDL::getId
(std::string(
"K_S0"
));;
46
bool
idpi =
getDaugs
()[2]==
EvtPDL::getId
(std::string(
"pi+"
)) ||
getDaugs
()[2]==
EvtPDL::getId
(std::string(
"pi-"
))||
getDaugs
()[2]==
EvtPDL::getId
(std::string(
"pi0"
));
47
if
(!(idp && idk && idpi ) ){std::cout<<
"EvtLambdac2pKpi: the daughter sequence should be p K pi"
<<std::endl;abort();}
48
std::vector<EvtVector4R> vp4;
49
m_inputFileName=getenv(
"BESEVTGENROOT"
);
50
m_inputFileName +=
"/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.dat"
;
51
// m_inputFileName="EvtLambdac2pKpi.dat";
52
m_inputFile.open(m_inputFileName.c_str());
53
if
(!m_inputFile){
54
cout <<
"EvtLambdac2pKpi: PROBLEMS OPENING FILE "
55
<< m_inputFileName << endl;
56
exit(0);
57
}
58
nParticles=3;
//number of daughters
59
Ntot = 100000;
//number of events stored in the file m_puthFileName
60
Evt.clear();
61
for
(
int
h=0;h<Ntot;h++){
62
vp4.clear();
63
for
(
int
i = 0; i < nParticles; i++){
64
EvtVector4R
p4;
65
m_inputFile >> pxParticle; p4.
set
(1,pxParticle);
66
m_inputFile >> pyParticle; p4.
set
(2,pyParticle);
67
m_inputFile >> pzParticle; p4.
set
(3,pzParticle);
68
m_inputFile >> eParticle; p4.
set
(0,eParticle);
69
vp4.push_back(p4);
70
}
71
Evt.push_back(vp4);
72
}
73
74
}
75
76
void
EvtLambdac2pKpi::initProbMax
(){
77
78
noProbMax
();
79
80
}
81
82
void
EvtLambdac2pKpi::decay
(
EvtParticle
*p ){
83
84
double
weight
= p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
());
85
int
rdm= (int)Evt.size()*
EvtRandom::Flat
(0.0,1.0);
86
//debugging
87
//std::cout<<"rdm= "<<rdm<<" "<<Evt.size()<<std::endl;
88
89
if
(Evt.size()==0) {std::cout<<
"EvtLambdac2pKpi: out of stored file record"
<<std::endl;abort();}
90
for
(
int
i=0;i<nParticles;i++){
91
EvtParticle
* daug=p->
getDaug
(i);
92
daug->
init
(daug->
getId
(),Evt[rdm][i]);
93
}
94
// std::cout<<p->getDaug(0)->getP4()<<p->getDaug(1)->getP4()<<p->getDaug(2)->getP4()<<std::endl;
95
96
return ;
97
}
98
99
100
EvtLambdac2pKpi.hh
weight
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared dimensionless $ !dummy photon IR regulator $ !crude photon multiplicity enhancement factor *EVENT $ !MC crude volume of PhhSpace *Sfactors $ !YFS formfactor IR part only $ !YFS formfactor non IR finite part $ !mass weight
Definition:
KarFin.h:34
EvtDecayBase
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:33
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::getDaugs
EvtId * getDaugs()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.hh:65
EvtDecayBase::checkNArg
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDecayBase.cc:482
EvtLambdac2pKpi::decay
void decay(EvtParticle *p)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.cc:82
EvtLambdac2pKpi::initProbMax
void initProbMax()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.cc:76
EvtLambdac2pKpi::clone
EvtDecayBase * clone()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.cc:33
EvtLambdac2pKpi::init
void init()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.cc:40
EvtLambdac2pKpi::EvtLambdac2pKpi
EvtLambdac2pKpi()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.hh:40
EvtLambdac2pKpi::~EvtLambdac2pKpi
virtual ~EvtLambdac2pKpi()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.cc:25
EvtLambdac2pKpi::getName
void getName(std::string &name)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtLambdac2pKpi.cc:27
EvtPDL::getId
static EvtId getId(const std::string &name)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtPDL.cc:287
EvtParticle
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.hh:42
EvtParticle::init
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle::getId
EvtId getId() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:113
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
EvtRandom::Flat
static double Flat()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtRandom.cc:74
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
EvtLambdac2pKpi.cc
Generated by
1.9.6