Skip to content

Commit

Permalink
Merge pull request #33621 from PFCal-dev/hgc-tpg-integration-210504
Browse files Browse the repository at this point in the history
[HGCAL trigger] Fixing phi smoothing in cluster seeding
  • Loading branch information
cmsbuild committed May 11, 2021
2 parents 269634d + 55cf094 commit df81f1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions L1Trigger/L1THGCal/interface/backend/HGCalHistoSeedingImpl.h
Expand Up @@ -151,6 +151,8 @@ class HGCalHistoSeedingImpl {
unsigned nBins2_ = 216;
std::vector<unsigned> binsSumsHisto_;
double histoThreshold_ = 20.;
static constexpr double area_per_triggercell_ =
4.91E-05; // Hex_Wafer_Area (x/z units)/N_TC (per wafer) = (0.866*((hexWafer_minimal_diameter)*(1./319.))^2 / 48)
std::vector<double> neighbour_weights_;
std::vector<double> smoothing_ecal_;
std::vector<double> smoothing_hcal_;
Expand Down
Expand Up @@ -105,7 +105,7 @@
# (see https://indico.cern.ch/event/806845/contributions/3359859/attachments/1815187/2966402/19-03-20_EGPerf_HGCBE.pdf
# for more details)
phase2_hgcalV10.toModify(histoMax_C3d_seeding_params,
threshold_histo_multicluster=7.5, # MipT
threshold_histo_multicluster=8.5, # MipT
)


Expand Down
10 changes: 5 additions & 5 deletions L1Trigger/L1THGCal/src/backend/HGCalHistoSeedingImpl.cc
Expand Up @@ -166,12 +166,12 @@ HGCalHistoSeedingImpl::Histogram HGCalHistoSeedingImpl::fillSmoothPhiHistoCluste
for (int z_side : {-1, 1}) {
for (unsigned bin1 = 0; bin1 < nBins1_; bin1++) {
int nBinsSide = (binSums[bin1] - 1) / 2;
float R1 = kROverZMin_ + bin1 * (kROverZMax_ - kROverZMin_);
float R2 = R1 + (kROverZMax_ - kROverZMin_);
float R1 = kROverZMin_ + bin1 * (kROverZMax_ - kROverZMin_) / nBins1_;
float R2 = R1 + ((kROverZMax_ - kROverZMin_) / nBins1_);
double area =
0.5 * (pow(R2, 2) - pow(R1, 2)) *
((M_PI * (pow(R2, 2) - pow(R1, 2))) / nBins2_) *
(1 +
0.5 *
2.0 *
(1 -
pow(0.5,
nBinsSide))); // Takes into account different area of bins in different R-rings + sum of quadratic weights used
Expand All @@ -196,7 +196,7 @@ HGCalHistoSeedingImpl::Histogram HGCalHistoSeedingImpl::fillSmoothPhiHistoCluste
}

auto& bin = histoSumPhiClusters.at(z_side, bin1, bin2);
bin.values[Bin::Content::Sum] = content / area;
bin.values[Bin::Content::Sum] = (content / area) * area_per_triggercell_;
bin.weighted_x = bin_orig.weighted_x;
bin.weighted_y = bin_orig.weighted_y;
}
Expand Down

0 comments on commit df81f1e

Please sign in to comment.