CMS 3D CMS Logo

EgHLTOffPho.cc
Go to the documentation of this file.
1 #include <cmath>
2 
4 
5 using namespace egHLT;
6 
7 float OffPho::sigmaEtaEta() const {
8  if (std::fabs(etaSC()) < 1.479)
9  return clusShapeData_.sigmaEtaEta; //barrel case, no correction
10  else { //endcap, need to apply eta correction
11  return clusShapeData_.sigmaEtaEta - 0.02 * (std::fabs(etaSC()) - 2.3);
12  }
13 }
14 
16  //yes maybe a sorted vector might be better but 1) its small and 2) bitset doesnt support < operator
17  //okay laugh, for some reason I cant overload the == operator (brain just not working), hence the non stl'y way
18  //std::vector<std::pair<TrigCodes::TrigBitSet,int> >::const_iterator it;
19  //it = std::find(trigCutsCodes_.begin(),trigCutsCodes_.end(),trigger);
20  //if(it!=trigCutsCodes_.end()) return it->second;
21  //else return 0; //defaults to passing
22 
23  for (auto const& trigCutsCutCode : trigCutsCutCodes_)
24  if (trigger == trigCutsCutCode.first)
25  return trigCutsCutCode.second;
26  return 0; //defaults to passing
27 }
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:63
int trigCutsCutCode(const TrigCodes::TrigBitSet &trigger) const
Definition: EgHLTOffPho.cc:15
float etaSC() const
Definition: EgHLTOffPho.h:112
float sigmaEtaEta() const
Definition: EgHLTOffPho.cc:7
std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes_
Definition: EgHLTOffPho.h:74
std::bitset< maxNrBits_ > TrigBitSet