28 #include "fastjet/tools/GridMedianBackgroundEstimator.hh" 43 fastjet::GridMedianBackgroundEstimator
bge_;
61 : bge_(iConfig.getParameter<double>(
"maxRapidity"), iConfig.getParameter<double>(
"gridSpacing")),
62 hbheRecHitsTag_(consumes(iConfig.getParameter<
edm::
InputTag>(
"hbheRecHitsTag"))),
63 ebRecHitsTag_(consumes(iConfig.getParameter<
edm::
InputTag>(
"ebRecHitsTag"))),
64 eeRecHitsTag_(consumes(iConfig.getParameter<
edm::
InputTag>(
"eeRecHitsTag"))),
67 skipHCAL_(iConfig.getParameter<
bool>(
"skipHCAL")),
68 skipECAL_(iConfig.getParameter<
bool>(
"skipECAL")),
71 if (skipHCAL_ && skipECAL_) {
73 <<
"skipHCAL and skipECAL both can't be True. Please make at least one of them False.";
85 desc.add<
bool>(
"skipHCAL",
false);
86 desc.add<
bool>(
"skipECAL",
false);
88 desc.add<std::vector<double> >(
"eThresHB", {0.1, 0.2, 0.3, 0.3});
89 desc.add<std::vector<double> >(
"eThresHE", {0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2});
90 desc.add<
double>(
"maxRapidity", 2.5);
91 desc.add<
double>(
"gridSpacing", 0.55);
98 std::vector<fastjet::PseudoJet>
inputs;
108 inputs.emplace_back(fastjet::PseudoJet(hitp4[0], hitp4[1], hitp4[2], hitp4[3]));
116 for (
const auto &
hit : ebRecHits) {
119 inputs.emplace_back(fastjet::PseudoJet(hitp4[0], hitp4[1], hitp4[2], hitp4[3]));
125 for (
const auto &
hit : eeRecHits) {
128 inputs.emplace_back(fastjet::PseudoJet(hitp4[0], hitp4[1], hitp4[2], hitp4[3]));
134 iEvent.put(std::make_unique<double>(
bge_.rho()));
142 const double thispt = hitE / cosh(gpPos.eta());
143 const double thispx = thispt *
cos(gpPos.phi());
144 const double thispy = thispt *
sin(gpPos.phi());
145 const double thispz = thispt * sinh(gpPos.eta());
146 return std::array<double, 4>{{thispx, thispy, thispz, hitE}};
151 const auto thisDetId =
hit.
id();
152 const auto thisDepth = thisDetId.depth();
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< EcalRecHitCollection > ebRecHitsTag_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
constexpr SubDetector subDetGeom[21]
void produce(edm::Event &, const edm::EventSetup &) override
Sin< T >::type sin(const T &t)
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > ecalPFRecHitThresholdsToken_
fastjet::GridMedianBackgroundEstimator bge_
bool passedHcalNoiseCut(const HBHERecHit &hit) const
Cos< T >::type cos(const T &t)
#define DEFINE_FWK_MODULE(type)
const EgammaHcalIsolation::arrayHB eThresHB_
std::array< double, 4 > getHitP4(const DetId &detId, const double hitE, const CaloGeometry &caloGeometry) const
const edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitsTag_
const edm::EDGetTokenT< EcalRecHitCollection > eeRecHitsTag_
FixedGridRhoProducerFastjetFromRecHit(const edm::ParameterSet &iConfig)
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~FixedGridRhoProducerFastjetFromRecHit() override
const EgammaHcalIsolation::arrayHE eThresHE_
std::array< double, 4 > arrayHB
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
bool passedEcalNoiseCut(const EcalRecHit &hit, const EcalPFRecHitThresholds &thresholds) const
std::array< double, 7 > arrayHE