|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #include "Gaudi/Property.h"
26 m_lumiBlockMuTool(
"LumiBlockMuTool/LumiBlockMuTool")
46 return StatusCode::SUCCESS;
59 ATH_CHECK( previousDecisionsHandle.isValid() );
60 ATH_MSG_DEBUG(
"Running with "<< previousDecisionsHandle->size() <<
" previous decisions");
63 ATH_MSG_DEBUG(
"Event No.: "<<context.eventID().event_number());
72 std::map<const xAOD::TrigEMCluster*, size_t> clusterToIndexMap;
73 size_t clusterCounter = 0;
74 for (
auto previousDecision : *previousDecisionsHandle){
78 clusterLink = linkInfo.
link;
82 clusterToIndexMap.insert( std::make_pair( cluster, clusterCounter ) );
87 ATH_MSG_DEBUG(
"Cluster ptr to decision map has size " << clusterToIndexMap.size() );
90 std::vector<ITrigEgammaFastElectronHypoTool::ElectronInfo> hypoToolInput;
92 for (
auto previousDecision: *previousDecisionsHandle ) {
98 size_t electronCounter = 0;
101 ATH_MSG_DEBUG (
"electron handle size: " << electronsHandle->size() <<
"..." );
103 for (
auto electronIter = electronsHandle->begin(); electronIter != electronsHandle->end(); ++electronIter, electronCounter++ ) {
106 d->setObjectLink(
featureString(), ViewHelper::makeLink<xAOD::TrigElectronContainer>( *viewEL, electronsHandle, electronCounter ) );
108 auto clusterPtr = (*electronIter)->emCluster();
114 auto origCluster = clusterToIndexMap.find( clusterPtr );
115 ATH_CHECK( origCluster != clusterToIndexMap.end() );
122 auto ringerLink = linkInfo.
link;
132 decisionIDs( previousDecisionsHandle->at( origCluster->second ), clusterDecisionIDs );
134 auto el = *electronIter;
135 auto cl = origCluster->first;
141 info.valueDecorator[
"avgmu"] = avgmu;
144 if(rings &&
cl &&
el){
147 timer_predict.start();
149 timer_predict.stop();
151 info.valueDecorator[pidname+
"NNOutput"] = nnOutput;
156 hypoToolInput.push_back(
info);
168 return StatusCode::SUCCESS;
virtual StatusCode execute(const EventContext &context) const override
TrigEgammaFastElectronHypoAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_runInView
Group
Properties of a chain group.
ElementLink< T > link
Link to the feature.
xAOD::TrigCompositeContainer DecisionContainer
ToolHandleArray< Ringer::IAsgRingerSelectorTool > m_ringerNNTools
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::string & hypoAlgNodeName()
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 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.
ToolHandle< GenericMonitoringTool > m_monTool
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...
bool isValid() const
Test to see if the link can be dereferenced.
def timer(name, disabled=False)
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.
virtual StatusCode initialize() override
Gaudi::Property< std::vector< std::string > > m_pidNames
ToolHandleArray< ITrigEgammaFastElectronHypoTool > m_hypoTools
Header file to be included by clients of the Monitored infrastructure.
xAOD::TrigCompositeAuxContainer DecisionAuxContainer
ElementLink implementation for ROOT usage.
const std::string & featureString()
Hypothesis algorithms take the output of reco algorithms and the decision from the preceeding InputMa...
SG::ReadHandleKey< xAOD::TrigElectronContainer > m_electronsKey
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
std::set< DecisionID > DecisionIDContainer
ToolHandle< ILumiBlockMuTool > m_lumiBlockMuTool
LinkInfo< T > findLink(const Decision *start, const std::string &linkName, const bool suppressMultipleLinksWarning=false)
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision obj...
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Description of a trigger EM cluster.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
const std::string & viewString()