72 lines
1.6 KiB
C++
72 lines
1.6 KiB
C++
// This code implementation is the intellectual property of
|
|
// the GEANT4 collaboration.
|
|
//
|
|
// By copying, distributing or modifying the Program (or any work
|
|
// based on the Program) you indicate your acceptance of this statement,
|
|
// and all its terms.
|
|
//
|
|
// $Id: ExN02TrackerHit.hh,v 1.1.10.1 1999/12/07 20:47:25 gunter Exp $
|
|
// GEANT4 tag $Name: geant4-01-00 $
|
|
//
|
|
|
|
#ifndef ExN02TrackerHit_h
|
|
#define ExN02TrackerHit_h 1
|
|
|
|
#include "G4VHit.hh"
|
|
#include "G4THitsCollection.hh"
|
|
#include "G4Allocator.hh"
|
|
#include "G4ThreeVector.hh"
|
|
|
|
class ExN02TrackerHit : public G4VHit
|
|
{
|
|
public:
|
|
|
|
ExN02TrackerHit();
|
|
~ExN02TrackerHit();
|
|
ExN02TrackerHit(const ExN02TrackerHit &right);
|
|
const ExN02TrackerHit& operator=(const ExN02TrackerHit &right);
|
|
int operator==(const ExN02TrackerHit &right) const;
|
|
|
|
|
|
inline void *operator new(size_t);
|
|
inline void operator delete(void *aHit);
|
|
|
|
void Draw();
|
|
void Print();
|
|
|
|
private:
|
|
G4double edep;
|
|
G4ThreeVector pos;
|
|
|
|
public:
|
|
inline void SetEdep(G4double de)
|
|
{ edep = de; };
|
|
inline G4double GetEdep()
|
|
{ return edep; };
|
|
inline void SetPos(G4ThreeVector xyz)
|
|
{ pos = xyz; };
|
|
inline G4ThreeVector GetPos()
|
|
{ return pos; };
|
|
|
|
};
|
|
|
|
typedef G4THitsCollection<ExN02TrackerHit> ExN02TrackerHitsCollection;
|
|
|
|
extern G4Allocator<ExN02TrackerHit> ExN02TrackerHitAllocator;
|
|
|
|
inline void* ExN02TrackerHit::operator new(size_t)
|
|
{
|
|
void *aHit;
|
|
aHit = (void *) ExN02TrackerHitAllocator.MallocSingle();
|
|
return aHit;
|
|
}
|
|
|
|
inline void ExN02TrackerHit::operator delete(void *aHit)
|
|
{
|
|
ExN02TrackerHitAllocator.FreeSingle((ExN02TrackerHit*) aHit);
|
|
}
|
|
|
|
#endif
|
|
|
|
|