|
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"
24 ATH_MSG_DEBUG(
"z0HalfWidth <= 0: will use the original RoIInput z0HalfWidth" );
35 return StatusCode::SUCCESS;
52 if(RoICaloClusterContainer !=
nullptr) {
53 ATH_MSG_DEBUG(
"Size of vector CaloCluster container is " << RoICaloClusterContainer->
size());
54 if(RoICaloClusterContainer->
empty()) {
59 return StatusCode::FAILURE;
68 float eta = roiDescriptor->
eta();
69 float phi = roiDescriptor->
phi();
73 float zed = roiDescriptor->
zed();
74 float zedPlus = roiDescriptor->
zedPlus();
75 float zedMinus = roiDescriptor->
zedMinus();
83 <<
", Phi = " <<
phi );
86 TLorentzVector myCluster;
87 TLorentzVector TauBarycenter(0., 0., 0., 0.);
90 for (clusterIt=RoICaloClusterContainer->
begin(); clusterIt != RoICaloClusterContainer->
end(); ++clusterIt) {
91 if((*clusterIt)->e() < 0)
94 myCluster.SetPtEtaPhiE((*clusterIt)->pt(), (*clusterIt)->eta(), (*clusterIt)->phi(), (*clusterIt)->e());
95 TauBarycenter += myCluster;
99 TLorentzVector TauDetectorAxis(0.,0.,0.,0.);
100 for (clusterIt=RoICaloClusterContainer->
begin(); clusterIt != RoICaloClusterContainer->
end(); ++clusterIt) {
102 if((*clusterIt)->e() < 0)
105 myCluster.SetPtEtaPhiE((*clusterIt)->pt(), (*clusterIt)->eta(), (*clusterIt)->phi(), (*clusterIt)->e());
109 TauDetectorAxis += myCluster;
113 if(TauDetectorAxis.Eta()!=roiDescriptor->
eta() && TauDetectorAxis.Pt()>0.)
eta = TauDetectorAxis.Eta();
114 if(TauDetectorAxis.Phi()!=roiDescriptor->
phi() && TauDetectorAxis.Pt()>0.)
phi = TauDetectorAxis.Phi();
120 zed, zedMinus, zedPlus);
130 CHECK( outputRoiHandle.
record( std::move( roICollection ) ) );
132 return StatusCode::SUCCESS;
Gaudi::Property< float > m_dRForCenter
Const iterator class for DataVector/DataList.
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roIOutputKey
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].
virtual unsigned int roiWord() const override final
Gaudi::Property< float > m_phiHalfWidth
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
const std::string & key() const
Return the StoreGate ID for the referenced object.
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())
Gaudi::Property< float > m_etaHalfWidth
::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 *)
Athena::TPCnvVers::Current Athena::TPCnvVers::Old TrigRoiDescriptorCollection
virtual unsigned int l1Id() const override final
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual double zed() const override final
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
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roIInputKey
Gaudi::Property< float > m_z0HalfWidth
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
Athena::TPCnvVers::Current TrigRoiDescriptor
const T * at(size_type n) const
Access an element, as an rvalue.
virtual StatusCode execute(const EventContext &ctx) const override
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersKey
virtual double zedPlus() const override final
z at the most forward end of the RoI