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 
5 
6 #include <vector>
7 #include <stdint.h>
8 #include <iosfwd>
9 
11 {
12  public:
13 
14  static const unsigned NUMBER_ETA_VALUES;
15  static const unsigned N_CENTRAL_ETA_VALUES;
16 
18 
19  L1GctJetFinderParams(double rgnEtLsb,
20  double htLsb,
21  double cJetSeed,
22  double fJetSeed,
23  double tJetSeed,
24  double tauIsoEtThresh,
25  double htJetEtThresh,
26  double mhtJetEtThresh,
27  unsigned etaBoundary,
28  unsigned corrType,
29  const std::vector< std::vector<double> >& jetCorrCoeffs,
30  const std::vector< std::vector<double> >& tauCorrCoeffs,
31  bool convertToEnergy,
32  const std::vector<double>& energyConvCoeffs);
33 
35 
36  // get methods
37  double getRgnEtLsbGeV() const { return rgnEtLsb_; }
38  double getHtLsbGeV() const { return htLsb_; }
39  double getCenJetEtSeedGeV() const { return cenJetEtSeed_; }
40  double getForJetEtSeedGeV() const { return forJetEtSeed_; }
41  double getTauJetEtSeedGeV() const { return tauJetEtSeed_; }
42  double getTauIsoEtThresholdGeV() const { return tauIsoEtThreshold_; }
43  double getHtJetEtThresholdGeV() const { return htJetEtThreshold_; }
44  double getMHtJetEtThresholdGeV() const { return mhtJetEtThreshold_; }
45  unsigned getCenForJetEtaBoundary() const { return cenForJetEtaBoundary_; }
46  bool getConvertToEnergy() const { return convertToEnergy_; }
47 
48  // get integers
49  unsigned getCenJetEtSeedGct() const { return static_cast<unsigned>(cenJetEtSeed_/rgnEtLsb_); }
50  unsigned getForJetEtSeedGct() const { return static_cast<unsigned>(forJetEtSeed_/rgnEtLsb_); }
51  unsigned getTauJetEtSeedGct() const { return static_cast<unsigned>(tauJetEtSeed_/rgnEtLsb_); }
52  unsigned getTauIsoEtThresholdGct() const { return static_cast<unsigned>(tauIsoEtThreshold_/rgnEtLsb_); }
53  unsigned getHtJetEtThresholdGct() const { return static_cast<unsigned>(htJetEtThreshold_/htLsb_); }
54  unsigned getMHtJetEtThresholdGct() const { return static_cast<unsigned>(mhtJetEtThreshold_/htLsb_); }
55 
56  // set methods
57  void setRegionEtLsb (const double rgnEtLsb);
58  void setSlidingWindowParams(const double cJetSeed,
59  const double fJetSeed,
60  const double tJetSeed,
61  const unsigned etaBoundary);
62  void setJetEtCalibrationParams(const unsigned corrType,
63  const std::vector< std::vector<double> >& jetCorrCoeffs,
64  const std::vector< std::vector<double> >& tauCorrCoeffs);
65  void setJetEtConvertToEnergyOn(const std::vector<double>& energyConvCoeffs);
67  void setHtSumParams(const double htLsb,
68  const double htJetEtThresh,
69  const double mhtJetEtThresh);
70  void setTauAlgorithmParams(const double tauIsoEtThresh);
71  void setParams(const double rgnEtLsb,
72  const double htLsb,
73  const double cJetSeed,
74  const double fJetSeed,
75  const double tJetSeed,
76  const double tauIsoEtThresh,
77  const double htJetEtThresh,
78  const double mhtJetEtThresh,
79  const unsigned etaBoundary,
80  const unsigned corrType,
81  const std::vector< std::vector<double> >& jetCorrCoeffs,
82  const std::vector< std::vector<double> >& tauCorrCoeffs);
83 
84  // correct jet Et
86  double correctedEtGeV(const double et, const unsigned eta, const bool tauVeto) const;
87 
89  uint16_t correctedEtGct(const double correctedEt) const;
90 
92  unsigned getCorrType() const { return corrType_; }
93  const std::vector< std::vector<double> >& getJetCorrCoeffs() const { return jetCorrCoeffs_; }
94  const std::vector< std::vector<double> >& getTauCorrCoeffs() const { return tauCorrCoeffs_; }
95 
96  private:
97 
98  // correct the et
99  double correctionFunction(const double Et, const std::vector<double>& coeffs) const;
100 
101  // different jet correction functions
102  double findCorrectedEt (const double Et, const std::vector<double>& coeffs) const;
103  double powerSeriesCorrect (const double Et, const std::vector<double>& coeffs) const;
104  double orcaStyleCorrect (const double Et, const std::vector<double>& coeffs) const;
105  double simpleCorrect (const double Et, const std::vector<double>& coeffs) const;
106  double piecewiseCubicCorrect (const double Et, const std::vector<double>& coeffs) const;
107  double pfCorrect (const double Et, const std::vector<double>& coeffs) const;
108 
109  private:
110 
111  // internal scale LSBs
112  double rgnEtLsb_;
113  double htLsb_;
114 
115  // parameters
123 
124  // jet Et corrections
125  unsigned corrType_;
126  std::vector< std::vector<double> > jetCorrCoeffs_;
127  std::vector< std::vector<double> > tauCorrCoeffs_;
128 
129  // convert Et to E
131  std::vector<double> energyConversionCoeffs_;
132 
133 
135 };
136 
138 std::ostream& operator << (std::ostream& os, const L1GctJetFinderParams& fn);
139 
140 #endif /*L1GCTJETPARAMS_H_*/
141 
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
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)
#define COND_SERIALIZABLE
Definition: Serializable.h:37
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