Geant4  10.02.p03
B4cCalorHit Class Reference

#include <B4cCalorHit.hh>

Inheritance diagram for B4cCalorHit:
Collaboration diagram for B4cCalorHit:

Public Member Functions

 B4cCalorHit ()
 
 B4cCalorHit (const B4cCalorHit &)
 
virtual ~B4cCalorHit ()
 
const B4cCalorHitoperator= (const B4cCalorHit &)
 
G4int operator== (const B4cCalorHit &) const
 
void * operator new (size_t)
 
void operator delete (void *)
 
virtual void Draw ()
 
virtual void Print ()
 
void Add (G4double de, G4double dl)
 
G4double GetEdep () const
 
G4double GetTrackLength () 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

G4double fEdep
 Energy deposit in the sensitive volume. More...
 
G4double fTrackLength
 Track length in the sensitive volume. More...
 

Detailed Description

Calorimeter hit class

It defines data members to store the the energy deposit and track lengths of charged particles in a selected volume:

  • fEdep, fTrackLength

Definition at line 46 of file B4cCalorHit.hh.

Constructor & Destructor Documentation

◆ B4cCalorHit() [1/2]

B4cCalorHit::B4cCalorHit ( )

Definition at line 44 of file B4cCalorHit.cc.

45  : G4VHit(),
46  fEdep(0.),
47  fTrackLength(0.)
48 {}
G4double fTrackLength
Track length in the sensitive volume.
Definition: B4cCalorHit.hh:73
G4VHit()
Definition: G4VHit.cc:34
G4double fEdep
Energy deposit in the sensitive volume.
Definition: B4cCalorHit.hh:72

◆ B4cCalorHit() [2/2]

B4cCalorHit::B4cCalorHit ( const B4cCalorHit right)

Definition at line 56 of file B4cCalorHit.cc.

57  : G4VHit()
58 {
59  fEdep = right.fEdep;
60  fTrackLength = right.fTrackLength;
61 }
G4double fTrackLength
Track length in the sensitive volume.
Definition: B4cCalorHit.hh:73
G4VHit()
Definition: G4VHit.cc:34
G4double fEdep
Energy deposit in the sensitive volume.
Definition: B4cCalorHit.hh:72

◆ ~B4cCalorHit()

B4cCalorHit::~B4cCalorHit ( )
virtual

Definition at line 52 of file B4cCalorHit.cc.

52 {}

Member Function Documentation

◆ Add()

void B4cCalorHit::Add ( G4double  de,
G4double  dl 
)
inline

Definition at line 100 of file B4cCalorHit.hh.

100  {
101  fEdep += de;
102  fTrackLength += dl;
103 }
G4double fTrackLength
Track length in the sensitive volume.
Definition: B4cCalorHit.hh:73
G4double fEdep
Energy deposit in the sensitive volume.
Definition: B4cCalorHit.hh:72
Here is the caller graph for this function:

◆ Draw()

virtual void B4cCalorHit::Draw ( )
inlinevirtual

Reimplemented from G4VHit.

Definition at line 61 of file B4cCalorHit.hh.

61 {}
Here is the call graph for this function:

◆ GetEdep()

G4double B4cCalorHit::GetEdep ( ) const
inline

Definition at line 105 of file B4cCalorHit.hh.

105  {
106  return fEdep;
107 }
G4double fEdep
Energy deposit in the sensitive volume.
Definition: B4cCalorHit.hh:72
Here is the caller graph for this function:

◆ GetTrackLength()

G4double B4cCalorHit::GetTrackLength ( ) const
inline

Definition at line 109 of file B4cCalorHit.hh.

109  {
110  return fTrackLength;
111 }
G4double fTrackLength
Track length in the sensitive volume.
Definition: B4cCalorHit.hh:73
Here is the caller graph for this function:

◆ operator delete()

void B4cCalorHit::operator delete ( void *  hit)
inline

Definition at line 93 of file B4cCalorHit.hh.

94 {
97  B4cCalorHitAllocator->FreeSingle((B4cCalorHit*) hit);
98 }
G4ThreadLocal G4Allocator< B4cCalorHit > * B4cCalorHitAllocator
Definition: B4cCalorHit.cc:40

◆ operator new()

void * B4cCalorHit::operator new ( size_t  )
inline

Definition at line 84 of file B4cCalorHit.hh.

85 {
88  void *hit;
89  hit = (void *) B4cCalorHitAllocator->MallocSingle();
90  return hit;
91 }
G4ThreadLocal G4Allocator< B4cCalorHit > * B4cCalorHitAllocator
Definition: B4cCalorHit.cc:40

◆ operator=()

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

Definition at line 65 of file B4cCalorHit.cc.

66 {
67  fEdep = right.fEdep;
68  fTrackLength = right.fTrackLength;
69 
70  return *this;
71 }
G4double fTrackLength
Track length in the sensitive volume.
Definition: B4cCalorHit.hh:73
G4double fEdep
Energy deposit in the sensitive volume.
Definition: B4cCalorHit.hh:72

◆ operator==()

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

Definition at line 75 of file B4cCalorHit.cc.

76 {
77  return ( this == &right ) ? 1 : 0;
78 }

◆ Print()

void B4cCalorHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 82 of file B4cCalorHit.cc.

83 {
84  G4cout
85  << "Edep: "
86  << std::setw(7) << G4BestUnit(fEdep,"Energy")
87  << " track length: "
88  << std::setw(7) << G4BestUnit( fTrackLength,"Length")
89  << G4endl;
90 }
G4double fTrackLength
Track length in the sensitive volume.
Definition: B4cCalorHit.hh:73
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
G4double fEdep
Energy deposit in the sensitive volume.
Definition: B4cCalorHit.hh:72
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

Member Data Documentation

◆ fEdep

G4double B4cCalorHit::fEdep
private

Energy deposit in the sensitive volume.

Definition at line 72 of file B4cCalorHit.hh.

◆ fTrackLength

G4double B4cCalorHit::fTrackLength
private

Track length in the sensitive volume.

Definition at line 73 of file B4cCalorHit.hh.


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