28 return StatusCode::SUCCESS;
39 std::make_unique<xAOD::MuonAuxContainer>()));
42 ATH_CHECK(previousDecisionHandle.isValid());
43 ATH_MSG_DEBUG(
"Running with " << previousDecisionHandle->size() <<
" previous decisions");
51 std::vector<std::pair<Decision *, const Decision *> > HypoInputs;
55 for (
const auto previousDecision : *previousDecisionHandle)
66 ATH_MSG_DEBUG(
"This decision has " << prevMuons.size() <<
" decisions");
69 if (prevMuons.size() != 1) {
70 ATH_MSG_DEBUG(
"Did not locate exactly one muon for this Decision Object, found " << prevMuons.size());
71 return StatusCode::FAILURE;
74 auto prevMuLink = prevMuons.at(0).link;
76 muonPrev = *prevMuLink;
79 h_TLAMuons->push_back(copiedMuon);
80 *copiedMuon = *muonPrev;
87 ATH_MSG_DEBUG(
"Copied muon with pT: " << copiedMuon->
pt() <<
" from decision " << nDecision);
89 HypoInputs.push_back( std::make_pair(newDecision, previousDecision) );
95 Nmuons = h_TLAMuons->size();
96 auto muonPtMon =
Monitored::Collection(
"Pt", *h_TLAMuons, [](
const auto& t ) {
return t->pt() * t->charge() / Gaudi::Units::GeV; });
104 for (
auto& hypoPair: HypoInputs ){
110 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Header file to be included by clients of the Monitored infrastructure.
ElementLink implementation for ROOT usage.
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...
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...
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...
HypoBase(const std::string &name, ISvcLocator *pSvcLocator)
constructor, to be called by sub-class constructors
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
SG::WriteHandleKey< xAOD::MuonContainer > m_TLAMuonsKey
virtual StatusCode initialize() override
ToolHandle< GenericMonitoringTool > m_monTool
virtual StatusCode execute(const EventContext &context) const override
TrigMuonTLAHypoAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
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 & featureString()
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
void findLinks(const Decision *start, const std::string &linkName, std::vector< LinkInfo< T > > &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr)
search back the TC links for the object of type T linked to the one of TC (recursively) Populates pro...
const std::string & hypoAlgNodeName()
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
xAOD::TrigCompositeContainer DecisionContainer
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".