26 int main(
int argc,
char**argv)
37 JParser<> zap(
"Example program to test rotations in 3D.");
46 catch(
const exception &error) {
47 FATAL(error.what() << endl);
50 gRandom->SetSeed(seed);
55 JQuantile
Q(
"Distance");
57 const JVector3D
v[] = { JVector3D(1,0,0),
61 for (
int i = 0; i != numberOfEvents; ++i) {
63 STATUS(
"event: " << setw(10) << i <<
'\r');
DEBUG(endl);
65 const double theta = gRandom->Uniform(0.0,
PI);
66 const double phi = gRandom->Uniform(0.0, 2*
PI);
68 const JAngle3D dir(theta, phi);
69 const JRotation3D
R(dir);
77 const JQuaternion3X Rx(0.0);
78 const JQuaternion3Y Ry(theta);
79 const JQuaternion3Z Rz(phi);
82 JQuaternion3D Rs(Rx, Ry, Rz);
88 for (
int j = 0;
j !=
sizeof(
v)/
sizeof(
v[0]); ++
j) {
100 Q.put((B - A).getLength());
102 if ((B - A).getLengthSquared() > precision*precision) {
104 DEBUG(
"theta " << theta << endl);
105 DEBUG(
"phi " << phi << endl);
110 DEBUG(
"R " << endl << R);
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);
Utility class to parse command line options.
Q(UTCMax_s-UTCMin_s)-livetime_s
int main(int argc, char *argv[])
Auxiliary data structure for floating point format specification.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
static const double PI
Mathematical constants.
then usage $script[distance] fi case set_variable R
General purpose messaging.
Utility class to parse command line options.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A