CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1GctJetFinderParams.h
Go to the documentation of this file.
1 #ifndef L1GCTJETFINDERPARAMS_H_
2 #define L1GCTJETFINDERPARAMS_H_
3 
5 
6 #include <vector>
7 #include <cstdint>
8 #include <iosfwd>
9 
11 public:
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, const double htJetEtThresh, const double mhtJetEtThresh);
66  void setTauAlgorithmParams(const double tauIsoEtThresh);
67  void setParams(const double rgnEtLsb,
68  const double htLsb,
69  const double cJetSeed,
70  const double fJetSeed,
71  const double tJetSeed,
72  const double tauIsoEtThresh,
73  const double htJetEtThresh,
74  const double mhtJetEtThresh,
75  const unsigned etaBoundary,
76  const unsigned corrType,
77  const std::vector<std::vector<double> >& jetCorrCoeffs,
78  const std::vector<std::vector<double> >& tauCorrCoeffs);
79 
80  // correct jet Et
82  double correctedEtGeV(const double et, const unsigned eta, const bool tauVeto) const;
83 
85  uint16_t correctedEtGct(const double correctedEt) const;
86 
88  unsigned getCorrType() const { return corrType_; }
89  const std::vector<std::vector<double> >& getJetCorrCoeffs() const { return jetCorrCoeffs_; }
90  const std::vector<std::vector<double> >& getTauCorrCoeffs() const { return tauCorrCoeffs_; }
91 
92 private:
93  // correct the et
94  double correctionFunction(const double Et, const std::vector<double>& coeffs) const;
95 
96  // different jet correction functions
97  double findCorrectedEt(const double Et, const std::vector<double>& coeffs) const;
98  double powerSeriesCorrect(const double Et, const std::vector<double>& coeffs) const;
99  double orcaStyleCorrect(const double Et, const std::vector<double>& coeffs) const;
100  double simpleCorrect(const double Et, const std::vector<double>& coeffs) const;
101  double piecewiseCubicCorrect(const double Et, const std::vector<double>& coeffs) const;
102  double pfCorrect(const double Et, const std::vector<double>& coeffs) const;
103 
104 private:
105  // internal scale LSBs
106  double rgnEtLsb_;
107  double htLsb_;
108 
109  // parameters
117 
118  // jet Et corrections
119  unsigned corrType_;
120  std::vector<std::vector<double> > jetCorrCoeffs_;
121  std::vector<std::vector<double> > tauCorrCoeffs_;
122 
123  // convert Et to E
125  std::vector<double> energyConversionCoeffs_;
126 
128 };
129 
131 std::ostream& operator<<(std::ostream& os, const L1GctJetFinderParams& fn);
132 
133 #endif /*L1GCTJETPARAMS_H_*/
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
void setRegionEtLsb(const double rgnEtLsb)
unsigned getCenJetEtSeedGct() const
unsigned getTauJetEtSeedGct() const
const std::vector< std::vector< double > > & getJetCorrCoeffs() const
std::vector< std::vector< double > > tauCorrCoeffs_
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
unsigned getTauIsoEtThresholdGct() 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
const std::vector< std::vector< double > > & getTauCorrCoeffs() 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)
#define COND_SERIALIZABLE
Definition: Serializable.h:39
std::vector< std::vector< double > > jetCorrCoeffs_
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_