Skip to content

Commit

Permalink
Adapt FastJet plugin to LayerTiles type traits
Browse files Browse the repository at this point in the history
  • Loading branch information
rovere committed Nov 18, 2021
1 parent 6de8bb5 commit c302229
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions RecoHGCal/TICL/plugins/PatternRecognitionbyFastJet.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Author: Marco Rovere - [email protected]
// Date: 04/2021
// Date: 10/2021
#include <algorithm>
#include <set>
#include <vector>
Expand Down Expand Up @@ -99,12 +99,12 @@ void PatternRecognitionbyFastJet<TILES>::makeTracksters(
const CaloGeometry &geom = es.getData(caloGeomToken_);
rhtools_.setGeometry(geom);

int type = input.tiles[0].typeT();
int nEtaBin = (type == 1) ? ticl::TileConstantsHFNose::nEtaBins : ticl::TileConstants::nEtaBins;
int nPhiBin = (type == 1) ? ticl::TileConstantsHFNose::nPhiBins : ticl::TileConstants::nPhiBins;
constexpr auto isHFnose = std::is_same<TILES, TICLLayerTilesHFNose>::value;
constexpr int nEtaBin = TILES::constants_type_t::nEtaBins;
constexpr int nPhiBin = TILES::constants_type_t::nPhiBins;

// We need to partition the two sides of the HGCAL detector
auto lastLayerPerSide = static_cast<unsigned int>(rhtools_.lastLayer(false)) - 1;
auto lastLayerPerSide = static_cast<unsigned int>(rhtools_.lastLayer(isHFnose)) - 1;
unsigned int maxLayer = 2 * lastLayerPerSide - 1;
std::vector<fastjet::PseudoJet> fjInputs;
fjInputs.clear();
Expand Down Expand Up @@ -150,7 +150,7 @@ void PatternRecognitionbyFastJet<TILES>::makeTracksters(
ticl::assignPCAtoTracksters(result,
input.layerClusters,
input.layerClustersTime,
rhtools_.getPositionLayer(rhtools_.lastLayerEE(false), false).z());
rhtools_.getPositionLayer(rhtools_.lastLayerEE(isHFnose), isHFnose).z());

// run energy regression and ID
energyRegressionAndID(input.layerClusters, result);
Expand Down
2 changes: 1 addition & 1 deletion RecoHGCal/TICL/plugins/PatternRecognitionbyFastJet.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Author: Marco Rovere - [email protected]
// Date: 04/2021
// Date: 10/2021

#ifndef __RecoHGCal_TICL_PRbyFASTJET_H__
#define __RecoHGCal_TICL_PRbyFASTJET_H__
Expand Down

0 comments on commit c302229

Please sign in to comment.