CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TtEvent.cc
Go to the documentation of this file.
3 #include <cstring>
4 
5 // find corresponding hypotheses based on JetLepComb
6 int TtEvent::correspondingHypo(const HypoClassKey& key1, const unsigned& hyp1, const HypoClassKey& key2) const {
7  for (unsigned hyp2 = 0; hyp2 < this->numberOfAvailableHypos(key2); ++hyp2) {
8  if (this->jetLeptonCombination(key1, hyp1) == this->jetLeptonCombination(key2, hyp2))
9  return hyp2;
10  }
11  return -1; // if no corresponding hypothesis was found
12 }
13 
14 // return the corresponding enum value from a string
16  return (HypoClassKey)StringToEnumValue<HypoClassKey>(label);
17 }
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:26
unsigned int numberOfAvailableHypos(const std::string &key) const
return number of available hypotheses within a given hypothesis class
Definition: TtEvent.h:88
char const * label
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
int correspondingHypo(const std::string &key1, const unsigned &hyp1, const std::string &key2) const
return the hypothesis in hypothesis class &#39;key2&#39;, which corresponds to hypothesis &#39;hyp1&#39; in hypothesi...
Definition: TtEvent.h:136
std::vector< int > jetLeptonCombination(const std::string &key, const unsigned &cmb=0) const
return the vector of jet lepton combinatorics for a given hypothesis and class
Definition: TtEvent.h:104