BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPhspStepf.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: EvtPhspStep.cc
12
//
13
// Description: Routine to decay a particle according th phase space, but with a stepfunction
14
// in a two-body subsystem
15
//
16
// Modification history:
17
//
18
// RYD January 8, 1997 Module created
19
// N. Huesken July 2022 model to suppress part of the phase-space in a multi-body
20
// decay syntax in decay card (e.g.): Decay J/psi 1.0 K+ K- pi+ pi- PhspStepf 0 1 1.0 1.04
21
// 0.9; Enddecay will generate J/psi --> K+K-pi+pi- in 4-body PHSP, but with 90% of K+K-
22
// invariant masses outside the region 1.00-1.04 being vetoed during event generation this
23
// allows for more efficient event generation for PWA with narrow resonances
24
//
25
// apart from the suppression, this is a copy of the PHSP model
26
//
27
//------------------------------------------------------------------------
28
//
29
#include "
EvtPhspStepf.hh
"
30
#include "
../EvtGenBase/EvtGenKine.hh
"
31
#include "
../EvtGenBase/EvtGlobalSet.hh
"
32
#include "
../EvtGenBase/EvtPDL.hh
"
33
#include "
../EvtGenBase/EvtParticle.hh
"
34
#include "
../EvtGenBase/EvtPatches.hh
"
35
#include "
../EvtGenBase/EvtRandom.hh
"
36
#include "
../EvtGenBase/EvtReport.hh
"
37
#include <stdlib.h>
38
#include <string>
39
40
EvtPhspStepf::~EvtPhspStepf
() {}
41
42
void
EvtPhspStepf::getName
( std::string& model_name ) { model_name =
"PhspStepf"
; }
43
44
EvtDecayBase
*
EvtPhspStepf::clone
() {
return
new
EvtPhspStepf
; }
45
46
void
EvtPhspStepf::init
() {
47
// check that there are 5 arguments
48
checkNArg
( 5 );
49
idx1 = (int)
getArg
( 0 );
50
idx2 = (int)
getArg
( 1 );
51
// std::cout << idx1 << " " << idx2 << std::endl;
52
mass_min =
getArg
( 2 );
53
mass_max =
getArg
( 3 );
54
frac =
getArg
( 4 );
55
}
56
57
void
EvtPhspStepf::initProbMax
() {
noProbMax
(); }
58
59
void
EvtPhspStepf::decay
(
EvtParticle
* p ) {
60
61
// unneeded - lange - may13-02
62
// if ( p->getNDaug() != 0 ) {
63
// Will end up here because maxrate multiplies by 1.2
64
// report(DEBUG,"EvtGen") << "In EvtPhspStep: has "
65
// <<" daugthers should not be here!"<<endl;
66
// return;
67
//}
68
EvtFilter:
69
double
weight
= p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
70
// std::cout<<"weight= "<<weight<<std::endl;
71
// std::cout << idx1 << " " << idx2 << std::endl;
72
if
( ( ( p->
getDaug
( idx1 )->
getP4
() + p->
getDaug
( idx2 )->
getP4
() ).mass() < mass_min ||
73
( p->
getDaug
( idx1 )->
getP4
() + p->
getDaug
( idx2 )->
getP4
() ).mass() > mass_max ) &&
74
EvtRandom::Flat
( 0.0, 1.0 ) < frac )
75
{
goto
EvtFilter; }
76
77
if
( !
EvtGlobalSet::iVV
.size() )
return
;
78
79
for
(
int
i = 0; i <
EvtGlobalSet::iVV
.size(); i++ )
80
{
81
EvtVector4R
psum( 0, 0, 0, 0 );
82
for
(
int
j = 0; j <
EvtGlobalSet::iVV
[i].size(); j++ )
83
{
84
int
idx =
EvtGlobalSet::iVV
[i][j];
85
psum += p->
getDaug
( idx )->
getP4
();
86
// debugging
87
// std::cout<<idx<<std::endl;
88
}
89
double
xmass
= psum.
mass
();
90
// std::cout<<xmass<<" "<<EvtGlobalSet::dVV[i][0]<<" "<<EvtGlobalSet::dVV[i][1]<<std::endl;
91
if
(
xmass
<
EvtGlobalSet::dVV
[i][0] ||
xmass
>
EvtGlobalSet::dVV
[i][1] )
goto
EvtFilter;
92
}
93
return
;
94
}
EvtGenKine.hh
EvtGlobalSet.hh
EvtPDL.hh
EvtParticle.hh
EvtPatches.hh
EvtPhspStepf.hh
EvtRandom.hh
EvtReport.hh
xmass
const double xmass[5]
Definition
Gam4pikp.cxx:35
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::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::getDaugs
EvtId * getDaugs()
Definition
EvtDecayBase.hh:68
EvtDecayBase::checkNArg
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition
EvtDecayBase.cc:449
EvtGlobalSet::dVV
static std::vector< std::vector< double > > dVV
Definition
EvtGlobalSet.hh:20
EvtGlobalSet::iVV
static std::vector< std::vector< int > > iVV
Definition
EvtGlobalSet.hh:21
EvtParticle
Definition
EvtParticle.hh:42
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cc:108
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
EvtPhspStepf::decay
void decay(EvtParticle *p)
Definition
EvtPhspStepf.cc:59
EvtPhspStepf::initProbMax
void initProbMax()
Definition
EvtPhspStepf.cc:57
EvtPhspStepf::getName
void getName(std::string &name)
Definition
EvtPhspStepf.cc:42
EvtPhspStepf::init
void init()
Definition
EvtPhspStepf.cc:46
EvtPhspStepf::clone
EvtDecayBase * clone()
Definition
EvtPhspStepf.cc:44
EvtPhspStepf::~EvtPhspStepf
virtual ~EvtPhspStepf()
Definition
EvtPhspStepf.cc:40
EvtPhspStepf::EvtPhspStepf
EvtPhspStepf()
Definition
EvtPhspStepf.hh:33
EvtRandom::Flat
static double Flat(double min, double max)
Definition
EvtRandom.cc:55
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition
EvtVector4R.cc:40
8.0.0
BOSS_Gen
BesEvtGen
src
EvtGen
EvtGenModels
EvtPhspStepf.cc
Generated by
1.16.1