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