Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing conversion of ScalarHT and make it a UserDataCollection #138

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions converter/src/DelphesEDM4HepConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace k4SimDelphes {
* ensure that products required by later stages are producd early enough
*/
constexpr std::array<std::string_view, 10> PROCESSING_ORDER = {
"GenParticle", "Track", "Tower", "ParticleFlowCandidate", "Muon", "Electron", "Photon",
"Jet", "MissingET", "SclalarHT"};
"GenParticle", "Track", "Tower", "ParticleFlowCandidate", "Muon", "Electron", "Photon",
"Jet", "MissingET", "ScalarHT"};

template <size_t N>
void sortBranchesProcessingOrder(std::vector<BranchSettings>& branches,
Expand Down Expand Up @@ -435,11 +435,9 @@ namespace k4SimDelphes {
}

void DelphesEDM4HepConverter::processScalarHT(const TClonesArray* delphesCollection, std::string const& branch) {
auto* collection = createCollection<edm4hep::ParticleIDCollection>(branch);
auto* collection = createCollection<podio::UserDataCollection<float>>(branch);
bistapf marked this conversation as resolved.
Show resolved Hide resolved
auto* delphesCand = static_cast<ScalarHT*>(delphesCollection->At(0));

auto cand = collection->create();
cand.addToParameters(delphesCand->HT);
collection->push_back(delphesCand->HT);
}

template <typename DelphesT>
Expand Down
Loading