30 return StatusCode::SUCCESS;
39 ATH_CHECK( trigPhotoColl.record (std::make_unique<xAOD::TrigPhotonContainer>(),
40 std::make_unique<xAOD::TrigEMClusterAuxContainer>()) );
45 if (roiCollection->size()==0) {
47 return StatusCode::SUCCESS;
53 <<
", Phi = " << (roiDescriptor)->
phi());
56 double etaRef = roiDescriptor->
eta();
57 double phiRef = roiDescriptor->
phi();
59 if ( fabs(phiRef) >
M_PI ) phiRef -= 2*
M_PI;
76 ATH_MSG_ERROR(
"Failed to retieve TrigEMCluster from the ElementLink");
77 return StatusCode::SUCCESS;
80 float dEta = pClus->
eta() - etaRef;
82 float dPhi = fabs(pClus->
phi() - phiRef);
83 dPhi = (dPhi <
M_PI ? dPhi : 2*
M_PI - dPhi );
85 <<
" and dPhi= " << dPhi);
90 trigPhotoColl->push_back(p_trigPhoton);
91 p_trigPhoton->
init( roiDescriptor->
roiId(), dPhi, dEta, EClus);
94 ATH_MSG_DEBUG(
"REGTEST: TrigPhotonContainer has " << trigPhotoColl->size()<<
" element");
95 if (!trigPhotoColl->empty()) {
98 <<
"; eta=" << p_tp->
eta()
99 <<
"; phi=" << p_tp->
phi()
101 <<
"; Had Et=" << p_tp->
etHad()
102 <<
"; EnergyRatio=" << p_tp->
eratio()
103 <<
"; rCore=" << p_tp->
rcore());
105 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
An algorithm that can be simultaneously executed in multiple threads.
ElementLink implementation for ROOT usage.
virtual double phi() const override final
Methods to retrieve data members.
virtual double eta() const override final
SG::ReadHandleKey< xAOD::TrigEMClusterContainer > m_TrigEMClusterContainerKey
TrigEgammaFastPhotonReAlgo(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
SG::WriteHandleKey< xAOD::TrigPhotonContainer > m_outputPhotonsKey
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode initialize() override
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
virtual unsigned int roiId() const override final
these quantities probably don't need to be used any more
float et() const
get Et (calibrated)
float eta() const
get Eta (calibrated)
float phi() const
get Phi (calibrated)
const TrigEMCluster * emCluster() const
The associated EM cluster, as a simple pointer.
virtual double eta() const
The pseudorapidity ( ) of the particle.
uint32_t roiWord() const
Get the RoI word that seeded the reconstruction of this object.
float etHad() const
Documentation to be added.
void init(uint32_t roi, float dphi, float deta, const EMClusterLink_t &clLink)
Initialisation function, setting most properties of the object.
float rcore() const
Documentation to be added.
float eratio() const
Documentation to be added.
virtual double phi() const
The azimuthal angle ( ) of the particle.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TrigPhoton_v1 TrigPhoton
Declare the latest version of TrigPhoton.
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.
setTeId setLumiBlock roiId