#include <G4TrajectoryDrawByParticleID.hh>
◆ G4TrajectoryDrawByParticleID()
G4TrajectoryDrawByParticleID::G4TrajectoryDrawByParticleID |
( |
const G4String & |
name = "Unspecified" , |
|
|
G4VisTrajContext * |
context = 0 |
|
) |
| |
Definition at line 35 of file G4TrajectoryDrawByParticleID.cc.
39 Set(
"gamma",
"green");
42 Set(
"pi+",
"magenta");
43 Set(
"pi-",
"magenta");
44 Set(
"proton",
"cyan");
45 Set(
"neutron",
"yellow");
G4VTrajectoryModel(const G4String &name, G4VisTrajContext *fpContext=0)
void Set(const G4String &particle, const G4String &colour)
◆ ~G4TrajectoryDrawByParticleID()
G4TrajectoryDrawByParticleID::~G4TrajectoryDrawByParticleID |
( |
| ) |
|
|
virtual |
◆ Draw()
void G4TrajectoryDrawByParticleID::Draw |
( |
const G4VTrajectory & |
trajectory, |
|
|
const G4bool & |
visible = true |
|
) |
| const |
|
virtual |
Implements G4VTrajectoryModel.
Definition at line 51 of file G4TrajectoryDrawByParticleID.cc.
54 G4String particle = traj.GetParticleName();
60 myContext.SetLineColour(colour);
61 myContext.SetVisible(visible);
64 G4cout<<
"G4TrajectoryDrawByParticleID drawer named "<<
Name();
65 G4cout<<
", drawing trajectory with particle type, "<<particle<<
G4endl;
const G4VisTrajContext & GetContext() const
G4GLOB_DLL std::ostream G4cout
void DrawLineAndPoints(const G4VTrajectory &traj, const G4VisTrajContext &)
bool GetColour(const T &, G4Colour &) const
G4ModelColourMap< G4String > fMap
G4bool GetVerbose() const
◆ Print()
void G4TrajectoryDrawByParticleID::Print |
( |
std::ostream & |
ostr | ) |
const |
|
virtual |
Implements G4VTrajectoryModel.
Definition at line 109 of file G4TrajectoryDrawByParticleID.cc.
111 ostr<<
"G4TrajectoryDrawByParticleID model "<<
Name() <<
" colour scheme: "<<std::endl;
117 ostr<<
"Default configuration:"<<
G4endl;
void Print(std::ostream &ostr) const
void Print(std::ostream &ostr) const
const G4VisTrajContext & GetContext() const
G4GLOB_DLL std::ostream G4cout
G4ModelColourMap< G4String > fMap
◆ Set() [1/2]
void G4TrajectoryDrawByParticleID::Set |
( |
const G4String & |
particle, |
|
|
const G4String & |
colour |
|
) |
| |
◆ Set() [2/2]
void G4TrajectoryDrawByParticleID::Set |
( |
const G4String & |
particle, |
|
|
const G4Colour & |
colour |
|
) |
| |
◆ SetDefault() [1/2]
void G4TrajectoryDrawByParticleID::SetDefault |
( |
const G4String & |
colour | ) |
|
Definition at line 74 of file G4TrajectoryDrawByParticleID.cc.
81 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
83 (
"G4TrajectoryDrawByParticleID::SetDefault(const G4String& colour)",
void SetDefault(const G4String &)
std::ostringstream G4ExceptionDescription
static G4bool GetColour(const G4String &key, G4Colour &result)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ SetDefault() [2/2]
void G4TrajectoryDrawByParticleID::SetDefault |
( |
const G4Colour & |
colour | ) |
|
◆ fDefault
G4Colour G4TrajectoryDrawByParticleID::fDefault |
|
private |
◆ fMap
The documentation for this class was generated from the following files: