Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SubjetIndicesv1.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SubjetIndicesv1.cc
1 #include "SubjetIndicesv1.h"
2 #include <phool/phool.h> // for PHWHERE
3 #include <iostream>
4 
6  v_begin.clear();
7  v_end.clear();
8  m_nsubjets = 0;
9 }
10 
11 void SubjetIndicesv1::add_index_pair (unsigned int _begin, unsigned int _end) {
12  v_begin.push_back(_begin);
13  v_end.push_back(_end);
14  m_nsubjets++;
15 }
16 
17 unsigned int SubjetIndicesv1::index_begin(unsigned int _i) const {
18  if (_i >= m_nsubjets) {
19  std::cout << PHWHERE << std::endl;
20  std::cout << " Error -- asking for index of jet indexed(" << _i << ") when there are only " << m_nsubjets << std::endl
21  << " Returning zero. " << std::endl;
22  }
23  return v_begin[_i];
24 }
25 
26 unsigned int SubjetIndicesv1::index_end (unsigned int _i) const {
27  if (_i >= m_nsubjets) {
28  std::cout << PHWHERE << std::endl;
29  std::cout << " Error -- asking for index of jet indexed(" << _i << ") when there are only " << m_nsubjets << std::endl
30  << " Returning zero. " << std::endl;
31  }
32  return v_end[_i];
33 }