CMS 3D CMS Logo

FactorizedJetCorrector.cc
Go to the documentation of this file.
1 // This is the file "FactorizedJetCorrector.cc".
2 // This is the implementation of the class FactorizedJetCorrector.
3 // Author: Konstantinos Kousouris, Philipp Schieferdecker
4 // Email: kkousour@fnal.gov, philipp.schieferdecker@cern.ch
5 
10 #include "Math/PtEtaPhiE4D.h"
11 #include "Math/Vector3D.h"
12 #include "Math/LorentzVector.h"
13 #include <vector>
14 #include <string>
15 #include <sstream>
16 
17 //------------------------------------------------------------------------
18 //--- Default FactorizedJetCorrector constructor -------------------------
19 //------------------------------------------------------------------------
21 {
22 }
23 //------------------------------------------------------------------------
24 //--- FactorizedJetCorrector constructor ---------------------------------
25 //------------------------------------------------------------------------
27 mCalc(fLevels,fFiles,fOptions)
28 {
29 }
30 //------------------------------------------------------------------------
31 //--- FactorizedJetCorrector constructor ---------------------------------
32 //------------------------------------------------------------------------
33 FactorizedJetCorrector::FactorizedJetCorrector(const std::vector<JetCorrectorParameters>& fParameters):
34  mCalc(fParameters)
35 {
36 }
37 
38 //------------------------------------------------------------------------
39 //--- Returns the correction ---------------------------------------------
40 //------------------------------------------------------------------------
42 {
43  return mCalc.getCorrection(mValues);
44 }
45 //------------------------------------------------------------------------
46 //--- Returns the vector of subcorrections, up to a given level ----------
47 //------------------------------------------------------------------------
49 {
51 }
52 //------------------------------------------------------------------------
53 //--- Setters ------------------------------------------------------------
54 //------------------------------------------------------------------------
56 {
57 
58  mValues.setNPV (fNPV);
59 }
61 {
62  mValues.setJetEta( fEta );
63 }
64 //------------------------------------------------------------------------
66 {
67  mValues.setJetPt(fPt);
68 }
69 //------------------------------------------------------------------------
71 {
72  mValues.setJetPhi( fPhi );
73 }
74 //------------------------------------------------------------------------
76 {
77  mValues.setJetE(fE);
78 }
79 //------------------------------------------------------------------------
81 {
82  mValues.setJetEMF( fEMF );
83 }
84 //------------------------------------------------------------------------
86 {
87  mValues.setJetA( fA );
88 }
89 //------------------------------------------------------------------------
91 {
92  mValues.setRho(fRho);
93 }
94 //------------------------------------------------------------------------
95 void FactorizedJetCorrector::setJPTrawP4(const TLorentzVector& fJPTrawP4)
96 {
97  mValues.setJPTrawP4(fJPTrawP4);
98 }
99 //------------------------------------------------------------------------
101 {
102  mValues.setJPTrawOff(fJPTrawOff);
103 }
104 //------------------------------------------------------------------------
106 {
107  mValues.setLepPx( fPx );
108 }
109 //------------------------------------------------------------------------
111 {
112  mValues.setLepPy( fPy );
113 }
114 //------------------------------------------------------------------------
116 {
117  mValues.setLepPz(fPz);
118 }
119 //------------------------------------------------------------------------
121 {
122  mValues.setAddLepToJet(fAddLepToJet);
123 }
std::vector< float > getSubCorrections()
FactorizedJetCorrectorCalculator mCalc
void setAddLepToJet(bool fAddLepToJet)
FactorizedJetCorrectorCalculator::VariableValues mValues
void setJPTrawP4(const TLorentzVector &fJPTrawP4)
std::vector< float > getSubCorrections(VariableValues &) const
void setJPTrawOff(float fJPTrawOff)