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
extended
eventgenerator
HepMC
HepMCEx01
include
ExN04CalorimeterHit.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
//
28
//
29
30
#ifndef ExN04CalorimeterHit_h
31
#define ExN04CalorimeterHit_h 1
32
33
#include "
G4VHit.hh
"
34
#include "G4THitsCollection.hh"
35
#include "
G4Allocator.hh
"
36
#include "
G4ThreeVector.hh
"
37
#include "
G4LogicalVolume.hh
"
38
#include "
G4Transform3D.hh
"
39
#include "
G4RotationMatrix.hh
"
40
41
class
ExN04CalorimeterHit
:
public
G4VHit
42
{
43
public
:
44
45
ExN04CalorimeterHit
();
46
ExN04CalorimeterHit
(
G4LogicalVolume
* logVol,
G4int
z
,
G4int
phi);
47
~ExN04CalorimeterHit
();
48
ExN04CalorimeterHit
(
const
ExN04CalorimeterHit
&
right
);
49
const
ExN04CalorimeterHit
&
operator=
(
const
ExN04CalorimeterHit
&right);
50
G4int
operator==
(
const
ExN04CalorimeterHit
&right)
const
;
51
52
inline
void
*
operator
new
(size_t);
53
inline
void
operator
delete
(
void
*aHit);
54
55
void
Draw
();
56
void
Print
();
57
58
private
:
59
G4int
ZCellID;
60
G4int
PhiCellID;
61
G4double
edep;
62
G4ThreeVector
pos;
63
G4RotationMatrix
rot;
64
const
G4LogicalVolume
* pLogV;
65
66
public
:
67
inline
void
SetCellID
(
G4int
z,
G4int
phi)
68
{
69
ZCellID =
z
;
70
PhiCellID = phi;
71
}
72
inline
G4int
GetZ
() {
return
ZCellID; }
73
inline
G4int
GetPhi
() {
return
PhiCellID; }
74
inline
void
SetEdep
(
G4double
de)
75
{ edep = de; }
76
inline
void
AddEdep
(
G4double
de)
77
{ edep += de; }
78
inline
G4double
GetEdep
()
79
{
return
edep; }
80
inline
void
SetPos
(
G4ThreeVector
xyz)
81
{ pos = xyz; }
82
inline
G4ThreeVector
GetPos
()
83
{
return
pos; }
84
inline
void
SetRot
(
G4RotationMatrix
rmat)
85
{ rot = rmat; }
86
inline
G4RotationMatrix
GetRot
()
87
{
return
rot; }
88
inline
const
G4LogicalVolume
*
GetLogV
()
89
{
return
pLogV; }
90
91
};
92
93
typedef
G4THitsCollection<ExN04CalorimeterHit>
ExN04CalorimeterHitsCollection
;
94
95
extern
G4Allocator<ExN04CalorimeterHit>
ExN04CalorimeterHitAllocator
;
96
97
inline
void
* ExN04CalorimeterHit::operator
new
(size_t)
98
{
99
void
*aHit;
100
aHit = (
void
*) ExN04CalorimeterHitAllocator.
MallocSingle
();
101
return
aHit;
102
}
103
104
inline
void
ExN04CalorimeterHit::operator
delete
(
void
*aHit)
105
{
106
ExN04CalorimeterHitAllocator.
FreeSingle
((
ExN04CalorimeterHit
*) aHit);
107
}
108
109
#endif
110
111
Generated on Sat May 25 2013 14:32:22 for Geant4 by
1.8.4