BOSS 8.0.0
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//
21#include "EvtmPhsp.hh"
27#include <stdlib.h>
28#include <string>
29using std::endl;
30
32
33void EvtmPhsp::getName( std::string& model_name ) { model_name = "mPHSP"; }
34
36
38
39 if ( getNArg() == 3 )
40 {
41 nd1 = getArg( 0 ); // assign the first nd1 particle in the son list
42 ma1 = getArg( 1 ); // the lower mass for the nd1 son cluster
43 ma2 = getArg( 2 ); // the upper mass for the nd1 son cluster
44 }
45 else if ( getNArg() == 6 )
46 {
47 nd1 = getArg( 0 ); // assign the first nd1 particle in the son list
48 ma1 = getArg( 1 ); // the lower mass for the nd1 son cluster
49 ma2 = getArg( 2 ); // the upper mass for the nd1 son cluster
50 nd2 = getArg( 3 ); // assign the first nd1 particle in the son list
51 mb1 = getArg( 4 ); // the lower mass for the nd2 son cluster
52 mb2 = getArg( 5 ); // the upper mass for the nd2 son cluster
53 }
54 else
55 {
56
57 report( ERROR, "EvtGen" ) << "EvtmPHSP generator expected "
58 << " 3 or 6 arguments but found:" << getNArg() << endl;
59 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
60 ::abort();
61 }
62}
63
65
67 EvtVector4R pt, pt2;
68loop:
69
71
72 pt = p->getDaug( 0 )->getP4Lab();
73 for ( int ii = 1; ii < nd1; ii++ ) { pt = pt + p->getDaug( ii )->getP4Lab(); }
74 xmass1 = pt.mass();
75
76 if ( getNArg() == 6 )
77 {
78 pt2 = p->getDaug( nd1 )->getP4Lab();
79 for ( int jj = nd1 + 1; jj < nd1 + nd2; jj++ ) pt2 = pt2 + p->getDaug( jj )->getP4Lab();
80 }
81 xmass2 = pt2.mass();
82
83 // std::cout<<"xmass1= "<<xmass1<<std::endl;
84
85 if ( getNArg() == 3 && ( xmass1 < ma1 || xmass1 > ma2 ) ) goto loop;
86 if ( getNArg() == 6 && ( xmass1 < ma1 || xmass1 > ma2 || xmass2 < mb1 || xmass2 > mb2 ) )
87 goto loop;
88
89 return;
90}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ 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:64
void init()
Definition EvtmPhsp.cc:37
void getName(std::string &name)
Definition EvtmPhsp.cc:33
virtual ~EvtmPhsp()
Definition EvtmPhsp.cc:31
void decay(EvtParticle *p)
Definition EvtmPhsp.cc:66
EvtDecayBase * clone()
Definition EvtmPhsp.cc:35