BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtMultibody Class Reference

#include <EvtMultibody.hh>

+ Inheritance diagram for EvtMultibody:

Public Member Functions

 EvtMultibody ()
 
virtual ~EvtMultibody ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void init ()
 
void initProbMax ()
 
void decay (EvtParticle *p)
 
- Public Member Functions inherited from EvtDecayAmp
void makeDecay (EvtParticle *p)
 
void setWeight (double weight)
 
void vertex (const EvtComplex &amp)
 
void vertex (int i1, const EvtComplex &amp)
 
void vertex (int i1, int i2, const EvtComplex &amp)
 
void vertex (int i1, int i2, int i3, const EvtComplex &amp)
 
void vertex (int *i1, const EvtComplex &amp)
 
virtual ~EvtDecayAmp ()
 
- Public Member Functions inherited from EvtDecayBase
virtual void getName (std::string &name)=0
 
virtual void decay (EvtParticle *p)=0
 
virtual void makeDecay (EvtParticle *p)=0
 
virtual EvtDecayBaseclone ()=0
 
virtual void init ()
 
virtual void initProbMax ()
 
virtual std::string commandName ()
 
virtual void command (std::string cmd)
 
double getProbMax (double prob)
 
double resetProbMax (double prob)
 
 EvtDecayBase ()
 
virtual ~EvtDecayBase ()
 
virtual bool matchingDecay (const EvtDecayBase &other) const
 
EvtId getParentId ()
 
double getBranchingFraction ()
 
void disableCheckQ ()
 
void checkQ ()
 
int getNDaug ()
 
EvtIdgetDaugs ()
 
EvtId getDaug (int i)
 
int getNArg ()
 
int getPHOTOS ()
 
void setPHOTOS ()
 
void setVerbose ()
 
void setSummary ()
 
double * getArgs ()
 
std::string * getArgsStr ()
 
double getArg (int j)
 
std::string getArgStr (int j)
 
std::string getModelName ()
 
int getDSum ()
 
int summary ()
 
int verbose ()
 
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
 
void printSummary ()
 
void setProbMax (double prbmx)
 
void noProbMax ()
 
void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
 
void checkNDaug (int d1, int d2=-1)
 
void checkSpinParent (EvtSpinType::spintype sp)
 
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)
 
virtual int nRealDaughters ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EvtDecayBase
static void findMasses (EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
 
static void findMass (EvtParticle *p)
 
static double findMaxMass (EvtParticle *p)
 
- Protected Member Functions inherited from EvtDecayBase
bool daugsDecayedByParentModel ()
 
- Protected Attributes inherited from EvtDecayAmp
EvtAmp _amp2
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Definition at line 10 of file EvtMultibody.hh.

Constructor & Destructor Documentation

◆ EvtMultibody()

EvtMultibody::EvtMultibody ( )
inline

Definition at line 13 of file EvtMultibody.hh.

13{ _decayTree = NULL; }
#define NULL

Referenced by clone().

◆ ~EvtMultibody()

EvtMultibody::~EvtMultibody ( )
virtual

Definition at line 13 of file EvtMultibody.cc.

14{
15 if( _decayTree != NULL ) delete _decayTree;
16 _decayTree=NULL;
17}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtMultibody::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 24 of file EvtMultibody.cc.

25{
26 return new EvtMultibody;
27}

◆ decay()

void EvtMultibody::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 54 of file EvtMultibody.cc.

55{
56 // Initialize the phase space before doing anything else!
58 std::vector<EvtVector4R> product;
59
60 for(int i=0; i<getNDaug(); ++i)
61 product.push_back(p->getDaug(i)->getP4Lab());
62
63 EvtSpinAmp amp = _decayTree->amplitude( product );
64
65 int * ilist = new int[amp.rank()];
66
67 // Set up the rotation matrix for the root particle
69
72
73 std::vector<EvtSpinType::spintype> types(2, type);
74 EvtSpinAmp newamp( types, EvtComplex(0.0, 0.0) );
75 std::vector<int> index = newamp.iterallowedinit();
76 do {
77 newamp(index) = R.Get((index[0]+twospin)/2,(index[1]+twospin)/2);
78 } while( newamp.iterateallowed( index ) );
79
80 newamp.extcont(amp, 1, 0);
81 amp=newamp;
82
83 index = amp.iterallowedinit();
84 std::vector<int> spins = amp.dims();
85
86 do {
87 for( int i=0; i<index.size(); ++i ) {
88 ilist[i]=index[i]+spins[i];
89 }
90
91 vertex( ilist, amp( index ) );
92 } while( amp.iterateallowed( index ) );
93
94 delete [] ilist;
95}
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
EvtId getParentId()
Definition: EvtDecayBase.hh:60
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
EvtSpinAmp amplitude(const vector< EvtVector4R > &product) const
Definition: EvtMTree.cc:395
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
EvtVector4R getP4Lab()
Definition: EvtParticle.cc:684
virtual EvtSpinDensity rotateToHelicityBasis() const =0
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:84
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
bool iterateallowed(vector< int > &index) const
Definition: EvtSpinAmp.cc:411
int rank() const
Definition: EvtSpinAmp.hh:64
vector< int > iterallowedinit() const
Definition: EvtSpinAmp.cc:421
const vector< int > & dims() const
Definition: EvtSpinAmp.hh:67
static int getSpin2(spintype stype)
Definition: EvtSpinType.hh:34
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

◆ getName()

void EvtMultibody::getName ( std::string &  name)
virtual

Implements EvtDecayBase.

Definition at line 19 of file EvtMultibody.cc.

20{
21 model_name = "D_MULTIBODY";
22}

◆ init()

void EvtMultibody::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 29 of file EvtMultibody.cc.

30{
31 int N = getNArg();
32
33 _decayTree = new EvtMTree( getDaugs(), getNDaug() );
34
35 for(int i=0; i<N-1; ++i) {
36 if(getArgStr( i )=="RESONANCE") {
37 _decayTree->addtree( getArgStr( ++i ) );
38 } else {
39 report(ERROR,"EvtGen")
40 << "Syntax error at " << getArgStr( i ) << std::endl;
41 ::abort();
42 }
43 }
44}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
std::string getArgStr(int j)
Definition: EvtDecayBase.hh:75
void addtree(const string &args)
Definition: EvtMTree.cc:379

◆ initProbMax()

void EvtMultibody::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 49 of file EvtMultibody.cc.

50{
51 // setProbMax(1.0);
52}

The documentation for this class was generated from the following files: