27{
   29 
   30  int     numberOfEvents;
   31  double  precision;
   32  ULong_t seed;
   34 
   35  try {
   36 
   37    JParser<> zap(
"Example program to test rotations in 3D.");
 
   38 
   43 
   44    zap(argc, argv);
   45  }
   46  catch(const exception &error) {
   47    FATAL(error.what() << endl);
 
   48  }
   49 
   50  gRandom->SetSeed(seed);
   51 
   53 
   54 
   56 
   60 
   61  for (int i = 0; i != numberOfEvents; ++i) {
   62 
   63    STATUS(
"event: " << setw(10) << i << 
'\r'); 
DEBUG(endl);
 
   64 
   65    const double theta = gRandom->Uniform(0.0, PI);
   66    const double phi   = gRandom->Uniform(0.0, 2*PI);
   67 
   70 
   71    
   72    
   73 
   74    
   75    
   76 
   80    
   81    
   83    
   84
   85
   86
   87
   88    for (
int j = 0; 
j != 
sizeof(v)/
sizeof(v[0]); ++
j) {
 
   89 
   92 
   93      
   94      
   95      B.rotate(Rs);
   96      
   97      B.rotate(R);                              
   98 
   99      
  100      Q.put((B - A).getLength());
  101      
  102      if ((B - A).getLengthSquared() > precision*precision) {
  103 
  104        DEBUG(
"theta " << theta << endl);
 
  105        DEBUG(
"phi   " << phi   << endl);
 
  106 
  107        
  108        
  109 
  110        DEBUG(
"R " << endl << R);
 
  111 
  112        ERROR(
"A " << 
FIXED(7,3) << A.getX() << 
' ' << A.getY() << 
' ' << A.getZ() << endl);
 
  113        ERROR(
"B " << 
FIXED(7,3) << B.getX() << 
' ' << B.getY() << 
' ' << B.getZ() << endl);
 
  114      }
  115    }
  116  }
  118 
  119  Q.print(cout);
  120}
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Data structure for angles in three dimensions.
 
Data structure for position in three dimensions.
 
Data structure for unit quaternion in three dimensions.
 
Data structure for vector in three dimensions.
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary data structure for floating point format specification.
 
This class represents a rotation around the x-axis.
 
This class represents a rotation around the y-axis.
 
This class represents a rotation around the z-axis.