|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/MsgStream.h"
8 #include "GaudiKernel/IToolSvc.h"
9 #include "GaudiKernel/StatusCode.h"
14 #include "TLorentzVector.h"
33 return StatusCode::SUCCESS;
46 std::unique_ptr<TrigRoiDescriptorCollection> roiCollection = std::make_unique<TrigRoiDescriptorCollection>();
58 float eta = roiDescriptor->
eta();
59 float phi = roiDescriptor->
phi();
77 if(!RoICaloClusterContainer) {
79 return StatusCode::FAILURE;
82 ATH_MSG_DEBUG(
"Size of vector CaloCluster container is: " << RoICaloClusterContainer->
size());
85 TLorentzVector tau_barycenter;
88 if(cluster->e() < 0)
continue;
90 tau_barycenter += cluster->p4();
94 TLorentzVector tau_detector_axis;
97 if(cluster->e() < 0)
continue;
100 if(tau_barycenter.DeltaR(cluster->p4()) >
m_dRForCenter)
continue;
102 tau_detector_axis += cluster->p4();
112 if(tau_detector_axis.Pt() > 0) {
113 eta = tau_detector_axis.Eta();
114 phi = tau_detector_axis.Phi();
118 outputRoIHandle->
push_back(std::make_unique<TrigRoiDescriptor>(
129 return StatusCode::SUCCESS;
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roIInputKey
Scalar phi() const
phi method
virtual double zedMinus() const override final
z at the most backward end of the RoI
Scalar eta() const
pseudorapidity method
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
Gaudi::Property< float > m_dRForCenter
virtual unsigned int roiWord() const override final
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersKey
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Description of a calorimeter cluster.
::StatusCode StatusCode
StatusCode definition for legacy code.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
TrigTauCaloRoiUpdater(const std::string &, ISvcLocator *)
virtual unsigned int l1Id() const override final
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const T * back() const
Access the last element in the collection as an rvalue.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual double zed() const override final
T deltaPhi(T phiA, T phiB)
Return difference phiA - phiB in range [-pi, pi].
Helper for azimuthal angle calculations.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual unsigned int roiId() const override final
these quantities probably don't need to be used any more
virtual double etaPlus() const override final
gets eta at zedPlus
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual double phi() const override final
Methods to retrieve data members.
virtual StatusCode initialize() override
virtual double eta() const override final
const T * at(size_type n) const
Access an element, as an rvalue.
virtual StatusCode execute(const EventContext &ctx) const override
virtual double phiPlus() const override final
gets phiPlus
virtual double etaMinus() const override final
gets eta at zMinus
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
virtual double phiMinus() const override final
gets phiMinus
size_type size() const noexcept
Returns the number of elements in the collection.
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roIOutputKey
virtual double zedPlus() const override final
z at the most forward end of the RoI