11#include <boost/dynamic_bitset.hpp>
13using Gaudi::Units::GeV;
19 ISvcLocator * pSvcLocator) :
52 return StatusCode::FAILURE;
61 for (
const ToolHandle<ITauToolBase>& tool :
m_tools) {
69 return StatusCode::SUCCESS;
79 ATH_CHECK(tauHandle.
record(std::make_unique<xAOD::TauJetContainer>(), std::make_unique<xAOD::TauJetAuxContainer>()));
83 ATH_CHECK(tauTrackHandle.
record(std::make_unique<xAOD::TauTrackContainer>(), std::make_unique<xAOD::TauTrackAuxContainer>()));
87 boost::dynamic_bitset<> addedCellsMap;
92 Pi0CellContainer = tauPi0CellHandle.
ptr();
97 addedCellsMap.resize(hashMax,
false);
103 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << jetHandle.
key());
104 return StatusCode::FAILURE;
113 for (
const xAOD::Jet* pSeed : *pSeedContainer) {
114 ATH_MSG_VERBOSE(
"Seeds eta:" << pSeed->eta() <<
", pt:" << pSeed->pt());
116 if (std::abs(pSeed->eta()) >
m_maxEta) {
131 pTau->
setJet(pSeedContainer, pSeed);
137 for (
const ToolHandle<ITauToolBase>& tool :
m_tools) {
138 ATH_MSG_DEBUG(
"ProcessorAlg Invoking tool " << tool->name());
140 if (tool->type() ==
"TauVertexFinder") {
141 sc = tool->executeVertexFinder(*pTau);
142 }
else if (tool->type() ==
"TauTrackFinder") {
143 sc = tool->executeTrackFinder(*pTau, *pTauTrackCont);
144 }
else if (tool->type() ==
"tauRecTools::TauTrackRNNClassifier") {
145 sc = tool->executeTrackClassifier(*pTau, *pTauTrackCont);
151 sc = StatusCode::FAILURE;
154 }
else if (tool->type() ==
"TauPi0CreateROI") {
155 sc = tool->executePi0CreateROI(*pTau, *Pi0CellContainer, addedCellsMap);
157 sc = tool->execute(*pTau);
163 if (
sc.isSuccess()) {
176 if(Pi0CellContainer) {
190 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
DataVector< INavigable4Momentum > INavigable4MomentumCollection
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
Container class for CaloCell.
CaloCellContainer that can accept const cell pointers.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
const T * back() const
Access the last element in the collection as an rvalue.
void pop_back()
Remove the last element from the collection.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
iterator erase(iterator position)
Remove element at a given position.
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
virtual StatusCode initialize()
Gaudi::Property< double > m_minPt
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Gaudi::Property< int > m_maxNTracks
const ToolHandle< ICaloConstCellMakerTool > m_cellMakerTool
SG::WriteHandleKey< CaloConstCellContainer > m_tauPi0CellOutputContainer
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
const ToolHandleArray< ITauToolBase > m_tools
SG::ReadHandleKey< xAOD::JetContainer > m_jetInputContainer
SG::WriteHandleKey< xAOD::TauTrackContainer > m_tauTrackOutputContainer
virtual StatusCode execute(const EventContext &ctx) const
SG::WriteHandleKey< xAOD::TauJetContainer > m_tauOutputContainer
const CaloCell_ID * m_cellID
TauProcessorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< double > m_maxEta
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleContKey
void setJet(const xAOD::JetContainer *cont, const xAOD::Jet *jet)
size_t nAllTracks() const
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Jet_v1 Jet
Definition of the current "jet version".
TauJet_v3 TauJet
Definition of the current "tau version".
TauTrackContainer_v1 TauTrackContainer
Definition of the current TauTrack container version.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".