예제 #1
0
int SignatureLeptonTagger::Train(Event const& event, boca::PreCuts const&, Tag tag)
{
    INFO0;
   std::vector<Lepton> leptons = event.Leptons().leptons();
    if (leptons.size() < 2) return 0;
   std::vector<Particle> particles = event.Partons().GenParticles();
   std::vector<Particle> lepton_particle = CopyIfParticles(particles, {Id::electron, Id::muon});
//     ERROR(lepton_particle);
    lepton_particle = CopyIfGrandMother(lepton_particle, Id::top);
//     ERROR(lepton_particle);
    std::vector<Lepton> final_leptons = CopyIfClose(leptons, lepton_particle);
//     ERROR(final_leptons);
    std::vector<Doublet> doublets = higgs_reader_.Multiplets(event);
    std::vector<Particle> higgses = CopyIfParticles(particles, {Id::higgs, Id::CP_violating_higgs});
    std::vector<Doublet> final_doublets = BestMatches(doublets, higgses, tag);

    std::vector<MultipletSignature<Quartet211>> quartets = Triples(final_leptons, final_doublets, [&](Singlet const& singlet_1, Singlet const& singlet_2, Doublet const& doublet) {
        MultipletSignature<Quartet211> quartet = Signature(doublet, singlet_1, singlet_2);
        quartet.SetTag(tag);
        return quartet;
    });
    DEBUG(quartets.size());
    if (tag == Tag::signal) quartets = ReduceResult(quartets, 1);
    DEBUG(quartets.size());
    return  SaveEntries(quartets);
}
예제 #2
0
int SignatureT::Train(boca::Event const& event, boca::PreCuts const&, Tag tag)
{
    INFO0;
    auto particles = event.GenParticles();
    auto triplets = top_reader_.Multiplets(event);
    auto tops = CopyIfParticle(particles, Id::top);

    auto final_triplets = triplets;
//     auto final_triplets = BestMatches(triplets, tops, tag);
    DEBUG(triplets.size(), tops.size(), final_triplets.size());

    auto doublets = higgs_reader_.Multiplets(event);
    auto higgses = CopyIfParticles(particles, {Id::higgs, Id::CP_violating_higgs});
    auto final_doublets = doublets;
//     auto final_doublets = BestMatches(doublets, higgses, tag);
    DEBUG(doublets.size(), higgses.size(), final_doublets.size());

    auto octets = Triples(final_triplets, final_doublets, [&](Triplet const & triplet_1, Triplet const & triplet_2, Doublet const & doublet) {
        auto octet = Signature(triplet_1, triplet_2, doublet);
        octet.SetTag(tag);
        return octet;
    });
    DEBUG(octets.size());
    return SaveEntries(octets, 1);
}
예제 #3
0
std::vector<Particle> Higgs::Particles(boca::Event const& event) const
{
    INFO0;
    return CopyIfParticles(event.GenParticles(), {Id::higgs, Id::CP_violating_higgs, Id::higgs_coupling});
}