CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctJetFinderParams.h
Go to the documentation of this file.
1 #ifndef L1GCTJETFINDERPARAMS_H_
2 #define L1GCTJETFINDERPARAMS_H_
3 
4 #include <vector>
5 #include <stdint.h>
6 #include <iosfwd>
7 
9 {
10  public:
11 
12  static const unsigned NUMBER_ETA_VALUES;
13  static const unsigned N_CENTRAL_ETA_VALUES;
14 
16 
17  L1GctJetFinderParams(double rgnEtLsb,
18  double htLsb,
19  double cJetSeed,
20  double fJetSeed,
21  double tJetSeed,
22  double tauIsoEtThresh,
23  double htJetEtThresh,
24  double mhtJetEtThresh,
25  unsigned etaBoundary,
26  unsigned corrType,
27  const std::vector< std::vector<double> >& jetCorrCoeffs,
28  const std::vector< std::vector<double> >& tauCorrCoeffs,
29  bool convertToEnergy,
30  const std::vector<double>& energyConvCoeffs);
31 
33 
34  // get methods
35  double getRgnEtLsbGeV() const { return rgnEtLsb_; }
36  double getHtLsbGeV() const { return htLsb_; }
37  double getCenJetEtSeedGeV() const { return cenJetEtSeed_; }
38  double getForJetEtSeedGeV() const { return forJetEtSeed_; }
39  double getTauJetEtSeedGeV() const { return tauJetEtSeed_; }
40  double getTauIsoEtThresholdGeV() const { return tauIsoEtThreshold_; }
41  double getHtJetEtThresholdGeV() const { return htJetEtThreshold_; }
42  double getMHtJetEtThresholdGeV() const { return mhtJetEtThreshold_; }
43  unsigned getCenForJetEtaBoundary() const { return cenForJetEtaBoundary_; }
44  bool getConvertToEnergy() const { return convertToEnergy_; }
45 
46  // get integers
47  unsigned getCenJetEtSeedGct() const { return static_cast<unsigned>(cenJetEtSeed_/rgnEtLsb_); }
48  unsigned getForJetEtSeedGct() const { return static_cast<unsigned>(forJetEtSeed_/rgnEtLsb_); }
49  unsigned getTauJetEtSeedGct() const { return static_cast<unsigned>(tauJetEtSeed_/rgnEtLsb_); }
50  unsigned getTauIsoEtThresholdGct() const { return static_cast<unsigned>(tauIsoEtThreshold_/rgnEtLsb_); }
51  unsigned getHtJetEtThresholdGct() const { return static_cast<unsigned>(htJetEtThreshold_/htLsb_); }
52  unsigned getMHtJetEtThresholdGct() const { return static_cast<unsigned>(mhtJetEtThreshold_/htLsb_); }
53 
54  // set methods
55  void setRegionEtLsb (const double rgnEtLsb);
56  void setSlidingWindowParams(const double cJetSeed,
57  const double fJetSeed,
58  const double tJetSeed,
59  const unsigned etaBoundary);
60  void setJetEtCalibrationParams(const unsigned corrType,
61  const std::vector< std::vector<double> >& jetCorrCoeffs,
62  const std::vector< std::vector<double> >& tauCorrCoeffs);
63  void setJetEtConvertToEnergyOn(const std::vector<double>& energyConvCoeffs);
65  void setHtSumParams(const double htLsb,
66  const double htJetEtThresh,
67  const double mhtJetEtThresh);
68  void setTauAlgorithmParams(const double tauIsoEtThresh);
69  void setParams(const double rgnEtLsb,
70  const double htLsb,
71  const double cJetSeed,
72  const double fJetSeed,
73  const double tJetSeed,
74  const double tauIsoEtThresh,
75  const double htJetEtThresh,
76  const double mhtJetEtThresh,
77  const unsigned etaBoundary,
78  const unsigned corrType,
79  const std::vector< std::vector<double> >& jetCorrCoeffs,
80  const std::vector< std::vector<double> >& tauCorrCoeffs);
81 
82  // correct jet Et
84  double correctedEtGeV(const double et, const unsigned eta, const bool tauVeto) const;
85 
87  uint16_t correctedEtGct(const double correctedEt) const;
88 
90  unsigned getCorrType() const { return corrType_; }
91  const std::vector< std::vector<double> >& getJetCorrCoeffs() const { return jetCorrCoeffs_; }
92  const std::vector< std::vector<double> >& getTauCorrCoeffs() const { return tauCorrCoeffs_; }
93 
94  private:
95 
96  // correct the et
97  double correctionFunction(const double Et, const std::vector<double>& coeffs) const;
98 
99  // different jet correction functions
100  double findCorrectedEt (const double Et, const std::vector<double>& coeffs) const;
101  double powerSeriesCorrect (const double Et, const std::vector<double>& coeffs) const;
102  double orcaStyleCorrect (const double Et, const std::vector<double>& coeffs) const;
103  double simpleCorrect (const double Et, const std::vector<double>& coeffs) const;
104  double piecewiseCubicCorrect (const double Et, const std::vector<double>& coeffs) const;
105  double pfCorrect (const double Et, const std::vector<double>& coeffs) const;
106 
107  private:
108 
109  // internal scale LSBs
110  double rgnEtLsb_;
111  double htLsb_;
112 
113  // parameters
121 
122  // jet Et corrections
123  unsigned corrType_;
124  std::vector< std::vector<double> > jetCorrCoeffs_;
125  std::vector< std::vector<double> > tauCorrCoeffs_;
126 
127  // convert Et to E
129  std::vector<double> energyConversionCoeffs_;
130 
131 };
132 
134 std::ostream& operator << (std::ostream& os, const L1GctJetFinderParams& fn);
135 
136 #endif /*L1GCTJETPARAMS_H_*/
137 
double powerSeriesCorrect(const double Et, const std::vector< double > &coeffs) const
static const unsigned N_CENTRAL_ETA_VALUES
Number of eta bins used in correction.
bool getConvertToEnergy() const
void setHtSumParams(const double htLsb, const double htJetEtThresh, const double mhtJetEtThresh)
double findCorrectedEt(const double Et, const std::vector< double > &coeffs) const
std::vector< std::vector< double > > jetCorrCoeffs_
void setRegionEtLsb(const double rgnEtLsb)
unsigned getCenJetEtSeedGct() const
unsigned getTauJetEtSeedGct() const
T eta() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
std::vector< std::vector< double > > tauCorrCoeffs_
unsigned getTauIsoEtThresholdGct() const
const std::vector< std::vector< double > > & getJetCorrCoeffs() const
double getHtLsbGeV() const
uint16_t correctedEtGct(const double correctedEt) const
Convert the corrected Et value to a linear Et for Ht summing.
double getCenJetEtSeedGeV() const
unsigned getMHtJetEtThresholdGct() const
double getTauJetEtSeedGeV() const
double correctedEtGeV(const double et, const unsigned eta, const bool tauVeto) const
Eta takes a value from 0-10, corresponding to jet regions running from eta=0.0 to eta=5...
void setParams(const double rgnEtLsb, const double htLsb, const double cJetSeed, const double fJetSeed, const double tJetSeed, const double tauIsoEtThresh, const double htJetEtThresh, const double mhtJetEtThresh, const unsigned etaBoundary, const unsigned corrType, const std::vector< std::vector< double > > &jetCorrCoeffs, const std::vector< std::vector< double > > &tauCorrCoeffs)
double correctionFunction(const double Et, const std::vector< double > &coeffs) const
unsigned getCorrType() const
Access to jet Et calibration parameters.
double simpleCorrect(const double Et, const std::vector< double > &coeffs) const
void setJetEtConvertToEnergyOn(const std::vector< double > &energyConvCoeffs)
double getMHtJetEtThresholdGeV() const
double getTauIsoEtThresholdGeV() const
double piecewiseCubicCorrect(const double Et, const std::vector< double > &coeffs) const
static const unsigned NUMBER_ETA_VALUES
Number of eta bins used in correction.
unsigned getCenForJetEtaBoundary() const
void setJetEtCalibrationParams(const unsigned corrType, const std::vector< std::vector< double > > &jetCorrCoeffs, const std::vector< std::vector< double > > &tauCorrCoeffs)
unsigned getHtJetEtThresholdGct() const
double getHtJetEtThresholdGeV() const
void setTauAlgorithmParams(const double tauIsoEtThresh)
double pfCorrect(const double Et, const std::vector< double > &coeffs) const
double getRgnEtLsbGeV() const
unsigned getForJetEtSeedGct() const
double orcaStyleCorrect(const double Et, const std::vector< double > &coeffs) const
void setSlidingWindowParams(const double cJetSeed, const double fJetSeed, const double tJetSeed, const unsigned etaBoundary)
double getForJetEtSeedGeV() const
std::vector< double > energyConversionCoeffs_
const std::vector< std::vector< double > > & getTauCorrCoeffs() const