70 bool killZeroPt)
const;
81 template <
class Container>
106 etaBinning_(iConfig.getParameter<std::vector<double>>(
"etaBinning")),
107 nBinsEta_(etaBinning_.size() - 1),
108 nBinsPhi_(iConfig.getParameter<
unsigned int>(
"nBinsPhi")),
109 phiLow_(iConfig.getParameter<
double>(
"phiLow")),
110 phiUp_(iConfig.getParameter<
double>(
"phiUp")),
111 jetIEtaSize_(iConfig.getParameter<
unsigned int>(
"jetIEtaSize")),
112 jetIPhiSize_(iConfig.getParameter<
unsigned int>(
"jetIPhiSize")),
113 seedPtThreshold_(iConfig.getParameter<
double>(
"seedPtThreshold")),
114 puSubtraction_(iConfig.getParameter<
bool>(
"puSubtraction")),
115 vetoZeroPt_(iConfig.getParameter<
bool>(
"vetoZeroPt")),
116 outputCollectionName_(iConfig.getParameter<
std::string>(
"outputCollectionName")) {
118 std::make_unique<TH2F>(
"caloGrid",
"Calorimeter grid", nBinsEta_, etaBinning_.data(), nBinsPhi_, phiLow_, phiUp_);
119 caloGrid_->GetXaxis()->SetTitle(
"#eta");
120 caloGrid_->GetYaxis()->SetTitle(
"#phi");
121 produces<std::vector<reco::CaloJet>>(outputCollectionName_).setBranchAlias(outputCollectionName_);
151 fillCaloGrid<>(*(
caloGrid_), *inputCollectionHandle);
159 return jet1.
pt() > jet2.pt();
162 auto l1jetVectorPtr = std::make_unique<std::vector<reco::CaloJet>>(l1jetVector);
171 float leftBandPt = 0;
172 float rightBandPt = 0;
173 float bottomBandPt = 0;
177 int xCenter, yCenter, zCenter;
199 pileUpEnergy = topBandPt + leftBandPt + rightBandPt + bottomBandPt -
205 float ptAfterPUSubtraction =
jet.pt() - pileUpEnergy;
206 ptVector.SetPt((ptAfterPUSubtraction > 0) ? ptAfterPUSubtraction : 0);
207 ptVector.SetEta(
jet.eta());
208 ptVector.SetPhi(
jet.phi());
211 jet.setPileup(pileUpEnergy);
219 std::vector<std::tuple<int, int>>
seeds;
229 for (
int iPhi = 1; iPhi <= nBinsY; iPhi++) {
234 bool isLocalMaximum =
true;
237 for (
int etaIndex = -etaHalfSize; etaIndex <= etaHalfSize; etaIndex++) {
238 for (
int phiIndex = -phiHalfSize; phiIndex <= phiHalfSize; phiIndex++) {
239 if ((etaIndex == 0) && (phiIndex == 0))
242 if (phiIndex > -etaIndex) {
243 isLocalMaximum = ((isLocalMaximum) && (centralPt >
getTowerEnergy(
iEta + etaIndex, iPhi + phiIndex)));
245 isLocalMaximum = ((isLocalMaximum) && (centralPt >=
getTowerEnergy(
iEta + etaIndex, iPhi + phiIndex)));
248 if (phiIndex >= -etaIndex) {
249 isLocalMaximum = ((isLocalMaximum) && (centralPt >
getTowerEnergy(
iEta + etaIndex, iPhi + phiIndex)));
251 isLocalMaximum = ((isLocalMaximum) && (centralPt >=
getTowerEnergy(
iEta + etaIndex, iPhi + phiIndex)));
256 if (isLocalMaximum) {
267 int iPhi = std::get<1>(
seed);
274 for (
int etaIndex = -etaHalfSize; etaIndex <= etaHalfSize; etaIndex++) {
275 for (
int phiIndex = -phiHalfSize; phiIndex <= phiHalfSize; phiIndex++) {
282 ptVector.SetPt(ptSum);
284 ptVector.SetPhi(
caloGrid_->GetYaxis()->GetBinCenter(iPhi));
291 const std::vector<std::tuple<int, int>>&
seeds,
bool killZeroPt)
const {
294 std::vector<reco::CaloJet>
jets;
307 const std::vector<std::tuple<int, int>>&
seeds)
const {
310 std::vector<reco::CaloJet>
jets;
318 template <
class Container>
321 for (
const auto& primitiveIterator : triggerPrimitives) {
322 caloGrid.Fill(static_cast<float>(primitiveIterator.eta()),
323 static_cast<float>(primitiveIterator.phi()),
324 static_cast<float>(primitiveIterator.pt()));
331 desc.
add<std::vector<double>>(
"etaBinning");
332 desc.
add<
unsigned int>(
"nBinsPhi", 72);
333 desc.
add<
double>(
"phiLow", -
M_PI);
334 desc.
add<
double>(
"phiUp",
M_PI);
335 desc.
add<
unsigned int>(
"jetIEtaSize", 7);
336 desc.
add<
unsigned int>(
"jetIPhiSize", 7);
337 desc.
add<
double>(
"seedPtThreshold", 5);
338 desc.
add<
bool>(
"puSubtraction",
false);
339 desc.
add<
string>(
"outputCollectionName",
"UncalibratedPhase1L1TJetFromPfCandidates");
340 desc.
add<
bool>(
"vetoZeroPt",
true);
341 descriptions.
add(
"Phase1L1TJetProducer", desc);