|
ATLAS Offline Software
|
Go to the documentation of this file.
13 ISvcLocator* pSvcLocator ) :
23 return StatusCode::SUCCESS;
30 ATH_CHECK( previousDecisionsHandle.isValid() );
31 ATH_MSG_DEBUG(
"Running with "<< previousDecisionsHandle->size() <<
" previous decisions");
36 std::map<const xAOD::TrigEMCluster*, size_t> clusterToIndexMap;
37 size_t clusterCounter = 0;
38 for (
auto previousDecision : *previousDecisionsHandle){
39 auto clusterELInfo = TCU::findLink<xAOD::TrigEMClusterContainer>( previousDecision,
"feature" );
41 if( not clusterELInfo.isValid() ) {
46 return StatusCode::FAILURE;
49 clusterToIndexMap.insert( std::make_pair( cluster, clusterCounter ) );
52 ATH_MSG_DEBUG(
"Cluster ptr to decision map has size " << clusterToIndexMap.size() );
58 std::vector<TrigEgammaFastPhotonHypoTool::PhotonInfo> hypoToolInput;
60 for (
auto previousDecision: *previousDecisionsHandle ) {
67 size_t photonCounter = 0;
71 ATH_MSG_DEBUG (
"electron handle size: " << photonsHandle->size() <<
"..." );
73 for (
auto photonIter = photonsHandle->begin(); photonIter != photonsHandle->end(); ++photonIter, photonCounter++ ) {
75 d->setObjectLink(
TCU::featureString(), ViewHelper::makeLink<xAOD::TrigPhotonContainer>( *viewEL, photonsHandle, photonCounter ) );
77 auto clusterPtr = (*photonIter)->emCluster();
83 auto origCluster = clusterToIndexMap.find( clusterPtr );
84 ATH_CHECK( origCluster != clusterToIndexMap.end() );
91 TCU::decisionIDs( previousDecisionsHandle->at( origCluster->second ), clusterDecisionIDs );
104 return StatusCode::SUCCESS;
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
const std::string & hypoAlgNodeName()
TrigEgammaFastPhotonHypoAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandle< T > makeHandle(const SG::View *view, const SG::ReadHandleKey< T > &rhKey, const EventContext &context)
navigate from the TrigComposite to nearest view and fetch object from it
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
const OBJECT * object(const std::string &name) const
Get a bare pointer with the requested name.
const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > & decisionInput() const
methods for derived classes to access handles of the base class input other read/write handles may be...
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & decisionOutput() const
methods for derived classes to access handles of the base class output other read/write handles may b...
SG::ReadHandleKey< xAOD::TrigPhotonContainer > m_photonsKey
virtual StatusCode initialize() override
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
StatusCode hypoBaseOutputProcessing(SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle, MSG::Level lvl=MSG::DEBUG) const
Base class function to be called once slice specific code has finished. Handles debug printing and va...
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
Class used to describe composite objects in the HLT.
virtual StatusCode execute(const EventContext &context) const override
const std::string & featureString()
Hypothesis algorithms take the output of reco algorithms and the decision from the preceeding InputMa...
ToolHandleArray< TrigEgammaFastPhotonHypoTool > m_hypoTools
const std::string & name() const
Get a human-readable name for the object.
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
std::set< DecisionID > DecisionIDContainer
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Description of a trigger EM cluster.
const std::string & viewString()