7#include "CaloDetDescr/CaloDetDescrElement.h"
10#include "Identifier/Identifier.h"
35 ATH_MSG_WARNING(
"UseTrigger set to true but no trigger names given! Forcing useTrigger to false");
39 ATH_MSG_DEBUG(
"CaloClusterCellMonAlg::initialize() is done!");
41 return StatusCode::SUCCESS;
55 if(!chainName.empty()) {
77 ATH_MSG_DEBUG(
"CaloClusterCellMonAlg::fillHistograms() starts");
89 bool passBeamBackgroundRemoval =
true;
91 if(!ifPass)
return StatusCode::SUCCESS;
100 std::vector<unsigned> hitMap(
m_calo_id->calo_cell_hash_max(), 0);
101 std::vector<std::pair<IdentifierHash, float> > clusteredCells;
106 auto cellIt = cluster->cell_begin();
107 auto cellIt_e = cluster->cell_end();
108 clusteredCells.clear();
109 clusteredCells.reserve(cluster->size());
110 for (; cellIt != cellIt_e; ++cellIt) {
112 if (hash < hitMap.size()) {
113 const float cellE = cellIt->energy();
114 clusteredCells.emplace_back(std::make_pair(hash, cellE));
122 [](
const std::pair<IdentifierHash, float>& p1,
123 const std::pair<IdentifierHash, float>& p2) {
124 return (p1.second > p2.second);
129 for (
const auto& cc : clusteredCells) {
136 if (
h<hitMap.size() && hitMap[
h]) {
137 float celleta, cellphi;
138 unsigned iLyr, iLyrNS;
139 std::string layerName;
144 const HWIdentifier chid=cabling->createSignalChannelID(caloDDE->identify());
151 celleta=caloDDE->eta_raw();
152 cellphi=caloDDE->phi_raw();
153 iLyr=caloDDE->getSampling();
154 if (iLyr<12 || iLyr>20 ) {
156 return StatusCode::FAILURE;
159 layerName += (celleta>0) ?
"A" :
"C";
163 if (caloDDE->onl2() != 64000) {
164 mon_tileOnl=caloDDE->onl2();
177 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
Definition of CaloDetDescrManager.
const ServiceHandle< StoreGateSvc > & detStore() const
Header file for AthHistogramAlgorithm.
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
Gaudi::Property< unsigned > m_nCellsPerCluster
StringArrayProperty m_layerNames
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< float > m_clusterECut
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
virtual StatusCode initialize() override final
initialize
const std::array< std::string, 9 > m_tileNames
Gaudi::Property< std::string > m_MonGroupName
const LArOnlineID * m_onlineID
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
void checkTrigger() const
std::array< StringProperty, NOTA > m_triggerNames
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
BooleanProperty m_useTrigger
This class groups all DetDescr information related to a CaloCell.
calo_element_range element_range() const
Range over element vector.
This class provides the client interface for accessing the detector description information common to...
StatusCode checkFilters(bool &ifPass, bool &passBeamBackgroundRemoval, const std::string &MonGroupName, const EventContext &ctx) const
void getHistoCoordinates(const CaloDetDescrElement *dde, float &celleta, float &cellphi, unsigned &iLyr, unsigned &iLyrNS) const
virtual StatusCode initialize() override
initialize
const CaloCell_ID * m_calo_id
This is a "hash" representation of an Identifier.
Declare a monitored scalar variable.
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
void partial_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > mid, DataModel_detail::iterator< DVL > end)
Specialization of partial_sort for DataVector/List.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
void fill(H5::Group &out_file, size_t iterations)