11#include "CaloGeoHelpers/CaloSampling.h"
16using Athena::Units::GeV;
76 StatusCode
sc = StatusCode::SUCCESS;
79 bool passBeamBackgroundRemoval = 0;
81 if(
sc.isFailure() || !ifPass)
return StatusCode::SUCCESS;
85 int lumiBlock = ctx.eventID().lumi_block();
86 int bcid = ctx.eventID().bunch_crossing_id();
88 bool thisEvent_bool_pedestalMon =
false;
89 bool thisEvent_bool_bcidtoolMon =
false;
94 ATH_MSG_WARNING(
"Failed to retrieve Bunch Crossing data, no monitoring in this event");
95 return StatusCode::SUCCESS;
101 if(!bunchCrossing->
isInTrain(bcid)) thisEvent_bool_pedestalMon =
true;
110 ATH_MSG_DEBUG(thisEvent_bool_pedestalMon<<
" "<<thisEvent_bool_bcidtoolMon);
112 if (not (thisEvent_bool_pedestalMon or thisEvent_bool_bcidtoolMon))
return sc;
122 std::vector<std::vector<float>> sum_partition_eta;
130 sum_partition_eta[iPart][iEta] = 0.;
137 for ( ; it!=it_e;++it) {
142 float energy = cell->energy();
143 double eta = cell->caloDDE()->eta_raw();
145 int partThisAlgo = 0;
154 sum_partition_eta[partThisAlgo][etaBin] += energy;
161 if (thisEvent_bool_pedestalMon ) {
177 if (thisEvent_bool_bcidtoolMon ) {
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Wrapper to avoid constant divisions when using units.
const ServiceHandle< StoreGateSvc > & detStore() const
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
int distanceFromFront(const bcid_type bcid, const BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the front of the train.
@ BunchCrossings
Distance in units of 25 nanoseconds.
bool isInTrain(const bcid_type bcid) const
Function deciding if a given bunch crossing is in a filled train.
std::vector< float > m_inv_etaBinWidth
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
std::vector< std::vector< int > > m_histoGroups
Gaudi::Property< std::string > m_MonGroupName
Gaudi::Property< std::vector< float > > m_etaMin
virtual StatusCode initialize() override final
initialize
Gaudi::Property< int > m_bcidtoolMon_BCIDmax
Gaudi::Property< std::vector< float > > m_etaMax
Gaudi::Property< std::vector< uint > > m_nbOfEtaBins
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
std::vector< int > m_partMap
Gaudi::Property< std::vector< std::string > > m_partNames
CaloBaselineMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
std::vector< float > m_etaBinWidth
Gaudi::Property< int > m_pedestalMon_BCIDmin
Data object for each calorimeter readout cell.
virtual StatusCode initialize()
initialize
StatusCode checkFilters(bool &ifPass, bool &passBeamBackgroundRemoval, const std::string &MonGroupName, const EventContext &ctx) const
const CaloCell_ID * m_calo_id
DataModel_detail::const_iterator< DataVector > const_iterator
Declare a monitored scalar variable.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average mu, i.e.
std::vector< V > buildToolMap(const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, int nHist)
Builds an array of indices (base case)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
void fill(H5::Group &out_file, size_t iterations)