Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 35 of file Par01EnergySpot.hh.

Constructor & Destructor Documentation

Par01EnergySpot::Par01EnergySpot ( )

Definition at line 38 of file Par01EnergySpot.cc.

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

Definition at line 41 of file Par01EnergySpot.cc.

42 {
43  fPoint = point;
44  fEnergy = E;
45 }
Par01EnergySpot::~Par01EnergySpot ( )

Definition at line 47 of file Par01EnergySpot.cc.

48 {;}

Member Function Documentation

void Par01EnergySpot::Draw ( G4Colour color = 0)

Definition at line 51 of file Par01EnergySpot.cc.

References python.hepunit::cm, G4VVisManager::GetConcreteInstance(), G4InuclParticleNames::pp, G4Visible::SetVisAttributes(), CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), CLHEP::Hep3Vector::setZ(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

52 {
54  if (pVVisManager)
55  {
56  G4Polyline polyline;
57  G4Colour colour(1.,.5,.5);
58  if (color != 0) colour = *color;
59  polyline.SetVisAttributes(colour);
60  G4ThreeVector pp(fPoint);
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 G4VVisManager * GetConcreteInstance()
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
void Draw(G4Colour *color=0)
G4double Par01EnergySpot::GetEnergy ( ) const
inline

Definition at line 43 of file Par01EnergySpot.hh.

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

Definition at line 46 of file Par01EnergySpot.hh.

46 {return fPoint;}
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  }
void Par01EnergySpot::Print ( void  )

Definition at line 83 of file Par01EnergySpot.cc.

References G4cout, and G4endl.

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

Definition at line 42 of file Par01EnergySpot.hh.

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

Definition at line 45 of file Par01EnergySpot.hh.

45 {fPoint = point;}

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