ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4PhysicsOrderedFreeVector.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4PhysicsOrderedFreeVector.hh
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
//
27
//
29
// PhysicsOrderedFreeVector Class Definition
31
//
32
// File: G4PhysicsOrderedFreeVector.hh
33
// Created: 1996-08-13
34
// Author: Juliet Armstrong
35
// Updated: 1997-03-25 by Peter Gumplinger
36
// > cosmetics (only)
37
// 2000-11-11 by H.Kurashige
38
// > use STL vector for dataVector and binVector
39
// mail: gum@triumf.ca
40
//
41
// Class description:
42
//
43
// A physics ordered free vector inherits from G4PhysicsVector which
44
// has values of energy-loss, cross-section, and other physics values
45
// of a particle in matter in a given range of the energy, momentum,
46
// etc.). In addition, the ordered free vector provides a method for
47
// the user to insert energy/value pairs in sequence. Methods to
48
// Retrieve the Max and Min energies and values from the vector are
49
// also provided.
50
52
53
#ifndef G4PhysicsOrderedFreeVector_h
54
#define G4PhysicsOrderedFreeVector_h 1
55
57
// Includes
59
60
#include "
G4PhysicsVector.hh
"
61
63
// Class Definition
65
66
class
G4PhysicsOrderedFreeVector
:
public
G4PhysicsVector
67
{
68
69
public
:
// with description
70
72
// Constructors and Destructor
74
75
G4PhysicsOrderedFreeVector
();
76
// the vector will be filled from exteran file using Retrieve
77
// or InsertValues methods
78
79
G4PhysicsOrderedFreeVector
(
G4double
* Energies,
80
G4double
* Values,
81
size_t
VectorLength);
82
// the vector is filled in this constructor
83
// 'Energies' and 'Values' need to have the same vector length
84
// 'Energies' assumed to be ordered
85
86
virtual
~G4PhysicsOrderedFreeVector
();
87
89
// Methods
91
92
void
InsertValues
(
G4double
energy
,
G4double
value
);
93
94
G4double
GetEnergy
(
G4double
aValue);
95
96
inline
G4double
GetMaxValue
();
97
98
inline
G4double
GetMinValue
();
99
100
inline
G4double
GetMaxLowEdgeEnergy
();
101
102
inline
G4double
GetMinLowEdgeEnergy
();
103
104
private
:
105
106
size_t
FindValueBinLocation
(
G4double
aValue);
107
108
G4double
LinearInterpolationOfEnergy
(
G4double
aValue,
size_t
theLocBin);
109
};
110
111
inline
112
G4double
G4PhysicsOrderedFreeVector::GetMaxValue
()
113
{
114
return
dataVector
.back();
115
}
116
117
inline
118
G4double
G4PhysicsOrderedFreeVector::GetMinValue
()
119
{
120
return
dataVector
.front();
121
}
122
123
inline
124
G4double
G4PhysicsOrderedFreeVector::GetMaxLowEdgeEnergy
()
125
{
126
return
binVector
.back();
127
}
128
129
inline
130
G4double
G4PhysicsOrderedFreeVector::GetMinLowEdgeEnergy
()
131
{
132
return
binVector
.front();
133
}
134
135
#endif
/* G4PhysicsOrderedFreeVector_h */
136
137
138
139
140
141
geant4
tree
geant4-10.6-release
source
global
management
include
G4PhysicsOrderedFreeVector.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:21
using
1.8.2 with
ECCE GitHub integration