CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/CondFormats/L1TObjects/interface/L1GctJetFinderParams.h

Go to the documentation of this file.
00001 #ifndef L1GCTJETFINDERPARAMS_H_
00002 #define L1GCTJETFINDERPARAMS_H_
00003 
00004 #include <vector>
00005 #include <stdint.h>
00006 #include <iosfwd>
00007 
00008 class L1GctJetFinderParams
00009 {
00010  public:
00011 
00012   static const unsigned NUMBER_ETA_VALUES;     
00013   static const unsigned N_CENTRAL_ETA_VALUES;     
00014 
00015   L1GctJetFinderParams();
00016 
00017   L1GctJetFinderParams(double rgnEtLsb,
00018                        double htLsb,
00019                        double cJetSeed,
00020                        double fJetSeed,
00021                        double tJetSeed,
00022                        double tauIsoEtThresh,
00023                        double htJetEtThresh,
00024                        double mhtJetEtThresh,
00025                        unsigned etaBoundary, 
00026                        unsigned corrType,
00027                        std::vector< std::vector<double> > jetCorrCoeffs,
00028                        std::vector< std::vector<double> > tauCorrCoeffs,
00029                        bool convertToEnergy,
00030                        std::vector<double> energyConvCoeffs);
00031 
00032   ~L1GctJetFinderParams();
00033 
00034   // get methods
00035   double getRgnEtLsbGeV() const { return rgnEtLsb_; }
00036   double getHtLsbGeV() const { return htLsb_; }
00037   double getCenJetEtSeedGeV() const { return cenJetEtSeed_; }
00038   double getForJetEtSeedGeV() const { return forJetEtSeed_; }
00039   double getTauJetEtSeedGeV() const { return tauJetEtSeed_; }
00040   double getTauIsoEtThresholdGeV() const { return tauIsoEtThreshold_; }
00041   double getHtJetEtThresholdGeV() const { return htJetEtThreshold_; }
00042   double getMHtJetEtThresholdGeV() const { return mhtJetEtThreshold_; }
00043   unsigned getCenForJetEtaBoundary() const { return cenForJetEtaBoundary_; }
00044   bool getConvertToEnergy() const { return convertToEnergy_; }
00045 
00046   // get integers
00047   unsigned getCenJetEtSeedGct() const { return static_cast<unsigned>(cenJetEtSeed_/rgnEtLsb_); }
00048   unsigned getForJetEtSeedGct() const { return static_cast<unsigned>(forJetEtSeed_/rgnEtLsb_); }
00049   unsigned getTauJetEtSeedGct() const { return static_cast<unsigned>(tauJetEtSeed_/rgnEtLsb_); }
00050   unsigned getTauIsoEtThresholdGct() const { return static_cast<unsigned>(tauIsoEtThreshold_/rgnEtLsb_); }
00051   unsigned getHtJetEtThresholdGct() const { return static_cast<unsigned>(htJetEtThreshold_/htLsb_); }
00052   unsigned getMHtJetEtThresholdGct() const { return static_cast<unsigned>(mhtJetEtThreshold_/htLsb_); }
00053 
00054   // set methods
00055   void setRegionEtLsb (const double rgnEtLsb);
00056   void setSlidingWindowParams(const double cJetSeed,
00057                               const double fJetSeed,
00058                               const double tJetSeed,
00059                               const unsigned etaBoundary);
00060   void setJetEtCalibrationParams(const unsigned corrType,
00061                                  const std::vector< std::vector<double> >& jetCorrCoeffs,
00062                                  const std::vector< std::vector<double> >& tauCorrCoeffs);
00063   void setJetEtConvertToEnergyOn(const std::vector<double>& energyConvCoeffs);
00064   void setJetEtConvertToEnergyOff();
00065   void setHtSumParams(const double htLsb,
00066                       const double htJetEtThresh,
00067                       const double mhtJetEtThresh);
00068   void setTauAlgorithmParams(const double tauIsoEtThresh);
00069   void setParams(const double rgnEtLsb,
00070                  const double htLsb,
00071                  const double cJetSeed,
00072                  const double fJetSeed,
00073                  const double tJetSeed,
00074                  const double tauIsoEtThresh,
00075                  const double htJetEtThresh,
00076                  const double mhtJetEtThresh,
00077                  const unsigned etaBoundary,
00078                  const unsigned corrType,
00079                  const std::vector< std::vector<double> >& jetCorrCoeffs,
00080                  const std::vector< std::vector<double> >& tauCorrCoeffs);
00081 
00082   // correct jet Et
00084   double correctedEtGeV(const double et, const unsigned eta, const bool tauVeto) const;
00085   
00087   uint16_t correctedEtGct(const double correctedEt) const;
00088   
00090   unsigned getCorrType() const { return corrType_; }
00091   const std::vector< std::vector<double> >& getJetCorrCoeffs() const { return jetCorrCoeffs_; }
00092   const std::vector< std::vector<double> >& getTauCorrCoeffs() const { return tauCorrCoeffs_; }
00093 
00094  private:
00095 
00096   // correct the et
00097   double correctionFunction(const double Et, const std::vector<double>& coeffs) const;
00098 
00099   // different jet correction functions
00100   double findCorrectedEt       (const double Et, const std::vector<double>& coeffs) const;
00101   double powerSeriesCorrect    (const double Et, const std::vector<double>& coeffs) const;
00102   double orcaStyleCorrect      (const double Et, const std::vector<double>& coeffs) const;
00103   double simpleCorrect         (const double Et, const std::vector<double>& coeffs) const;
00104   double piecewiseCubicCorrect (const double Et, const std::vector<double>& coeffs) const;
00105   double pfCorrect             (const double Et, const std::vector<double>& coeffs) const;
00106   
00107  private:
00108 
00109   // internal scale LSBs
00110   double rgnEtLsb_;
00111   double htLsb_;
00112 
00113   // parameters
00114   double cenJetEtSeed_;
00115   double forJetEtSeed_;
00116   double tauJetEtSeed_;
00117   double tauIsoEtThreshold_;
00118   double htJetEtThreshold_;
00119   double mhtJetEtThreshold_;
00120   unsigned cenForJetEtaBoundary_;
00121 
00122   // jet Et corrections
00123   unsigned corrType_; 
00124   std::vector< std::vector<double> > jetCorrCoeffs_;
00125   std::vector< std::vector<double> > tauCorrCoeffs_;
00126 
00127   // convert Et to E
00128   bool convertToEnergy_;
00129   std::vector<double> energyConversionCoeffs_;
00130 
00131 };
00132 
00134 std::ostream& operator << (std::ostream& os, const L1GctJetFinderParams& fn);
00135 
00136 #endif /*L1GCTJETPARAMS_H_*/
00137