Analysis Software
Documentation for sPHENIX simulation software
 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 
4 
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 
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 
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 
37  if (no_data) return;
38  ++iter;
39  if (in_silicon && has_tpc && iter == iter_end_silicon) {
40  in_silicon = false;
42  }
43 }
44 
46  if (no_data) return false;
47  return iter != rhs.iter;
48 }
49 
51  return *iter;
52 }