|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CaloDetDescr/CaloDetDescrElement.h"
9 #include "Identifier/Identifier.h"
32 ATH_MSG_WARNING(
"UseTrigger set to true but no trigger names given! Forcing useTrigger to false");
38 return StatusCode::SUCCESS;
74 ATH_MSG_DEBUG(
"LArClusterCellMonAlg::fillHistograms() starts");
86 bool passBeamBackgroundRemoval =
true;
88 if(!ifPass)
return StatusCode::SUCCESS;
98 std::vector<unsigned> hitMap(caloCellMax,0);
99 std::vector<std::pair<IdentifierHash,float> > clusteredCells;
103 auto cellIt=cluster->cell_begin();
104 auto cellIt_e=cluster->cell_end();
105 clusteredCells.clear();
106 clusteredCells.reserve(cluster->size());
107 for (;cellIt!=cellIt_e;++cellIt) {
109 if (
hash<hitMap.size()) {
110 const float cellE=cellIt->energy();
111 clusteredCells.emplace_back(std::make_pair(
hash,cellE));
118 std::partial_sort(clusteredCells.begin(),middle,clusteredCells.end(),
119 [](
const std::pair<IdentifierHash,float>&
p1,
120 const std::pair<IdentifierHash,float>&
p2) {return (p1.second>p2.second);});
124 for (
const auto&
cc : clusteredCells) {
132 if (
h<hitMap.size() && hitMap[
h]) {
133 float celleta, cellphi;
134 unsigned iLyr, iLyrNS;
148 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
StatusCode checkFilters(bool &ifPass, bool &passBeamBackgroundRemoval, const std::string &MonGroupName, const EventContext &ctx) const
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
calo_element_range element_range() const
Range over element vector.
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
virtual StatusCode initialize() override final
initialize
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
BooleanProperty m_useTrigger
virtual StatusCode initialize()
initialize
Gaudi::Property< float > m_clusterECut
Definition of CaloDetDescrManager.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Property< unsigned > m_nCellsPerCluster
Description of a calorimeter cluster.
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
std::array< StringProperty, NOTA > m_triggerNames
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
::StatusCode StatusCode
StatusCode definition for legacy code.
const CaloCell_ID * m_calo_id
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void checkTrigger() const
void getHistoCoordinates(const CaloDetDescrElement *dde, float &celleta, float &cellphi, unsigned &iLyr, unsigned &iLyrNS) const
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
StringArrayProperty m_layerNames
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
StatusCode initialize(bool used=true)
This class provides the client interface for accessing the detector description information common to...
#define ATH_MSG_WARNING(x)
Gaudi::Property< std::string > m_MonGroupName
const LArOnlineID * m_onlineID
Declare a monitored scalar variable.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...