 |
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 EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 59 of file MuonTruthClassifierFallback.cxx.
63 if (!
parts.isValid()) {
65 return StatusCode::FAILURE;
70 return StatusCode::FAILURE;
73 if (!tpec.isValid()) {
74 ATH_MSG_DEBUG(
"No truth pileup collection with name " <<
m_truthPileupSGKey.fullKey() <<
" found in StoreGate. Pile-up information will not be filled");
78 if (!truthMuons.isValid()) {
80 return StatusCode::FAILURE;
90 if (dR > minDR)
continue;
96 for (
size_t parti = 0; parti <
event->nTruthParticles(); parti++) {
102 if (dR > minDR)
continue;
108 decorator_dR(*
part) = closest ? std::sqrt(minDR) : -1;
110 int newType{-1}, newOrigin{-1};
111 if (closest && closest->
isMuon()) {
112 newType = acc_tT(*closest);
113 newOrigin = acc_tO(*closest);
114 }
else if (closest) {
117 newOrigin =
res.second;
119 decorator_type(*
part) = newType;
120 decorator_origin(*
part) = newOrigin;
122 decorator_pu_dR(*
part) = -1;
123 decorator_pu_type(*
part) = -1;
124 decorator_pu_origin(*
part) = -1;
128 if (tpec.isValid()) {
130 for (
auto event : *tpec) {
131 for (
size_t parti = 0; parti <
event->nTruthParticles(); parti++) {
137 if (dR > minDR)
continue;
138 closestPileup = tpart;
142 decorator_pu_dR(*
part) = (closestPileup ? std::sqrt(minDR) : -1);
143 int newPileupType{-1}, newPileupOrigin{-1};
146 newPileupType =
res.first;
147 newPileupOrigin =
res.second;
149 decorator_pu_type(*
part) = newPileupType;
150 decorator_pu_origin(*
part) = newPileupOrigin;
154 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