MonitorHit Class Reference

#include <MonitorHit.hh>

List of all members.

Public Member Functions

 MonitorHit ()
 ~MonitorHit ()
 MonitorHit (const MonitorHit &)
const MonitorHitoperator= (const MonitorHit &)
int operator== (const MonitorHit &) const
void * operator new (size_t)
void operator delete (void *)
void Draw ()
void Print ()
void SetTrackID (G4int track)
void SetVolID (G4int val)
void SetEdep (G4double de)
void SetPos (G4ThreeVector xyz)
void SetGlobalT (G4double time)
G4int GetTrackID ()
G4int GetVolID ()
G4double GetEdep ()
G4ThreeVector GetPos ()
G4double GetGlobalT ()

Private Attributes

G4int trackID
G4int volID
G4double edep
G4ThreeVector pos
G4double globalT

Detailed Description

Definition at line 18 of file MonitorHit.hh.


Constructor & Destructor Documentation

MonitorHit::MonitorHit (  ) 

Definition at line 19 of file MonitorHit.cc.

00019 {}

MonitorHit::~MonitorHit (  ) 

Definition at line 23 of file MonitorHit.cc.

00023 {}

MonitorHit::MonitorHit ( const MonitorHit right  ) 

Definition at line 27 of file MonitorHit.cc.

References edep, globalT, pos, trackID, and volID.

00028 : G4VHit()
00029 {
00030   trackID   = right.trackID;
00031   volID     = right.volID;
00032   edep      = right.edep;
00033   pos       = right.pos;
00034   globalT   = right.globalT;
00035 }


Member Function Documentation

void MonitorHit::Draw (  ) 

Definition at line 58 of file MonitorHit.cc.

References pos.

00059 {
00060   G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
00061   if(pVVisManager)
00062   {
00063     G4Circle circle(pos);
00064     circle.SetScreenSize(4.);
00065     circle.SetFillStyle(G4Circle::filled);
00066     G4Colour colour(1.,1.,0.);
00067     G4VisAttributes attribs(colour);
00068     circle.SetVisAttributes(attribs);
00069     pVVisManager->Draw(circle);
00070   }
00071 }

G4double MonitorHit::GetEdep (  )  [inline]

Definition at line 43 of file MonitorHit.hh.

References edep.

00043 { return edep; };      

G4double MonitorHit::GetGlobalT (  )  [inline]

Definition at line 45 of file MonitorHit.hh.

00045 { return globalT;};

G4ThreeVector MonitorHit::GetPos (  )  [inline]

Definition at line 44 of file MonitorHit.hh.

References pos.

00044 { return pos; };

G4int MonitorHit::GetTrackID (  )  [inline]

Definition at line 41 of file MonitorHit.hh.

References trackID.

00041 { return trackID; };

G4int MonitorHit::GetVolID (  )  [inline]

Definition at line 42 of file MonitorHit.hh.

References volID.

00042 { return volID; };

void MonitorHit::operator delete ( void *  aHit  )  [inline]

Definition at line 72 of file MonitorHit.hh.

References MonitorHitAllocator.

00073 {
00074   MonitorHitAllocator.FreeSingle((MonitorHit*) aHit);
00075 }

void * MonitorHit::operator new ( size_t   )  [inline]

Definition at line 63 of file MonitorHit.hh.

References MonitorHitAllocator.

00064 {
00065   void *aHit;
00066   aHit = (void *) MonitorHitAllocator.MallocSingle();
00067   return aHit;
00068 }

const MonitorHit & MonitorHit::operator= ( const MonitorHit right  ) 

Definition at line 39 of file MonitorHit.cc.

References edep, globalT, pos, trackID, and volID.

00040 {
00041   trackID   = right.trackID;
00042   volID     = right.volID;
00043   edep      = right.edep;
00044   pos       = right.pos;
00045   globalT   = right.globalT;
00046   return *this;
00047 }

int MonitorHit::operator== ( const MonitorHit right  )  const

Definition at line 51 of file MonitorHit.cc.

00052 {
00053   return (this==&right) ? 1 : 0;
00054 }

void MonitorHit::Print (  ) 

Definition at line 75 of file MonitorHit.cc.

References edep, globalT, pos, trackID, and volID.

00076 {
00077   G4cout << "  trackID: " << trackID 
00078     << "  volID: " << volID
00079     << "  energy deposit: " << G4BestUnit(edep,"Energy")
00080     << "  position: " << G4BestUnit(pos,"Length") 
00081     << "  globalT: " << G4BestUnit(globalT,"Time")
00082     <<G4endl;
00083 }

void MonitorHit::SetEdep ( G4double  de  )  [inline]

Definition at line 37 of file MonitorHit.hh.

References edep.

Referenced by MonitorSD::ProcessHits().

00037 { edep = de; };

void MonitorHit::SetGlobalT ( G4double  time  )  [inline]

Definition at line 39 of file MonitorHit.hh.

References globalT.

Referenced by MonitorSD::ProcessHits().

00039 { globalT = time;};

void MonitorHit::SetPos ( G4ThreeVector  xyz  )  [inline]

Definition at line 38 of file MonitorHit.hh.

References pos.

Referenced by MonitorSD::ProcessHits().

00038 { pos = xyz; };

void MonitorHit::SetTrackID ( G4int  track  )  [inline]

Definition at line 35 of file MonitorHit.hh.

References trackID.

Referenced by MonitorSD::ProcessHits().

00035 { trackID = track; };

void MonitorHit::SetVolID ( G4int  val  )  [inline]

Definition at line 36 of file MonitorHit.hh.

References volID.

Referenced by MonitorSD::ProcessHits().

00036 { volID = val; };  


Member Data Documentation

G4double MonitorHit::edep [private]

Definition at line 50 of file MonitorHit.hh.

Referenced by GetEdep(), MonitorHit(), operator=(), Print(), and SetEdep().

G4double MonitorHit::globalT [private]

Definition at line 52 of file MonitorHit.hh.

Referenced by MonitorHit(), operator=(), Print(), and SetGlobalT().

G4ThreeVector MonitorHit::pos [private]

Definition at line 51 of file MonitorHit.hh.

Referenced by Draw(), GetPos(), MonitorHit(), operator=(), Print(), and SetPos().

G4int MonitorHit::trackID [private]

Definition at line 45 of file MonitorHit.hh.

Referenced by GetTrackID(), MonitorHit(), operator=(), Print(), and SetTrackID().

G4int MonitorHit::volID [private]

Definition at line 49 of file MonitorHit.hh.

Referenced by GetVolID(), MonitorHit(), operator=(), Print(), and SetVolID().


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

Generated on 15 Jun 2016 for g4sim by  doxygen 1.6.1