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
KFPEmcCluster.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file KFPEmcCluster.h
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
#ifndef KFPEmcCluster_H
23
#define KFPEmcCluster_H
24
25
#include "
KFParticleDef.h
"
26
42
class
KFPEmcCluster
43
{
44
public
:
45
KFPEmcCluster
():
fP
(),
fC
(),
fId
() { }
46
~KFPEmcCluster
() { }
47
49
int
Size
()
const
{
return
fP
[0].size(); }
50
51
void
Resize
(
const
int
n
);
52
void
Set
(
KFPEmcCluster
&
v
,
int
vSize,
int
offset
);
53
void
SetTracks
(
const
KFPEmcCluster
& track,
const
kfvector_uint
& trackIndex,
const
int
nIndexes);
54
55
const
kfvector_float
&
X
()
const
{
return
fP
[0]; }
56
const
kfvector_float
&
Y
()
const
{
return
fP
[1]; }
57
const
kfvector_float
&
Z
()
const
{
return
fP
[2]; }
58
const
kfvector_float
&
E
()
const
{
return
fP
[3]; }
59
60
const
kfvector_float
&
Parameter
(
const
int
i
)
const
{
return
fP
[
i
]; }
61
const
kfvector_float
&
Covariance
(
const
int
i
)
const
{
return
fC
[
i
]; }
62
const
kfvector_int
&
Id
()
const
{
return
fId
; }
63
64
//modifiers
65
void
SetParameter
(
float
value
,
int
iP,
int
iTr) {
fP
[iP][iTr] =
value
; }
66
void
SetCovariance
(
float
value
,
int
iC,
int
iTr) {
fC
[iC][iTr] =
value
; }
67
68
void
SetParameter
(
const
float_v&
value
,
int
iP,
int
iTr);
69
void
SetCovariance
(
const
float_v&
value
,
int
iC,
int
iTr);
70
71
void
SetId
(
int
value
,
int
iTr) {
fId
[iTr] =
value
; }
72
73
void
PrintTrack
(
int
n
);
74
void
PrintTracks
();
75
76
KFPEmcCluster
(
const
KFPEmcCluster
&
clusters
):
fId
()
77
{
79
const
int
localSize = clusters.
Size
();
80
81
for
(
int
i
=0;
i
<4;
i
++)
82
{
83
fP
[
i
].resize(localSize);
84
for
(
int
n
=0;
n
<localSize;
n
++)
85
fP
[
i
][
n
] = clusters.
fP
[
i
][
n
];
86
}
87
88
for
(
int
i
=0;
i
<10;
i
++)
89
{
90
fC
[
i
].resize(localSize);
91
for
(
int
n
=0;
n
<localSize;
n
++)
92
fC
[
i
][
n
] = clusters.
fC
[
i
][
n
];
93
}
94
95
fId
.resize(localSize);
96
for
(
int
n
=0;
n
<localSize;
n
++)
97
fId
[
n
] = clusters.
fId
[
n
];
98
}
99
100
const
KFPEmcCluster
&
operator =
(
const
KFPEmcCluster
&
clusters
)
101
{
103
const
int
localSize = clusters.
Size
();
104
105
for
(
int
i
=0;
i
<4;
i
++)
106
{
107
fP
[
i
].resize(localSize);
108
for
(
int
n
=0;
n
<localSize;
n
++)
109
fP
[
i
][
n
] = clusters.
fP
[
i
][
n
];
110
}
111
112
for
(
int
i
=0;
i
<10;
i
++)
113
{
114
fC
[
i
].resize(localSize);
115
for
(
int
n
=0;
n
<localSize;
n
++)
116
fC
[
i
][
n
] = clusters.
fC
[
i
][
n
];
117
}
118
119
fId
.resize(localSize);
120
for
(
int
n
=0;
n
<localSize;
n
++)
121
fId
[
n
] = clusters.
fId
[
n
];
122
123
return
*
this
;
124
}
125
126
private
:
127
kfvector_float
fP
[4];
128
kfvector_float
fC
[10];
129
130
kfvector_int
fId
;
131
};
132
133
#endif
KFParticle
blob
master
KFParticle
KFPEmcCluster.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration