PDF types.
   37   string        fileDescriptor;
 
   51     zap[
'O'] = 
make_field(option)           = 
"KM3NeT", 
"Antares";
 
   61   catch(
const exception &error) {
 
   62     FATAL(error.what() << endl);
 
   67   typedef JSplineFunction1S_t                                     JFunction1D_t;
 
   69     JMapList<JPolint1FunctionalMap,
 
   70     JMapList<JPolint1FunctionalGridMap,
 
   71     JMapList<JPolint1FunctionalGridMap> > >                       JMapList_t;
 
   72   typedef JPDFTable<JFunction1D_t, JMapList_t>                    JPDF_t;
 
   82   const double TTS            = 2.0;        
 
   86   const int  NUMBER_OF_PDFS = 
sizeof(pdf_t)/
sizeof(pdf_t[0]);
 
   88   JPDF_t pdf[NUMBER_OF_PDFS];               
 
   90   const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
 
   92   for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
   96       const string file_name = 
getFilename(fileDescriptor, pdf_t[i]);
 
   98       NOTICE(
"loading PDF from file " << file_name << 
"... " << flush);
 
  100       pdf[i].load(file_name.c_str());
 
  104       pdf[i].setExceptionHandler(supervisor);      
 
  107     catch(
const JException& error) {
 
  108       FATAL(error.what() << endl);
 
  117   if        (option == 
"KM3NeT") {
 
  119     PMT.push_back(JAngle3D(3.142, 0.000));   
 
  120     PMT.push_back(JAngle3D(2.582, 0.524));
 
  121     PMT.push_back(JAngle3D(2.582, 1.571));
 
  122     PMT.push_back(JAngle3D(2.582, 2.618));
 
  123     PMT.push_back(JAngle3D(2.582, 3.665));
 
  124     PMT.push_back(JAngle3D(2.582, 4.712));
 
  125     PMT.push_back(JAngle3D(2.582, 5.760));
 
  126     PMT.push_back(JAngle3D(2.162, 0.000));
 
  127     PMT.push_back(JAngle3D(2.162, 1.047));
 
  128     PMT.push_back(JAngle3D(2.162, 2.094));   
 
  129     PMT.push_back(JAngle3D(2.162, 3.142));
 
  130     PMT.push_back(JAngle3D(2.162, 4.189));
 
  131     PMT.push_back(JAngle3D(2.162, 5.236));
 
  132     PMT.push_back(JAngle3D(1.872, 0.524));
 
  133     PMT.push_back(JAngle3D(1.872, 1.571));
 
  134     PMT.push_back(JAngle3D(1.872, 2.618));
 
  135     PMT.push_back(JAngle3D(1.872, 3.665));
 
  136     PMT.push_back(JAngle3D(1.872, 4.712));
 
  137     PMT.push_back(JAngle3D(1.872, 5.760));
 
  138     PMT.push_back(JAngle3D(1.270, 0.000));   
 
  139     PMT.push_back(JAngle3D(1.270, 1.047));
 
  140     PMT.push_back(JAngle3D(1.270, 2.094));
 
  141     PMT.push_back(JAngle3D(1.270, 3.142));
 
  142     PMT.push_back(JAngle3D(1.270, 4.189));
 
  143     PMT.push_back(JAngle3D(1.270, 5.236));
 
  144     PMT.push_back(JAngle3D(0.980, 0.524));
 
  145     PMT.push_back(JAngle3D(0.980, 1.571));
 
  146     PMT.push_back(JAngle3D(0.980, 2.618));
 
  147     PMT.push_back(JAngle3D(0.980, 3.665));
 
  148     PMT.push_back(JAngle3D(0.980, 4.712));   
 
  149     PMT.push_back(JAngle3D(0.980, 5.760));
 
  151   } 
else if (option == 
"Antares") {
 
  153     PMT.push_back(JAngle3D(2.36, +1.05));
 
  154     PMT.push_back(JAngle3D(2.36,  3.14));
 
  155     PMT.push_back(JAngle3D(2.36, -1.05));
 
  159     FATAL(
"Fatal error at detector option " << option << endl);
 
  165   const JRotation3D 
R(dir);
 
  168     *i = JDirection3D(*i).rotate(
R);
 
  175   TH1D h0(
"L0", NULL, 300, 1.0, 151.0);
 
  176   TH1D h1(
"L1", NULL, 300, 1.0, 151.0);
 
  179   for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
 
  181     const double R = h0.GetBinCenter(i);
 
  187       V += (pdf[0](
R, pmt->getTheta(), fabs(pmt->getPhi()), 0.0).V      +
 
  188             pdf[1](
R, pmt->getTheta(), fabs(pmt->getPhi()), 0.0).V      +
 
  189             pdf[2](
R, pmt->getTheta(), fabs(pmt->getPhi()), 0.0).V * E_GeV  +
 
  190             pdf[3](
R, pmt->getTheta(), fabs(pmt->getPhi()), 0.0).V * E_GeV);
 
  193     h0.SetBinContent(i, 1.0 - TMath::PoissonI(0,V));
 
  201   const double Tmin =  -15.0;    
 
  202   const double Tmax = +250.0;    
 
  203   const double dt   =    1.0;    
 
  206   for (
int i = 1; i <= h1.GetNbinsX(); ++i) {
 
  208     const double R = h1.GetBinCenter(i);
 
  212     for (
double x = Tmin; 
x <= Tmax; 
x += dt) {
 
  218         Vi[pmt]  =  ((pdf[0](
R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x + TMax_ns).
v          +
 
  219                       pdf[1](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x + TMax_ns).
v          +
 
  220                       pdf[2](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x + TMax_ns).
v * E_GeV  +
 
  221                       pdf[3](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x + TMax_ns).
v * E_GeV)
 
  225                      (pdf[0](
R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
v          +
 
  226                       pdf[1](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
v          +
 
  227                       pdf[2](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
v * E_GeV  +
 
  228                       pdf[3](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
v * E_GeV));
 
  239         const double y = (pdf[0](
R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
f          +
 
  240                           pdf[1](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
f          +
 
  241                           pdf[2](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
f * E_GeV  +
 
  242                           pdf[3](R, 
PMT[pmt].getTheta(), fabs(
PMT[pmt].getPhi()), 
x).
f * E_GeV);
 
  245           Y += y * (1.0 - TMath::PoissonI(0, V - Vi[pmt])) * dt;
 
  250     h1.SetBinContent(i, 1.0 - TMath::PoissonI(0,Y));
 
Utility class to parse command line options. 
 
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT) 
 
o $QUALITY_ROOT d $DEBUG!JPlot1D f
 
direct light from EM showers 
 
static const JZero zero
Function object to assign zero value. 
 
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
 
scattered light from muon 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
scattered light from EM showers 
 
then usage $script[distance] fi case set_variable R
 
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
 
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any. 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module.