Back to home page

Project CMSSW displayed by LXR

 
 

    


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 // find corresponding hypotheses based on JetLepComb
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;  // if no corresponding hypothesis was found
0012 }
0013 
0014 // return the corresponding enum value from a string
0015 TtEvent::HypoClassKey TtEvent::hypoClassKeyFromString(const std::string& label) const {
0016   return (HypoClassKey)StringToEnumValue<HypoClassKey>(label);
0017 }