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
HistoManager.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file HistoManager.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
//
28
//
29
//
30
//---------------------------------------------------------------------------
31
//
32
// ClassName: HistoManager
33
//
34
// Description: Singleton class to hold parameters and build histograms.
35
// User cannot access to the constructor.
36
// The pointer of the only existing object can be got via
37
// HistoManager::GetPointer() static method.
38
// The first invokation of this static method makes
39
// the singleton object.
40
//
41
// Author: V.Ivanchenko 27/09/00
42
//
43
// Modified:
44
//
45
//----------------------------------------------------------------------------
46
//
47
48
#ifndef HistoManager_h
49
#define HistoManager_h 1
50
51
#include "
globals.hh
"
52
#include "
G4Material.hh
"
53
54
#include "
g4root.hh
"
55
56
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57
58
class
Histo
;
59
class
G4ParticleDefinition
;
60
class
HistoManagerMessenger
;
61
62
class
HistoManager
63
{
64
public
:
65
66
HistoManager
();
67
68
~HistoManager
();
69
70
void
BeginOfRun
();
71
void
EndOfRun
();
72
73
void
SetVerbose
(
G4int
val);
74
75
inline
void
SetParticleName
(
const
G4String
&);
76
inline
void
SetElementName
(
const
G4String
&);
77
78
inline
void
SetNumberOfBinsE
(
G4int
val);
79
inline
void
SetNumberOfBinsP
(
G4int
val);
80
81
inline
void
SetMinKinEnergy
(
G4double
val);
82
inline
void
SetMaxKinEnergy
(
G4double
val);
83
84
inline
void
SetMinMomentum
(
G4double
val);
85
inline
void
SetMaxMomentum
(
G4double
val);
86
87
inline
void
SetHistoName
(
G4String
& val);
88
89
inline
void
SetTargetMaterial
(
const
G4Material
*
p
);
90
91
private
:
92
93
HistoManagerMessenger
*
fMessenger
;
94
G4AnalysisManager
*
fAnalysisManager
;
95
96
const
G4ParticleDefinition
*
fNeutron
;
97
const
G4Material
*
fTargetMaterial
;
98
99
G4String
fParticleName
;
100
G4String
fElementName
;
101
102
G4double
fMinKinEnergy
;
103
G4double
fMaxKinEnergy
;
104
G4double
fMinMomentum
;
105
G4double
fMaxMomentum
;
106
107
G4int
fVerbose
;
108
G4int
fBinsE
;
109
G4int
fBinsP
;
110
111
G4String
fHistoName
;
112
};
113
114
inline
void
HistoManager::SetParticleName
(
const
G4String
&
name
)
115
{
116
fParticleName
=
name
;
117
}
118
119
inline
void
HistoManager::SetElementName
(
const
G4String
&
name
)
120
{
121
fElementName
=
name
;
122
}
123
124
inline
void
HistoManager::SetNumberOfBinsE
(
G4int
val)
125
{
126
if
(val>0) {
fBinsE
= val; }
127
}
128
129
inline
void
HistoManager::SetNumberOfBinsP
(
G4int
val)
130
{
131
if
(val>0) {
fBinsP
= val; }
132
}
133
134
inline
void
HistoManager::SetMinKinEnergy
(
G4double
val)
135
{
136
if
(val>0 && val<
fMaxKinEnergy
) {
fMinKinEnergy
= val; }
137
}
138
139
inline
void
HistoManager::SetMaxKinEnergy
(
G4double
val)
140
{
141
if
(val>
fMinKinEnergy
) {
fMaxKinEnergy
= val; }
142
}
143
144
inline
void
HistoManager::SetMinMomentum
(
G4double
val)
145
{
146
if
(val>0 && val<
fMaxMomentum
) {
fMinMomentum
= val; }
147
}
148
149
inline
void
HistoManager::SetMaxMomentum
(
G4double
val)
150
{
151
if
(val>
fMinMomentum
) {
fMaxMomentum
= val; }
152
}
153
154
inline
void
HistoManager::SetHistoName
(
G4String
& val)
155
{
156
fHistoName
= val;
157
}
158
159
inline
void
HistoManager::SetTargetMaterial
(
const
G4Material
*
p
)
160
{
161
fTargetMaterial
=
p
;
162
}
163
164
#endif
geant4
tree
geant4-10.6-release
examples
extended
hadronic
Hadr00
include
HistoManager.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:53
using
1.8.2 with
ECCE GitHub integration