9#include "GaudiKernel/IToolSvc.h"
10#include "GaudiKernel/StatusCode.h"
11#include "GaudiKernel/SystemOfUnits.h"
36 return StatusCode::FAILURE;
49 return StatusCode::SUCCESS;
62 std::unique_ptr<TrigRoiDescriptorCollection> roiCollection = std::make_unique<TrigRoiDescriptorCollection>();
72 ATH_MSG_ERROR(
"No tau container found, the Tau RoI updater should not be scheduled");
73 return StatusCode::FAILURE;
83 if(roisHandle->size() != 1) {
85 return StatusCode::FAILURE;
91 const float eta = roiDescriptor->
eta();
92 const float phi = roiDescriptor->
phi();
93 float zed = roiDescriptor->
zed();
94 float zedMinus = roiDescriptor->
zedMinus();
95 float zedPlus = roiDescriptor->
zedPlus();
104 const float hitz_z0 = zDecor(*tau);
108 const float hitz_sigma = sigmaDecor(*tau);
110 ATH_MSG_DEBUG(
"HitZ Tau pt: " << tau->
pt() <<
", eta: " << tau->
eta() <<
", phi: " << tau->
phi() <<
", HitZ z0: " << hitz_z0 <<
", HitZ sigma: " << hitz_sigma);
117 constexpr float invalid_z0 = -1111;
118 if(hitz_z0 != invalid_z0 && tau->
pt() <
m_maxPt * Gaudi::Units::GeV && hitz_sigma <
m_maxSigma) {
130 outputRoIHandle->push_back(std::make_unique<TrigRoiDescriptor>(
132 eta, etaMinus, etaPlus,
133 phi, phiMinus, phiPlus,
134 zed, zedMinus, zedPlus
141 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading a decoration on an object.
An algorithm that can be simultaneously executed in multiple threads.
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual double zed() const override final
virtual double phi() const override final
Methods to retrieve data members.
virtual double zedPlus() const override final
z at the most forward end of the RoI
virtual double zedMinus() const override final
z at the most backward end of the RoI
virtual double eta() const override final
Handle class for reading a decoration on an object.
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
virtual unsigned int roiWord() const override final
virtual unsigned int roiId() const override final
these quantities probably don't need to be used any more
virtual unsigned int l1Id() const override final
Gaudi::Property< float > m_maxSigma
SG::ReadDecorHandleKey< xAOD::TauJetContainer > m_zDecorKey
virtual StatusCode execute(const EventContext &) const override
TrigTauHitZRoiUpdater(const std::string &, ISvcLocator *)
Gaudi::Property< float > m_phiHalfWidth
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauKey
virtual StatusCode initialize() override
Gaudi::Property< float > m_etaHalfWidth
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roIOutputKey
Gaudi::Property< float > m_maxPt
Gaudi::Property< float > m_z0HalfWidth
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roIInputKey
SG::ReadDecorHandleKey< xAOD::TauJetContainer > m_sigmaDecorKey
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
TauJet_v3 TauJet
Definition of the current "tau version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
Helper for azimuthal angle calculations.