GeoTransform.cxx
Go to the documentation of this file.
1 ///
2 /// \file GeoTransform.cxx
3 //
4 /// \version $Id: Style.h,v 1.1.1.1 2010-11-10 19:44:54 p-novaart Exp $
5 /// \author messier@indiana.edu
6 ///
7 #include "TVector3.h"
10 
11 using namespace evd;
12 
13 void GeoTransform::XYZ(double* xyz)
14 {
15  GeoTransform::XYZ(xyz,xyz+1,xyz+2);
16 }
17 
18 //......................................................................
19 
20 void GeoTransform::XYZ(double* x, double* y, double* z)
21 {
22  GeoTransform::X(x);
23  GeoTransform::Y(y);
24  GeoTransform::Z(z);
25 }
26 
27 //......................................................................
28 
29 void GeoTransform::XYZ(TVector3& v)
30 {
32 
33  bool flipx = geoopt->fFlip & evd::GeometryDrawingOptions::kFLIP_X;
34  bool flipy = geoopt->fFlip & evd::GeometryDrawingOptions::kFLIP_Y;
35  bool flipz = geoopt->fFlip & evd::GeometryDrawingOptions::kFLIP_Z;
36 
37  if (flipx) v.SetX(-v.X());
38  if (flipy) v.SetY(-v.Y());
39  if (flipz) v.SetZ(-v.Z());
40 }
41 
42 //......................................................................
43 
44 void GeoTransform::X(double* x)
45 {
47  bool flipx = geoopt->fFlip & evd::GeometryDrawingOptions::kFLIP_X;
48  if (flipx) *x = -(*x);
49 }
50 
51 //......................................................................
52 
53 void GeoTransform::Y(double* y)
54 {
56  bool flipy = geoopt->fFlip & evd::GeometryDrawingOptions::kFLIP_Y;
57  if (flipy) *y = -(*y);
58 }
59 
60 //......................................................................
61 
62 void GeoTransform::Z(double* z)
63 {
65  bool flipz = geoopt->fFlip & evd::GeometryDrawingOptions::kFLIP_Z;
66  if (flipz) *z = -(*z);
67 }
68 
69 ////////////////////////////////////////////////////////////////////////
nova event display
static void X(double *x)
z
Definition: test.py:28
static void Z(double *z)
static void Y(double *y)
int fFlip
Reverse the sense of any of the coordinate axes?
static void XYZ(double *xyz)
Global drawing options that apply to all displays.