CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
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//
22#include <stdlib.h>
25#include "EvtGenBase/EvtPDL.hh"
28#include <string>
29using std::endl;
30
32
33void EvtmPhsp::getName(std::string& model_name){
34
35 model_name="mPHSP";
36
37}
38
40
41 return new EvtmPhsp;
42
43}
44
45
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
70
71 noProbMax();
72
73}
74
76 EvtVector4R pt,pt2;
77 loop:
78
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
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ ERROR
Definition EvtReport.hh:49
double getArg(int j)
EvtId * getDaugs()
EvtVector4R getP4Lab()
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double mass() const
void initProbMax()
Definition EvtmPhsp.cc:69
void init()
Definition EvtmPhsp.cc:46
void getName(std::string &name)
Definition EvtmPhsp.cc:33
virtual ~EvtmPhsp()
Definition EvtmPhsp.cc:31
void decay(EvtParticle *p)
Definition EvtmPhsp.cc:75
EvtDecayBase * clone()
Definition EvtmPhsp.cc:39