Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <MuonTruthClassifierFallback.h>
|
SG::ReadHandleKey< xAOD::IParticleContainer > | m_containerKey {this, "ContainerKey", "", "Key of the container to be decorated"} |
|
SG::ReadHandleKey< xAOD::TruthEventContainer > | m_truthSGKey {this, "TruthSGKey", "TruthEvents", "Key of the truth event container"} |
|
SG::ReadHandleKey< xAOD::TruthPileupEventContainer > | m_truthPileupSGKey |
|
SG::ReadHandleKey< xAOD::TruthParticleContainer > | m_truthMuonSGKey {this, "TruthMuonContainerKey", "MuonTruthParticles", ""} |
|
SG::WriteDecorHandleKey< xAOD::IParticleContainer > | m_Truth_dR_Key {this, "dRDecoration", ""} |
| Key properties are overwirrten during initialize. More...
|
|
SG::WriteDecorHandleKey< xAOD::IParticleContainer > | m_Truth_type_Key {this, "typeDecoration", ""} |
|
SG::WriteDecorHandleKey< xAOD::IParticleContainer > | m_Truth_origin_Key {this, "originDecoration", ""} |
|
SG::WriteDecorHandleKey< xAOD::IParticleContainer > | m_Truth_PU_dR_Key {this, "dRDecorationPU", ""} |
|
SG::WriteDecorHandleKey< xAOD::IParticleContainer > | m_Truth_PU_type_Key {this, "typeDecorationPU", ""} |
|
SG::WriteDecorHandleKey< xAOD::IParticleContainer > | m_Truth_PU_origin_Key {this, "originDecorationPU", ""} |
|
Gaudi::Property< float > | m_minPt {this, "MinPt", 2500} |
|
ToolHandle< IMCTruthClassifier > | m_mcTruthClassifier {this, "MCTruthClassifierTool", "", "Handle of the MC truth classifier"} |
|
◆ MuonTruthClassifierFallback()
DerivationFramework::MuonTruthClassifierFallback::MuonTruthClassifierFallback |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MuonTruthClassifierFallback()
DerivationFramework::MuonTruthClassifierFallback::~MuonTruthClassifierFallback |
( |
| ) |
|
|
default |
◆ addBranches()
StatusCode DerivationFramework::MuonTruthClassifierFallback::addBranches |
( |
| ) |
const |
|
overridevirtual |
Definition at line 59 of file MuonTruthClassifierFallback.cxx.
61 const EventContext& ctx = Gaudi::Hive::currentContext();
64 if (!
parts.isValid()) {
66 return StatusCode::FAILURE;
71 return StatusCode::FAILURE;
74 if (!tpec.isValid()) {
75 ATH_MSG_DEBUG(
"No truth pileup collection with name " <<
m_truthPileupSGKey.fullKey() <<
" found in StoreGate. Pile-up information will not be filled");
79 if (!truthMuons.isValid()) {
81 return StatusCode::FAILURE;
91 if (dR > minDR)
continue;
97 for (
size_t parti = 0; parti <
event->nTruthParticles(); parti++) {
103 if (dR > minDR)
continue;
109 decorator_dR(*
part) = closest ? std::sqrt(minDR) : -1;
111 int newType{-1}, newOrigin{-1};
112 if (closest && closest->
isMuon()) {
113 newType = acc_tT(*closest);
114 newOrigin = acc_tO(*closest);
115 }
else if (closest) {
118 newOrigin =
res.second;
120 decorator_type(*
part) = newType;
121 decorator_origin(*
part) = newOrigin;
123 decorator_pu_dR(*
part) = -1;
124 decorator_pu_type(*
part) = -1;
125 decorator_pu_origin(*
part) = -1;
129 if (tpec.isValid()) {
131 for (
auto event : *tpec) {
132 for (
size_t parti = 0; parti <
event->nTruthParticles(); parti++) {
138 if (dR > minDR)
continue;
139 closestPileup = tpart;
143 decorator_pu_dR(*
part) = (closestPileup ? std::sqrt(minDR) : -1);
144 int newPileupType{-1}, newPileupOrigin{-1};
147 newPileupType =
res.first;
148 newPileupOrigin =
res.second;
150 decorator_pu_type(*
part) = newPileupType;
151 decorator_pu_origin(*
part) = newPileupOrigin;
155 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::MuonTruthClassifierFallback::initialize |
( |
| ) |
|
|
override |
◆ m_containerKey
◆ m_mcTruthClassifier
ToolHandle<IMCTruthClassifier> DerivationFramework::MuonTruthClassifierFallback::m_mcTruthClassifier {this, "MCTruthClassifierTool", "", "Handle of the MC truth classifier"} |
|
private |
◆ m_minPt
Gaudi::Property<float> DerivationFramework::MuonTruthClassifierFallback::m_minPt {this, "MinPt", 2500} |
|
private |
◆ m_Truth_dR_Key
◆ m_Truth_origin_Key
◆ m_Truth_PU_dR_Key
◆ m_Truth_PU_origin_Key
◆ m_Truth_PU_type_Key
◆ m_Truth_type_Key
◆ m_truthMuonSGKey
◆ m_truthPileupSGKey
Initial value:{this, "TruthPileupContainerKey", "TruthPileupEvents",
"Key of the pile-up event container"}
Definition at line 38 of file MuonTruthClassifierFallback.h.
◆ m_truthSGKey
The documentation for this class was generated from the following files:
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthMuonSGKey
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_Truth_type_Key
SG::ReadHandleKey< xAOD::TruthPileupEventContainer > m_truthPileupSGKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthSGKey
#define ATH_MSG_VERBOSE(x)
double deltaR2(double rapidity1, double phi1, double rapidity2, double phi2)
from bare rapidity,phi
Class providing the definition of the 4-vector interface.
ToolHandle< IMCTruthClassifier > m_mcTruthClassifier
Gaudi::Property< float > m_minPt
POOL::TEvent event(POOL::TEvent::kClassAccess)
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Class describing a truth particle in the MC record.
std::pair< std::vector< unsigned int >, bool > res
Class describing a signal truth event in the MC record.
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_Truth_origin_Key
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_Truth_PU_origin_Key
SG::ReadHandleKey< xAOD::IParticleContainer > m_containerKey
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool isMuon() const
Whether the particle is a muon (or antimuon)
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_Truth_PU_type_Key
virtual double pt() const override final
The transverse momentum ( ) of the particle.
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_Truth_dR_Key
Key properties are overwirrten during initialize.
double charge() const
Physical charge.
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_Truth_PU_dR_Key