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
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
blob
master
macros
offline
packages
MvtxPrototype1
MvtxPrototype2
Prototype2
Prototype3
CaloCalibration.cc
CaloCalibration.h
CaloUnpackPRDF.cc
CaloUnpackPRDF.h
EventInfoSummary.cc
EventInfoSummary.h
GenericUnpackPRDF.cc
GenericUnpackPRDF.h
PROTOTYPE3_FEM.cc
PROTOTYPE3_FEM.h
Prototype3DSTReader.cc
Prototype3DSTReader.h
RawTower_Prototype3.cc
RawTower_Prototype3.h
RawTower_Prototype3LinkDef.h
RawTower_Temperature.cc
RawTower_Temperature.h
RawTower_TemperatureLinkDef.h
RunInfoUnpackPRDF.cc
RunInfoUnpackPRDF.h
TempInfoUnpackPRDF.cc
TempInfoUnpackPRDF.h
Prototype4
tpc2019
online
simulation
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
RawTower_Prototype3.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RawTower_Prototype3.cc
1
#include "
RawTower_Prototype3.h
"
2
3
#include "
PROTOTYPE3_FEM.h
"
4
5
#include <calobase/RawTowerDefs.h>
6
7
#include <algorithm>
8
#include <cassert>
9
#include <cmath>
10
#include <iostream>
11
#include <vector>
// for vector
12
13
using namespace
std;
14
15
RawTower_Prototype3::RawTower_Prototype3
()
16
:
towerid
(~0)
17
,
// initialize all bits on
18
energy
(0)
19
,
time
(NAN)
20
, HBD_channel(-1)
21
{
22
fill_n(
signal_samples
,
NSAMPLES
, -9999);
23
}
24
25
RawTower_Prototype3::RawTower_Prototype3
(
RawTowerDefs::keytype
id
)
26
:
towerid
(id)
27
,
energy
(0)
28
,
time
(NAN)
29
, HBD_channel(-1)
30
{
31
fill_n(
signal_samples
,
NSAMPLES
, -9999);
32
}
33
34
RawTower_Prototype3::RawTower_Prototype3
(
const
unsigned
int
icol,
35
const
unsigned
int
irow)
36
:
towerid
(0)
37
,
energy
(0)
38
,
time
(NAN)
39
, HBD_channel(-1)
40
{
41
towerid
=
RawTowerDefs::encode_towerid
(
RawTowerDefs::NONE
, icol, irow);
42
fill_n(
signal_samples
,
NSAMPLES
, -9999);
43
}
44
45
RawTower_Prototype3::RawTower_Prototype3
(
46
const
RawTowerDefs::CalorimeterId
caloid,
const
unsigned
int
ieta,
47
const
unsigned
int
iphi)
48
:
towerid
(0)
49
,
energy
(0)
50
,
time
(NAN)
51
, HBD_channel(-1)
52
{
53
towerid
=
RawTowerDefs::encode_towerid
(caloid, ieta, iphi);
54
fill_n(
signal_samples
,
NSAMPLES
, -9999);
55
}
56
57
void
RawTower_Prototype3::Reset
()
58
{
59
energy
= 0;
60
time
= NAN;
61
fill_n(
signal_samples
,
NSAMPLES
, -9999);
62
}
63
64
int
RawTower_Prototype3::isValid
()
const
{
return
get_energy
() != 0; }
65
66
void
RawTower_Prototype3::identify
(std::ostream &
os
)
const
67
{
68
os <<
"RawTower_Prototype3: etabin: "
<<
get_bineta
()
69
<<
", phibin: "
<<
get_binphi
() <<
" energy="
<<
get_energy
() << std::endl;
70
}
71
72
void
RawTower_Prototype3::set_signal_samples
(
73
int
i
,
RawTower_Prototype3::signal_type
sig)
74
{
75
assert
(i >= 0);
76
assert
(i <
NSAMPLES
);
77
signal_samples
[
i
] = sig;
78
}
79
80
RawTower_Prototype3::signal_type
81
RawTower_Prototype3::get_signal_samples
(
int
i
)
const
82
{
83
assert
(i >= 0);
84
assert
(i <
NSAMPLES
);
85
return
signal_samples
[
i
];
86
}
87
88
double
RawTower_Prototype3::get_energy_power_law_exp
(
int
verbosity
)
89
{
90
double
peak = NAN;
91
double
peak_sample = NAN;
92
double
pedstal = NAN;
93
94
vector<double> vec_signal_samples;
95
for
(
int
i
= 0;
i
<
NSAMPLES
;
i
++)
96
{
97
vec_signal_samples.push_back(
signal_samples
[
i
]);
98
}
99
100
PROTOTYPE3_FEM::SampleFit_PowerLawExp
(vec_signal_samples, peak, peak_sample,
101
pedstal, verbosity);
102
103
return
peak;
104
}
prototype
blob
master
offline
packages
Prototype3
RawTower_Prototype3.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:29
using
1.8.2 with
sPHENIX GitHub integration