Go to the documentation of this file. 1 #include "CLHEP/Vector/defs.h"
8 bool eatwhitespace ( std::istream &
is ) {
28 std::cerr <<
"istream mysteriously lost a putback character!\n";
38 double &
x,
double & y,
double & z ) {
46 bool parenthesis =
false;
48 if ( !eatwhitespace(
is) ) {
49 std::cerr <<
"istream ended before trying to input " <<
type <<
"\n";
53 if ( !
is.get(c) ) { fouledup();
return; }
56 if ( !eatwhitespace(
is) ) {
57 std::cerr <<
"istream ended after ( trying to input " <<
type <<
"\n";
68 std::cerr <<
"Could not read first value in input of " <<
type <<
"\n";
72 if ( !eatwhitespace(
is) ) {
73 std::cerr <<
"istream ended before second value of " <<
type <<
"\n";
77 if ( !
is.get(c) ) { fouledup();
return; }
79 if ( !eatwhitespace(
is) ) {
80 std::cerr <<
"istream ended ater one value and comma in "
92 std::cerr <<
"Could not read second value in input of " <<
type <<
"\n";
96 if ( !eatwhitespace(
is) ) {
97 std::cerr <<
"istream ended before third value of " <<
type <<
"\n";
101 if ( !
is.get(c) ) { fouledup();
return; }
103 if ( !eatwhitespace(
is) ) {
104 std::cerr <<
"istream ended ater two values and comma in "
116 std::cerr <<
"Could not read third value in input of " <<
type <<
"\n";
123 if ( !eatwhitespace(
is) ) {
124 std::cerr <<
"No closing parenthesis in input of " <<
type <<
"\n";
127 if ( !
is.get(c) ) { fouledup();
return; }
129 std::cerr <<
"Missing closing parenthesis in input of "
134 if ( isdigit(c) || (c==
'-') || (c==
'+') ) {
153 double &
x,
double & y,
double & z,
167 bool parenthesis =
false;
169 if ( !eatwhitespace(
is) ) {
170 std::cerr <<
"istream ended before trying to input AxisAngle \n";
174 if ( !
is.get(c) ) { fouledup();
return; }
177 if ( !eatwhitespace(
is) ) {
178 std::cerr <<
"istream ended after ( trying to input AxisAngle \n";
191 if ( !eatwhitespace(
is) ) {
192 std::cerr <<
"istream ended before delta of AxisAngle \n";
196 if ( !
is.get(c) ) { fouledup();
return; }
198 if ( !eatwhitespace(
is) ) {
199 std::cerr <<
"istream ended ater axis and comma in AxisAngle \n";
210 std::cerr <<
"Could not delta value in input of AxisAngle \n";
217 if ( !eatwhitespace(
is) ) {
218 std::cerr <<
"No closing parenthesis in input of AxisAngle \n";
221 if ( !
is.get(c) ) { fouledup();
return; }
223 std::cerr <<
"Missing closing parenthesis in input of AxisAngle \n";
224 if ( isdigit(c) || (c==
'-') || (c==
'+') ) {
241 double &
x,
double & y ) {
249 bool parenthesis =
false;
251 if ( !eatwhitespace(
is) ) {
252 std::cerr <<
"istream ended before trying to input " <<
type <<
"\n";
256 if ( !
is.get(c) ) { fouledup();
return; }
259 if ( !eatwhitespace(
is) ) {
260 std::cerr <<
"istream ended after ( trying to input " <<
type <<
"\n";
271 std::cerr <<
"Could not read first value in input of " <<
type <<
"\n";
275 if ( !eatwhitespace(
is) ) {
276 std::cerr <<
"istream ended before second value of " <<
type <<
"\n";
280 if ( !
is.get(c) ) { fouledup();
return; }
282 if ( !eatwhitespace(
is) ) {
283 std::cerr <<
"istream ended ater one value and comma in "
295 std::cerr <<
"Could not read second value in input of " <<
type <<
"\n";
302 if ( !eatwhitespace(
is) ) {
303 std::cerr <<
"No closing parenthesis in input of " <<
type <<
"\n";
306 if ( !
is.get(c) ) { fouledup();
return; }
308 std::cerr <<
"Missing closing parenthesis in input of "
313 if ( isdigit(c) || (c==
'-') || (c==
'+') ) {
HepRotation delta() setPhi()
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
HepRotation and so forth isNear() norm2() rectify() static Rotation row1 row4(To avoid bloat in the code pulled in for programs which don 't use all these features, we split the implementation .cc files. Only isNear() goes into the original Rotation.cc) --------------------------------------- HepAxisAngle and HepEulerAngles classes --------------------------------------- These classes are very useful and simple structures for holding the result of a nice intuituve decomposition of a rotation there is no longer much content in the distinct ZOOM PhysicsVectors library The only content left in the library is the object files representing the various Exception objects When we build the CLHEP classes for the ZOOM we will set up so as to use ZOOM SpaceVector is(but we can disable namespace usage and most of our users do so at this point). What I do is leave Hep3Vector in the global namespace
Signatures of Hep3Vector::rotate For equivalent ZOOM axis There is no harm in leaving this axis CLHEP has implemented a first forming an identity then rotating that by axis and I leave the CLHEP code alone people are of course free to use the ZOOM originated method with signature which I believe will be faster Return types for rotateZ CLHEP and PhysicsVectors each have these three and they are identical except that the ZOOM version returns a reference to while in CLHEP they return void Having methods that alter an object return a reference to that object is convenient for certain chained and costs nothing I don t wish to potentially break ZOOM user code for no good so I have made these CLHEP method conform to this convention There are a couple of other CLHEP rotate and which use the void return type
void ZMinput2doubles(std::istream &is, const char *type, double &x, double &y)
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)
any side effects of that construction would occur twice The semantics of throw x