64 scalar_part->
init( parent, p_init );
77 amp.
init( parent, 3, listdaug );
80 daughter = root_part->
getDaug( 0 );
82 trino = root_part->
getDaug( 2 );
96 double m = root_part->
mass();
102 double q2, elepton, plepton;
104 double erho, prho, costl;
106 double maxfoundprob = 0.0;
110 for ( massiter = 0; massiter < 3; massiter++ ) {
114 if ( massiter == 1 ) {
117 if ( massiter == 2 ) {
119 if ( ( mass[0] + mass[1] + mass[2] ) > m )
120 mass[0] = m - mass[1] - mass[2] - 0.00001;
123 q2min = mass[1] * mass[1];
124 q2max = ( m - mass[0] ) * ( m - mass[0] );
128 for ( i = 0; i < nQ2Bins; i++ ) {
129 q2 = q2min + ( ( i + 0.5 ) * ( q2max - q2min ) ) / nQ2Bins;
131 erho = ( m * m + mass[0] * mass[0] - q2 ) / ( 2.0 * m );
133 prho = sqrt( erho * erho - mass[0] * mass[0] );
135 p4meson.
set( erho, 0.0, 0.0, -1.0 * prho );
136 p4w.
set( m - erho, 0.0, 0.0, prho );
139 elepton = ( q2 + mass[1] * mass[1] ) / ( 2.0 * sqrt( q2 ) );
140 plepton = sqrt( elepton * elepton - mass[1] * mass[1] );
144 for ( j = 0; j < 3; j++ ) {
145 costl = 0.99 * ( j - 1.0 );
149 p4lepton.
set( elepton, 0.0, plepton * sqrt( 1.0 - costl * costl ),
151 p4nu.
set( plepton, 0.0,
152 -1.0 * plepton * sqrt( 1.0 - costl * costl ),
153 -1.0 * plepton * costl );
155 EvtVector4R boost( ( m - erho ), 0.0, 0.0, 1.0 * prho );
156 p4lepton =
boostTo( p4lepton, boost );
161 daughter->
init( meson, p4meson );
162 lep->
init( lepton, p4lepton );
163 trino->
init( nudaug, p4nu );
165 CalcAmp( root_part, amp, FormFactors );
179 double a = probctl[1];
180 double b = 0.5 * ( probctl[2] - probctl[0] );
181 double c = 0.5 * ( probctl[2] + probctl[0] ) - probctl[1];
184 if ( probctl[1] > prob )
186 if ( probctl[2] > prob )
189 if ( fabs( c ) > 1e-20 ) {
190 double ctlx = -0.5 * b / c;
191 if ( fabs( ctlx ) < 1.0 ) {
192 double probtmp = a + b * ctlx + c * ctlx * ctlx;
193 if ( probtmp > prob )
198 if ( prob > maxfoundprob ) {
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
static double getMeanMass(EvtId i)
int getSpinStates() const
void makeDaughters(unsigned int ndaug, EvtId *id)
void set(int i, double d)
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
EvtSpinDensity getSpinDensity()
static double getMinMass(EvtId i)
void init(EvtId part_n, double e, double px, double py, double pz)
static double getWidth(EvtId i)
void setDiagonalSpinDensity()
EvtParticle * getDaug(int i)
double CalcMaxProb(EvtId parent, EvtId meson, EvtId lepton, EvtId nudaug, EvtSemiLeptonicFF *FormFactors, int nQ2Bins=25)
virtual void CalcAmp(EvtParticle *parent, EvtAmp &, EvtSemiLeptonicFF *FormFactors)=0
static double getMass(EvtId i)
void init(EvtId p, int ndaug, EvtId *daug)
static double getMaxMass(EvtId i)
double normalizedProb(const EvtSpinDensity &d)