CMS 3D CMS Logo

Stage1Layer2JetAlgorithmImpSimpleHW.cc
Go to the documentation of this file.
1 
8 // This is a simple algorithm for use in comparing with early versions of the Stage1 firmware
9 
15 
16 #include <bitset>
17 #include <iostream>
18 
19 using namespace std;
20 using namespace l1t;
21 
22 Stage1Layer2JetAlgorithmImpSimpleHW::Stage1Layer2JetAlgorithmImpSimpleHW(CaloParamsHelper const* params) : params_(params)
23 {
24 }
25 
26 
27 void Stage1Layer2JetAlgorithmImpSimpleHW::processEvent(const std::vector<l1t::CaloRegion> & regions,
28  const std::vector<l1t::CaloEmCand> & EMCands,
29  std::vector<l1t::Jet> * jets,
30  std::vector<l1t::Jet> * debugJets){
31 
32  std::vector<l1t::CaloRegion> subRegions;
33  std::vector<l1t::Jet> preGtEtaJets;
34  std::vector<l1t::Jet> calibratedRankedJets;
35  std::vector<l1t::Jet> sortedJets;
36 
37  double towerLsb = params_->towerLsbSum();
38  int jetSeedThreshold = floor( params_->jetSeedThreshold()/towerLsb + 0.5);
39 
40  RegionCorrection(regions, &subRegions, params_);
41 
42  slidingWindowJetFinder(jetSeedThreshold, &subRegions, &preGtEtaJets);
43 
44  calibrateAndRankJets(params_, &preGtEtaJets, &calibratedRankedJets);
45 
46  SortJets(&calibratedRankedJets, &sortedJets);
47 
48  JetToGtEtaScales(params_, &sortedJets, jets);
49  JetToGtEtaScales(params_, &preGtEtaJets, debugJets);
50  //JetToGtPtScales(params_, preGtJets, jets);
51 }
void processEvent(const std::vector< l1t::CaloRegion > &regions, const std::vector< l1t::CaloEmCand > &EMCands, std::vector< l1t::Jet > *jets, std::vector< l1t::Jet > *preGtJets) override
delete x;
Definition: CaloConfig.h:22
void SortJets(std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void RegionCorrection(const std::vector< l1t::CaloRegion > &regions, std::vector< l1t::CaloRegion > *subRegions, CaloParamsHelper const *params)
------— New region correction (PUsub, no response correction at the moment) --------— ...
void calibrateAndRankJets(CaloParamsHelper const *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void JetToGtEtaScales(CaloParamsHelper const *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
vector< PseudoJet > jets
void slidingWindowJetFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
double towerLsbSum() const
double jetSeedThreshold() const