Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Par01EnergySpot Class Reference

#include <Par01EnergySpot.hh>

Public Member Functions

 Par01EnergySpot ()
 
 Par01EnergySpot (const G4ThreeVector &point, G4double E)
 
 ~Par01EnergySpot ()
 
void SetEnergy (const G4double &E)
 
G4double GetEnergy () const
 
void SetPosition (const G4ThreeVector &point)
 
G4ThreeVector GetPosition () const
 
G4int operator== (const Par01EnergySpot &eSpot) const
 
void Draw (G4Colour *color=0)
 
void Print ()
 

Detailed Description

Definition at line 38 of file Par01EnergySpot.hh.

Constructor & Destructor Documentation

Par01EnergySpot::Par01EnergySpot ( )

Definition at line 43 of file Par01EnergySpot.cc.

44 {;}
Par01EnergySpot::Par01EnergySpot ( const G4ThreeVector point,
G4double  E 
)

Definition at line 48 of file Par01EnergySpot.cc.

49 {
50  fPoint = point;
51  fEnergy = E;
52 }
Par01EnergySpot::~Par01EnergySpot ( )

Definition at line 56 of file Par01EnergySpot.cc.

57 {;}

Member Function Documentation

void Par01EnergySpot::Draw ( G4Colour color = 0)

Definition at line 61 of file Par01EnergySpot.cc.

62 {
64  if (pVVisManager)
65  {
66  G4Polyline polyline;
67  G4Colour colour(1.,.5,.5);
68  if (color != 0) colour = *color;
69  polyline.SetVisAttributes(colour);
70  G4ThreeVector pp(fPoint);
71  // Draw a "home made" marker:
72  // Will be better by using a real Marker:
73  pp.setZ(pp.z()+1*cm);
74  polyline.push_back(pp);
75  pp.setZ(pp.z()-2*cm);
76  polyline.push_back(pp);
77  pp = fPoint;
78  polyline.push_back(pp);
79  pp.setX(pp.x()+1*cm);
80  polyline.push_back(pp);
81  pp.setX(pp.x()-2*cm);
82  polyline.push_back(pp);
83  pp = fPoint;
84  polyline.push_back(pp);
85  pp.setY(pp.y()+1*cm);
86  polyline.push_back(pp);
87  pp.setY(pp.y()-2*cm);
88  polyline.push_back(pp);
89  pVVisManager -> Draw(polyline);
90  }
91 }
static G4VVisManager * GetConcreteInstance()
static constexpr double cm
Definition: G4SIunits.hh:119
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
void Draw(G4Colour *color=0)

Here is the call graph for this function:

G4double Par01EnergySpot::GetEnergy ( ) const
inline

Definition at line 46 of file Par01EnergySpot.hh.

46 {return fEnergy;}
G4ThreeVector Par01EnergySpot::GetPosition ( ) const
inline

Definition at line 49 of file Par01EnergySpot.hh.

49 {return fPoint;}
G4int Par01EnergySpot::operator== ( const Par01EnergySpot eSpot) const
inline

Definition at line 51 of file Par01EnergySpot.hh.

52  {
53  return (fEnergy==eSpot.fEnergy && fPoint==eSpot.fPoint) ? 1 : 0;
54  }
void Par01EnergySpot::Print ( void  )

Definition at line 95 of file Par01EnergySpot.cc.

96 {
97  G4cout << " Par01EnergySpot {E = " << fEnergy << "; Position = " << fPoint << " }"<< G4endl;
98 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void Par01EnergySpot::SetEnergy ( const G4double E)
inline

Definition at line 45 of file Par01EnergySpot.hh.

45 {fEnergy = E;}
void Par01EnergySpot::SetPosition ( const G4ThreeVector point)
inline

Definition at line 48 of file Par01EnergySpot.hh.

48 {fPoint = point;}

The documentation for this class was generated from the following files: