|
ATLAS Offline Software
|
Go to the documentation of this file.
48 return StatusCode::SUCCESS;
67 ATH_CHECK( previousDecisionsHandle.isValid() );
68 ATH_MSG_DEBUG(
"Running in precisionElectron step with "<< previousDecisionsHandle->size() <<
" previous decisions");
77 std::vector<ITrigEgammaPrecisionElectronHypoTool::ElectronInfo> toolInput;
81 for (
auto previousDecision: *previousDecisionsHandle ) {
84 auto roiELInfo = TCU::findLink<TrigRoiDescriptorCollection>( previousDecision,
TCU::roiString() );
92 ATH_MSG_DEBUG (
"Precision Electron handle size: " << electronHandle->size() <<
"..." );
95 auto decor_d0 = ViewHelper::makeHandle<float> (*viewEL,
m_decorD0Key, context);
96 auto decor_clEta = ViewHelper::makeHandle<float> (*viewEL,
m_decorClEtaKey, context);
97 auto decor_clPhi = ViewHelper::makeHandle<float> (*viewEL,
m_decorClPhiKey, context);
109 bool hasDecor = decor_d0.isAvailable();
117 size_t validelectrons=0;
123 if( !
el.isValid() ) {
124 ATH_MSG_DEBUG (
"Precision ElectronHandle in position " << ele->index() <<
" -> invalid ElemntLink!. Skipping...");
128 ATH_MSG_DEBUG (
"Precision ElectronHandle in position " << ele->index() <<
" processing...");
140 float avg_mu = eventInfoDecor(0);
142 info.valueDecorator[
"avgmu"] = avg_mu;
157 float avg_mu = eventInfoDecor(0);
159 info.valueDecorator[pidname+
"LHValue"] = lhvalue;
163 info.valueDecorator[pidname+
"LHValue"] = lhvalue;
179 float avg_mu = eventInfoDecor(0);
195 if (acc_d0(*ele) != ele->trackParticle()->d0() ||
196 acc_clEta(*ele) != ele->caloCluster()->etaBE(2) ||
197 acc_clPhi(*ele) != ele->caloCluster()->phiBE(2))
200 << acc_d0(*ele) <<
"<->" << ele->trackParticle()->d0()
201 << acc_clEta(*ele) <<
"<->" << ele->caloCluster()->etaBE(2)
202 << acc_clPhi(*ele) <<
"<->" << ele->caloCluster()->phiBE(2) );
206 decor_d0(*ele) = ele->trackParticle()->d0();
207 decor_clEta(*ele) = ele->caloCluster()->etaBE(2);
208 decor_clPhi(*ele) = ele->caloCluster()->phiBE(2);
211 toolInput.push_back(
info );
216 ATH_MSG_DEBUG(
"Electrons with valid links: " << validelectrons );
222 ATH_MSG_DEBUG(
"Found "<<toolInput.size()<<
" inputs to tools");
228 return StatusCode::SUCCESS;
Group
Properties of a chain group.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_avgMuKey
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.
std::string decorKeyFromKey(const std::string &key)
Extract the decoration part of key.
ElementLink< T > makeLink(const SG::View *view, const SG::ReadHandle< T > &handle, size_t index)
Create EL to a collection in view.
const std::string & hypoAlgNodeName()
StatusCode accept(const xAOD::Muon *mu)
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)
bool isPresent() const
Is the referenced container present in SG?
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...
ToolHandle< GenericMonitoringTool > m_monTool
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_decorClPhiKey
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_decorD0Key
const std::string & key() const
Return the StoreGate ID for the referenced object.
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...
def timer(name, disabled=False)
TrigEgammaPrecisionElectronHypoAlg()
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_decorClEtaKey
PublicToolHandleArray< IAsgElectronLikelihoodTool > m_egammaElectronDNNTools
Handle class for reading a decoration on an object.
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.
Gaudi::Property< std::vector< std::string > > m_cbNames
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Header file to be included by clients of the Monitored infrastructure.
PublicToolHandleArray< IAsgElectronLikelihoodTool > m_egammaElectronLHTools
const std::string & featureString()
Hypothesis algorithms take the output of reco algorithms and the decision from the preceeding InputMa...
Gaudi::Property< std::vector< std::string > > m_dnnNames
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
virtual StatusCode initialize() override
PublicToolHandleArray< IAsgElectronIsEMSelector > m_egammaElectronCBTools
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
#define ATH_MSG_WARNING(x)
ToolHandleArray< ITrigEgammaPrecisionElectronHypoTool > m_hypoTools
const std::string & roiString()
setBGCode setTAP setLVL2ErrorBits bool
const std::string & viewString()
Gaudi::Property< std::vector< std::string > > m_lhNames
virtual StatusCode execute(const EventContext &context) const override