20 using std::find_first_of;
23 #include "StProtoJet.h"
24 #include "StEtaPhiCell.h"
26 #include "StJetSpliterMerger.h"
31 copy(preJets.begin(), preJets.end(), back_inserter(_preJets));
34 while(!_preJets.empty()) {
40 for (CellList::iterator otherIt = ++(_preJets.begin()); otherIt != _preJets.end(); ++otherIt) {
42 StEtaPhiCell::CellList& otherCells = (*otherIt)->cellList();
45 for (StEtaPhiCell::CellList::iterator rootSetIt = _preJets.front()->cellList().begin(); rootSetIt != _preJets.front()->cellList().end(); ++rootSetIt) {
46 for (StEtaPhiCell::CellList::iterator otherSetIt = otherCells.begin(); otherSetIt != otherCells.end(); ++otherSetIt) {
47 neighbor.check(*rootSetIt, *otherSetIt);
51 if (neighbor.nCommonCells <= 0)
continue;
53 neighbor._otherCell = otherIt;
54 _OverlapList.push_back(neighbor);
58 if (_OverlapList.empty()) {
59 preJets.push_back(_preJets.front());
63 EtNeighbor& n = *min_element(_OverlapList.begin(), _OverlapList.end());
67 if (n.sharedEt/neighborJet.eT() > splitFraction() ) {
68 merge(*_preJets.front(), neighborJet, n.cells);
71 _preJets.erase(n._otherCell);
73 split(*_preJets.front(), neighborJet, n.cells);
83 CellList& rootList = root.cellList();
84 CellList& neighborList = neighbor.cellList();
86 for (CellList::iterator it2=neighborList.begin(); it2!=neighborList.end(); ++it2) {
88 if (std::find(rootList.begin(), rootList.end(), (*it2))==rootList.end() ) {
89 rootList.push_back(*it2);
101 CellList& rootList = root.cellList();
102 CellList& neighborList = neighbor.cellList();
104 for (CellVec::iterator it=commonCells.begin(); it!=commonCells.end(); ++it) {
106 double distanceToRoot = root.distance(**it);
107 double distanceToNeighbor = neighbor.distance(**it);
108 if (distanceToRoot<distanceToNeighbor) {
109 neighborList.remove(*it);
111 rootList.remove(*it);
136 updater = for_each( cell.cellList().begin(), cell.cellList().end(), updater );
139 cell.mEt = updater.sumEt;
void splitMerge(CellList &jets)
action