|
ATLAS Offline Software
|
Go to the documentation of this file.
19 return StatusCode::SUCCESS;
27 if ( !eventInfo.isValid() ) {
29 return StatusCode::FAILURE;
36 float avgMuInverse = avgIntPerXing>0 ? 1./avgIntPerXing : 0.;
48 for (
const auto vertex : *vertices ) {
53 for (
size_t i = 0;
i <
vertex->nTrackParticles(); ++
i) {
63 auto nLooseVtxPerAvgMu =
Scalar<float>(
"nLooseVtxPerAvgMu",nLooseVtx*avgMuInverse);
64 auto nTightVtxPerAvgMu =
Scalar<float>(
"nTightVtxPerAvgMu",nTightVtx*avgMuInverse);
67 avgLiveFrac,liveFracPerBCID,lumiWeight,nLooseVtx,nTightVtx,nLooseVtxPerAvgMu,
73 if ( !pixelClusters.
isValid() ) {
75 }
else if ( !pixelID.
isValid() ) {
84 for (
auto cluster : *pixelClusters ) {
87 for (
auto pixel : *cluster ) {
91 if (ec==2) nClustersECA++;
92 else if (ec==-2) nClustersECC++;
95 if (
ld==0) nClustersB0++;
96 else if(
ld==1) nClustersB1++;
97 else if(
ld==2) nClustersB2++;
102 auto nClustersAllPerAvgMu =
Scalar<int>(
"nClustersAllPerAvgMu",nClustersAll*avgMuInverse);
103 auto nClustersECAPerAvgMu =
Scalar<int>(
"nClustersECAPerAvgMu",nClustersECA*avgMuInverse);
104 auto nClustersECCPerAvgMu =
Scalar<int>(
"nClustersECCPerAvgMu",nClustersECC*avgMuInverse);
105 auto nClustersB0PerAvgMu =
Scalar<int>(
"nClustersB0PerAvgMu",nClustersB0*avgMuInverse);
106 auto nClustersB1PerAvgMu =
Scalar<int>(
"nClustersB1PerAvgMu",nClustersB1*avgMuInverse);
107 auto nClustersB2PerAvgMu =
Scalar<int>(
"nClustersB2PerAvgMu",nClustersB2*avgMuInverse);
110 nClustersAll,nClustersECA,nClustersECC,
111 nClustersB0,nClustersB1,nClustersB2,
112 nClustersAllPerAvgMu,nClustersECAPerAvgMu,nClustersECCPerAvgMu,
113 nClustersB0PerAvgMu,nClustersB1PerAvgMu,nClustersB2PerAvgMu);
117 return StatusCode::SUCCESS;
Environment_t environment() const
Accessor functions for the environment.
virtual float livefractionPerBCID(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the live fraction per bunch crossing ID.
virtual float lbInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate instantaneous number of interactions, i.e.
virtual double lbLumiWeight(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average integrated luminosity multiplied by the live fraction.
virtual float lbAverageLuminosity(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.
virtual StatusCode initialize() override
initialize
RHK< xAOD::VertexContainer > m_VertexContainerKey
virtual float lbLuminosityPerBCID(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the instantaneous luminosity per bunch crossing.
Base class for Athena Monitoring Algorithms.
RHK< PixelID > m_PixelIDKey
Generic monitoring tool for athena components.
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
RHK< InDet::PixelClusterContainer > m_PixelClustersKey
int layer_disk(const Identifier &id) const
virtual float lbAverageLivefraction(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average luminosity livefraction.
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average mu, i.e.
virtual StatusCode initialize() override
initialize
#define ATH_MSG_WARNING(x)
DQTLumiMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Declare a monitored scalar variable.
virtual double lbDuration(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the duration of the luminosity block (in seconds)
GP< float > m_tightTrackWeight
const ToolHandle< GenericMonitoringTool > & getGroup(const std::string &name) const
Get a specific monitoring tool from the tool handle array.