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
ClusKeyIter.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ClusKeyIter.cc
1
#include "
ClusKeyIter.h
"
2
3
#include <
trackbase_historic/SvtxTrack.h
>
4
5
ClusKeyIter::ClusKeyIter
(
SvtxTrack
* _track) :
6
track {_track}
7
,
in_silicon
{ _track->get_silicon_seed()!=
nullptr
}
8
,
has_tpc
{ _track->get_tpc_seed()!=
nullptr
}
9
, no_data { !
in_silicon
&& !
has_tpc
}
10
{
11
}
12
13
ClusKeyIter
ClusKeyIter::begin
() {
14
ClusKeyIter
iter0 {
track
};
15
if
(iter0.no_data)
return
iter0;
16
if
(iter0.in_silicon) {
17
iter0.iter =
track
->
get_silicon_seed
()->
begin_cluster_keys
();
18
iter0.iter_end_silicon =
track
->
get_silicon_seed
()->
end_cluster_keys
();
19
}
else
if
(
has_tpc
) {
20
iter0.iter =
track
->
get_tpc_seed
()->
begin_cluster_keys
();
21
}
22
return
iter0;
23
}
24
25
ClusKeyIter
ClusKeyIter::end
() {
26
ClusKeyIter
iter0 {
track
};
27
if
(iter0.no_data)
return
iter0;
28
if
(
has_tpc
) {
29
iter0.iter =
track
->
get_tpc_seed
()->
end_cluster_keys
();
30
}
else
if
(
in_silicon
) {
31
iter0.iter =
track
->
get_silicon_seed
()->
end_cluster_keys
();
32
}
33
return
iter0;
34
}
35
36
void
ClusKeyIter::operator++
() {
37
if
(
no_data
)
return
;
38
++
iter
;
39
if
(
in_silicon
&&
has_tpc
&&
iter
==
iter_end_silicon
) {
40
in_silicon
=
false
;
41
iter
=
track
->
get_tpc_seed
()->
begin_cluster_keys
();
42
}
43
}
44
45
bool
ClusKeyIter::operator!=
(
const
ClusKeyIter
&
rhs
) {
46
if
(
no_data
)
return
false
;
47
return
iter
!= rhs.
iter
;
48
}
49
50
TrkrDefs::cluskey
ClusKeyIter::operator*
() {
51
return
*
iter
;
52
}
coresoftware
blob
master
simulation
g4simulation
g4eval
ClusKeyIter.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration