Skip to content

Commit

Permalink
Merge pull request #2 from bistapf/split-pid-collections
Browse files Browse the repository at this point in the history
splitting tagging PIDs further into HF (heavy flavour = b and c) and tau tags
  • Loading branch information
tmadlener authored Oct 14, 2024
2 parents ad07238 + 87bee03 commit 55a6b1e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions converter/src/DelphesEDM4HepConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,15 @@ namespace k4SimDelphes {
}

void DelphesEDM4HepConverter::processJets(const TClonesArray* delphesCollection, std::string const& branch) {
auto* jetCollection = createCollection<edm4hep::ReconstructedParticleCollection>(branch);
auto* idCollection = createCollection<edm4hep::ParticleIDCollection>(branch + "_tags");
auto* jetCollection = createCollection<edm4hep::ReconstructedParticleCollection>(branch);
auto* idCollection_HF_tags = createCollection<edm4hep::ParticleIDCollection>(branch + "_HF_tags");
auto* idCollection_tau_tags = createCollection<edm4hep::ParticleIDCollection>(branch + "_tau_tags");

for (auto iCand = 0; iCand < delphesCollection->GetEntries(); ++iCand) {
auto* delphesCand = static_cast<Jet*>(delphesCollection->At(iCand));
auto jet = jetCollection->create();
auto id = idCollection->create();
auto id_HF_tag = idCollection_HF_tags->create();
auto id_tau_tag = idCollection_tau_tags->create();

// NOTE: Filling the jet with the information delievered by Delphes, which
// is not necessarily the same as the sum of its constituents (filled below)
Expand All @@ -361,9 +363,10 @@ namespace k4SimDelphes {
jet.setMomentum({(float)momentum.Px(), (float)momentum.Py(), (float)momentum.Pz()});

// id.addToParameters(delphesCand->IsolationVar);
id.addToParameters(delphesCand->BTag);
id.addToParameters(delphesCand->TauTag);
id.setParticle(jet);
id_HF_tag.addToParameters(delphesCand->BTag);
id_tau_tag.addToParameters(delphesCand->TauTag);
id_HF_tag.setParticle(jet);
id_tau_tag.setParticle(jet);

const auto& constituents = delphesCand->Constituents;
for (auto iConst = 0; iConst < constituents.GetEntries(); ++iConst) {
Expand Down

0 comments on commit 55a6b1e

Please sign in to comment.