Geant4  10.02.p03
Par01EnergySpot Class Reference

#include <Par01EnergySpot.hh>

Collaboration diagram for Par01EnergySpot:

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 ()
 

Private Attributes

G4double fEnergy
 
G4ThreeVector fPoint
 

Detailed Description

Definition at line 35 of file Par01EnergySpot.hh.

Constructor & Destructor Documentation

◆ Par01EnergySpot() [1/2]

Par01EnergySpot::Par01EnergySpot ( )

Definition at line 38 of file Par01EnergySpot.cc.

39 {;}

◆ Par01EnergySpot() [2/2]

Par01EnergySpot::Par01EnergySpot ( const G4ThreeVector point,
G4double  E 
)

Definition at line 41 of file Par01EnergySpot.cc.

42 {
43  fPoint = point;
44  fEnergy = E;
45 }
G4ThreeVector fPoint

◆ ~Par01EnergySpot()

Par01EnergySpot::~Par01EnergySpot ( )

Definition at line 47 of file Par01EnergySpot.cc.

48 {;}

Member Function Documentation

◆ Draw()

void Par01EnergySpot::Draw ( G4Colour color = 0)

Definition at line 51 of file Par01EnergySpot.cc.

52 {
54  if (pVVisManager)
55  {
56  G4Polyline polyline;
57  G4Colour colour(1.,.5,.5);
58  if (color != 0) colour = *color;
59  polyline.SetVisAttributes(colour);
61  // Draw a "home made" marker:
62  // Will be better by using a real Marker:
63  pp.setZ(pp.z()+1*cm);
64  polyline.push_back(pp);
65  pp.setZ(pp.z()-2*cm);
66  polyline.push_back(pp);
67  pp = fPoint;
68  polyline.push_back(pp);
69  pp.setX(pp.x()+1*cm);
70  polyline.push_back(pp);
71  pp.setX(pp.x()-2*cm);
72  polyline.push_back(pp);
73  pp = fPoint;
74  polyline.push_back(pp);
75  pp.setY(pp.y()+1*cm);
76  polyline.push_back(pp);
77  pp.setY(pp.y()-2*cm);
78  polyline.push_back(pp);
79  pVVisManager -> Draw(polyline);
80  }
81 }
static const double cm
Definition: G4SIunits.hh:118
static G4VVisManager * GetConcreteInstance()
G4ThreeVector fPoint
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
void Draw(G4Colour *color=0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEnergy()

G4double Par01EnergySpot::GetEnergy ( ) const
inline

Definition at line 43 of file Par01EnergySpot.hh.

43 {return fEnergy;}
Here is the caller graph for this function:

◆ GetPosition()

G4ThreeVector Par01EnergySpot::GetPosition ( ) const
inline

Definition at line 46 of file Par01EnergySpot.hh.

46 {return fPoint;}
G4ThreeVector fPoint
Here is the caller graph for this function:

◆ operator==()

G4int Par01EnergySpot::operator== ( const Par01EnergySpot eSpot) const
inline

Definition at line 48 of file Par01EnergySpot.hh.

49  {
50  return (fEnergy==eSpot.fEnergy && fPoint==eSpot.fPoint) ? 1 : 0;
51  }
G4ThreeVector fPoint
Here is the call graph for this function:

◆ Print()

void Par01EnergySpot::Print ( void  )

Definition at line 83 of file Par01EnergySpot.cc.

84 {
85  G4cout << " Par01EnergySpot {E = " << fEnergy << "; Position = " << fPoint << " }"<< G4endl;
86 }
G4ThreeVector fPoint
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ SetEnergy()

void Par01EnergySpot::SetEnergy ( const G4double E)
inline

Definition at line 42 of file Par01EnergySpot.hh.

42 {fEnergy = E;}
Here is the caller graph for this function:

◆ SetPosition()

void Par01EnergySpot::SetPosition ( const G4ThreeVector point)
inline

Definition at line 45 of file Par01EnergySpot.hh.

45 {fPoint = point;}
G4ThreeVector fPoint
Here is the caller graph for this function:

Member Data Documentation

◆ fEnergy

G4double Par01EnergySpot::fEnergy
private

Definition at line 60 of file Par01EnergySpot.hh.

◆ fPoint

G4ThreeVector Par01EnergySpot::fPoint
private

Definition at line 61 of file Par01EnergySpot.hh.


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