Skip to content

Commit

Permalink
Fixing conversion of ScalarHT and make it a UserDataCollection (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
bistapf authored Dec 20, 2024
1 parent c8ad257 commit 2261a45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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);
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
2 changes: 1 addition & 1 deletion doc/output_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ classes. For the conversion the Delphes classes are taken from the `TreeWriter`
| `Electron` | `ReconstructedParticle` (subset collection) |
| `Photon` | `ReconstructedParticle` (subset collection) |
| `MissingET` | `ReconstructedParticle` |
| `ScalarHT` | `ParticleID` |
| `ScalarHT` | `UserDataCollection<float>` |
| `ParticleFlowCandidate` | `ReconstructedParticle` |
| n/a | `RecoMCParticleLink` |

Expand Down

0 comments on commit 2261a45

Please sign in to comment.