Skip to content
Snippets Groups Projects
Commit e0afda55 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'AddL1TE' into 'master'

Add L1TE Info for monitoring

See merge request atlas/athena!42823
parents abaf8f17 6274f086
No related branches found
No related tags found
No related merge requests found
......@@ -48,11 +48,17 @@ def TrigSPTRK(configFlags):
mbEffGroup.defineHistogram( "trkSelOfflineRatio", path="Expert", title="Number of tracks reconstructed offline(selected)/offline; N sel/all", xbins=200, xmin=0.1, xmax=1.9 )
mbEffGroup.defineHistogram( "nTrkOnline,nTrkOffline", type="TH2F", path="Expert", title=";N online tracks;N offline tracks", xbins=200, xmin=0, xmax=400, ybins=400, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "SctTot,nTrkOffline", type="TH2F", title="Number of SP in whole SCT detector for all events;N offline tracks", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "SctTot,nTrkOnline", type="TH2F", title="Number of SP in whole SCT detector for all events;N online tracks", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "PixelCL,nTrkOffline", type="TH2F", title="Number of SP in whole Pixels detector for all events;N offline tracks", xbins=100, xmin=0, xmax=4000, ybins=100, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "PixelCL,nTrkOnline", type="TH2F", title="Number of SP in whole Pixels detector for all events;N online tracks", xbins=100, xmin=0, xmax=4000, ybins=100, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "SctTot,PixelCL", type="TH2F", title="Number of SP in whole SCT detector for all events;Number of SP in whole Pixels detector for all events", xbins=100, xmin=0, xmax=4000, ybins=100, ymin=0, ymax=4000 )
mbEffGroup.defineHistogram( "SctTot,nTrkOffline", type="TH2F", title=";Number of SP in whole SCT detector for all events;N offline tracks", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "SctTot,nTrkOnline", type="TH2F", title=";Number of SP in whole SCT detector for all events;N online tracks", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "PixelCL,nTrkOffline", type="TH2F", title=";Number of SP in whole Pixels detector for all events;N offline tracks", xbins=100, xmin=0, xmax=4000, ybins=100, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "PixelCL,nTrkOnline", type="TH2F", title=";Number of SP in whole Pixels detector for all events;N online tracks", xbins=100, xmin=0, xmax=4000, ybins=100, ymin=0, ymax=400 )
mbEffGroup.defineHistogram( "SctTot,PixelCL", type="TH2F", title=";Number of SP in whole SCT detector for all events;Number of SP in whole Pixels detector for all events", xbins=100, xmin=0, xmax=4000, ybins=100, ymin=0, ymax=4000 )
mbEffGroup.defineHistogram( "L1sumEt", title=";L1 Total ET [GeV] ;Events", xbins=52, xmin=-2, xmax=50 )
mbEffGroup.defineHistogram( "nTrkOffline,L1sumEt", type="TH2F", title=";Offline Ntrk;L1 Total ET [GeV]", xbins=200, xmin=-1, xmax=400, ybins=52, ymin=-2, ymax=50 )
mbEffGroup.defineHistogram( "nTrkOnline,L1sumEt", type="TH2F", title=";Online Ntrk;L1 Total ET [GeV]", xbins=200, xmin=-1, xmax=400, ybins=52, ymin=-2, ymax=50 )
mbEffGroup.defineHistogram( "SctTot,L1sumEt", type="TH2F", title=";Number of SP in whole SCT detector for all events;L1 Total ET [GeV]", xbins=100, xmin=0, xmax=4000, ybins=52, ymin=-2, ymax=50 )
mbEffGroup.defineHistogram( "PixelCL,L1sumEt", type="TH2F", title=";Number of SP in whole Pixels detector for all events;L1 Total ET [GeV]", xbins=100, xmin=0, xmax=4000, ybins=52, ymin=-2, ymax=50 )
mbSpGroup = monConfig.addGroup(
alg,
......@@ -69,12 +75,12 @@ def TrigSPTRK(configFlags):
mbSpGroup.defineHistogram( "SctECA_SP", title="Number of SCT_SP for all events in ECA", xbins=250, xmin=0, xmax=5000 )
mbSpGroup.defineHistogram( "SctECC_SP", title="Number of SCT_SP for all events in ECC", xbins=250, xmin=0, xmax=5000 )
# expert plots
mbSpGroup.defineHistogram( "SctECA_SP,SctECC_SP", type="TH2F", title="SctECA_SP;SctECC_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "PixECA_SP,PixECC_SP", type="TH2F", title="PixECA_SP;PixECC_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctBarr_SP,PixBarr_SP", type="TH2F", title="SctBarr_SP;PixBarr_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctECA_SP,PixECA_SP", type="TH2F", title="SctECA_SP;PixECA_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctECC_SP,PixECC_SP", type="TH2F", title="SctECC_SP;PixECC_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctTot,PixelCL", type="TH2F", title="Number of SP in whole SCT detector for all events;Number of SP in whole Pixels detector for all events", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctECA_SP,SctECC_SP", type="TH2F", title=";SctECA_SP;SctECC_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "PixECA_SP,PixECC_SP", type="TH2F", title=";PixECA_SP;PixECC_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctBarr_SP,PixBarr_SP", type="TH2F", title=";SctBarr_SP;PixBarr_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctECA_SP,PixECA_SP", type="TH2F", title=";SctECA_SP;PixECA_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctECC_SP,PixECC_SP", type="TH2F", title=";SctECC_SP;PixECC_SP", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
mbSpGroup.defineHistogram( "SctTot,PixelCL", type="TH2F", title=";Number of SP in whole SCT detector for all events;Number of SP in whole Pixels detector for all events", xbins=400, xmin=0, xmax=4000, ybins=400, ymin=0, ymax=4000 )
return monConfig.result()
......
......@@ -19,6 +19,7 @@ StatusCode HLTMinBiasTrkMonAlg::initialize()
ATH_CHECK(m_trkCountsKey.initialize());
ATH_CHECK(m_offlineTrkKey.initialize());
ATH_CHECK(m_onlineTrkKey.initialize());
ATH_CHECK(m_lvl1EnergySumROIKey.initialize() );
return AthMonitorAlgorithm::initialize();
}
......@@ -120,6 +121,13 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext &context) co
auto nMBTrkTrkOfflineRatio = Scalar("trkSelOfflineRatio", (offlineTrkHandle->size() == 0 ? -1 : static_cast<double>(nTrkOffline)/offlineTrkHandle->size() ));
auto L1TEHandle = SG::makeHandle(m_lvl1EnergySumROIKey, context);
ATH_MSG_DEBUG("L1TE monitoring, handle validity " << L1TEHandle.isValid());
float sum_roi_sumEt = 0.;
if (!L1TEHandle.isValid()) sum_roi_sumEt= -1.;
else sum_roi_sumEt = static_cast<float>(L1TEHandle->energyT())/1000.;
auto L1sumEt = Scalar("L1sumEt", sum_roi_sumEt);
auto spCountsHandle = SG::makeHandle(m_spCountsKey, context);
ATH_MSG_DEBUG("SP monitoring, handle validity " << spCountsHandle.isValid());
if (!spCountsHandle.isValid())
......@@ -132,7 +140,6 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext &context) co
return StatusCode::SUCCESS;
}
ATH_CHECK(spCountsHandle->size() == 1); // if object is present then it should have size == 1
for (auto &trig : m_triggerList )
{
if (trigDecTool->isPassed(trig, TrigDefs::requireDecision))
......@@ -163,7 +170,7 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext &context) co
double nTrkRatio = offlineTrkHandle->size() > 0 ? static_cast<double>(offlineTrkHandle->size()) / static_cast<double>(trkCountsHandle->at(0)->getDetail<int>("ntrks")) : -1.0;
auto trkRatio = Scalar("nTrkRatio", nTrkRatio);
fill(trig + "_Tracking", nTrkOffline, nAllTrkOffline, nTrkOnline, decision, whichtrigger, trkRatio, nMBTrkTrkOfflineRatio, pixelCL, PixBarr_SP, PixECA_SP, PixECC_SP, SctTot, SctBarr_SP, SctECA_SP, SctECC_SP);
fill(trig + "_Tracking", nTrkOffline, nAllTrkOffline, nTrkOnline, decision, whichtrigger, trkRatio, nMBTrkTrkOfflineRatio, pixelCL, PixBarr_SP, PixECA_SP, PixECC_SP, SctTot, SctBarr_SP, SctECA_SP, SctECC_SP,L1sumEt);
fill("EffAll", decision, whichtrigger);
}
}
......@@ -177,4 +184,4 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext &context) co
}
return StatusCode::SUCCESS;
}
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#include "TrigDecisionTool/TrigDecisionTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
#include "xAODTrigger/EnergySumRoI.h"
// STL includes
#include <string>
......@@ -35,6 +36,8 @@ private:
SG::ReadHandleKey<xAOD::TrigCompositeContainer> m_trkCountsKey { this, "TrkCountsKey", "HLT_TrackCount", "Name of Online track counts info object produced by the HLT track counting FEX algorithm" };
SG::ReadHandleKey<xAOD::TrackParticleContainer> m_offlineTrkKey { this, "OfflineTrkKey", "InDetTrackParticles", "Name of Offline track counts info object produced by the HLT track counting FEX algorithm" };
SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrkKey { this, "OnlineTrkKey", "HLT_IDTrack_MinBias_IDTrig", "Name of track counts info object produced by the HLT track counting FEX algorithm" };
SG::ReadHandleKey<xAOD::EnergySumRoI> m_lvl1EnergySumROIKey { this, "lvl1EnergySumROIKey", "LVL1EnergySumRoI", "Name of Sum of Energy info object produced by the HLT track counting FEX algorithm" };
Gaudi::Property<std::vector<std::string>> m_triggerList{this, "triggerList",{}, "Add triggers to this to be monitored"};
ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelectionTool {this, "TrackSelectionTool", "InDetTrackSelectionTool", "Tool for selecting tracks"};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment