package gen; import mmc.*; /** * This class calculates atmosphere-dependent quantities for a given average first interaction depth. */ public class ExpCorr extends PhysicsModel{ public double h0=19.279; public double X0=114.8; public CosCorr C; private Integral I; private int func=0; private double xs=1; private double Norm=1; //----------------------------------------------------------------------------------------------------// /** * Initialize class with atmospheric model and ground elevation z0 in [km]. * h0 is the average production height in km or in g/cm^2 if negative. */ public ExpCorr(int model, double h0, double z0){ C = new CosCorr(model, h0, z0); I = new Integral(iromb, imaxs, iprec2); if(h0<0){ this.X0=-h0; Norm=getExp(0, 1); this.h0=getExp(1, 1); } else{ this.h0=h0; this.X0=C.A.X(h0-z0); Norm=getExp(0, 1); } } //----------------------------------------------------------------------------------------------------// /** * Prints zenith angle profile of production height, cos*, total X, track length. */ public static void main(String[] args){ int w=0, m=1; double h0=15.5, z0=0; ExpCorr E; for(int n=0; n *
  • func=1: muon production height *
  • func=2: 1/cos~1/rho *
  • func=3: muon track length *
  • all others: normalization. * */ public double getExp(int func, double x){ this.func=func; xs=x; double aux=0; aux=I.integrateOpened(0, X0, this)+I.integrateWithSubstitution(X0, -1, this, 2); return aux/Norm; } //----------------------------------------------------------------------------------------------------// /** * Common function for calculation of atmospheric averages - interface to Integral. */ public double function(double X){ double aux=1; double rho=Math.exp(-X/X0); switch(func){ case 0: aux=1; break; // normalization case 1: aux=C.geth(xs, X); break; // muon production height case 2: aux=C.A.dXdh(C.geth(1, X))/C.A.dXdh(C.geth(xs, X)); break; // 1/cos~1/rho case 3: aux=C.getx(xs, C.geth(xs, X)); break; // muon track length default: } return rho*aux; } }