BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtHelAmp Class Reference

#include <EvtHelAmp.hh>

Inheritance diagram for EvtHelAmp:

Public Member Functions

 EvtHelAmp ()
virtual ~EvtHelAmp ()
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 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 35 of file EvtHelAmp.hh.

Constructor & Destructor Documentation

◆ EvtHelAmp()

EvtHelAmp::EvtHelAmp ( )
inline

Definition at line 38 of file EvtHelAmp.hh.

38{}

Referenced by clone().

◆ ~EvtHelAmp()

EvtHelAmp::~EvtHelAmp ( )
virtual

Definition at line 36 of file EvtHelAmp.cc.

36{ delete _evalHelAmp; }

Member Function Documentation

◆ clone()

EvtDecayBase * EvtHelAmp::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 40 of file EvtHelAmp.cc.

40{ return new EvtHelAmp; }

◆ decay()

void EvtHelAmp::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 149 of file EvtHelAmp.cc.

149 {
150
151 // first generate simple phase space
153
154 _evalHelAmp->evalAmp( p, _amp2 );
155
156 return;
157}
EvtId * getDaugs()
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)

◆ getName()

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

Implements EvtDecayBase.

Definition at line 38 of file EvtHelAmp.cc.

38{ model_name = "HELAMP"; }

◆ init()

void EvtHelAmp::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 42 of file EvtHelAmp.cc.

42 {
43
44 checkNDaug( 2 );
45
46 // find out how many states each particle have
50
51 if ( verbose() )
52 { report( INFO, "EvtGen" ) << "_nA,_nB,_nC:" << _nA << "," << _nB << "," << _nC << endl; }
53
54 // find out what 2 times the spin is
58
59 if ( verbose() )
60 {
61 report( INFO, "EvtGen" ) << "_JA2,_JB2,_JC2:" << _JA2 << "," << _JB2 << "," << _JC2
62 << endl;
63 }
64
65 // allocate memory
66 int* _lambdaA2 = new int[_nA];
67 int* _lambdaB2 = new int[_nB];
68 int* _lambdaC2 = new int[_nC];
69
70 EvtComplexPtr* _HBC = new EvtComplexPtr[_nB];
71 int ib, ic;
72 for ( ib = 0; ib < _nB; ib++ ) { _HBC[ib] = new EvtComplex[_nC]; }
73
74 int i;
75 // find the allowed helicities (actually 2*times the helicity!)
76 fillHelicity( _lambdaA2, _nA, _JA2, getParentId() );
77 fillHelicity( _lambdaB2, _nB, _JB2, getDaug( 0 ) );
78 fillHelicity( _lambdaC2, _nC, _JC2, getDaug( 1 ) );
79
80 if ( verbose() )
81 {
82 report( INFO, "EvtGen" ) << "Helicity states of particle A:" << endl;
83 for ( i = 0; i < _nA; i++ ) { report( INFO, "EvtGen" ) << _lambdaA2[i] << endl; }
84
85 report( INFO, "EvtGen" ) << "Helicity states of particle B:" << endl;
86 for ( i = 0; i < _nB; i++ ) { report( INFO, "EvtGen" ) << _lambdaB2[i] << endl; }
87
88 report( INFO, "EvtGen" ) << "Helicity states of particle C:" << endl;
89 for ( i = 0; i < _nC; i++ ) { report( INFO, "EvtGen" ) << _lambdaC2[i] << endl; }
90 }
91
92 // now read in the helicity amplitudes
93
94 int argcounter = 0;
95
96 for ( ib = 0; ib < _nB; ib++ )
97 {
98 for ( ic = 0; ic < _nC; ic++ )
99 {
100 _HBC[ib][ic] = 0.0;
101 if ( abs( _lambdaB2[ib] - _lambdaC2[ic] ) <= _JA2 ) argcounter += 2;
102 }
103 }
104
105 checkNArg( argcounter );
106
107 argcounter = 0;
108
109 for ( ib = 0; ib < _nB; ib++ )
110 {
111 for ( ic = 0; ic < _nC; ic++ )
112 {
113 if ( abs( _lambdaB2[ib] - _lambdaC2[ic] ) <= _JA2 )
114 {
115 _HBC[ib][ic] =
116 getArg( argcounter ) * exp( EvtComplex( 0.0, getArg( argcounter + 1 ) ) );
117 ;
118 argcounter += 2;
119 if ( verbose() )
120 {
121 report( INFO, "EvtGen" )
122 << "_HBC[" << ib << "][" << ic << "]=" << _HBC[ib][ic] << endl;
123 }
124 }
125 }
126 }
127
128 _evalHelAmp = new EvtEvalHelAmp( EvtPDL::getSpinType( getParentId() ),
130 EvtPDL::getSpinType( getDaug( 1 ) ), _HBC );
131
132 // Note: these are not class data members but local variables.
133 delete[] _lambdaA2;
134 delete[] _lambdaB2;
135 delete[] _lambdaC2;
136 for ( int ib = 0; ib < _nB; ib++ ) { delete[] _HBC[ib]; }
137 delete[] _HBC; // _HBC is copied in ctor of EvtEvalHelAmp above.
138}
EvtComplex exp(const EvtComplex &c)
EvtComplex * EvtComplexPtr
Definition EvtComplex.hh:68
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ INFO
Definition EvtReport.hh:52
double getArg(int j)
EvtId getParentId()
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66
static int getSpin2(spintype stype)
static int getSpinStates(spintype stype)

◆ initProbMax()

void EvtHelAmp::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 140 of file EvtHelAmp.cc.

140 {
141
142 double maxprob = _evalHelAmp->probMax();
143
144 if ( verbose() ) { report( INFO, "EvtGen" ) << "Calculated probmax" << maxprob << endl; }
145
146 setProbMax( maxprob );
147}
void setProbMax(double prbmx)

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