Geant4  10.02.p03
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
 
void * operator 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
 

Private Attributes

G4int fTrackID
 
G4double fEdep
 
G4ThreeVector fPos
 

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() [1/2]

TrackerHit::TrackerHit ( )

Definition at line 50 of file TrackerHit.cc.

51  : G4VHit(),
52  fTrackID(-1),
53  fEdep(0.),
55 {}
G4ThreeVector fPos
Definition: TrackerHit.hh:82
G4VHit()
Definition: G4VHit.cc:34
CLHEP::Hep3Vector G4ThreeVector
G4int fTrackID
Definition: TrackerHit.hh:76
G4double fEdep
Definition: TrackerHit.hh:81

◆ TrackerHit() [2/2]

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 }
G4ThreeVector fPos
Definition: TrackerHit.hh:82
G4VHit()
Definition: G4VHit.cc:34
G4int fTrackID
Definition: TrackerHit.hh:76
G4double fEdep
Definition: TrackerHit.hh:81

◆ ~TrackerHit()

TrackerHit::~TrackerHit ( )
virtual

Definition at line 59 of file TrackerHit.cc.

59 {}

Member Function Documentation

◆ Draw()

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
G4ThreeVector fPos
Definition: TrackerHit.hh:82
static G4VVisManager * GetConcreteInstance()
Here is the call graph for this function:

◆ GetEdep()

G4double TrackerHit::GetEdep ( ) const
inline

Definition at line 75 of file TrackerHit.hh.

75 { return fEdep; };
G4double fEdep
Definition: TrackerHit.hh:81

◆ GetPos()

G4ThreeVector TrackerHit::GetPos ( ) const
inline

Definition at line 76 of file TrackerHit.hh.

76 { return fPos; };
G4ThreeVector fPos
Definition: TrackerHit.hh:82

◆ GetTrackID()

G4int TrackerHit::GetTrackID ( ) const
inline

Definition at line 74 of file TrackerHit.hh.

74 { return fTrackID; };
G4int fTrackID
Definition: TrackerHit.hh:76

◆ operator delete()

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

◆ operator new()

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

◆ operator=()

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 }
G4ThreeVector fPos
Definition: TrackerHit.hh:82
G4int fTrackID
Definition: TrackerHit.hh:76
G4double fEdep
Definition: TrackerHit.hh:81

◆ operator==()

G4int TrackerHit::operator== ( const TrackerHit right) const

Definition at line 84 of file TrackerHit.cc.

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

◆ Print()

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 }
G4ThreeVector fPos
Definition: TrackerHit.hh:82
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4int fTrackID
Definition: TrackerHit.hh:76
G4GLOB_DLL std::ostream G4cout
G4double fEdep
Definition: TrackerHit.hh:81
#define G4endl
Definition: G4ios.hh:61

◆ SetEdep()

void TrackerHit::SetEdep ( G4double  de)
inline

Definition at line 70 of file TrackerHit.hh.

70 { fEdep = de; };
G4double fEdep
Definition: TrackerHit.hh:81
Here is the caller graph for this function:

◆ SetPos()

void TrackerHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 71 of file TrackerHit.hh.

71 { fPos = xyz; };
G4ThreeVector fPos
Definition: TrackerHit.hh:82
Here is the caller graph for this function:

◆ SetTrackID()

void TrackerHit::SetTrackID ( G4int  track)
inline

Definition at line 69 of file TrackerHit.hh.

69 { fTrackID = track; };
G4int fTrackID
Definition: TrackerHit.hh:76
Here is the caller graph for this function:

Member Data Documentation

◆ fEdep

G4double TrackerHit::fEdep
private

Definition at line 81 of file TrackerHit.hh.

◆ fPos

G4ThreeVector TrackerHit::fPos
private

Definition at line 82 of file TrackerHit.hh.

◆ fTrackID

G4int TrackerHit::fTrackID
private

Definition at line 76 of file TrackerHit.hh.


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