Main Page
Namespaces
Classes
Package Documentation
src
DataFormats
HeavyIonEvent
src
CentralityBins.cc
Go to the documentation of this file.
1
#include "
DataFormats/HeavyIonEvent/interface/CentralityBins.h
"
2
#include <iostream>
3
using namespace
std
;
4
5
int
CentralityBins::getBin
(
double
value
)
const
{
6
7
int
bin
=
table_
.size() - 1;
8
for
(
unsigned
int
i
= 0;
i
<
table_
.size(); ++
i
){
9
if
(value >=
table_
[
i
].bin_edge){
10
bin =
i
;
11
return
bin
;
12
}
13
}
14
15
return
bin
;
16
}
17
18
CentralityBins::RunMap
getCentralityFromFile
(TDirectoryFile*
file
,
const
char
*
tag
,
int
firstRun
,
int
lastRun
){
19
return
getCentralityFromFile
(file,
"."
,tag,firstRun,lastRun);
20
}
21
22
CentralityBins::RunMap
getCentralityFromFile
(TDirectoryFile*
file
,
const
char
*
dir
,
const
char
*
tag
,
int
firstRun
,
int
lastRun
){
23
CentralityBins::RunMap
map
;
24
for
(
int
run
= firstRun;
run
<=
lastRun
; ++
run
){
25
const
CentralityBins
* table = (
const
CentralityBins
*)file->Get(Form(
"%s/run%d/%s"
,dir,
run
,tag));
26
if
(table) map.insert(std::pair<int,const CentralityBins*>(
run
,table));
27
}
28
return
map
;
29
}
30
31
ClassImp
(
CBin
);
32
ClassImp
(
CentralityBins
);
33
34
35
36
37
CentralityBins
Definition:
CentralityBins.h:37
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition:
GlobalPosition_Frontier_DevDB_cff.py:11
mps_fire.i
i
Definition:
mps_fire.py:338
ClassImp
ClassImp(CBin)
CentralityBins.h
std
Definition:
JetResolutionObject.h:80
getCentralityFromFile
CentralityBins::RunMap getCentralityFromFile(TDirectoryFile *file, const char *tag, int firstRun, int lastRun)
Definition:
CentralityBins.cc:18
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
CentralityBins::RunMap
std::map< int, const CentralityBins * > RunMap
Definition:
CentralityBins.h:40
FrontierConditions_GlobalTag_cff.file
file
Definition:
FrontierConditions_GlobalTag_cff.py:13
value
Definition:
value.py:1
stringResolutionProvider_cfi.bin
bin
set the eta bin as selection string.
Definition:
stringResolutionProvider_cfi.py:11
genParticles_cff.map
map
Definition:
genParticles_cff.py:11
table_
Table table_
Definition:
ExceptionActions.cc:21
ntuplemaker.lastRun
lastRun
Definition:
ntuplemaker.py:166
CentralityBins::getBin
int getBin(double value) const
Definition:
CentralityBins.cc:5
dataset.firstRun
firstRun
Definition:
dataset.py:940
dir
dbl *** dir
Definition:
mlp_gen.cc:35
CBin
Definition:
CentralityBins.h:9
Generated for CMSSW Reference Manual by
1.8.11