22 int main(
int argc, 
char**argv)
 
   33     JParser<> zap(
"Example program to test intersection of straight line with cylinder.");
 
   42   catch(
const exception &error) {
 
   43     FATAL(error.what() << endl);
 
   46   gRandom->SetSeed(seed);
 
   51   const JCylinder3D cylinder(JCircle2D(JVector2D(0.0,0.0), 2.0), -1.0, +1.0);
 
   54   int number_of_errors = 0;
 
   55   int number_of_events = 0;
 
   57   for (
int i = 0; i != numberOfEvents; ++i) {
 
   61     const double x  = gRandom->Uniform(-1.0, +1.0);
 
   62     const double y  = gRandom->Uniform(-1.0, +1.0);
 
   63     const double z  = gRandom->Uniform(-1.0, +1.0);
 
   69     gRandom->Sphere(dx, dy, dz, 1.0);
 
   71     JAxis3D axis(JVector3D(x, y, z), JVersor3D(dx, dy, dz));
 
   76       make_pair(intersection.first  - 1*precision,                      
false),
 
   77       make_pair(2*precision,                                            
true),
 
   78       make_pair(intersection.second - intersection.first - 2*precision, 
true),
 
   79       make_pair(2*precision,                                            
false)
 
   86     const int N = 
sizeof(
path)/
sizeof(path[0]);
 
   90     for (
int i = 0; i != 
N; ++i) {
 
   92       axis.move(path[i].
first);
 
   94       if ((
getDistance(cylinder, axis.getPosition()) < 1e-3*precision) != path[i].second) {
 
   98       pos[i] = axis.getPosition();
 
  103       for (
int i = 0; i != 
N; ++i) {
 
  104         cout << endl << 
"point[" << noshowpos << setw(1) << i << 
"] = "  
  105              << showpos << 
FIXED(9,5) << pos[i].getX()  << 
' ' 
  106              << showpos << 
FIXED(9,5) << pos[i].getY()  << 
' ' 
  107              << showpos << 
FIXED(9,5) << pos[i].getZ()  << 
' ' 
  108              << 
SCIENTIFIC(12,3) << cylinder.getDistance(pos[i]) << 
' '  
  109              << (cylinder.getDistance(pos[i]) < 1e-3*precision ? 
"in" : 
"out") << endl;
 
  119   NOTICE(
"Number of errors: " << number_of_errors << 
" out of " << number_of_events << 
" events." << endl);
 
  121   ASSERT(number_of_events >  0);
 
  122   ASSERT(number_of_errors == 0);
 
Utility class to parse command line options. 
 
Auxiliary data structure for floating point format specification. 
 
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
 
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects. 
 
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
 
#define ASSERT(A,...)
Assert macro. 
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
Auxiliary data structure for floating point format specification. 
 
then usage $script[input file[working directory[option]]] nWhere option can be N
 
#define DEBUG(A)
Message macros. 
 
int main(int argc, char *argv[])