1 #ifndef DQMOffline_Trigger_FunctionDefs_h 2 #define DQMOffline_Trigger_FunctionDefs_h 38 template<
typename ObjType>
float scEtaFunc(
const ObjType&
obj){
return obj.superCluster()->eta();}
42 template<
typename ObjType>
44 std::function<float(const ObjType&)> varFunc;
49 template<
typename ObjType>
51 std::function<float(const ObjType&)> varFunc;
56 else varFunc = getUnaryFuncExtraFloat<ObjType>(varName);
58 if(!varFunc && !varName.empty()){
59 throw cms::Exception(
"ConfigError") <<
"var "<<varName<<
" not recognised "<<__FILE__<<
","<<__LINE__<<std::endl;
66 std::function<float(const reco::GsfElectron&)> getUnaryFuncExtraFloat<reco::GsfElectron>(
const std::string& varName){
67 std::function<float(const reco::GsfElectron&)> varFunc;
68 if(varName==
"scEta") varFunc = scEtaFunc<reco::GsfElectron>;
float scEtaFunc(const ObjType &obj)
float hcalOverEcal() const
std::function< float(const ObjType &)> getUnaryFuncFloat(const std::string &varName)
et
define resolution functions of each parameter
std::function< float(const ObjType &)> getUnaryFuncExtraFloat(const std::string &varName)