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/EgHLTOffPho.h"
0004 
0005 using namespace egHLT;
0006 
0007 float OffPho::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 int OffPho::trigCutsCutCode(const TrigCodes::TrigBitSet& trigger) const {
0016   //yes maybe a sorted vector might be better but 1) its small and 2) bitset doesnt support < operator
0017   //okay laugh, for some reason I cant overload the == operator (brain just not working), hence the non stl'y way
0018   //std::vector<std::pair<TrigCodes::TrigBitSet,int> >::const_iterator it;
0019   //it = std::find(trigCutsCodes_.begin(),trigCutsCodes_.end(),trigger);
0020   //if(it!=trigCutsCodes_.end()) return it->second;
0021   //else return 0; //defaults to passing
0022 
0023   for (auto const& trigCutsCutCode : trigCutsCutCodes_)
0024     if (trigger == trigCutsCutCode.first)
0025       return trigCutsCutCode.second;
0026   return 0;  //defaults to passing
0027 }