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

#include <EvtRhoPi.hh>

Inheritance diagram for EvtRhoPi:

Public Member Functions

 EvtRhoPi ()
virtual ~EvtRhoPi ()
void getName (std::string &name)
EvtDecayBaseclone ()
void initProbMax ()
void init ()
void decay (EvtParticle *p)
double AmplitudeSquare (double ResonanceMass, double ResonanceWidth, double r1, double r2, double phase1, double phase2)
EvtVector4R GetDaugMomLab (int i)
EvtVector4R GetDaugMomCM (int i)
EvtVector4R GetDaugMomHel (int i)
int GetNdaug ()
Public Member Functions inherited from EvtDecayIncoherent
void makeDecay (EvtParticle *p)
virtual ~EvtDecayIncoherent ()
void setDaughterSpinDensity (int daughter)
int isDaughterSpinDensitySet (int daughter)
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 EvtDecayBase
bool _daugsDecayedByParentModel

Detailed Description

Definition at line 29 of file EvtRhoPi.hh.

Constructor & Destructor Documentation

◆ EvtRhoPi()

EvtRhoPi::EvtRhoPi ( )
inline

Definition at line 32 of file EvtRhoPi.hh.

32{}

Referenced by clone().

◆ ~EvtRhoPi()

EvtRhoPi::~EvtRhoPi ( )
virtual

Definition at line 45 of file EvtRhoPi.cc.

45{}

Member Function Documentation

◆ AmplitudeSquare()

double EvtRhoPi::AmplitudeSquare ( double ResonanceMass,
double ResonanceWidth,
double r1,
double r2,
double phase1,
double phase2 )

Definition at line 128 of file EvtRhoPi.cc.

129 {
130 EvtVector4R dp1 = GetDaugMomLab( 0 );
131 EvtVector4R dp2 = GetDaugMomLab( 1 );
132 EvtVector4R dp3 = GetDaugMomLab( 2 );
133 VVS Jpsi2rhopi( dp1, dp2, dp3, ResonanceMass, ResonanceWidth, r1, r2, phase1, phase2 );
134 return Jpsi2rhopi.amps();
135}
EvtVector4R GetDaugMomLab(int i)
Definition EvtRhoPi.hh:48

Referenced by decay().

◆ clone()

EvtDecayBase * EvtRhoPi::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 49 of file EvtRhoPi.cc.

49{ return new EvtRhoPi; }

◆ decay()

void EvtRhoPi::decay ( EvtParticle * p)
virtual

default use rho(770) as the intermediate state, this set parameter will generate the symmetric momentum distribution for pi+ pi-.

Implements EvtDecayBase.

Definition at line 65 of file EvtRhoPi.cc.

65 {
66
67 ///// default use rho(770) as the intermediate state, this set parameter will generate the
68 /// symmetric momentum distribution for pi+ pi-.
69 double ResonanceMass = 0.7710;
70 double ResonanceWidth = 0.1492;
71 double r1 = 0.9;
72 double phase1 = 0;
73 double r2 = 1.1;
74 double phase2 = 1.5;
75 if ( getNArg() > 0 )
76 {
77 ResonanceMass = getArg( 0 );
78 ResonanceWidth = getArg( 1 );
79 r1 = getArg( 2 );
80 phase1 = getArg( 3 );
81 r2 = getArg( 4 );
82 phase2 = getArg( 5 );
83 }
84 double amps, SamAmps, rd1;
85 // calculated the max amplitude square in 20000 events, is it enough larger?
86 if ( nrun == 1 )
87 {
88 int ir, nd;
89 for ( ir = 0; ir <= 20000; ir++ )
90 {
92 int nd = p->getNDaug(), i;
93 _nd = nd;
94 for ( i = 0; i <= nd - 1; i++ )
95 {
96 _p4Lab[i] = p->getDaug( i )->getP4Lab();
97 _p4CM[i] = p->getDaug( i )->getP4();
98 }
99 amps = AmplitudeSquare( ResonanceMass, ResonanceWidth, r1, r2, phase1, phase2 );
100 if ( amps > max_amps ) max_amps = amps * 1.01;
101 nrun++;
102 }
103 }
104 if ( max_amps == 0.0 )
105 {
106 report( ERROR, "EvtGen" ) << "The decay amplitude square should be positive number"
107 << endl;
108 abort();
109 }
110 // cout<<"max_amp="<<max_amps<<endl;
111
112loop:
114 int i;
115 for ( i = 0; i <= p->getNDaug() - 1; i++ )
116 {
117 _p4Lab[i] = p->getDaug( i )->getP4Lab();
118 _p4CM[i] = p->getDaug( i )->getP4();
119 }
120 // Put phase space results into the daughters.
121 amps = AmplitudeSquare( ResonanceMass, ResonanceWidth, r1, r2, phase1, phase2 );
122 SamAmps = amps / max_amps;
123 rd1 = EvtRandom::Flat( 0.0, 1.0 );
124 if ( rd1 >= SamAmps ) goto loop;
125 return;
126}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
double getArg(int j)
EvtId * getDaugs()
EvtVector4R getP4Lab()
const EvtVector4R & getP4() const
int getNDaug() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition EvtRandom.cc:69
double AmplitudeSquare(double ResonanceMass, double ResonanceWidth, double r1, double r2, double phase1, double phase2)
Definition EvtRhoPi.cc:128

◆ GetDaugMomCM()

EvtVector4R EvtRhoPi::GetDaugMomCM ( int i)
inline

Definition at line 49 of file EvtRhoPi.hh.

49{ return _p4CM[i]; }

◆ GetDaugMomHel()

EvtVector4R EvtRhoPi::GetDaugMomHel ( int i)
inline

Definition at line 50 of file EvtRhoPi.hh.

50{ return _p4Hel[i]; }

◆ GetDaugMomLab()

EvtVector4R EvtRhoPi::GetDaugMomLab ( int i)
inline

Definition at line 48 of file EvtRhoPi.hh.

48{ return _p4Lab[i]; }

Referenced by AmplitudeSquare().

◆ getName()

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

Implements EvtDecayBase.

Definition at line 47 of file EvtRhoPi.cc.

47{ model_name = "RhoPi"; }

◆ GetNdaug()

int EvtRhoPi::GetNdaug ( )
inline

Definition at line 52 of file EvtRhoPi.hh.

52{ return _nd; }

◆ init()

void EvtRhoPi::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 51 of file EvtRhoPi.cc.

51 {
52
53 // checkNArg(6);
55 // if ( parenttype == EvtSpinType::SCALAR ){
56 // report(ERROR,"EvtGen")<<"Scalar decays with flat distribution"<<endl;
57 // ::abort();
58 // }
59}
EvtId getParentId()
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66

◆ initProbMax()

void EvtRhoPi::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 60 of file EvtRhoPi.cc.

60{ noProbMax(); }

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