|
ATLAS Offline Software
|
Go to the documentation of this file.
38 return StatusCode::SUCCESS;
43 ATH_MSG_INFO(
"Statistics of X->VV, V->decay scanning all ancestors of V in order to find X");
48 return StatusCode::SUCCESS;
53 bool okPDGChild1 =
false;
54 bool okPDGChild2 =
false;
63 <<
" found in StoreGate!");
64 return StatusCode::FAILURE;
69 unsigned int nPart = (*itr)->nTruthParticles();
70 for (
unsigned int iPart = 0; iPart < nPart; ++iPart)
84 ATH_MSG_DEBUG(
"Result " << nGoodParent <<
" " << okPDGChild1 <<
" " << okPDGChild2);
89 if (okPDGChild1 && okPDGChild2)
92 return StatusCode::SUCCESS;
97 setFilterPassed(
false);
98 return StatusCode::SUCCESS;
126 auto pitr_current = pitr;
152 bool isGrandParentOK =
false;
163 for (
size_t thisMother_id = 0; thisMother_id < pitr->
prodVtx()->nIncomingParticles(); thisMother_id++)
171 isGrandParentOK =
true;
189 int targetPDGID,
bool &okPDGChild1,
bool &okPDGChild2)
193 for (
size_t thisMother_id = 0; thisMother_id < searchvertex->
nOutgoingParticles(); thisMother_id++)
197 if (std::abs(thisAncestor->pdgId()) == targetPDGID)
199 FindAncestor(thisAncestor->decayVtx(), targetPDGID, okPDGChild1, okPDGChild2);
def retrieve(aClass, aKey=None)
size_t nOutgoingParticles() const
Get the number of outgoing particles.
bool RunHistory(const xAOD::TruthParticle *pitr)
Const iterator class for DataVector/DataList.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual StatusCode filterEvent()
std::vector< int > m_PDGChild1
std::vector< int > m_PDGChild2
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Base class for event generator filtering modules.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
void FindAncestor(const xAOD::TruthVertex *searchvertex, int targetPDGID, bool &okPDGChild1, bool &okPDGChild2)
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
xAODXtoVVDecayFilterExtended(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode filterInitialize()
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Class describing a truth vertex in the MC record.
virtual StatusCode filterFinalize()
const xAOD::TruthParticle * CheckGrandparent(const xAOD::TruthParticle *pitr, int &)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
int status() const
Status code.
size_t nIncomingParticles() const
Get the number of incoming particles.
int pdgId() const
PDG ID code.
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.