5#ifndef ACTIVEFRACTION_H
6#define ACTIVEFRACTION_H
14#define M_PI 3.141592653589793238462643383279502884197
25 const std::vector<std::pair<float,float>>&
getEtaBins( )
const;
26 const std::vector<std::pair<float,float>>&
getPhiBins( )
const;
49 float phiEdgeLow = -1. *
M_PI;
55 std::vector<float> dummyPhiVec(
m_phiBins.size(), 1. );
56 std::vector<std::vector<float> > dummyTable(
m_etaBins.size(), dummyPhiVec );
62 for ( ; etaBin < (int)
m_etaBins.size(); ++etaBin ) {
63 std::pair<float,float> theBin =
m_etaBins.at(etaBin);
64 if (
eta > theBin.first &&
eta <= theBin.second )
break;
66 if ( etaBin == (
int)
m_etaBins.size() )
return -1;
73 for ( ; phiBin < (int)
m_phiBins.size(); ++phiBin ) {
74 std::pair<float,float> theBin =
m_phiBins.at(phiBin);
75 if (
phi > theBin.first &&
phi <= theBin.second )
break;
77 if ( phiBin == (
int)
m_phiBins.size() )
return-1;
85 if ( etaBin < 0 )
return 1.;
87 if ( phiBin < 0 )
return 1.;
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
std::vector< std::pair< float, float > > m_phiBins
float getActiveFraction(float eta, float phi) const
int findEtaBin(float eta) const
const std::vector< std::pair< float, float > > & getEtaBins() const
virtual ~ActiveFraction()
std::vector< std::vector< float > > m_activeFracTable
int findPhiBin(float phi) const
std::vector< std::pair< float, float > > m_etaBins
void setActiveFraction(unsigned int etaBin, unsigned int phiBin, float value)
const std::vector< std::pair< float, float > > & getPhiBins() const