2 #include "StCdfChargedConeJetFinder.h"
4 #include "StJetEtCell.h"
5 #include "StProtoJet.h"
6 #include "StCdfChargedJetEtCell.h"
14 StCdfChargedConeJetFinder::~StCdfChargedConeJetFinder()
23 void StCdfChargedConeJetFinder::findJets(JetList& protoJetList,
const FourVecList& particleList)
27 for(FourVecList::const_iterator particle = particleList.begin(); particle != particleList.end(); ++particle) {
31 clearPreviousResult();
33 CellList orderedList = generateLeadingPtOrderedList(protoJetList);
35 CellList toSearchList = generateToSearchListFrom(orderedList);
37 findProtoJets(toSearchList);
39 storeTheResultIn(protoJetList);
43 void StCdfChargedConeJetFinder::clearPreviousResult()
45 for(CellList::iterator it = _preJets.begin(); it != _preJets.end(); ++it) {
51 void StCdfChargedConeJetFinder::storeTheResultIn(JetList& protoJetList)
55 for (CellList::iterator jet = _preJets.begin(); jet != _preJets.end(); ++jet) {
57 if ((*jet)->cellList().size() == 0)
continue;
59 protoJetList.push_back( collectCell(*jet) );
63 void StCdfChargedConeJetFinder::findProtoJets(CellList& toSearchList)
65 for (CellList::iterator cell = toSearchList.begin(); cell != toSearchList.end(); ++cell) {
67 if (shouldNotSearchForJetAroundThis((*cell)))
continue;
69 findJetAroundThis(*cell);
73 StEtaPhiCell::CellList StCdfChargedConeJetFinder::generateLeadingPtOrderedList(JetList& protoJetList)
75 _cellGrid.fillGridWith(protoJetList);
76 return _cellGrid.EtSortedCellList();
79 void StCdfChargedConeJetFinder::findJetAroundThis(
StEtaPhiCell* cell)
81 initializeWorkCell(cell);
87 bool StCdfChargedConeJetFinder::shouldNotSearchForJetAroundThis(
const StEtaPhiCell* cell)
const
89 if (cell->nTimesUsed())
return true;
91 if (cell->empty())
return true;
96 bool StCdfChargedConeJetFinder::shouldNotAddToTheCell(
const StEtaPhiCell& theCell,
const StEtaPhiCell& otherCell)
const
98 if (otherCell.nTimesUsed())
return true;
99 if (otherCell.empty())
return true;
100 if (otherCell.eT() <= mPars.assocEtMin())
return true;
104 void StCdfChargedConeJetFinder::addToPrejets(
StEtaPhiCell& cell)
107 for(CellList::iterator etCell = cell.cellList().begin(); etCell != cell.cellList().end(); ++etCell) {
109 cell.setEt(cell.Et() + (*etCell)->eT());
112 _preJets.push_back(cell.clone());
StEtaPhiCell * mWorkCell
run-time pars