31   class JEMShowerCorrection
 
   41       const double P_Atm = 240.0;                      
 
   45       const JDispersion dispersion(P_Atm);
 
   47       const double xmin = 1.0 / wmax;
 
   48       const double xmax = 1.0 / wmin;
 
   55         const double w  = 1.0 / 
x;
 
   56         const double dw = dx * w*
w;
 
   58         const double n  = dispersion.getIndexOfRefractionPhase(w);
 
   67       f1[ 1.0e-3]  =    90.96 /  1.0e-3;               
 
   68       f1[ 2.0e-3]  =   277.36 /  2.0e-3;               
 
   69       f1[ 3.0e-3]  =   485.82 /  3.0e-3;
 
   70       f1[ 4.0e-3]  =   692.83 /  4.0e-3;
 
   71       f1[ 5.0e-3]  =   890.01 /  5.0e-3;
 
   72       f1[ 6.0e-3]  =  1098.53 /  6.0e-3;
 
   73       f1[ 7.0e-3]  =  1285.47 /  7.0e-3;
 
   74       f1[ 8.0e-3]  =  1502.86 /  8.0e-3;
 
   75       f1[ 9.0e-3]  =  1687.15 /  9.0e-3;
 
   76       f1[10.0e-3]  =  1891.00 / 10.0e-3;
 
   81       f2[-2.0]  =  
log(1.891e3 / 1.0e-2);
 
   82       f2[-1.0]  =  
log(1.905e4 / 1.0e-1);
 
   83       f2[ 0.0]  =  
log(1.889e5 / 1.0e+0);
 
   84       f2[+1.0]  =  
log(1.875e6 / 1.0e+1);
 
   85       f2[+2.0]  =  
log(1.881e7 / 1.0e+2);
 
   98     double operator()(
const double E)
 const 
  100       if        (E <= 
f1.getXmin()) {
 
  104       } 
else if (E <= 
f1.getXmax()) {
 
  110         const double x = 
log10(E);
 
  112         if        (x <= f2.getXmin()) {
 
  114           return exp(f2.begin()->getY());
 
  116         } 
else if (x <= f2.getXmax()) {
 
  122           return exp(f2.rbegin()->getY());
 
  129     JPolint1Function1D_t 
f1;
 
  130     JPolint1Function1D_t f2;
 
  137   static const JEMShowerCorrection  getEMShowerCorrection;
 
  147 int main(
int argc, 
char **argv)
 
  158     JParser<> zap(
"Auxiliary program to draw npe as a function of EM-energy.");
 
  167   catch(
const exception &error) {
 
  168     FATAL(error.what() << endl);
 
  191   const double precision = 1.0e-10;
 
  193   while (fabs(
xmax - 
xmin) > precision) {
 
  195     const double x = 0.5 * (
xmin + 
xmax);
 
  196     const double E = 
pow(10.0, x);
 
  198     const double y = getEMShowerCorrection(E);
 
  213   TH1D h0(
"h0", NULL, 10000, -4.0, +4.0);
 
  214   TH1D 
h1(
"h1", NULL, 10000, -4.0, +4.0);
 
  216   for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
 
  218     const Double_t x = h0.GetBinCenter(i);
 
  219     const Double_t E = 
pow(10.0, x);
 
  221     h0.SetBinContent(i, E * 
geanc() * pdf.getNumberOfPhotons());
 
  222     h1.SetBinContent(i, getEMShowerCorrection(E));
 
then cat $TRIPOD_INITIAL<< EOF1 256877.5 4743716.7-2438.42 256815.5 4743395.0-2435.53 257096.2 4743636.0-2439.5EOFfiJEditDetector-a $DETECTOR_INITIAL-s"-1 addz -6.9"-o $DETECTOReval`JPrintDetector-a $DETECTOR-O SUMMARY`for STRING in ${STRINGS[*]};do set_variable MODULE`getModule-a $DETECTOR-L"$STRING 0"`JEditDetector-a $DETECTOR-M"$MODULE setz -2.9"-o $DETECTORdonecp-p $TRIPOD_INITIAL $TRIPODJAcoustics.sh $DETECTOR_IDcat > acoustics_trigger_parameters txt<< EOFQ=0.0;TMax_s=0.020;numberOfHits=90;EOFJAcousticsEventBuilder.sh $DETECTOR $RUNS[*]INPUT_FILES=(`ls KM3NeT_ ${(l:8::0::0:) DETECTOR_ID}_0 *${^RUNS}_event.root`) cd $WORKDIRif[!$HOMEDIR-ef $WORKDIR];then cp-p $HOMEDIR/$DETECTOR $WORKDIR cp-p $HOMEDIR/$TRIPOD $WORKDIR cp-p $HOMEDIR/${^INPUT_FILES}$WORKDIR cp-p $HOMEDIR/{acoustics_fit_parameters, acoustics_trigger_parameters, disable, hydrophone, mechanics, sound_velocity, tripod, waveform}.txt $WORKDIRfisource $JPP_DIR/examples/JAcoustics/acoustics-fit-toolkit.shtimer_startinitialise stage_1B > &stage log
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
double geanc()
Equivalent muon track length per unit shower energy. 
 
double getScatteringProbability(const double x)
Function to describe light scattering in water. 
 
then for HISTOGRAM in h0 h1
 
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations. 
 
const JPolynome f1(1.0, 2.0, 3.0)
Function. 
 
Properties of KM3NeT PMT and deep-sea water. 
 
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations. 
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
double getQE(const double R, const double mu)
Get QE for given ratio of hit probabilities and expectation value of the number of photo-electrons...
 
set_variable E_E log10(E_{fit}/E_{#mu})"
 
double getAmbientPressure()
Get ambient pressure. 
 
T pow(const T &x, const double y)
Power . 
 
double getPhotocathodeArea()
Get photo-cathode area of PMT. 
 
static const double MASS_ELECTRON
electron mass [GeV] 
 
General purpose messaging. 
 
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength. 
 
double getAbsorptionLength(const double lambda)
Get absorption length. 
 
Utility class to parse command line options. 
 
double getScatteringLength(const double lambda)
Get scattering length. 
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
 
double getAngularAcceptance(const double x)
Angular acceptence of PMT.