3#include "GaudiKernel/StatusCode.h"
4#include "AthLinks/ElementLink.h"
28 return StatusCode::SUCCESS;
37 ATH_CHECK( trigEmClusterCollection.
record(std::make_unique<xAOD::TrigEMClusterContainer>(),
38 std::make_unique<xAOD::TrigEMClusterAuxContainer>()) );
43 if (!roisHandle.isValid()) {
45 return StatusCode::SUCCESS;
48 trigEmClusterCollection->reserve(roisHandle->size());
51 ATH_MSG_DEBUG(
"RoI descriptor size is " << roisHandle->size() );
56 double etamin, etamax, phimin, phimax;
58 ATH_MSG_INFO(
"RoI eta = " << roiDescriptor->eta() <<
" RoI phi = " << roiDescriptor->phi());
61 etamin = std::max( -3.2 , roiDescriptor->eta() -
m_etaWidth);
62 etamax = std::min( 3.2 , roiDescriptor->eta() +
m_etaWidth);
67 etaL1 = roiDescriptor->eta();
68 phiL1 = roiDescriptor->phi();
71 roiDescriptor->phi(), phimin, phimax);
74 ATH_MSG_DEBUG(
" etamin = " << etamin <<
" etamax = " << etamax <<
75 " phimin = " << phimin <<
" phimax = " << phimax);
78 trigEmClusterCollection->push_back(ptrigEmCluster);
80 ptrigEmCluster->
setEt(0.0);
98 for (
int i = 0; i < CaloSampling::CaloSample::MINIFCAL0; i++) {
103 ptrigEmCluster->
setEta(etaL1);
104 ptrigEmCluster->
setPhi(phiL1);
107 ptrigEmCluster->
setRoIword(roiDescriptor->roiWord());
112 ATH_CHECK( tool->execute(*ptrigEmCluster, newroi, caloDDE, context) );
120 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Header file to be included by clients of the Monitored infrastructure.
An algorithm that can be simultaneously executed in multiple threads.
This class groups all DetDescr information related to a CaloCell.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
T2CaloEgammaForwardReFastAlgo(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< GenericMonitoringTool > m_monTool
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
virtual StatusCode execute(const EventContext &context) const override
SG::WriteHandleKey< xAOD::TrigEMClusterContainer > m_clusterContainerKey
Gaudi::Property< double > m_phiWidth
Gaudi::Property< double > m_etaWidth
SG::ReadHandleKey< CaloBCIDAverage > m_bcidAvgKey
virtual StatusCode initialize() override
ToolHandleArray< IReAlgToolCalo > m_emAlgTools
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
void setNCells(int)
set number of cells used from RoI
void setRoIword(long)
set RoI Word
void setRawPhi(float)
set Raw Phi (no calibration)
void setRawEnergy(float)
set Raw Energy (no calibration)
void setRawEta(float)
set Raw Eta (no calibration)
void setRawEt(float)
set Raw Et (no calibration)
void setPhi(float)
set Phi (calibrated)
void setEta(float)
set Eta (calibrated)
void setEt(float)
set Et (calibrated)
void setEhad1(float)
set hadronic Energy (first hadronic layer)
void setWeta2(float)
set cluster width (based on a 3x5 cluster - 2nd layer)
void setEnergy(float energy)
set Energy (calibrated)
void setE2tsts1(float)
set second maximum energy in sampling 1 (strip layer)
void setE237(float)
set Energy in a 3x7 cluster (no calibration) around hottest cell
void setE277(float)
set Energy in a 7x7 cluster (no calibration) around hottest cell
void setEmaxs1(float)
set maximum energy in sampling 1 (strip layer)
void setFracs1(float)
set Energy in a 7 strips (around hottest strip) minus energy in 3 strips divided by energy in 3 strip...
void setWstot(float)
set width in first layer
void setE233(float)
set Energy in a 3x3 cluster (no calibration) around hottest cell
void setEta1(float)
set Eta sampling 1 (strip layer)
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.
Helper for azimuthal angle calculations.