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
blob
master
A_N
Ana
AndersonAnalysisModules
AntiSigma
BBCStudy
Calo_Validation_Package
Calo_waveform_sim
Calorimeter
CalorimeterEmbedding
CalorimeterJets
cdbEMCalExample
cemcRecoAna
Centrality_Validation_Package
dNdEta_Run2023
EIC-IR
EIC-SynRad
EICAnalysis
EICMCAnalysis
EICTrigger
ElectronID
EMCal-analysis
EMCal-calibration
EMCal-commissioning
EMCal-LEDs
EMCal-position-dependent-calibration
EMCal-QA
EMCal_pi0_Calib_2023
EMCTemplateFitting
macros
src
CaloCalibration.cc
CaloCalibration.h
CaloTemplateFit.cc
CaloTemplateFit.h
CaloUnpackPRDF.cc
CaloUnpackPRDF.h
EventInfoSummary.cc
EventInfoSummary.h
GenericUnpackPRDF.cc
GenericUnpackPRDF.h
PROTOTYPE4_FEM.cc
PROTOTYPE4_FEM.h
Prototype4DSTReader.cc
Prototype4DSTReader.h
RawTower_Prototype4.cc
RawTower_Prototype4.h
RawTower_Prototype4LinkDef.h
RawTower_Temperature.cc
RawTower_Temperature.h
RawTower_TemperatureLinkDef.h
RunInfoUnpackPRDF.cc
RunInfoUnpackPRDF.h
TempInfoUnpackPRDF.cc
TempInfoUnpackPRDF.h
EpFinder
Event-Display
EventMix
FilterEvents
FilterEventsUpsilon
Fluence
ForwardCalo
ForwardTracking
FrawleyTrackEvalMacros
hbcup
HCal-analysis
HCalCosmicCalib
HCalHotTowerFinder
HCalib
HcalSingleHadronCalib
HF-Jet
HF-Particle
isoCluster
IsolatedTrackAnalysis
JS-Jet
mbdAnalysis
MBDStudy
MultiDetectorMultiplicity
MvtxTelescope
mybuild
ParticleID
PHFlowJetMaker
PhotonConversion
PhotonJet
pi0ClusterAna
pi0Efficiency
Pi0MassAnalysis
Prototype2
Prototype3
Prototype4
psTOF
pythiaEMCalAna
pythiaInfo
QuarkoniaBG
quickHIJING
ResonanceJetTaggingOutputs
runTrackingDiagnostics
Shift_emcal_g4hits
SimpleTrackingAnalysis
singlePhotonClusterAna
sPhenixAj
SvtxSimPerformanceCheckReco
TemplateCreation
Test
TowerInfoExample
TPC
TPC-ClusterAnimation
TPC-GemGain
Tracking
TrackPid
TreeMaker
ZDC-CALIB
analysis_tpc_prototype
coresoftware
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
RawTower_Temperature.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RawTower_Temperature.cc
1
#include "
RawTower_Temperature.h
"
2
3
#include <calobase/RawTowerDefs.h>
4
5
#include <iomanip>
6
#include <iostream>
7
8
using namespace
std;
9
10
RawTower_Temperature::RawTower_Temperature
()
11
:
towerid
(~0)
// initialize all bits on
12
{
13
}
14
15
RawTower_Temperature::RawTower_Temperature
(
RawTowerDefs::keytype
id
)
16
:
towerid
(id)
17
{
18
}
19
20
RawTower_Temperature::RawTower_Temperature
(
const
unsigned
int
icol,
21
const
unsigned
int
irow)
22
{
23
towerid
=
RawTowerDefs::encode_towerid
(
RawTowerDefs::NONE
, icol, irow);
24
}
25
26
void
RawTower_Temperature::Reset
()
27
{
28
eventnumbers
.clear();
29
times
.clear();
30
temperatures
.clear();
31
}
32
33
float
RawTower_Temperature::get_temperature_from_time
(
const
time_t
t
)
const
34
{
35
if
(!
isValid
())
36
return
-1;
37
38
if
(t <
get_time_from_entry
(0))
// if we ask for a time before the start time,
39
// we return the first reading
40
{
41
return
get_temperature_from_entry
(0);
42
}
43
44
int
lowest_entry = 0;
45
int
above_entry = 0;
46
47
for
(
int
i
= 0;
i
<
get_nr_entries
();
i
++)
48
{
49
if
(
get_time_from_entry
(
i
) <
t
)
50
{
51
lowest_entry =
i
;
52
}
53
else
54
{
55
if
(!above_entry)
56
above_entry =
i
;
57
}
58
}
59
60
if
(!above_entry)
// we didn't find a entry later than this
61
{
62
return
get_temperature_from_entry
(lowest_entry);
63
}
64
65
double
m
=
66
(
get_temperature_from_entry
(above_entry) -
67
get_temperature_from_entry
(lowest_entry)) /
68
(
get_time_from_entry
(above_entry) -
get_time_from_entry
(lowest_entry));
69
70
return
get_temperature_from_entry
(lowest_entry) +
71
m * (t -
get_time_from_entry
(lowest_entry));
72
}
73
void
RawTower_Temperature::identify
(std::ostream &
os
)
const
74
{
75
os <<
"RawTower_Temperature col="
<<
get_column
() <<
" row="
<<
get_row
()
76
<<
": "
<<
temperatures
.size() <<
" entries"
<< std::endl;
77
}
78
79
void
RawTower_Temperature::print
(std::ostream &
os
)
const
80
{
81
identify
(os);
82
83
cout <<
"entry event time T"
<< endl;
84
for
(
int
i
= 0;
i
<
get_nr_entries
();
i
++)
85
{
86
os << setw(4) <<
i
<<
" "
<< setw(7) <<
get_eventnumber_from_entry
(
i
)
87
<<
" "
<< setw(7) <<
get_time_from_entry
(
i
) <<
" "
<< setw(5)
88
<<
get_temperature_from_entry
(
i
) << endl;
89
}
90
}
analysis
blob
master
EMCTemplateFitting
src
RawTower_Temperature.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:51
using
1.8.2 with
sPHENIX GitHub integration