Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:43

0001 ///
0002 /// \class l1t::Stage1Layer2JetAlgorithmImpHI
0003 ///
0004 ///
0005 /// \author: R. Alex Barbieri MIT
0006 ///
0007 
0008 // This example implements algorithm version 1 and 2.
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/legacyGtHelper.h"
0014 #include "L1Trigger/L1TCalorimeter/interface/HardwareSortingMethods.h"
0015 
0016 using namespace std;
0017 using namespace l1t;
0018 
0019 Stage1Layer2JetAlgorithmImpHI::Stage1Layer2JetAlgorithmImpHI(CaloParamsHelper const* params) : params_(params){};
0020 
0021 void Stage1Layer2JetAlgorithmImpHI::processEvent(const std::vector<l1t::CaloRegion>& regions,
0022                                                  const std::vector<l1t::CaloEmCand>& EMCands,
0023                                                  std::vector<l1t::Jet>* jets,
0024                                                  std::vector<l1t::Jet>* preGtJets) {
0025   //std::vector<double> regionPUSParams = params_->regionPUSParams();
0026   int jetThreshold = params_->jetSeedThreshold();
0027 
0028   unsigned int etaMask = params_->jetRegionMask();
0029 
0030   std::vector<l1t::CaloRegion> subRegions;
0031   std::vector<l1t::Jet> unSortedJets;
0032   std::vector<l1t::Jet> preGtEtaJets;
0033   std::vector<l1t::Jet> preRankJets;
0034 
0035   HICaloRingSubtraction(regions, &subRegions, params_);
0036   TwoByTwoFinder(jetThreshold, etaMask, &subRegions, &preRankJets);
0037   //slidingWindowJetFinder(0, subRegions, unSortedJets);
0038   JetToGtPtScales(params_, &preRankJets, &unSortedJets);
0039   SortJets(&unSortedJets, &preGtEtaJets);
0040   JetToGtEtaScales(params_, &preGtEtaJets, preGtJets);
0041   JetToGtEtaScales(params_, &preGtEtaJets, jets);
0042   //JetToGtPtScales(params_, preGtJets, jets);
0043 }