11#include "CaloDetDescr/CaloDetDescrElement.h"
13#include "Identifier/Identifier.h"
68 return StatusCode::SUCCESS;
81 return StatusCode::SUCCESS;
86 if(!superCellRefCont){
88 return StatusCode::SUCCESS;
94 if (!hSCetRecoContainer.
isValid()) {
95 ATH_MSG_ERROR(
"The requested SC ET reco container key could not be retrieved. !!!");
97 superCellRecoCont = hSCetRecoContainer.
cptr();
98 ATH_MSG_DEBUG(
"SCetRecoContainer.size() " << hSCetRecoContainer->size());
114 unsigned int bcid = ctx.eventID().bunch_crossing_id();
123 std::vector<std::vector<std::string> > nameHistos;
125 nameHistos.insert(nameHistos.end(),
126 {
"superCellEt_"+layerName,
127 "superCelltime_"+layerName,
128 "superCellprovenance_"+layerName,
129 "superCellEta_"+layerName,
130 "superCellPhi_"+layerName,
131 "resolution_"+layerName,
132 "resolutionPass_"+layerName,
133 "resolutionHET_"+layerName,
134 "superCellEtRef_"+layerName,
135 "superCelltimeRef_"+layerName,
136 "superCellprovenanceRef_"+layerName,
137 "superCellEtDiff_"+layerName});
146 std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> variables;
148 for ( ; SCit!=SCit_e;++SCit) {
155 float SCet = superCell->
et();
158 unsigned iLyr, iLyrNS;
159 float SCt = superCell->
time();
168 if (not superCellRef){
169 ATH_MSG_WARNING(
"cell not found in LArSuperCellMonAlg::fillHistograms");
172 float SCetRef = superCellRef->
et();
173 float SCetDiff = SCet - SCetRef;
174 float resolution = -1000;
175 float resolutionPass = -1000;
176 float resolutionHET = -1000;
178 if ( SCpassTime || SCpassPF ) resolutionPass = resolution;
179 if ( SCet > 4e3 ) resolutionHET=resolution;
221 if ( SCpassTime || SCpassPF ) variables.push_back(LMSCtRef);
223 variables.insert(variables.end(),
250 float SCetReco = superCellReco->
et();
251 float SCtimeReco = superCellReco->
time();
252 MSCtReco = SCtimeReco;
253 MSCetReco = SCetReco;
254 LMSCtReco = SCtimeReco;
256 variables.insert(variables.end(),
269 return StatusCode::SUCCESS;
279 return StatusCode::SUCCESS;
291 if(!doDatabaseNoisePlot) {
293 return StatusCode::SUCCESS;
301 for ( ; it!=it_e;++it) {
305 if(!is_lar)
continue;
307 float celleta, cellphi;
308 unsigned iLyr, iLyrNS;
322 return StatusCode::SUCCESS;
329 for (
const auto& c : input) {
330 output.push_back(std::tolower(c));
358 const unsigned side=(celleta>0) ? 0 : 1;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Definition of CaloDetDescrManager.
Wrapper to avoid constant divisions when using units.
const ServiceHandle< StoreGateSvc > & detStore() const
virtual StatusCode initialize() override
initialize
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
@ BunchCrossings
Distance in units of 25 nanoseconds.
Container class for CaloCell.
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
Data object for each calorimeter readout cell.
float time() const
get time (data member)
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
uint16_t provenance() const
get provenance (data member)
virtual double et() const override final
get et
This class groups all DetDescr information related to a CaloCell.
IdentifierHash identifyHash() const override final
cell subcalo hash same as subcalo_hash(), but kept for backward compatibility
float eta_raw() const
cell eta_raw
CaloCell_ID::CaloSample getSampling() const
cell sampling
Identifier identify() const override final
cell identifier
float phi_raw() const
cell phi_raw
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
BooleanProperty m_removeMasked
BooleanProperty m_doSCReco
LArSuperCellMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override final
initialize
Gaudi::Property< std::string > m_MonGroupName
SG::ReadHandleKey< CaloCellContainer > m_superCellContainerKey
FloatProperty m_thresholdsForResolution
StatusCode createPerJobHistograms(const CaloCellContainer *cellcont, const CaloNoise *noisep) const
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
SG::ReadHandleKey< CaloCellContainer > m_superCellContainerRefKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
void getHistoCoordinates(const CaloDetDescrElement *dde, float &celleta, float &cellphi, unsigned &iLyr, unsigned &iLyrNS) const
const std::map< unsigned, LayerEnumNoSides > m_caloSamplingToLyrNS
const CaloCell_ID * m_calo_id
StringArrayProperty m_layerNames
std::string strToLower(const std::string &input) const
SG::ReadHandleKey< CaloCellContainer > m_superCellContainerRecoKey
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
Property: Bunch crossing data (MC only) (conditions input).
BooleanProperty m_doDatabaseNoiseVsEtaPhi
Declare a monitored scalar variable.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
bool test(const uint16_t prov, const LArProvenance check)
void fill(H5::Group &out_file, size_t iterations)