Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
KFPHistogramSet.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file KFPHistogramSet.cxx
1
/*
2
* This file is part of KFParticle package
3
* Copyright (C) 2007-2019 FIAS Frankfurt Institute for Advanced Studies
4
* 2007-2019 Goethe University of Frankfurt
5
* 2007-2019 Ivan Kisel <I.Kisel@compeng.uni-frankfurt.de>
6
* 2007-2019 Maksym Zyzak
7
*
8
* KFParticle is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* KFParticle is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20
*/
21
22
#include "
KFPHistogramSet.h
"
23
#include "
KFPartEfficiencies.h
"
24
25
KFPHistogramSet::KFPHistogramSet
(
int
iPart)
26
{
31
KFPartEfficiencies
fParteff;
32
std::string
parName[
NHisto1D
] = {
"M"
,
"p"
,
"p_{t}"
,
"y"
,
"DecayL"
,
"c#tau"
,
"chi2ndf"
,
"prob"
,
"#theta"
,
"phi"
,
"X"
,
"Y"
,
"Z"
,
"R"
,
"L"
,
"l/dl"
,
"Multiplicity"
};
33
#ifdef CBM
34
int
nBins[
NHisto1D
] = {1000,
// M
35
100,
// p
36
100,
// pt
37
100,
// y
38
100,
// DecayL
39
100,
// ctau
40
100,
// chi2/ndf
41
100,
// prob
42
100,
// theta
43
100,
// phi
44
200,
// X
45
200,
// Y
46
360,
// Z
47
200,
// R
48
200,
// L
49
200,
// L/dL
50
fParteff.
partMaxMult
[iPart]+1};
51
float
xMin[
NHisto1D
] = { fParteff.
partMHistoMin
[iPart],
// M
52
0.f,
// p
53
0.f,
// pt
54
0.f,
// y
55
-5.f,
// DecayL
56
0.f,
// ctau
57
0.f,
// chi2/ndf
58
0.f,
// prob
59
-2.f,
// theta
60
-2.f,
// phi
61
-50.f,
// X
62
-50.f,
// Y
63
-10.f,
// Z
64
0.f,
// R
65
0.f,
// L
66
-1.f,
// L/dL
67
-0.5f };
68
float
xMax[
NHisto1D
] = { fParteff.
partMHistoMax
[iPart],
// M
69
10.f,
// p
70
3.f,
// pt
71
6.f,
// y
72
55.f,
// DecayL
73
30.f,
// ctau
74
20.f,
// chi2/ndf
75
1.f,
// prob
76
2.f,
// theta
77
2.f,
// phi
78
50.f,
// X
79
50.f,
// Y
80
80.f,
// Z
81
50.f,
// R
82
100.f,
// L
83
35.f,
// L/dL
84
float(fParteff.
partMaxMult
[iPart])+0.5f};
85
#else
86
int
nBins[
NHisto1D
] = {1000,
// M
87
100,
// p
88
100,
// pt
89
100,
// y
90
100,
// DecayL
91
100,
// ctau
92
100,
// chi2/ndf
93
100,
// prob
94
100,
// theta
95
100,
// phi
96
100,
// X
97
1000,
// Y
98
1000,
// Z
99
1000,
// R
100
1000,
// L
101
1000,
// L/dL
102
fParteff.
partMaxMult
[iPart]+1};
103
float
xMin[
NHisto1D
] = { fParteff.
partMHistoMin
[iPart],
// M
104
0.f,
// p
105
0.f,
// pt
106
-6.f,
// y
107
-5.f,
// DecayL
108
0.f,
// ctau
109
0.f,
// chi2/ndf
110
0.f,
// prob
111
-2.f,
// theta
112
-2.f,
// phi
113
-200.f,
// X
114
-200.f,
// Y
115
-200.f,
// Z
116
0.f,
// R
117
0.f,
// L
118
-1.f,
// L/dL
119
-0.5f };
120
float
xMax[
NHisto1D
] = { fParteff.
partMHistoMax
[iPart],
// M
121
10.f,
// p
122
3.f,
// pt
123
6.f,
// y
124
55.f,
// DecayL
125
30.f,
// ctau
126
20.f,
// chi2/ndf
127
1.f,
// prob
128
2.f,
// theta
129
2.f,
// phi
130
200.f,
// X
131
200.f,
// Y
132
200.f,
// Z
133
200.f,
// R
134
400.f,
// L
135
35.f,
// L/dL
136
float(fParteff.
partMaxMult
[iPart])+0.5f};
137
#endif
138
for
(
int
iHisto=0; iHisto<
NHisto1D
; iHisto++)
139
fKFPHistogram1D
[iHisto] =
KFPHistogram1D
(parName[iHisto], nBins[iHisto], xMin[iHisto], xMax[iHisto]);
140
}
141
142
void
KFPHistogramSet::SetHistogramMemory
(
int
* pointer)
143
{
147
for
(
int
i
=0;
i
<
NHisto1D
;
i
++)
148
{
149
fKFPHistogram1D
[
i
].
SetHistogramMemory
(pointer);
150
pointer +=
fKFPHistogram1D
[
i
].
DataSize
();
151
}
152
}
153
154
void
KFPHistogramSet::Fill
(
const
KFParticle
&
particle
)
155
{
159
float
mass
= 0,
p
=0,
pt
=0,
err
= 0;
160
particle.
GetMass
(mass,
err
);
161
particle.
GetMomentum
(
p
,
err
);
162
particle.
GetPt
(
pt
,
err
);
163
float
rapidity = particle.
GetRapidity
();
164
float
chi2ndf = particle.
GetChi2
()/float(particle.
GetNDF
());
165
float
r
= sqrt(particle.
X
()*particle.
X
() + particle.
Y
()*particle.
Y
());
166
float
l = sqrt(particle.
X
()*particle.
X
() + particle.
Y
()*particle.
Y
() + particle.
Z
()*particle.
Z
());
167
168
fKFPHistogram1D
[0].
Fill
(mass);
169
fKFPHistogram1D
[1].
Fill
(
p
);
170
fKFPHistogram1D
[2].
Fill
(
pt
);
171
fKFPHistogram1D
[3].
Fill
(rapidity);
172
fKFPHistogram1D
[6].
Fill
(chi2ndf);
173
fKFPHistogram1D
[10].
Fill
(particle.
X
());
174
fKFPHistogram1D
[11].
Fill
(particle.
Y
());
175
fKFPHistogram1D
[12].
Fill
(particle.
Z
());
176
fKFPHistogram1D
[13].
Fill
(r);
177
fKFPHistogram1D
[14].
Fill
(l);
178
}
KFParticle
blob
master
KFParticlePerformance
KFPHistogram
KFPHistogramSet.cxx
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration