ATLAS Offline Software
Loading...
Searching...
No Matches
TruthCollectionMakerBoson.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TruthCollectionMakerBoson.cxx
7// Create truth boson collection decorated with boson decay specific variables
8
9// Class header file
12
14 std::vector<int> entries;
15 entries.reserve(truthParticles->size());
16 for (const auto* truthParticle : *truthParticles) {
17 entries.push_back( ((truthParticle->pdgId() == MC::Z0BOSON) || (std::abs(truthParticle->pdgId()) == MC::WPLUSBOSON) || (truthParticle->pdgId() == MC::HIGGSBOSON) ) ? 1 : 0);
18 }
19 return entries;
20}
ATLAS-specific HepMC functions.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual std::vector< int > updateMask(const xAOD::TruthParticleContainer *) const override final
double entries
Definition listroot.cxx:49
static const int Z0BOSON
static const int HIGGSBOSON
static const int WPLUSBOSON
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.