LBNFWormPlotter.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: LBNFWormPlotter.hh 77479 2013-11-25 10:01:22Z gcosmo $
28 //
29 //
30 
31 #ifndef LBNFWormPlotter_H
32 #define LBNFWormPlotter_H 1
33 
34 // class description:
35 //
36 // LBNFWormPlotter
37 
38 #include "globals.hh"
39 
40 #include "G4ThreeVector.hh"
41 #include "G4Colour.hh"
42 
43 #include <vector>
44 
45 class G4EventManager;
46 class G4RayShooter;
48 
50 
51 public:
52 
54 
55  virtual ~LBNFWormPlotter();
56 
57  void CreatePlot(const G4String& fileName);
58  // The main entry point which triggers ray tracing. "fileName" is output
59  // file name, and it must contain extention (e.g. myFigure.jpg). This
60  // method is available only if Geant4 is at Idle state.
61 
62  G4ThreeVector GetXAxis() const {return xAxis;}
63  G4ThreeVector GetYAxis() const {return yAxis;}
64  G4ThreeVector GetZAxis() const {return zAxis;}
65 
66  G4double GetXMin() const {return xMin;}
67  G4double GetXMax() const {return xMax;}
68  G4double GetYMin() const {return yMin;}
69  G4double GetYMax() const {return yMax;}
70  G4double GetZ0() const {return z0;}
71 
72  G4String GetXName() const {return xName;}
73  G4String GetYName() const {return yName;}
74 
75  void SetXAxis(const G4ThreeVector& vect) {xAxis = vect.unit();}
76  void SetYAxis(const G4ThreeVector& vect) {yAxis = vect.unit();}
77 
78  void SetXName(const G4String& word) {xName = word;}
79  void SetYName(const G4String& word) {yName = word;}
80 
81  void SetXMin(const G4double& val) {xMin = val;}
82  void SetXMax(const G4double& val) {xMax = val;}
83  void SetYMin(const G4double& val) {yMin = val;}
84  void SetYMax(const G4double& val) {yMax = val;}
85  void SetZ0(const G4double& val) {z0 = val;}
86 
87 protected:
88 
89  G4ThreeVector xAxis;
90  G4ThreeVector yAxis;
91  G4ThreeVector zAxis;
92  G4double xMin;
93  G4double xMax;
94  G4double yMin;
95  G4double yMax;
96  G4double z0;
97  G4bool gotBounds;
98  G4double ABSq;
99  G4double ADSq;
100  G4ThreeVector AB;
101  G4ThreeVector AD;
102  G4ThreeVector PointA;
103 
104  G4String xName;
105  G4String yName;
106 
107  G4RayShooter * theRayShooter;
109  G4EventManager * theEventManager;
110 
111  std::vector<G4ThreeVector> findIntersections(const G4ThreeVector& rayPosition,
112  const G4ThreeVector& rayDirection) const;
113 
114  G4bool insidePlot(const G4ThreeVector& thePoint) const;
115 
116 };
117 
118 #endif
G4ThreeVector yAxis
void SetYMax(const G4double &val)
void SetYAxis(const G4ThreeVector &vect)
void SetYMin(const G4double &val)
G4String GetXName() const
void CreatePlot(const G4String &fileName)
G4double GetYMax() const
G4ThreeVector GetXAxis() const
void SetXMax(const G4double &val)
G4double GetXMin() const
G4double GetYMin() const
G4double GetZ0() const
virtual ~LBNFWormPlotter()
G4ThreeVector PointA
G4EventManager * theEventManager
G4ThreeVector zAxis
void SetXAxis(const G4ThreeVector &vect)
G4double GetXMax() const
G4ThreeVector xAxis
G4ThreeVector AB
void SetYName(const G4String &word)
void SetXName(const G4String &word)
G4bool insidePlot(const G4ThreeVector &thePoint) const
std::vector< G4ThreeVector > findIntersections(const G4ThreeVector &rayPosition, const G4ThreeVector &rayDirection) const
void SetXMin(const G4double &val)
void SetZ0(const G4double &val)
G4ThreeVector GetYAxis() const
G4RayShooter * theRayShooter
G4ThreeVector AD
G4ThreeVector GetZAxis() const
G4String GetYName() const
LBNFWormPlotMessenger * theMessenger