Java source code of 'jhplot.stat.BunchingParameters'

package jhplot.stat;


import jhplot.P1D;
import jhplot.gui.HelpBrowser;
import java.lang.Math;


/**
* Calculations of bunching parameters. They haracterize  local multiplicity
* fluctuations inside a phase space. Calculations are done up to BP(6) order 
* For a Poisson distribution it should be 1 
* for all divisions
*
* Here are relevant  papers: 

* 1) LOCAL MULTIPLICITY FLUCTUATIONS IN HADRONIC Z DECAY. * L3 Collaboration (M. Acciarri et al.). CERN-PPE-97-165, Dec 1997. 18pp. * Phys.Lett.B429:375-386,1998 *

* Other papers:
* 1) Bunching Parameter and Intermittency in High-Energy Collisions * by S.V.Chekanov and V.I.Kuvshinov * Acta Phys. Pol. B25 (1994) p.1189-1197

* 2) Multifractal Multiplicity Distribution in Bunching-Parameter Analysis * by S.V.Chekanov and V.I.Kuvshinov * J. Phys G22 (1996), p.601-610

* 3) Generalized Bunching Parameters and Multiplicity Fluctuations in Restricted Phase-Space Bins * by S.V.Chekanov, W.Kittel and V.I.Kuvshinov * Z. Phys. C74 (1997) p.517-529, hep-ph/9606335

* 4) Scale-Invariant Dynamical Fluctuations in Jet Physics * by S.V.Chekanov * Eur. Phys. J. C6 (1999), 331-342, hep-ph/9804316

* 5) Suppression of multi-gluon fluctuations in jets at a Linear Collider * by S. V. Chekanov * Phys.Lett. B509 (2001) 74-80, hep-ph/0101233 * * @author S.Chekanov * */ public class BunchingParameters { private int Bins=0; private double Min=0; private int [][] ICC; private int Nmax; private double[][] BP; private double[][] ER; private int[] IBI; private double[] BI; private int NCO[][][]; private int IH[][][]; private int CM[][][][]; private int Nev=0; private double[][] HB; private int IMAX=0; /** * Initialize Bunching parameter. * * @param NmaxOrder Max order of the bunching parameter (starting from 2)! * @param Bins Defines Max number of bins used to divide the phase space (>1). * The actual number of divisions is step*Bins. Therefore, 10 * bins with step=4 means 400 divisions between Min and Max * @param step used to increase step for divisions * @param Min Min value in X * @param Max Max value in X */ public BunchingParameters(int NmaxOrder, int Bins, int step, double Min, double Max){ this.Bins=Bins; this.Min=Min; this.Nmax=NmaxOrder+1; if (this.Bins<2){ System.out.println("Number of bins should be larger than 2"); return; } if (this.Nmax<3){ System.out.println("Order if BP should be larger than 2"); return; } IBI=new int[Bins]; for (int i = 0; i5) { IBI[0]=2; IBI[1]=4; IBI[2]=6; IBI[3]=8; IBI[4]=10; for (int i = 5; i < IBI.length; i++) { IBI[i]=10+(i-4)*4; } } */ for (int i = 0; i < Bins; i++) { BI[i] = (Max-Min)/ (double)IBI[i]; } ICC=new int[Bins][IMAX]; NCO=new int[Nmax][Bins][IMAX]; IH=new int[Nmax][Bins][IMAX]; CM=new int[Nmax][Nmax][Bins][IMAX]; HB = new double [Nmax][IMAX]; BP= new double[Nmax][Bins]; ER= new double[Nmax][Bins]; Nev=0; // set to zero for (int n = 0; n < Nmax; n++) { for (int i = 0; i < Bins; i++) { for (int j = 0; j < IBI[i]; j++) { NCO[n][i][j]=0; IH[n][i][j]=0; }} } } /** * Collect information about sampling. * Put this method in a loop and pass vector with particle * characteristics. * @param v - vector characterizing particles (like momentum, speed etc) */ public void run(double[] v){ Nev++; // set to zero before filling for (int i = 0; i< Bins; i++) for (int j = 0; jm1 && v[m]1 but smaller than 8 * @param order order of bunching parameter * @return bunching parameters */ public P1D getBP(int order) { if (order>Nmax){ System.out.println("BP order is larger then allowed max 8"); return null; } if (order<2){ System.out.println("BP order is too small"); return null; } P1D pp= new P1D("BP_{"+ Integer.toString(order)+"}"); // always start from second division for (int i = 1; i < Bins; i++) { pp.add(IBI[i],BP[order][i],ER[order][i] ); } return pp; } /** * Show online documentation. */ public void doc() { String a=this.getClass().getName(); a=a.replace(".", "/")+".html"; new HelpBrowser( HelpBrowser.JHPLOT_HTTP+a); } }