CMS 3D CMS Logo

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_*/
L1GctJetFinderParams::convertToEnergy_
bool convertToEnergy_
Definition: L1GctJetFinderParams.h:124
L1GctJetFinderParams::jetCorrCoeffs_
std::vector< std::vector< double > > jetCorrCoeffs_
Definition: L1GctJetFinderParams.h:120
L1GctJetFinderParams::getCenJetEtSeedGct
unsigned getCenJetEtSeedGct() const
Definition: L1GctJetFinderParams.h:47
L1GctJetFinderParams::getHtJetEtThresholdGeV
double getHtJetEtThresholdGeV() const
Definition: L1GctJetFinderParams.h:41
L1GctJetFinderParams::correctedEtGct
uint16_t correctedEtGct(const double correctedEt) const
Convert the corrected Et value to a linear Et for Ht summing.
Definition: L1GctJetFinderParams.cc:198
L1GctJetFinderParams::setParams
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)
Definition: L1GctJetFinderParams.cc:153
L1GctJetFinderParams::getTauJetEtSeedGct
unsigned getTauJetEtSeedGct() const
Definition: L1GctJetFinderParams.h:49
L1GctJetFinderParams::findCorrectedEt
double findCorrectedEt(const double Et, const std::vector< double > &coeffs) const
L1GctJetFinderParams::getRgnEtLsbGeV
double getRgnEtLsbGeV() const
Definition: L1GctJetFinderParams.h:35
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
L1GctJetFinderParams::correctionFunction
double correctionFunction(const double Et, const std::vector< double > &coeffs) const
Definition: L1GctJetFinderParams.cc:212
L1GctJetFinderParams::getHtLsbGeV
double getHtLsbGeV() const
Definition: L1GctJetFinderParams.h:36
L1GctJetFinderParams::mhtJetEtThreshold_
double mhtJetEtThreshold_
Definition: L1GctJetFinderParams.h:115
L1GctJetFinderParams::getTauIsoEtThresholdGct
unsigned getTauIsoEtThresholdGct() const
Definition: L1GctJetFinderParams.h:50
L1GctJetFinderParams::rgnEtLsb_
double rgnEtLsb_
Definition: L1GctJetFinderParams.h:106
L1GctJetFinderParams::getJetCorrCoeffs
const std::vector< std::vector< double > > & getJetCorrCoeffs() const
Definition: L1GctJetFinderParams.h:89
L1GctJetFinderParams::tauIsoEtThreshold_
double tauIsoEtThreshold_
Definition: L1GctJetFinderParams.h:113
L1GctJetFinderParams::getCenForJetEtaBoundary
unsigned getCenForJetEtaBoundary() const
Definition: L1GctJetFinderParams.h:43
L1GctJetFinderParams::tauCorrCoeffs_
std::vector< std::vector< double > > tauCorrCoeffs_
Definition: L1GctJetFinderParams.h:121
L1GctJetFinderParams::setJetEtCalibrationParams
void setJetEtCalibrationParams(const unsigned corrType, const std::vector< std::vector< double > > &jetCorrCoeffs, const std::vector< std::vector< double > > &tauCorrCoeffs)
Definition: L1GctJetFinderParams.cc:127
L1GctJetFinderParams::piecewiseCubicCorrect
double piecewiseCubicCorrect(const double Et, const std::vector< double > &coeffs) const
Definition: L1GctJetFinderParams.cc:277
L1GctJetFinderParams::forJetEtSeed_
double forJetEtSeed_
Definition: L1GctJetFinderParams.h:111
L1GctJetFinderParams::getTauCorrCoeffs
const std::vector< std::vector< double > > & getTauCorrCoeffs() const
Definition: L1GctJetFinderParams.h:90
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1GctJetFinderParams::htLsb_
double htLsb_
Definition: L1GctJetFinderParams.h:107
L1GctJetFinderParams::correctedEtGeV
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....
Definition: L1GctJetFinderParams.cc:177
L1GctJetFinderParams::setRegionEtLsb
void setRegionEtLsb(const double rgnEtLsb)
Definition: L1GctJetFinderParams.cc:115
L1GctJetFinderParams::getCenJetEtSeedGeV
double getCenJetEtSeedGeV() const
Definition: L1GctJetFinderParams.h:37
L1GctJetFinderParams::getForJetEtSeedGeV
double getForJetEtSeedGeV() const
Definition: L1GctJetFinderParams.h:38
L1GctJetFinderParams::getForJetEtSeedGct
unsigned getForJetEtSeedGct() const
Definition: L1GctJetFinderParams.h:48
operator<<
std::ostream & operator<<(std::ostream &os, const L1GctJetFinderParams &fn)
Overload << operator.
Definition: L1GctJetFinderParams.cc:313
L1GctJetFinderParams
Definition: L1GctJetFinderParams.h:10
L1GctJetFinderParams::setSlidingWindowParams
void setSlidingWindowParams(const double cJetSeed, const double fJetSeed, const double tJetSeed, const unsigned etaBoundary)
Definition: L1GctJetFinderParams.cc:117
L1GctJetFinderParams::setJetEtConvertToEnergyOn
void setJetEtConvertToEnergyOn(const std::vector< double > &energyConvCoeffs)
Definition: L1GctJetFinderParams.cc:135
L1GctJetFinderParams::getTauJetEtSeedGeV
double getTauJetEtSeedGeV() const
Definition: L1GctJetFinderParams.h:39
L1GctJetFinderParams::getConvertToEnergy
bool getConvertToEnergy() const
Definition: L1GctJetFinderParams.h:44
L1GctJetFinderParams::htJetEtThreshold_
double htJetEtThreshold_
Definition: L1GctJetFinderParams.h:114
L1GctJetFinderParams::cenJetEtSeed_
double cenJetEtSeed_
Definition: L1GctJetFinderParams.h:110
Serializable.h
L1GctJetFinderParams::cenForJetEtaBoundary_
unsigned cenForJetEtaBoundary_
Definition: L1GctJetFinderParams.h:116
L1GctJetFinderParams::getMHtJetEtThresholdGct
unsigned getMHtJetEtThresholdGct() const
Definition: L1GctJetFinderParams.h:52
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1GctJetFinderParams::N_CENTRAL_ETA_VALUES
static const unsigned N_CENTRAL_ETA_VALUES
Number of eta bins used in correction.
Definition: L1GctJetFinderParams.h:13
L1GctJetFinderParams::setTauAlgorithmParams
void setTauAlgorithmParams(const double tauIsoEtThresh)
Definition: L1GctJetFinderParams.cc:151
L1GctJetFinderParams::orcaStyleCorrect
double orcaStyleCorrect(const double Et, const std::vector< double > &coeffs) const
Definition: L1GctJetFinderParams.cc:247
L1GctJetFinderParams::powerSeriesCorrect
double powerSeriesCorrect(const double Et, const std::vector< double > &coeffs) const
Definition: L1GctJetFinderParams.cc:239
L1GctJetFinderParams::simpleCorrect
double simpleCorrect(const double Et, const std::vector< double > &coeffs) const
Definition: L1GctJetFinderParams.cc:267
L1GctJetFinderParams::getTauIsoEtThresholdGeV
double getTauIsoEtThresholdGeV() const
Definition: L1GctJetFinderParams.h:40
L1GctJetFinderParams::corrType_
unsigned corrType_
Definition: L1GctJetFinderParams.h:119
L1GctJetFinderParams::~L1GctJetFinderParams
~L1GctJetFinderParams()
Definition: L1GctJetFinderParams.cc:108
L1GctJetFinderParams::energyConversionCoeffs_
std::vector< double > energyConversionCoeffs_
Definition: L1GctJetFinderParams.h:125
personalPlayback.fn
fn
Definition: personalPlayback.py:515
L1GctJetFinderParams::getCorrType
unsigned getCorrType() const
Access to jet Et calibration parameters.
Definition: L1GctJetFinderParams.h:88
L1GctJetFinderParams::getMHtJetEtThresholdGeV
double getMHtJetEtThresholdGeV() const
Definition: L1GctJetFinderParams.h:42
L1GctJetFinderParams::L1GctJetFinderParams
L1GctJetFinderParams()
Definition: L1GctJetFinderParams.cc:17
L1GctJetFinderParams::NUMBER_ETA_VALUES
static const unsigned NUMBER_ETA_VALUES
Number of eta bins used in correction.
Definition: L1GctJetFinderParams.h:12
L1GctJetFinderParams::tauJetEtSeed_
double tauJetEtSeed_
Definition: L1GctJetFinderParams.h:112
L1GctJetFinderParams::setJetEtConvertToEnergyOff
void setJetEtConvertToEnergyOff()
Definition: L1GctJetFinderParams.cc:140
L1GctJetFinderParams::setHtSumParams
void setHtSumParams(const double htLsb, const double htJetEtThresh, const double mhtJetEtThresh)
Definition: L1GctJetFinderParams.cc:145
L1GctJetFinderParams::getHtJetEtThresholdGct
unsigned getHtJetEtThresholdGct() const
Definition: L1GctJetFinderParams.h:51
L1GctJetFinderParams::pfCorrect
double pfCorrect(const double Et, const std::vector< double > &coeffs) const
Definition: L1GctJetFinderParams.cc:303