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
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
Calibrations
FastJetMedianBkg
src_JetMedianTree
macro
loc_lib
JetIndicesMatcher.cc
JetIndicesMatcher.h
JetIndicesMatcher_bkup.cc
loc_lib.h
loc_libs.h
noi_fmt.h
noi_fnc.h
noiBinVec.h
noiDict.h
noiGetter.h
noiMsgTree.h
noiPads.h
noiPtrDbl.h
pAu_bins.h
pAu_bins_.h
plot
Fun4All_JetRhoMedian.C
Fun4All_RhoFluct.C
make_inp_lists.py
JetRhoMedian.cc
JetRhoMedian.h
PrintTowers.cc
PrintTowers.h
RhoFluct.cc
RhoFluct.h
FullJetFinder
HCalJetPhiShift
jet-kinematics-mc
JetAnalysis
JetBkgdSub
JetMultSub
JetNconstituents
JetRTrack
JetSeedCount
JetUESize-v2Psi2Centrality
JetUnderlyingEvent
JetValidation
RandomConeAna
TracksInJets
TruthJetTagging
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
noiBinVec.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file noiBinVec.h
1
#ifndef noiBinVec__h
2
#define noiBinVec__h
3
4
#ifndef tuClass__h
5
// David Stewart, Dec 1 2022
6
// Stripped down version of a convenience class that provide's *double and int for histograms binning
7
// initialized with vector<double>
8
struct
tuBinVec
{
9
// data members
10
double
*
ptr
;
11
int
size
;
12
vector<double>
vec
;
13
14
void
build_ptr
() {
15
size
=
vec
.size();
16
ptr
=
new
double
[
size
];
17
for
(
int
i
{0};
i
<
size
; ++
i
)
ptr
[
i
] =
vec
[
i
];
18
};
19
20
tuBinVec
(vector<double> V) {
21
// range repeate will add a range leading to the next number
22
// it is triggered by a repeat value of the last number, followed by the number
23
// of bins
24
// example:
25
// 0, 0, 5, 1. 2. 3. = 0 .2 .4 .6 .8 1.0 2. 3.
26
vec
.push_back(V[0]);
27
int
S
= V.size();
28
int
i
{1};
29
while
(
i
<(
int
)S) {
30
if
( V[
i
] == V[
i
-1] ) {
31
if
(
i
>(S-3))
throw
std::runtime_error(
"fatal in tuBinVec with range_repeat"
);
32
double
step
= (V[
i
+2]-V[
i
])/V[
i
+1];
33
for
(
int
k
{1};
k
<=V[
i
+1]; ++
k
)
vec
.push_back(V[
i
]+
k
*step);
34
i
+=3;
35
}
else
{
36
vec
.push_back(V[
i
]);
37
++
i
;
38
}
39
}
40
build_ptr
();
41
};
42
43
operator
int ()
const
{
return
size
-1; };
44
operator
double
* ()
const
{
return
ptr
; };
45
operator
vector<double> () {
return
vec
; };
46
int
bin_from_0
(
double
val)
const
{
47
auto
loc
= upper_bound(
vec
.begin(),
vec
.end(), val);
48
return
loc
-
vec
.begin()-1;
49
};
50
int
bin_from_1
(
double
val)
const
{
51
return
bin_from_0
(val) + 1;
52
};
53
};
54
#endif // endif noiclass noibinvec definition
55
56
#endif
analysis
blob
master
JS-Jet
FastJetMedianBkg
src_JetMedianTree
macro
loc_lib
noiBinVec.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:53
using
1.8.2 with
sPHENIX GitHub integration