ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkMCTruth
src
TruthCollectionMakerForwardProton.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
// TruthCollectionMakerForwardProton.cxx
7
// Create truth forwardproton collection decorated with forwardproton decay specific variables
8
9
// Class header file
10
#include "
DerivationFrameworkMCTruth/TruthCollectionMakerForwardProton.h
"
11
#include "
TruthUtils/HepMCHelpers.h
"
12
13
std::vector<int>
DerivationFramework::TruthCollectionMakerForwardProton::updateMask
(
const
xAOD::TruthParticleContainer
* truthParticles)
const
{
14
std::vector<int>
entries
;
15
entries
.reserve(truthParticles->
size
());
16
for
(
const
auto
* truthParticle : *truthParticles) {
17
entries
.push_back( ((std::abs(truthParticle->pdgId()) ==
MC::PROTON
) && truthParticle->isStable() && truthParticle->e() > 0.8*
m_beamEnergy
) ? 1 : 0);
// TODO Check whether isGenStable was intended here?
18
}
19
return
entries
;
20
}
HepMCHelpers.h
ATLAS-specific HepMC functions.
TruthCollectionMakerForwardProton.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DerivationFramework::TruthCollectionMakerForwardProton::m_beamEnergy
Gaudi::Property< double > m_beamEnergy
Definition
TruthCollectionMakerForwardProton.h:21
DerivationFramework::TruthCollectionMakerForwardProton::updateMask
virtual std::vector< int > updateMask(const xAOD::TruthParticleContainer *) const override final
Definition
TruthCollectionMakerForwardProton.cxx:13
entries
double entries
Definition
listroot.cxx:49
MC::PROTON
static const int PROTON
Definition
HepMCHelpers.h:125
xAOD::TruthParticleContainer
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticleContainer.h:17
Generated on
for ATLAS Offline Software by
1.14.0