001package kernels;
002
003import models.IntegrableModel;
004
005
006/**
007 * The smeared energy density \(T^{00}(f)\) of an integrable model at one-particle level,
008 * considered as an integral kernel operator.
009 * 
010 * The kernel of this operator is
011 * 
012 *   \[ K(\theta,\eta) = \frac{\mu^2}{2\pi} \cosh^2 \big(\frac{\theta+\eta}{2}\big) \, 
013 *          P(\cosh(\theta-\eta)) \, F_\text{min}(\theta-\eta+i\pi) \,
014 *               \tilde{f} (\mu\cosh\theta-\mu\cosh\eta). \] 
015 *
016 * Here \(\mu\) is the particle mass, a given number. \(P\) is a polynomial, for which this class supports some options.
017 * \( F_\text{min} \) is the minimal solution of the model, cf. {@link models.IntegrableModel}. \(f\) is a real-valued test function
018 * of one real variable; this class assumes that it is a Gaussian, namely
019 * \[ \tilde f(p) = \exp\big( - p^2 \sigma^2 / \mu^2 \big),\]
020 *  where the width \(\sigma\) can be controlled.
021 */
022public class EnergyDensityKernel extends OneParticleKernel {
023    
024        /**
025         * The integrable model associated with the energy density.
026         */
027    protected IntegrableModel model;
028    
029    /**
030     * The mass of the scalar particle.
031     */
032    protected double mass;
033    
034    /**
035     * The standard deviation of the Gaussian smearing function
036     */
037    protected double sigma;
038    
039    /**
040     * The parameter \(\nu\) associated with the polynomial \(P\), see {@link #EnergyDensityKernel(IntegrableModel, double, double, int, double)}.
041     */
042    protected double nu;
043    
044    /**
045     * The parameter \(n\) associated with the polynomial \(P\), see {@link #EnergyDensityKernel(IntegrableModel, double, double, int, double)}.
046     */
047    protected int coshPower;
048
049    /**
050     * Retrieve the integrable model associated with this kernel
051     * @return the integrable model
052     */
053    public IntegrableModel getModel() {
054        return model;
055    }
056
057    /**
058     * Retrieve the mass \(\mu\) associated with this energy density. 
059     * @return the mass
060     */
061    public double getMass() {
062        return mass;
063    }
064    
065    /**
066     * Construct an energy density kernel for a specific integrable model.
067     * 
068     * The polynomial \(P\) here is given by
069     * \[  P(x) = \big((1-\nu) + \nu x\big) \big( \frac{x+1}{2} \big)^n  \]
070     * where \(n\) and \(\nu\) are passed as parameters.
071     * 
072     * The smearing function is a Gaussian with standard deviation \(\sigma\).
073     *  
074     * @param model the integrable model to use
075     * @param mass the mass \(\mu\) of the particle
076     * @param nu parameter \(\nu\) in the polynomial \(P\), see above
077     * @param coshPower parameter \(n\) in the  polynomial \(P\), see above
078     * @param sigma standard deviation \(\sigma\) of the smearing function
079     */
080    public EnergyDensityKernel(IntegrableModel model, double mass, double nu, int coshPower, double sigma) {
081        this.model = model;
082        this.mass = mass;
083        this.sigma = sigma;
084        this.nu = nu;
085        this.coshPower = coshPower;
086    }
087    
088    /**
089     * Return an evaluation of the smearing function, that is, the function \(\tilde f\) in the definition of the kernel.
090     * 
091     * @param p the argument of the smearing function
092     * @return the value of the (Fourier transform of) the smearing function, \(\tilde f (p) \). 
093     */
094    protected double smearing(double p) {
095        return Math.exp(-Math.pow(p/mass*sigma, 2));
096    }
097
098    public double kernelValue(double theta, double eta) {
099        
100        double momentumDiff = mass * (Math.cosh(theta)-Math.cosh(eta));
101        double val = smearing(momentumDiff);
102        val *= Math.pow(Math.cosh((theta+eta)/2), 2);
103        val *= (1-nu) + nu * Math.cosh(theta-eta);
104        if (coshPower != 0) {
105                val *= Math.pow( 0.5 + 0.5*Math.cosh(theta-eta), coshPower);
106        }
107        val *= model.FminIpi(theta-eta);
108        val *= mass*mass / 2.0 / Math.PI;
109        return val;
110    }
111
112}