Geant4
10.01.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
G4HnInformation.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
// $Id: G4HnInformation.hh 83599 2014-09-03 09:14:50Z gcosmo $
27
28
// Data class for the added Hn/Pn information (not available in g4tools).
29
//
30
// Author: Ivana Hrivnacova, 04/07/2012 (ivana@ipno.in2p3.fr)
31
32
#ifndef G4HnInformation_h
33
#define G4HnInformation_h 1
34
35
#include "
globals.hh
"
36
#include "
G4Fcn.hh
"
37
#include "
G4BinScheme.hh
"
38
39
// The additional Hn information per dimension
40
41
struct
G4HnDimensionInformation
42
{
43
G4HnDimensionInformation
(
44
const
G4String
& unitName,
45
const
G4String
& fcnName,
46
G4double
unit,
47
G4Fcn
fcn,
48
G4BinScheme
binScheme)
49
:
fUnitName
(unitName),
50
fFcnName
(fcnName),
51
fUnit
(unit),
52
fFcn
(fcn),
53
fBinScheme
(binScheme)
54
{}
55
56
G4HnDimensionInformation
(
const
G4HnDimensionInformation
& rhs)
57
:
fUnitName
(rhs.
fUnitName
),
58
fFcnName
(rhs.
fFcnName
),
59
fUnit
(rhs.
fUnit
),
60
fFcn
(rhs.
fFcn
),
61
fBinScheme
(rhs.
fBinScheme
)
62
{}
63
64
G4HnDimensionInformation
&
operator=
(
const
G4HnDimensionInformation
& rhs)
65
{
66
// check assignment to self
67
if
(
this
== &rhs)
return
*
this
;
68
69
fUnitName
= rhs.
fUnitName
;
70
fFcnName
= rhs.
fFcnName
;
71
fUnit
= rhs.
fUnit
;
72
fFcn
= rhs.
fFcn
;
73
fBinScheme
= rhs.
fBinScheme
;
74
75
return
*
this
;
76
}
77
78
//G4String fName;
79
G4String
fUnitName
;
80
G4String
fFcnName
;
81
G4double
fUnit
;
82
G4Fcn
fFcn
;
83
G4BinScheme
fBinScheme
;
84
};
85
86
class
G4HnInformation
87
{
88
public
:
89
enum
{
90
kX
= 0,
91
kY
= 1,
92
kZ
= 2
93
};
94
95
public
:
96
G4HnInformation
(
const
G4String
&
name
,
G4int
nofDimensions)
97
:
fName
(name),
98
fHnDimensionInformations
(),
99
fActivation
(true),
100
fAscii
(false) {
fHnDimensionInformations
.reserve(nofDimensions); }
101
102
// Set methods
103
void
AddHnDimensionInformation
(
104
const
G4HnDimensionInformation
& hnDimensionInformation);
105
void
SetActivation
(
G4bool
activation);
106
void
SetAscii
(
G4bool
ascii);
107
108
// Get methods
109
G4String
GetName
()
const
;
110
G4HnDimensionInformation
*
GetHnDimensionInformation
(
G4int
dimension);
111
G4bool
GetActivation
()
const
;
112
G4bool
GetAscii
()
const
;
113
114
private
:
115
// Disabled default constructor
116
G4HnInformation
();
117
118
// Data members
119
G4String
fName
;
120
std::vector<G4HnDimensionInformation>
fHnDimensionInformations
;
121
G4bool
fActivation
;
122
G4bool
fAscii
;
123
};
124
125
// inline functions
126
127
inline
void
G4HnInformation::AddHnDimensionInformation
(
128
const
G4HnDimensionInformation
& hnDimensionInformation)
129
{
fHnDimensionInformations
.push_back(hnDimensionInformation); }
130
131
inline
void
G4HnInformation::SetActivation
(
G4bool
activation)
132
{
fActivation
= activation; }
133
134
inline
void
G4HnInformation::SetAscii
(
G4bool
ascii)
135
{
fAscii
= ascii; }
136
137
inline
G4String
G4HnInformation::GetName
()
const
138
{
return
fName
; }
139
140
inline
G4HnDimensionInformation
*
G4HnInformation::GetHnDimensionInformation
(
G4int
dimension)
141
{
return
&(
fHnDimensionInformations
[dimension]); }
142
143
inline
G4bool
G4HnInformation::GetActivation
()
const
144
{
return
fActivation
; }
145
146
inline
G4bool
G4HnInformation::GetAscii
()
const
147
{
return
fAscii
; }
148
149
#endif
G4HnDimensionInformation::operator=
G4HnDimensionInformation & operator=(const G4HnDimensionInformation &rhs)
Definition:
G4HnInformation.hh:64
G4HnDimensionInformation::G4HnDimensionInformation
G4HnDimensionInformation(const G4HnDimensionInformation &rhs)
Definition:
G4HnInformation.hh:56
G4BinScheme.hh
G4HnInformation::GetActivation
G4bool GetActivation() const
Definition:
G4HnInformation.hh:143
G4HnInformation::SetActivation
void SetActivation(G4bool activation)
Definition:
G4HnInformation.hh:131
G4HnInformation::G4HnInformation
G4HnInformation()
G4HnInformation::kY
Definition:
G4HnInformation.hh:91
G4HnInformation::fActivation
G4bool fActivation
Definition:
G4HnInformation.hh:121
name
G4String name
Definition:
TRTMaterials.hh:40
G4Fcn
G4double(* G4Fcn)(G4double)
Definition:
G4Fcn.hh:36
G4HnInformation::SetAscii
void SetAscii(G4bool ascii)
Definition:
G4HnInformation.hh:134
G4HnInformation::AddHnDimensionInformation
void AddHnDimensionInformation(const G4HnDimensionInformation &hnDimensionInformation)
Definition:
G4HnInformation.hh:127
G4HnDimensionInformation::fFcn
G4Fcn fFcn
Definition:
G4HnInformation.hh:82
G4HnDimensionInformation
Definition:
G4HnInformation.hh:41
G4HnInformation::kZ
Definition:
G4HnInformation.hh:92
G4HnDimensionInformation::fBinScheme
G4BinScheme fBinScheme
Definition:
G4HnInformation.hh:83
G4int
int G4int
Definition:
G4Types.hh:78
G4HnDimensionInformation::G4HnDimensionInformation
G4HnDimensionInformation(const G4String &unitName, const G4String &fcnName, G4double unit, G4Fcn fcn, G4BinScheme binScheme)
Definition:
G4HnInformation.hh:43
G4HnInformation::kX
Definition:
G4HnInformation.hh:90
G4HnInformation::fName
G4String fName
Definition:
G4HnInformation.hh:119
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4HnDimensionInformation::fUnitName
G4String fUnitName
Definition:
G4HnInformation.hh:79
globals.hh
G4HnInformation::GetHnDimensionInformation
G4HnDimensionInformation * GetHnDimensionInformation(G4int dimension)
Definition:
G4HnInformation.hh:140
G4HnInformation
Definition:
G4HnInformation.hh:86
G4HnDimensionInformation::fFcnName
G4String fFcnName
Definition:
G4HnInformation.hh:80
G4HnInformation::fAscii
G4bool fAscii
Definition:
G4HnInformation.hh:122
G4HnInformation::GetAscii
G4bool GetAscii() const
Definition:
G4HnInformation.hh:146
G4HnInformation::fHnDimensionInformations
std::vector< G4HnDimensionInformation > fHnDimensionInformations
Definition:
G4HnInformation.hh:120
G4HnInformation::GetName
G4String GetName() const
Definition:
G4HnInformation.hh:137
G4HnDimensionInformation::fUnit
G4double fUnit
Definition:
G4HnInformation.hh:81
G4BinScheme
G4BinScheme
Definition:
G4BinScheme.hh:40
G4double
double G4double
Definition:
G4Types.hh:76
G4Fcn.hh
G4HnInformation::G4HnInformation
G4HnInformation(const G4String &name, G4int nofDimensions)
Definition:
G4HnInformation.hh:96
G4String
Definition:
G4String.hh:45
geant4.10.01.p02
source
analysis
management
include
G4HnInformation.hh
Generated on Wed Dec 30 2015 22:38:18 for Geant4 by
1.8.8