Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:38

0001 #include <cmath>
0002 
0003 #include "DQMOffline/Trigger/interface/EgHLTOffEle.h"
0004 
0005 using namespace egHLT;
0006 
0007 float OffEle::sigmaEtaEta() const {
0008   if (std::fabs(etaSC()) < 1.479)
0009     return clusShapeData_.sigmaEtaEta;  //barrel case, no correction
0010   else {                                //endcap, need to apply eta correction
0011     return clusShapeData_.sigmaEtaEta - 0.02 * (std::fabs(etaSC()) - 2.3);
0012   }
0013 }
0014 
0015 //defining the == operator
0016 //bool operator==(const std::pair<TrigCodes::TrigBitSet,int>& lhs,const TrigCodes::TrigBitSet& rhs){return lhs.first==rhs;}
0017 //bool operator==(const TrigCodes::TrigBitSet& lhs,const std::pair<TrigCodes::TrigBitSet,int>& rhs){return lhs==rhs.first;}
0018 
0019 int OffEle::trigCutsCutCode(const TrigCodes::TrigBitSet& trigger) const {
0020   //yes maybe a sorted vector might be better but 1) its small and 2) bitset doesnt support < operator
0021   //okay laugh, for some reason I cant overload the == operator (brain just not working), hence the non stl'y way
0022   //std::vector<std::pair<TrigCodes::TrigBitSet,int> >::const_iterator it;
0023   //it = std::find(trigCutsCodes_.begin(),trigCutsCodes_.end(),trigger);
0024   //if(it!=trigCutsCodes_.end()) return it->second;
0025   //else return 0; //defaults to passing
0026 
0027   for (auto const& trigCutsCutCode : trigCutsCutCodes_)
0028     if (trigger == trigCutsCutCode.first)
0029       return trigCutsCutCode.second;
0030   return 0;  //defaults to passing
0031 }
0032 
0033 // float EgHLTOffEle::sigmaIEtaIEta()const
0034 // {
0035 //   if(fabs(etaSC())<1.479) return clusShapeData_.sigmaIEtaIEta; //barrel case, no correction
0036 //   else{ //endcap, need to apply eta correction
0037 //     return clusShapeData_.sigmaIEtaIEta - 0.02*( fabs(etaSC()) - 2.3);
0038 //   }
0039 
0040 // }