File indexing completed on 2024-09-07 04:36:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "L1Trigger/L1TCalorimeter/interface/Stage1Layer2JetAlgorithmImp.h"
0011 #include "L1Trigger/L1TCalorimeter/interface/JetFinderMethods.h"
0012 #include "L1Trigger/L1TCalorimeter/interface/PUSubtractionMethods.h"
0013 #include "L1Trigger/L1TCalorimeter/interface/JetCalibrationMethods.h"
0014 #include "L1Trigger/L1TCalorimeter/interface/legacyGtHelper.h"
0015 #include "L1Trigger/L1TCalorimeter/interface/HardwareSortingMethods.h"
0016
0017 using namespace std;
0018 using namespace l1t;
0019
0020 Stage1Layer2JetAlgorithmImpPP::Stage1Layer2JetAlgorithmImpPP(CaloParamsHelper const* params) : params_(params) {}
0021
0022 void Stage1Layer2JetAlgorithmImpPP::processEvent(const std::vector<l1t::CaloRegion>& regions,
0023 const std::vector<l1t::CaloEmCand>& EMCands,
0024 std::vector<l1t::Jet>* jets,
0025 std::vector<l1t::Jet>* preGtJets) {
0026 std::vector<l1t::CaloRegion> subRegions;
0027 std::vector<l1t::Jet> uncalibjets;
0028 std::vector<l1t::Jet> unSortedJets;
0029 std::vector<l1t::Jet> preGtEtaJets;
0030
0031 double towerLsb = params_->towerLsbSum();
0032 int jetSeedThreshold = floor(params_->jetSeedThreshold() / towerLsb + 0.5);
0033 std::string jetCalibrationType = params_->jetCalibrationType();
0034 std::vector<double> jetCalibrationParams = params_->jetCalibrationParams();
0035
0036
0037
0038 RegionCorrection(regions, &subRegions, params_);
0039
0040 slidingWindowJetFinder(jetSeedThreshold, &subRegions, &uncalibjets);
0041
0042
0043
0044 JetCalibration(&uncalibjets, jetCalibrationParams, &unSortedJets, jetCalibrationType, towerLsb);
0045
0046 SortJets(&unSortedJets, &preGtEtaJets);
0047
0048
0049 JetToGtEtaScales(params_, &preGtEtaJets, preGtJets);
0050 JetToGtPtScales(params_, preGtJets, jets);
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060 }