CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
l1t::Stage1Layer2JetAlgorithmImpPP Class Reference

#include <Stage1Layer2JetAlgorithmImp.h>

Inheritance diagram for l1t::Stage1Layer2JetAlgorithmImpPP:
l1t::Stage1Layer2JetAlgorithm

Public Member Functions

virtual void processEvent (const std::vector< l1t::CaloRegion > &regions, const std::vector< l1t::CaloEmCand > &EMCands, std::vector< l1t::Jet > *jets, std::vector< l1t::Jet > *preGtJets)
 
 Stage1Layer2JetAlgorithmImpPP (CaloParamsHelper *params)
 
virtual ~Stage1Layer2JetAlgorithmImpPP ()
 
- Public Member Functions inherited from l1t::Stage1Layer2JetAlgorithm
virtual ~Stage1Layer2JetAlgorithm ()
 

Private Attributes

CaloParamsHelper *const params_
 

Detailed Description

Definition at line 40 of file Stage1Layer2JetAlgorithmImp.h.

Constructor & Destructor Documentation

Stage1Layer2JetAlgorithmImpPP::Stage1Layer2JetAlgorithmImpPP ( CaloParamsHelper params)

Definition at line 20 of file Stage1Layer2JetAlgorithmImpPP.cc.

20 : params_(params) {};
Stage1Layer2JetAlgorithmImpPP::~Stage1Layer2JetAlgorithmImpPP ( )
virtual

Definition at line 22 of file Stage1Layer2JetAlgorithmImpPP.cc.

22 {};

Member Function Documentation

void Stage1Layer2JetAlgorithmImpPP::processEvent ( const std::vector< l1t::CaloRegion > &  regions,
const std::vector< l1t::CaloEmCand > &  EMCands,
std::vector< l1t::Jet > *  jets,
std::vector< l1t::Jet > *  preGtJets 
)
virtual

Implements l1t::Stage1Layer2JetAlgorithm.

Definition at line 25 of file Stage1Layer2JetAlgorithmImpPP.cc.

References l1t::JetCalibration(), l1t::CaloParamsHelper::jetCalibrationParams(), l1t::CaloParamsHelper::jetCalibrationType(), l1t::CaloParamsHelper::jetSeedThreshold(), l1t::JetToGtEtaScales(), l1t::JetToGtPtScales(), params_, l1t::RegionCorrection(), l1t::slidingWindowJetFinder(), l1t::SortJets(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::CaloParamsHelper::towerLsbSum().

28  {
29 
30 
31  std::vector<l1t::CaloRegion> * subRegions = new std::vector<l1t::CaloRegion>();
32  std::vector<l1t::Jet> * uncalibjets = new std::vector<l1t::Jet>();
33  std::vector<l1t::Jet> * unSortedJets = new std::vector<l1t::Jet>();
34  std::vector<l1t::Jet> * preGtEtaJets = new std::vector<l1t::Jet>();
35 
36  double towerLsb = params_->towerLsbSum();
37  int jetSeedThreshold = floor( params_->jetSeedThreshold()/towerLsb + 0.5);
38  std::string jetCalibrationType = params_->jetCalibrationType();
39  std::vector<double> jetCalibrationParams = params_->jetCalibrationParams();
40 
41  //Region Correction will return uncorrected subregions
42  //if regionPUSType is set to None in the config
43  RegionCorrection(regions, subRegions, params_);
44 
45 
46  slidingWindowJetFinder(jetSeedThreshold, subRegions, uncalibjets);
47 
48  //will return jets with no response corrections
49  //if jetCalibrationType is set to None in the config
50  JetCalibration(uncalibjets, jetCalibrationParams, unSortedJets, jetCalibrationType, towerLsb);
51 
52  SortJets(unSortedJets, preGtEtaJets);
53 
54  // takes input jets (using region scales/eta) and outputs jets using Gt scales/eta
55  JetToGtEtaScales(params_, preGtEtaJets, preGtJets);
56  JetToGtPtScales(params_, preGtJets, jets);
57 
58  delete subRegions;
59  delete uncalibjets;
60  delete unSortedJets;
61  delete preGtEtaJets;
62 
63  //the jets should be sorted, highest pT first.
64  // do not truncate the tau list, GT converter handles that
65  // auto comp = [&](l1t::Jet i, l1t::Jet j)-> bool {
66  // return (i.hwPt() < j.hwPt() );
67  // };
68 
69  // std::sort(jets->begin(), jets->end(), comp);
70  // std::reverse(jets->begin(), jets->end());
71 }
std::vector< double > jetCalibrationParams()
void JetCalibration(std::vector< l1t::Jet > *uncalibjets, std::vector< double > jetCalibrationParams, std::vector< l1t::Jet > *jets, std::string jetCalibrationType, double jetLSB)
void RegionCorrection(const std::vector< l1t::CaloRegion > &regions, std::vector< l1t::CaloRegion > *subRegions, CaloParamsHelper *params)
------— New region correction (PUsub, no response correction at the moment) --------— ...
void SortJets(std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
std::string jetCalibrationType() const
vector< PseudoJet > jets
void JetToGtEtaScales(CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void JetToGtPtScales(CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void slidingWindowJetFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
double towerLsbSum() const
double jetSeedThreshold() const

Member Data Documentation

CaloParamsHelper* const l1t::Stage1Layer2JetAlgorithmImpPP::params_
private

Definition at line 49 of file Stage1Layer2JetAlgorithmImp.h.

Referenced by processEvent().