File indexing completed on 2023-10-25 09:33:11
0001 #include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
0002 #include "CommonTools/Utils/interface/StringToEnumValue.h"
0003 #include <cstring>
0004
0005
0006 int TtEvent::correspondingHypo(const HypoClassKey& key1, const unsigned& hyp1, const HypoClassKey& key2) const {
0007 for (unsigned hyp2 = 0; hyp2 < this->numberOfAvailableHypos(key2); ++hyp2) {
0008 if (this->jetLeptonCombination(key1, hyp1) == this->jetLeptonCombination(key2, hyp2))
0009 return hyp2;
0010 }
0011 return -1;
0012 }
0013
0014
0015 TtEvent::HypoClassKey TtEvent::hypoClassKeyFromString(const std::string& label) const {
0016 return (HypoClassKey)StringToEnumValue<HypoClassKey>(label);
0017 }