Class Reference for E1039 Core & Analysis Software
Home page
Related Pages
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
PHG4CylinderCellv1.cc
Go to the documentation of this file.
1
#include "
PHG4CylinderCellv1.h
"
2
#include "
PHG4CylinderCellDefs.h
"
3
4
using namespace
std;
5
6
PHG4CylinderCellv1::PHG4CylinderCellv1
():
7
layer(0xFFFFFFFF),
8
cellid(0xFFFFFFFF),
9
binz(-1),
10
binphi(-1),
11
edeps(), showeredeps(), light_yield(0)
12
{}
13
14
void
15
PHG4CylinderCellv1::add_edep
(
const
PHG4HitDefs::keytype
g4hitid,
const
float
edep)
16
{
17
if
(
edeps
.find(g4hitid) ==
edeps
.end())
18
{
19
edeps
[g4hitid] = edep;
20
}
21
else
22
{
23
edeps
[g4hitid]+= edep;
24
}
25
}
26
27
void
28
PHG4CylinderCellv1::add_edep
(
const
PHG4HitDefs::keytype
g4hitid,
const
float
edep,
const
float
ly)
29
{
30
add_edep
(g4hitid, edep);
31
light_yield
+= ly;
32
}
33
34
void
35
PHG4CylinderCellv1::add_shower_edep
(
const
int
g4showerid,
const
float
edep)
36
{
37
if
(
showeredeps
.find(g4showerid) ==
showeredeps
.end())
38
{
39
showeredeps
[g4showerid] = edep;
40
}
41
else
42
{
43
showeredeps
[g4showerid]+= edep;
44
}
45
}
46
47
double
PHG4CylinderCellv1::get_edep
()
const
{
48
49
double
esum = 0.0;
50
EdepConstIterator
iter;
51
for
(iter =
edeps
.begin(); iter !=
edeps
.end(); ++iter) {
52
esum += iter->second;
53
}
54
return
esum;
55
}
56
57
void
58
PHG4CylinderCellv1::identify
(std::ostream& os)
const
59
{
60
os <<
"PHG4CylinderCellv1: #"
<<
cellid
<<
" "
;
61
os <<
"(layer,binz,binphi,e) = ("
;
62
os <<
layer
<<
","
;
63
os <<
binz
<<
","
;
64
os <<
binphi
<<
","
;
65
os <<
get_edep
();
66
os <<
")"
;
67
os << endl;
68
}
PHG4CylinderCellDefs.h
PHG4CylinderCellv1::PHG4CylinderCellv1
PHG4CylinderCellv1()
Definition:
PHG4CylinderCellv1.cc:6
PHG4HitDefs::keytype
unsigned int keytype
Definition:
PHG4HitDefs.h:8
PHG4CylinderCellv1::showeredeps
ShowerEdepMap showeredeps
Definition:
PHG4CylinderCellv1.h:51
PHG4CylinderCellv1::identify
void identify(std::ostream &os=std::cout) const
Definition:
PHG4CylinderCellv1.cc:58
PHG4CylinderCellv1::binz
int binz
Definition:
PHG4CylinderCellv1.h:48
PHG4CylinderCellv1::add_edep
void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep)
Definition:
PHG4CylinderCellv1.cc:15
PHG4CylinderCellv1::add_shower_edep
void add_shower_edep(const int g4showerid, const float edep)
Definition:
PHG4CylinderCellv1.cc:35
PHG4CylinderCellv1::cellid
PHG4CylinderCellDefs::keytype cellid
Definition:
PHG4CylinderCellv1.h:47
PHG4CylinderCellv1.h
PHG4CylinderCellv1::layer
unsigned int layer
Definition:
PHG4CylinderCellv1.h:46
PHG4CylinderCellv1::get_edep
double get_edep() const
Definition:
PHG4CylinderCellv1.cc:47
PHG4CylinderCellv1::binphi
int binphi
Definition:
PHG4CylinderCellv1.h:49
PHG4Cell::EdepConstIterator
EdepMap::const_iterator EdepConstIterator
Definition:
PHG4Cell.h:17
PHG4CylinderCellv1::edeps
EdepMap edeps
Definition:
PHG4CylinderCellv1.h:50
PHG4CylinderCellv1::light_yield
float light_yield
Definition:
PHG4CylinderCellv1.h:52
e1039-core
simulation
g4detectors
PHG4CylinderCellv1.cc
Built by
Haiwang Yu
. updated:
Wed May 26 2021 21:44:04
using
1.8.5 with
SeaQuest GitHub integration