Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:45

0001 // CaloParamsHelper.cc
0002 // Author: R. Alex Barbieri
0003 //
0004 // Wrapper class for CaloParams and Et scales
0005 
0006 #include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h"
0007 
0008 namespace l1t {
0009   CaloParamsHelper::CaloParamsHelper(const CaloParams p) : CaloParams(p) {
0010     if (pnode_.size() < NUM_CALOPARAMNODES) {
0011       pnode_.resize(NUM_CALOPARAMNODES);
0012       // at version 2, tauCompress was added, we can add a default version here if necessary...
0013     }
0014   };
0015 
0016   std::ostream& operator<<(std::ostream& os, const l1t::CaloParamsHelper& p) { return os << "CaloParamsHelper..."; }
0017 
0018   int CaloParamsHelper::etSumEtaMin(unsigned isum) const {
0019     if (etSumEtaMin_.size() > isum)
0020       return etSumEtaMin_.at(isum);
0021     else
0022       return 0;
0023   }
0024 
0025   int CaloParamsHelper::etSumEtaMax(unsigned isum) const {
0026     if (etSumEtaMax_.size() > isum)
0027       return etSumEtaMax_.at(isum);
0028     else
0029       return 0;
0030   }
0031 
0032   double CaloParamsHelper::etSumEtThreshold(unsigned isum) const {
0033     if (etSumEtThreshold_.size() > isum)
0034       return etSumEtThreshold_.at(isum);
0035     else
0036       return 0.;
0037   }
0038 
0039   void CaloParamsHelper::setEtSumEtaMin(unsigned isum, int eta) {
0040     if (etSumEtaMin_.size() <= isum)
0041       etSumEtaMin_.resize(isum + 1);
0042     etSumEtaMin_.at(isum) = eta;
0043   }
0044 
0045   void CaloParamsHelper::setEtSumEtaMax(unsigned isum, int eta) {
0046     if (etSumEtaMax_.size() <= isum)
0047       etSumEtaMax_.resize(isum + 1);
0048     etSumEtaMax_.at(isum) = eta;
0049   }
0050 
0051   void CaloParamsHelper::setEtSumEtThreshold(unsigned isum, double thresh) {
0052     if (etSumEtThreshold_.size() <= isum)
0053       etSumEtThreshold_.resize(isum + 1);
0054     etSumEtThreshold_.at(isum) = thresh;
0055   }
0056 }  // namespace l1t