16#pragma warning( disable : 4786 )
38 model_name=
"HypNonLepton";
44 report(
ERROR,
"EvtGen") <<
" ERROR: EvtHypNonLepton generator expected 2 or 3 arguments but found: " <<
getNArg() << std::endl;
45 report(
INFO ,
"EvtGen") <<
" 1. Decay asymmetry parameter - alpha" << std::endl;
46 report(
INFO ,
"EvtGen") <<
" 2. Parameter phi - in degrees (not radians)" << std::endl;
47 report(
INFO ,
"EvtGen") <<
" 3. Note on every x-th decay" << std::endl;
52 report(
ERROR,
"EvtGen") <<
" ERROR: EvtHypNonLepton generator expected 2 daughters but found: " <<
getNDaug() << std::endl;
78 double p_to_s,beta,
delta,gamma;
85 report(
ERROR,
"EvtGen") <<
" ERROR: EvtHypNonLepton found impossible decay: " << M <<
" --> " << m1 <<
" + " << m2 <<
" GeV\n" << std::endl;
89 p = sqrt(M*M-(m1+m2)*(m1+m2))*sqrt(M*M-(m1-m2)*(m1-m2))/2./M;
91 beta = sqrt(1.-m_alpha*m_alpha)*
sin(m_phi);
92 delta = -atan2(beta,m_alpha);
93 gamma = sqrt(1.-m_alpha*m_alpha-beta*beta);
94 p_to_s = sqrt((1.-gamma)/(1.+gamma));
102 double maxProb,m1,m2,M,p;
109 report(
ERROR,
"EvtGen") <<
" ERROR: EvtHypNonLepton found impossible decay: " << M <<
" --> " << m1 <<
" + " << m2 <<
" GeV\n" << std::endl;
113 p=sqrt(M*M-(m1+m2)*(m1+m2))*sqrt(M*M-(m1-m2)*(m1-m2))/2/M;
114 maxProb=16*M*(sqrt(p*p+m1*m1)+m1+
abs(m_B_to_A)*
abs(m_B_to_A)*(sqrt(p*p+m1*m1)-m1));
118 report(
INFO,
"EvtGen") <<
" EvtHypNonLepton set up maximum probability to " << maxProb << std::endl;
131 static long noTries=0;
150 if(m_noTries>0)
if(!((++noTries)%m_noTries))
report(
DEBUG,
"EvtGen") <<
" EvtHypNonLepton already finished " << noTries <<
" matrix element calculations" << std::endl;
EvtComplex EvtLeptonSCurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtComplex EvtLeptonPCurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
ostream & report(Severity severity, const char *facility)
double sin(const BesAngle a)
double cos(const BesAngle a)
void vertex(const EvtComplex &)
void setProbMax(double prbmx)
void getName(std::string &name)
void calcAmp(EvtAmp *amp, EvtParticle *parent)
void decay(EvtParticle *p)
virtual ~EvtHypNonLepton()
static EvtSpinType::spintype getSpinType(EvtId i)
static double getMass(EvtId i)
virtual EvtDiracSpinor spParent(int) const
EvtParticle * getDaug(int i)
virtual EvtDiracSpinor sp(int) const
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static int getSpin2(spintype stype)