File indexing completed on 2025-08-06 08:17:46
0001 #include "SubjetIndicesv1.h"
0002 #include <phool/phool.h> // for PHWHERE
0003 #include <iostream>
0004
0005 void SubjetIndicesv1::Reset()
0006 {
0007 v_begin.clear();
0008 v_end.clear();
0009 m_nsubjets = 0;
0010 }
0011
0012 void SubjetIndicesv1::add_index_pair(unsigned int _begin, unsigned int _end)
0013 {
0014 v_begin.push_back(_begin);
0015 v_end.push_back(_end);
0016 m_nsubjets++;
0017 }
0018
0019 unsigned int SubjetIndicesv1::index_begin(unsigned int which_jet) const
0020 {
0021 if (which_jet >= m_nsubjets)
0022 {
0023 std::cout << PHWHERE << std::endl;
0024 std::cout << " Error -- asking for index of jet indexed(" << which_jet << ") when there are only " << m_nsubjets << std::endl
0025 << " Returning zero. " << std::endl;
0026 }
0027 return v_begin[which_jet];
0028 }
0029
0030 unsigned int SubjetIndicesv1::index_end(unsigned int which_jet) const
0031 {
0032 if (which_jet >= m_nsubjets)
0033 {
0034 std::cout << PHWHERE << std::endl;
0035 std::cout << " Error -- asking for index of jet indexed(" << which_jet << ") when there are only " << m_nsubjets << std::endl
0036 << " Returning zero. " << std::endl;
0037 }
0038 return v_end[which_jet];
0039 }