CMS 3D CMS Logo

VisG4ExampleHit.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "VisExamples/VisG4ExN02/src/VisG4ExampleHit.h"
00004 #include <G4UnitsTable.hh>
00005 #include <G4VVisManager.hh>
00006 #include <G4Circle.hh>
00007 #include <G4Colour.hh>
00008 #include <G4VisAttributes.hh>
00009 #include <iostream>
00010 
00011 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00012 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00013 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00014 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00015 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00016 
00017 G4Allocator<VisG4ExampleHit> VisG4ExampleHitAllocator;
00018 
00019 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00020 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00021 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00022 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00023 
00024 VisG4ExampleHit::VisG4ExampleHit (void)
00025     : m_trackId (-1),
00026       m_chamber (-1),
00027       m_energy (0.),
00028       m_position (G4ThreeVector ())
00029 {}
00030 
00031 void
00032 VisG4ExampleHit::Draw (void)
00033 {
00034     if (G4VVisManager *pVVisManager = G4VVisManager::GetConcreteInstance ())
00035     {
00036         G4Circle circle (m_position);
00037         circle.SetScreenSize (0.04);
00038         circle.SetFillStyle  (G4Circle::filled);
00039         circle.SetVisAttributes (G4VisAttributes (G4Colour (1.,0.,0.)));
00040 
00041         pVVisManager->Draw (circle);
00042     }
00043 }
00044 
00045 void
00046 VisG4ExampleHit::Print (void)
00047 {
00048     std::cout << " track id: " << m_trackId
00049               << " chamber: " << m_chamber
00050               << " energy: " << m_energy
00051               << " position: " << m_position;
00052 }

Generated on Tue Jun 9 17:49:46 2009 for CMSSW by  doxygen 1.5.4