4 #ifndef TRUTHUTILS_TRUTHCLASSIFIERS_H 
    5 #define TRUTHUTILS_TRUTHCLASSIFIERS_H 
   32   if (abs(pdg) == MC::JPSI) 
return JPsi;
 
  133   for (
const auto& 
it: allJetMothers) {
 
  134     int pdg = abs(
it->pdg_id());
 
  140     if (pdg == 35 || pdg == 36 || pdg == 37) 
return HiggsMSSM;
 
  141     if (pdg == 32 || pdg == 33 || pdg == 34) 
return HeavyBoson;
 
  142     if (pdg == 42) 
return LQ;
 
  153   T parent_hadron_ptr = 
nullptr;
 
  155   bool uncat = 0, fromHad = 0, fromTau = 0;
 
  159   bool fromBSM = 
isBSM; 
 
  161   auto prodVtx = thePart->production_vertex();
 
  167   std::bitset<MCTC_bits::totalBits> classifier;
 
  176   unsigned int outputvalue = 
static_cast<unsigned int>(classifier.to_ulong());
 
  178   return std::make_tuple(outputvalue,parent_hadron_ptr);
 
  184     if (fromPromptTau) 
return int(allow_prompt_tau_decays);
 
  194   int ElecOutNumOfNucFr(0);
 
  195   int ElecOutNumOfElec(0);
 
  197   auto outgoing = EndVert->particles_out();
 
  198   int NumOfElecDaug = outgoing.size();
 
  199   for (
const auto& 
p: outgoing) {
 
  201     int EndDaugType = 
p->pdg_id();
 
  204     if (EndDaugType > 1000000000 || EndDaugType == 0 || abs(EndDaugType) == 2212 || abs(EndDaugType) == 2112) ElecOutNumOfNucFr++;
 
  207   if (ElecOutNumOfNucFr != 0 || NumOfHadr != 0)  PartOutCome = 
NuclInteraction;
 
  208   if (ElecOutNumOfElec == 1 && NumOfElecDaug == 1) PartOutCome = 
ElectrMagInter;
 
  217   int MuOutNumOfNucFr(0);
 
  219   int NumOfEleNeutr(0);
 
  220   int NumOfMuonNeutr(0);
 
  222   auto outgoing = EndVert->particles_out();
 
  223   int NumOfMuDaug = outgoing.size();
 
  224   for (
const auto& 
p: outgoing) {
 
  226     int EndDaugType = 
p->pdg_id();
 
  228     if (abs(EndDaugType) == 12) NumOfEleNeutr++;
 
  229     if (abs(EndDaugType) == 14) NumOfMuonNeutr++;
 
  231     if (EndDaugType > 1000000000 || EndDaugType == 0 || abs(EndDaugType) == 2212 || abs(EndDaugType) == 2112) MuOutNumOfNucFr++;
 
  234   if (MuOutNumOfNucFr != 0 || NumOfHadr != 0) PartOutCome = 
NuclInteraction;
 
  235   if (NumOfMuDaug == 3 && NumOfElec == 1 && NumOfEleNeutr == 1 && NumOfMuonNeutr == 1) PartOutCome = 
DecaytoElectron;
 
  244   int NumOfTauDaug = EndVert->nOutgoingParticles();
 
  246   auto PD = DecayProducts(tauFinalStatePart);
 
  247   int NumOfElec = 
PD.apd(11);
 
  248   int NumOfMuon = 
PD.apd(13);
 
  249   int NumOfElecNeut = 
PD.apd(12);
 
  250   int NumOfMuonNeut = 
PD.apd(14);
 
  251   int NumOfPhot = 
PD.apd(22);
 
  252   int NumOfPi = 
PD.apd(211);
 
  253   int NumOfKaon = 
PD.apd(321);
 
  257   if ((NumOfTauDaug == 3 && NumOfElec == 1 && NumOfElecNeut == 1) || (NumOfTauDaug == (3 + NumOfPhot) && NumOfElecNeut == 1)) PartOutCome = 
DecaytoElectron;
 
  258   if ((NumOfTauDaug == 3 && NumOfMuon == 1 && NumOfMuonNeut == 1) || (NumOfTauDaug == (3 + NumOfPhot) && NumOfMuonNeut == 1)) PartOutCome = 
DecaytoMuon;
 
  260   if (NumOfPi == 1 || NumOfKaon == 1) PartOutCome = 
OneProng;
 
  261   if (NumOfPi + NumOfKaon == 3) PartOutCome = 
ThreeProng;
 
  262   if (NumOfPi + NumOfKaon == 5) PartOutCome = 
FiveProng;
 
  273   int PhtOutNumOfNucFr(0);
 
  274   int PhtOutNumOfEl(0);
 
  275   int PhtOutNumOfPos(0);
 
  276   int PhtOutNumOfHadr(0);
 
  278   auto outgoing = EndVert->particles_out();
 
  279   int NumOfPhtDaug = outgoing.size();
 
  280   for (
const auto& 
p: outgoing) {
 
  282     int EndDaugType = 
p->pdg_id();
 
  283     if (EndDaugType > 1000000000 || EndDaugType == 0 || abs(EndDaugType) == 2212 || abs(EndDaugType) == 2112) PhtOutNumOfNucFr++;
 
  284     if (EndDaugType == 11)  PhtOutNumOfEl++;
 
  285     if (EndDaugType == -11) PhtOutNumOfPos++;
 
  289   if (PhtOutNumOfEl == 1 && PhtOutNumOfPos == 1 && NumOfPhtDaug == 2) PartOutCome = 
Converted;
 
  290   if ((NumOfPhtDaug > 1 && PhtOutNumOfNucFr != 0) || PhtOutNumOfHadr > 0) PartOutCome = 
NuclInteraction;