Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackerHit Class Reference

#include <TrackerHit.hh>

Inheritance diagram for TrackerHit:
Collaboration diagram for TrackerHit:

Public Member Functions

 TrackerHit ()
 
 TrackerHit (const TrackerHit &)
 
virtual ~TrackerHit ()
 
const TrackerHitoperator= (const TrackerHit &)
 
G4int operator== (const TrackerHit &) const
 
voidoperator new (size_t)
 
void operator delete (void *)
 
virtual void Draw ()
 
virtual void Print ()
 
void SetTrackID (G4int track)
 
void SetEdep (G4double de)
 
void SetPos (G4ThreeVector xyz)
 
G4int GetTrackID () const
 
G4double GetEdep () const
 
G4ThreeVector GetPos () const
 
- Public Member Functions inherited from G4VHit
 G4VHit ()
 
virtual ~G4VHit ()
 
G4int operator== (const G4VHit &right) const
 
virtual const std::map
< G4String, G4AttDef > * 
GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 

Detailed Description

Tracker hit class

It defines data members to store the trackID, energy deposit, and position of charged particles in a selected volume:

  • fTrackID, fEdep, fPos

Definition at line 50 of file TrackerHit.hh.

Constructor & Destructor Documentation

TrackerHit::TrackerHit ( )

Definition at line 50 of file TrackerHit.cc.

51  : G4VHit(),
52  fTrackID(-1),
53  fEdep(0.),
54  fPos(G4ThreeVector())
55 {}
G4VHit()
Definition: G4VHit.cc:34
CLHEP::Hep3Vector G4ThreeVector
TrackerHit::TrackerHit ( const TrackerHit right)

Definition at line 63 of file TrackerHit.cc.

64  : G4VHit()
65 {
66  fTrackID = right.fTrackID;
67  fEdep = right.fEdep;
68  fPos = right.fPos;
69 }
G4VHit()
Definition: G4VHit.cc:34
TrackerHit::~TrackerHit ( )
virtual

Definition at line 59 of file TrackerHit.cc.

59 {}

Member Function Documentation

void TrackerHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 91 of file TrackerHit.cc.

92 {
94  if(pVVisManager)
95  {
96  G4Circle circle(fPos);
97  circle.SetScreenSize(4.);
98  circle.SetFillStyle(G4Circle::filled);
99  G4Colour colour(1.,0.,0.);
100  G4VisAttributes attribs(colour);
101  circle.SetVisAttributes(attribs);
102  pVVisManager->Draw(circle);
103  }
104 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
static G4VVisManager * GetConcreteInstance()

Here is the call graph for this function:

G4double TrackerHit::GetEdep ( ) const
inline

Definition at line 75 of file TrackerHit.hh.

75 { return fEdep; };
G4ThreeVector TrackerHit::GetPos ( ) const
inline

Definition at line 76 of file TrackerHit.hh.

76 { return fPos; };
G4int TrackerHit::GetTrackID ( ) const
inline

Definition at line 74 of file TrackerHit.hh.

74 { return fTrackID; };
void TrackerHit::operator delete ( void hit)
inline

Definition at line 102 of file TrackerHit.hh.

103 {
104  TrackerHitAllocator->FreeSingle((TrackerHit*) hit);
105 }
G4ThreadLocal G4Allocator< TrackerHit > * TrackerHitAllocator
Definition: TrackerHit.cc:46
void * TrackerHit::operator new ( size_t  )
inline

Definition at line 93 of file TrackerHit.hh.

94 {
97  return (void *) TrackerHitAllocator->MallocSingle();
98 }
G4ThreadLocal G4Allocator< TrackerHit > * TrackerHitAllocator
Definition: TrackerHit.cc:46
const TrackerHit & TrackerHit::operator= ( const TrackerHit right)

Definition at line 73 of file TrackerHit.cc.

74 {
75  fTrackID = right.fTrackID;
76  fEdep = right.fEdep;
77  fPos = right.fPos;
78 
79  return *this;
80 }
G4int TrackerHit::operator== ( const TrackerHit right) const

Definition at line 84 of file TrackerHit.cc.

85 {
86  return ( this == &right ) ? 1 : 0;
87 }
void TrackerHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 108 of file TrackerHit.cc.

109 {
110  G4cout
111  << " trackID: " << fTrackID
112  << "Edep: "
113  << std::setw(7) << G4BestUnit(fEdep,"Energy")
114  << " Position: "
115  << std::setw(7) << G4BestUnit( fPos,"Length")
116  << G4endl;
117 }
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void TrackerHit::SetEdep ( G4double  de)
inline

Definition at line 70 of file TrackerHit.hh.

70 { fEdep = de; };

Here is the caller graph for this function:

void TrackerHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 71 of file TrackerHit.hh.

71 { fPos = xyz; };

Here is the caller graph for this function:

void TrackerHit::SetTrackID ( G4int  track)
inline

Definition at line 69 of file TrackerHit.hh.

69 { fTrackID = track; };

Here is the caller graph for this function:


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