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

#include <RE01TrackerHit.hh>

Inheritance diagram for RE01TrackerHit:
Collaboration diagram for RE01TrackerHit:

Public Member Functions

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

Detailed Description

Definition at line 44 of file RE01TrackerHit.hh.

Constructor & Destructor Documentation

RE01TrackerHit::RE01TrackerHit ( )

Definition at line 48 of file RE01TrackerHit.cc.

49  : G4VHit(), fEdep(0.0), fPos(0),fTrackID(-1)
50 {;}
G4VHit()
Definition: G4VHit.cc:34
RE01TrackerHit::~RE01TrackerHit ( )
virtual

Definition at line 53 of file RE01TrackerHit.cc.

54 {;}

Member Function Documentation

std::vector< G4AttValue > * RE01TrackerHit::CreateAttValues ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 101 of file RE01TrackerHit.cc.

102 {
103  std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
104 
105  values->push_back(G4AttValue("HitType","RE01TrackerHit",""));
106 
107  values->push_back
108  (G4AttValue("TrackID",G4UIcommand::ConvertToString(fTrackID),""));
109 
110  values->push_back
111  (G4AttValue("Energy",G4BestUnit(fEdep,"Energy"),""));
112 
113  G4double noEnergy = 0.*MeV;
114  values->push_back
115  (G4AttValue("ETrack",G4BestUnit(noEnergy,"Energy"),""));
116 
117  values->push_back
118  (G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
119 
120  return values;
121 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void RE01TrackerHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 57 of file RE01TrackerHit.cc.

58 {
60  if(pVVisManager)
61  {
62  G4Circle circle(fPos);
63  circle.SetScreenSize(0.04);
64  circle.SetFillStyle(G4Circle::filled);
65  G4Colour colour(1.,0.,0.);
66  G4VisAttributes attribs(colour);
67  circle.SetVisAttributes(attribs);
68  pVVisManager->Draw(circle);
69  }
70 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
static G4VVisManager * GetConcreteInstance()

Here is the call graph for this function:

const std::map< G4String, G4AttDef > * RE01TrackerHit::GetAttDefs ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 73 of file RE01TrackerHit.cc.

74 {
75  G4bool isNew;
76  std::map<G4String,G4AttDef>* store
77  = G4AttDefStore::GetInstance("RE01TrackerHit",isNew);
78  if (isNew) {
79  G4String hitType("HitType");
80  (*store)[hitType] = G4AttDef(hitType,"Hit Type","Physics","","G4String");
81 
82  G4String trackID("TrackID");
83  (*store)[trackID] = G4AttDef(trackID,"Track ID","Physics","","G4int");
84 
85  G4String energy("Energy");
86  (*store)[energy] = G4AttDef(energy,"Energy Deposited","Physics",
87  "G4BestUnit","G4double");
88 
89  G4String eTrack("ETrack");
90  (*store)[eTrack] = G4AttDef(eTrack,"Energy Deposited By Track","Physics",
91  "G4BestUnit","G4double");
92 
93  G4String pos("Pos");
94  (*store)[pos] = G4AttDef(pos, "Position",
95  "Physics","G4BestUnit","G4ThreeVector");
96  }
97  return store;
98 }
bool G4bool
Definition: G4Types.hh:79
G4double energy(const ThreeVector &p, const G4double m)
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
static const G4double pos

Here is the call graph for this function:

G4double RE01TrackerHit::GetEdep ( ) const
inline

Definition at line 62 of file RE01TrackerHit.hh.

63  { return fEdep; }
G4int RE01TrackerHit::GetTrackID ( ) const
inline

Definition at line 68 of file RE01TrackerHit.hh.

69  { return fTrackID; }
void RE01TrackerHit::operator delete ( void aHit)
inline

Definition at line 89 of file RE01TrackerHit.hh.

90 {
91  RE01TrackerHitAllocator->FreeSingle((RE01TrackerHit*) aHit);
92 }
G4ThreadLocal G4Allocator< RE01TrackerHit > * RE01TrackerHitAllocator
void * RE01TrackerHit::operator new ( size_t  )
inline

Definition at line 82 of file RE01TrackerHit.hh.

83 {
86  return (void *) RE01TrackerHitAllocator->MallocSingle();
87 }
G4ThreadLocal G4Allocator< RE01TrackerHit > * RE01TrackerHitAllocator
void RE01TrackerHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 124 of file RE01TrackerHit.cc.

125 {
126  G4cout << "TrackID " << fTrackID << " Position " << fPos << " : "
127  << fEdep/keV << " [keV]" << G4endl;
128 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
static constexpr double keV
Definition: G4SIunits.hh:216
void RE01TrackerHit::SetEdep ( G4double  de)
inline

Definition at line 60 of file RE01TrackerHit.hh.

61  { fEdep = de; }

Here is the caller graph for this function:

void RE01TrackerHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 64 of file RE01TrackerHit.hh.

65  { fPos = xyz; }

Here is the caller graph for this function:

void RE01TrackerHit::SetTrackID ( G4int  i)
inline

Definition at line 66 of file RE01TrackerHit.hh.

67  { fTrackID = i; }

Here is the caller graph for this function:


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