 |
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");
36 ATH_MSG_DEBUG(
"CaloClusterCellMonAlg::initialize() is done!");
38 return StatusCode::SUCCESS;
74 ATH_MSG_DEBUG(
"CaloClusterCellMonAlg::fillHistograms() starts");
86 bool passBeamBackgroundRemoval =
true;
88 if(!ifPass)
return StatusCode::SUCCESS;
98 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) {
121 return (p1.second > p2.second);
126 for (
const auto&
cc : clusteredCells) {
133 if (
h<hitMap.size() && hitMap[
h]) {
134 float celleta, cellphi;
135 unsigned iLyr, iLyrNS;
136 std::string layerName;
148 celleta=caloDDE->eta_raw();
149 cellphi=caloDDE->phi_raw();
150 iLyr=caloDDE->getSampling();
151 if (iLyr<12 || iLyr>20 ) {
155 layerName += (celleta>0) ?
"A" :
"C";
159 if (caloDDE->onl2() != 64000) {
160 mon_tileOnl=caloDDE->onl2();
173 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
StatusCode checkFilters(bool &ifPass, bool &passBeamBackgroundRemoval, const std::string &MonGroupName, const EventContext &ctx) const
calo_element_range element_range() const
Range over element vector.
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
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
Definition of CaloDetDescrManager.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
StringArrayProperty m_layerNames
Description of a calorimeter cluster.
Gaudi::Property< std::string > m_MonGroupName
Gaudi::Property< unsigned > m_nCellsPerCluster
size_type calo_cell_hash_max() const
cell 'global' hash table max size
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
std::array< StringProperty, NOTA > m_triggerNames
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 getHistoCoordinates(const CaloDetDescrElement *dde, float &celleta, float &cellphi, unsigned &iLyr, unsigned &iLyrNS) const
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
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< float > m_clusterECut
const std::array< std::string, 9 > m_tileNames
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Declare a monitored scalar variable.
const LArOnlineID * m_onlineID
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
void checkTrigger() const