\Model{PTO3P}
\label{pto3p}
\Auth{Dvoretskii}

The \texttt{PTO3P} model is a generic decay-file driven model for simulating 
decays of a scalar (typically pseudoscalar, hence the \texttt{P}) particle
into a final state composed of three scalar particles. $B^+\to K^+\pi^+\pi^-$
would be an example of such a decay. 

It is possible to specify several channels through which the decay can proceed.
The interference effects are proprely handled by the model. It is also possible
to include time-dependent mixing in decays of neutral mesons.

\Expl
For an example of a decay, see the example below.
The first two parameters specify the PDF maximum (e.g. \texttt{MAXPDF 116.2}).
The PDF maximum is needed to perform accept/reject during generation. 
Alternatively if the maximum is not known one can specify the number of points
that will be sampled \texttt{SCANPDF 10000}. The PDF will be evaluated at each
point. To be conservative this maximum will be increased by 20\%. Typically
it's a good idea to do the scan once for a large number of events. Determine
the maximum and then put it explicitly in the decay file.

The other parameters are grouped into partial \texttt{AMPLITUDE} specifications and 
\texttt{COEFFICIENT} specifications. Complex coefficients can be in cartesian 
or polar coordinates. The keywords are: \texttt{CARTESIAN} for 
cartesian coordinates and \texttt{POLAR\_RAD} and \texttt{POLAR\_DEG} for polar coordinates.   

Partial amplitudes can be either \texttt{PHASESPACE} or \texttt{RESONANCE}.
For amplitudes describing intermediate resonances one should specify which 
two particles form the resonance (\texttt{AB}, \texttt{BC}, \texttt{CA}),
and the parameters of the resonance - spin, mass and width. The resonance parameters 
can be specified, either as three numbers or as the particle name. In the latter case
the parameters will be taken from the evt.pdl file. Finally, it's possible to 
get the spin from the evt.pdl file and override the mass and the width of the particle.
Examples:

\begin{verbatim}
RESONANCE BC 1 0.77 0.15
RESONANCE BC rho+
RESONANCE BC rho+ 0.77 0.15
\end{verbatim}
    
\texttt{ANGULAR AB} declares between which two particles the helicity angle will be evaluated.
(The rest frame was specified previously, e.g. \texttt{RESONANCE BC}. This disambiguates
the sign of the amplitude.

\texttt{RESONANCE} amplitudes are calculated using the code in \texttt{EvtGenBase/EvtPto3PAmp} class. 

\texttt{TYPE} specifies the type of the propagator. Choose between non-relativistic
Breit-Wigner (\texttt{NBW}), relativistic Zemach expression (\texttt{RBW\_ZEMACH}),
Kuehn-Santamaria propagator (\texttt{RBW\_KUEHN}) and relativistic propagator 
used e.g. in \texttt{CLEO hep-ex/0011065} (\texttt{RWB\_CLEO}). 

Finally it's possible to supply Blatt-Weisskopf form factors at the 
production (birth) vertex of the resonance and its decay vertex.

\begin{verbatim}
DVFF BLATTWEISSKOPF 3.0
BVFF BLATTWEISSKOPF 1.0
\end{verbatim} 

The functional form of the amplitude for different types of propagators is as followsa
.
For \texttt{NBW}:

$$\sqrt{\frac{\Gamma_0}{2\pi}}\frac{F_D F_B\ d(L,0,0,\cos\theta)}{m-m_0-i\Gamma_0/2}$$

where $m_0$, $\Gamma_0$, $L$ are the mass, width and spin of the resonance, m is the invariant mass of the
pair of particles the resonance decays into, $\theta$ is the helicity angle, $d$ is the Wigner d-function, and
$F_D$, $F_B$ are the optional Blatt-Weisskopf form-factors at the birth (production) and decay vertices of the 
resonance.

For \texttt{RBW\_ZEMACH}:

$$\frac{F_D F_B\ d(L,0,0,\cos\theta) p^L}{m^2_0-m^2-im_0\Gamma}$$

where there is an additional phase space factor $p^L$ with $p$ the momentum of either resonance daughter in the 
rest-frame of the resonance, and the adjusted width is

$$\Gamma = \Gamma_0 F^2_D m_0/m (p/p_0)^{2L+1}$$

where $p_0$ is the momentum of either resonance daughter in the rest frame of the resonance for nominal resonance
mass $m_0$.

For \texttt{RBW\_KUEHN}:

$$\frac{F_D F_B\ d(L,0,0,\cos\theta) m^2_0}{m^2_0-m^2-im_0\Gamma}$$

and for \texttt{RBW\_CLEO} see \texttt{CLEO hep-ex/0011065} e.g. for vector resonance:

$$\frac{F_BF_D(m^2_{BC} - m^2_{CA} + (M^2 - m^2_C)(m^2_A - m^2_B)/m^2_0)}{m^2_0-m^2-im_0\Gamma}$$

For decays with mixing, e.g. $B^0 \to \pi^+ \pi^- \pi^0$ first 
specify partial amplitudes for $B^0 \to \pi^+ \pi^- \pi^0$,
then stick in keyword \texttt{CONJUGATE} followed by mixing 
parameters (currently dm). Then specify partial amplitudes for
$\bar{B^0}   \to \pi^+ \pi^- \pi^0$ in the usual way.


For very narrow resonances the generation efficiency may be very low. 
In that case one should use pole compensation. In PTO3P pole-compensation is 
automatically turned on for all resonances. The pole-compensator PDF is created by 
the same factory that creates the amplitude. EvtDalitzBwPdf is used for that purpose.
If you would like to switch off pole-compensation you'll need to edit EvtPto3PAmpFactory.cc,
there is no way to control it via the decay file at this point.

\Example
The example below shows the decay $D^+\to \bar K^0\pi^+\pi^0$ including
the $\rho^+$ and $\bar K^{*0}$ resonances.

\begin{verbatim}
Decay D+

1.0 anti-K0 pi+ pi0 PTO3P       
        MAXPDF          75.0
        #SCANPDF 10000
        #gives 73.5

        # Non-resonant
        AMPLITUDE       PHASESPACE
        COEFFICIENT     POLAR_RAD       0.9522  -1.8565

        # rho+ (770) 
        AMPLITUDE       RESONANCE       BC      rho+            0.7699  0.1512
                        ANGULAR         AC
                        TYPE            RBW_CLEO
                        DVFF            BLATTWEISSKOPF  25.38
        COEFFICIENT     POLAR_RAD       0.389   0.0 

        # anti-K*0 (770) 
        AMPLITUDE       RESONANCE       AC      anti-K*0        0.89159 0.0498
                        ANGULAR         BC
                        TYPE            RBW_CLEO
                        DVFF            BLATTWEISSKOPF  10.15
        COEFFICIENT     POLAR_RAD       0.194   0.7191
        ;
Enddecay

\end{verbatim}

