CMS 3D CMS Logo

JetCalibrationMethods.cc
Go to the documentation of this file.
1 // JetCalibrationMethods.cc
2 // Authors: Inga Bucinskaite, UIC
3 //
4 // This file should contain the different algorithms used for Jet Calibration
5 //
6 
8 #include <vector>
9 
10 namespace l1t {
11 
12  void JetCalibration(std::vector<l1t::Jet>* uncalibjets,
13  std::vector<double> jetCalibrationParams,
14  std::vector<l1t::Jet>* jets,
16  double jetLSB) {
17  for (std::vector<l1t::Jet>::const_iterator uncalibjet = uncalibjets->begin(); uncalibjet != uncalibjets->end();
18  ++uncalibjet) {
19  if (jetCalibrationType == "None") {
20  l1t::Jet corrjets = *uncalibjet;
21  jets->push_back(corrjets);
22  continue;
23  }
24 
25  if (jetCalibrationType == "Stage1JEC") {
26  int jetPt = (uncalibjet->hwPt()) * jetLSB; // correction factors are parameterized as functions of physical pt
27  int jetPhi = uncalibjet->hwPhi();
28  int jetEta = uncalibjet->hwEta();
29  int jetQual = uncalibjet->hwQual();
30  double jpt = 0.0;
31 
32  double alpha = jetCalibrationParams[2 * jetEta + 0]; //Scale factor (See jetSF_cfi.py)
33  double gamma = ((jetCalibrationParams[2 * jetEta + 1])); //Offset
34 
35  jpt = jetPt * alpha + gamma;
36  unsigned int corjetET = (int)(jpt / jetLSB);
37 
38  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0, 0, 0, 0);
39  l1t::Jet corrjets(*&jetLorentz, corjetET, jetEta, jetPhi, jetQual);
40 
41  jets->push_back(corrjets);
42  }
43  }
44  }
45 } // namespace l1t
reco::btau::jetPt
Definition: TaggingVariable.h:32
CustomPhysics_cfi.gamma
gamma
Definition: CustomPhysics_cfi.py:17
alpha
float alpha
Definition: AMPTWrapper.h:105
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
jpt
Definition: JetPlusTrackCorrector.h:40
l1t::Jet
Definition: Jet.h:20
JetCalibrationMethods.h
reco::btau::jetPhi
Definition: TaggingVariable.h:36
reco::btau::jetEta
Definition: TaggingVariable.h:34
l1t::JetCalibration
void JetCalibration(std::vector< l1t::Jet > *uncalibjets, std::vector< double > jetCalibrationParams, std::vector< l1t::Jet > *jets, std::string jetCalibrationType, double jetLSB)
Definition: JetCalibrationMethods.cc:12
l1t
delete x;
Definition: CaloConfig.h:22
createfilelist.int
int
Definition: createfilelist.py:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
caloParams_2018_v1_0_ECALZS_inconsistent_cfi.jetCalibrationType
jetCalibrationType
Definition: caloParams_2018_v1_0_ECALZS_inconsistent_cfi.py:78
caloParams_2018_v1_0_ECALZS_inconsistent_cfi.jetCalibrationParams
jetCalibrationParams
Definition: caloParams_2018_v1_0_ECALZS_inconsistent_cfi.py:112