Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
int
bin
=
table_
.size() - 1;
7
for
(
unsigned
int
i
= 0;
i
<
table_
.size(); ++
i
) {
8
if
(value >=
table_
[
i
].bin_edge) {
9
bin =
i
;
10
return
bin
;
11
}
12
}
13
14
return
bin
;
15
}
16
17
CentralityBins::RunMap
getCentralityFromFile
(TDirectoryFile*
file
,
const
char
*
tag
,
int
firstRun
,
int
lastRun
) {
18
return
getCentralityFromFile
(file,
"."
, tag, firstRun, lastRun);
19
}
20
21
CentralityBins::RunMap
getCentralityFromFile
(
22
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)
27
map.insert(std::pair<int, const CentralityBins*>(
run
, table));
28
}
29
return
map;
30
}
31
32
ClassImp
(
CBin
);
33
ClassImp
(
CentralityBins
);
CentralityBins
Definition:
CentralityBins.h:37
mergeVDriftHistosByStation.file
tuple file
Definition:
mergeVDriftHistosByStation.py:55
mps_fire.i
i
Definition:
mps_fire.py:428
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:55
CentralityBins.h
TableParser.table
tuple table
Definition:
TableParser.py:111
dataset.firstRun
string firstRun
Definition:
dataset.py:936
MergeJob_cfg.lastRun
tuple lastRun
Definition:
MergeJob_cfg.py:17
CentralityBins::RunMap
std::map< int, const CentralityBins * > RunMap
Definition:
CentralityBins.h:39
GlobalPosition_Frontier_DevDB_cff.tag
tuple tag
Definition:
GlobalPosition_Frontier_DevDB_cff.py:11
newFWLiteAna.bin
string bin
Definition:
newFWLiteAna.py:161
submitPVValidationJobs.run
tuple run
Definition:
submitPVValidationJobs.py:227
DeadROC_duringRun.dir
string dir
Definition:
DeadROC_duringRun.py:23
ClassImp
ClassImp(AliDaqEventHeader)
table_
Table table_
Definition:
ExceptionActions.cc:21
CentralityBins::getBin
int getBin(double value) const
Definition:
CentralityBins.cc:5
CBin
Definition:
CentralityBins.h:9
getCentralityFromFile
CentralityBins::RunMap getCentralityFromFile(TDirectoryFile *, const char *dir, const char *tag, int firstRun=0, int lastRun=10)
Definition:
CentralityBins.cc:21
Generated for CMSSW Reference Manual by
1.8.5