Skip to content
Snippets Groups Projects

Allow to take into account grand parents in ClusterEfficiency algorithm

Merged Konrad Klimaszewski requested to merge aszabels_pi0_efficiency into master
1 file
+ 8
2
Compare changes
  • Side-by-side
  • Inline
@@ -110,9 +110,14 @@ namespace LHCb::Calo::Algorithms {
// select signal as defined by m_PDGID and m_PDGIDParent
if ( !mcp ) continue;
if ( mcp->particleID().pid() != m_PDGID ) continue;
if ( !mcp->mother() || abs( mcp->mother()->particleID().pid() ) != m_PDGIDParent ) continue;
auto mcp_mother = mcp->mother();
if ( !mcp_mother || abs( mcp_mother->particleID().pid() ) != m_PDGIDParent ) continue;
if ( m_PDGIDGrandparent &&
( !mcp_mother->mother() || abs( mcp_mother->mother()->particleID().pid() ) != m_PDGIDGrandparent ) )
continue;
if ( msgLevel( MSG::DEBUG ) )
debug() << "MC particle and parent ID are: " << m_PDGID << ", " << m_PDGIDParent << endmsg;
debug() << "MC particle, parent and grandparent ID are: " << m_PDGID << ", " << m_PDGIDParent << " and "
<< m_PDGIDGrandparent << endmsg;
// apply min ET cut
if ( mcp->pt() < m_minET ) continue;
@@ -220,6 +225,7 @@ namespace LHCb::Calo::Algorithms {
// properties
Gaudi::Property<int> m_PDGID{this, "PDGID", 22};
Gaudi::Property<int> m_PDGIDParent{this, "PDGIDParent", 511};
Gaudi::Property<int> m_PDGIDGrandparent{this, "PDGIDGrandparent", 0};
Gaudi::Property<float> m_minMCfraction{this, "minMCfraction", 0.9};
Gaudi::Property<float> m_minMatchFraction{this, "minMatchFraction", 0.9};
Gaudi::Property<float> m_minET{this, "minET", 50.};
Loading