Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
blob
master
calibrations
generators
offline
database
framework
packages
CaloBase
RawCluster.cc
RawCluster.h
RawClusterContainer.cc
RawClusterContainer.h
RawClusterContainerLinkDef.h
RawClusterDefs.h
RawClusterDefsLinkDef.h
RawClusterLinkDef.h
RawClusterUtility.h
RawClusterUtilityLinkDef.h
RawClusterv1.cc
RawClusterv1.h
RawClusterv1LinkDef.h
RawTower.cc
RawTower.h
RawTowerContainer.cc
RawTowerContainer.h
RawTowerContainerLinkDef.h
RawTowerDeadMap.cc
RawTowerDeadMap.h
RawTowerDeadMapLinkDef.h
RawTowerDeadMapv1.cc
RawTowerDeadMapv1.h
RawTowerDeadMapv1LinkDef.h
RawTowerDefs.h
RawTowerDefsLinkDef.h
RawTowerGeom.cc
RawTowerGeom.h
RawTowerGeomContainer.cc
RawTowerGeomContainer.h
RawTowerGeomContainer_Cylinderv1.cc
RawTowerGeomContainer_Cylinderv1.h
RawTowerGeomContainer_Cylinderv1LinkDef.h
RawTowerGeomContainerLinkDef.h
RawTowerGeomContainerv1.cc
RawTowerGeomContainerv1.h
RawTowerGeomContainerv1LinkDef.h
RawTowerGeomLinkDef.h
RawTowerGeomv1.cc
RawTowerGeomv1.h
RawTowerGeomv1LinkDef.h
RawTowerGeomv2.cc
RawTowerGeomv2.h
RawTowerGeomv2LinkDef.h
RawTowerGeomv3.cc
RawTowerGeomv3.h
RawTowerGeomv3LinkDef.h
RawTowerGeomv4.cc
RawTowerGeomv4.h
RawTowerGeomv4LinkDef.h
RawTowerLinkDef.h
RawTowerv1.cc
RawTowerv1.h
RawTowerv1LinkDef.h
RawTowerv2.cc
RawTowerv2.h
RawTowerv2LinkDef.h
TowerInfo.h
TowerInfoContainer.cc
TowerInfoContainer.h
TowerInfoContainerLinkDef.h
TowerInfoContainerv1.cc
TowerInfoContainerv1.h
TowerInfoContainerv1LinkDef.h
TowerInfoContainerv2.cc
TowerInfoContainerv2.h
TowerInfoContainerv2LinkDef.h
TowerInfoContainerv3.cc
TowerInfoContainerv3.h
TowerInfoContainerv3LinkDef.h
TowerInfoDefs.cc
TowerInfoDefs.h
TowerInfoLinkDef.h
TowerInfov1.cc
TowerInfov1.h
TowerInfov1LinkDef.h
TowerInfov2.cc
TowerInfov2.h
TowerInfov2LinkDef.h
TowerInfov3.cc
TowerInfov3.h
TowerInfov3LinkDef.h
CaloEmbedding
CaloReco
centrality
ClusterIso
compressor
decayfinder
epd
eventplaneinfo
globalvertex
Half
HFTrackEfficiency
intt
jetbackground
jetbase
KFParticle_sPHENIX
mbd
micromegas
mvtx
NodeDump
particleflow
PHField
PHGenFitPkg
PHGeometry
QAUtils
rawtodst
ResonanceJetTagging
tpc
tpccalib
tpcdaq
TPCHitTrackDisplay
trackbase
trackbase_historic
TrackerMillepedeAlignment
TrackingDiagnostics
trackreco
trigger
vararray
QA
simulation
validation
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RawTowerv2.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RawTowerv2.cc
1
#include "
RawTowerv2.h
"
2
3
#include <climits>
// for UCHAR_MAX
4
#include <cmath>
5
#include <iostream>
6
#include <string>
// for operator<<, string
7
#include <utility>
// for pair
8
9
using namespace
std;
10
11
RawTowerv2::RawTowerv2
() =
default
;
12
13
RawTowerv2::RawTowerv2
(
const
RawTower
&
tower
)
14
:
RawTowerv1
(tower)
15
{
16
// This is a generic copy of ALL properties a hit has
17
// do not add explicit copies, they will be added to
18
// the new hits with their default value increasing memory use
19
for
(
unsigned
char
ic = 0; ic < UCHAR_MAX; ic++)
20
{
21
PROPERTY
prop_id =
static_cast<
PROPERTY
>
(ic);
22
if
(tower.
has_property
(prop_id))
23
{
24
set_property
(prop_id, tower.
get_property
(prop_id));
25
}
26
}
27
}
28
29
RawTowerv2::RawTowerv2
(
RawTowerDefs::keytype
id
)
30
:
RawTowerv1
(id)
31
{
32
}
33
34
RawTowerv2::RawTowerv2
(
const
unsigned
int
ieta,
const
unsigned
int
iphi)
35
:
RawTowerv1
(ieta, iphi)
36
{
37
}
38
39
RawTowerv2::RawTowerv2
(
const
RawTowerDefs::CalorimeterId
caloid,
40
const
unsigned
int
ieta,
const
unsigned
int
iphi)
41
:
RawTowerv1
(caloid, ieta, iphi)
42
{
43
}
44
45
void
RawTowerv2::Reset
()
46
{
47
RawTowerv1::Reset
();
48
prop_map
.clear();
49
}
50
51
int
RawTowerv2::isValid
()
const
52
{
53
return
RawTowerv1::isValid
();
54
}
55
56
void
RawTowerv2::identify
(std::ostream&
os
)
const
57
{
58
os <<
"RawTowerv2: etabin: "
<<
get_bineta
() <<
", phibin: "
<<
get_binphi
()
59
<<
" energy="
<<
get_energy
() << std::endl;
60
61
for
(
auto
i
:
prop_map
)
62
{
63
PROPERTY
prop_id =
static_cast<
PROPERTY
>
(
i
.first);
64
const
string
property_info =
get_property_info
(prop_id);
65
cout <<
"\t"
<< prop_id <<
":\t"
<< property_info <<
" = \t"
<<
get_property
(prop_id) << endl;
66
}
67
}
68
69
bool
RawTowerv2::has_property
(
const
PROPERTY
prop_id)
const
70
{
71
prop_map_t::const_iterator
i
=
prop_map
.find(prop_id);
72
return
i !=
prop_map
.end();
73
}
74
75
double
76
RawTowerv2::get_property
(
const
PROPERTY
prop_id)
const
77
{
78
prop_map_t::const_iterator
i
=
prop_map
.find(prop_id);
79
80
if
(i !=
prop_map
.end())
81
{
82
return
i->second;
83
}
84
85
return
NAN;
86
}
87
88
void
RawTowerv2::set_property
(
const
PROPERTY
prop_id,
const
double
value
)
89
{
90
prop_map
[prop_id] =
value
;
91
}
coresoftware
blob
master
offline
packages
CaloBase
RawTowerv2.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:05
using
1.8.2 with
sPHENIX GitHub integration