Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
advanced
hadrontherapy
include
HadrontherapyDetectorHit.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// This is the *BASIC* version of Hadrontherapy, a Geant4-based application
27
// See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
28
//
29
// Visit the Hadrontherapy web site (http://www.lns.infn.it/link/Hadrontherapy) to request
30
// the *COMPLETE* version of this program, together with its documentation;
31
// Hadrontherapy (both basic and full version) are supported by the Italian INFN
32
// Institute in the framework of the MC-INFN Group
33
//
34
35
#ifndef HadrontherapyDetectorHit_h
36
#define HadrontherapyDetectorHit_h 1
37
38
#include "
G4VHit.hh
"
39
#include "G4THitsCollection.hh"
40
#include "
G4Allocator.hh
"
41
42
class
HadrontherapyDetectorHit
:
public
G4VHit
43
{
44
public
:
45
HadrontherapyDetectorHit
();
46
~HadrontherapyDetectorHit
();
47
48
HadrontherapyDetectorHit
(
const
HadrontherapyDetectorHit
&
right
);
49
50
const
HadrontherapyDetectorHit
&
operator =
(
const
HadrontherapyDetectorHit
&right);
51
52
int
operator ==
(
const
HadrontherapyDetectorHit
&right)
const
;
53
54
inline
void
*
operator
new
(size_t);
55
inline
void
operator
delete
(
void
*aHit);
56
57
private
:
58
G4int
xHitID;
// Hit x voxel
59
G4int
zHitID;
// Hit z voxel
60
G4int
yHitID;
// Hit y voxel
61
G4double
energyDeposit;
// Energy deposit associated with the hit
62
63
public
:
64
// Methods to get the information - energy deposit and associated
65
// position in the phantom - of the hits stored in the hits collection
66
67
inline
G4int
GetXID
()
// Get x index of the voxel
68
{
return
xHitID;}
69
70
inline
G4int
GetZID
()
// Get y index of the voxel
71
{
return
zHitID;}
72
73
inline
G4int
GetYID
()
// Get z index of the voxel
74
{
return
yHitID;}
75
76
inline
G4double
GetEdep
()
// Get energy deposit
77
{
return
energyDeposit;}
78
79
// Methods to store the information of the hit ( energy deposit, position in the phantom )
80
// in the hits collection
81
82
inline
void
SetEdepAndPosition
(
G4int
xx
,
G4int
yy
,
G4int
zz
,
G4double
eDep)
83
{
84
xHitID =
xx
;
85
yHitID =
yy
;
86
zHitID =
zz
;
87
energyDeposit = eDep;
88
}
89
};
90
91
typedef
G4THitsCollection<HadrontherapyDetectorHit>
HadrontherapyDetectorHitsCollection
;
92
extern
G4Allocator<HadrontherapyDetectorHit>
HadrontherapyDetectorHitAllocator
;
93
94
inline
void
* HadrontherapyDetectorHit::operator
new
(size_t)
95
{
96
void
*aHit;
97
aHit = (
void
*) HadrontherapyDetectorHitAllocator.
MallocSingle
();
98
return
aHit;
99
}
100
101
inline
void
HadrontherapyDetectorHit::operator
delete
(
void
*aHit)
102
{
103
HadrontherapyDetectorHitAllocator.
FreeSingle
((
HadrontherapyDetectorHit
*) aHit);
104
}
105
#endif
106
107
Generated on Sat May 25 2013 14:32:10 for Geant4 by
1.8.4