Skip to content
Snippets Groups Projects
Commit ea245b4d authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'apply-pt-cut-before-eff-calculation' into 'master'

Added cut on offline tracks pt in MinBias HLT tracking perf DQ

See merge request !48288
parents 613ec940 8685dac9
No related branches found
No related tags found
5 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!50012RecExConfig: Adjust log message levels from GetRunNumber and GetLBNumber,!48288Added cut on offline tracks pt in MinBias HLT tracking perf DQ
...@@ -18,4 +18,4 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) ...@@ -18,4 +18,4 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_add_test( ConfigTest atlas_add_test( ConfigTest
SCRIPT python -m TrigMinBiasMonitoring.TrigMinBiasMonitoringMT SCRIPT python -m TrigMinBiasMonitoring.TrigMinBiasMonitoringMT
POST nopost.sh) POST_EXEC_SCRIPT nopost.sh)
\ No newline at end of file \ No newline at end of file
...@@ -28,10 +28,21 @@ if __name__ == "__main__": ...@@ -28,10 +28,21 @@ if __name__ == "__main__":
from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
flags.DQ.Environment = "AOD" flags.DQ.Environment = "AOD"
flags.Output.HISTFileName = 'TestMinBiasMonitorOutput.root'
from AthenaConfiguration.TestDefaults import defaultTestFiles from AthenaConfiguration.TestDefaults import defaultTestFiles
flags.Input.Files = defaultTestFiles.AOD flags.Input.Files = defaultTestFiles.AOD
flags.Exec.MaxEvents = 20
flags.fillFromArgs()
flags.lock() flags.lock()
acc = TrigMinBias(flags) from AthenaConfiguration.MainServicesConfig import MainServicesCfg
acc.printConfig(withDetails=True, summariseProps=True) from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
cfg = MainServicesCfg(flags)
cfg.merge(PoolReadCfg(flags))
cfg.merge(TrigMinBias(flags))
status = cfg.run()
if status.isFailure():
import sys
sys.exit(-1)
\ No newline at end of file
...@@ -43,8 +43,9 @@ StatusCode HLTEfficiencyMonitoringAlg::fillHistograms(const EventContext& contex ...@@ -43,8 +43,9 @@ StatusCode HLTEfficiencyMonitoringAlg::fillHistograms(const EventContext& contex
auto leadingTrackPt = Scalar<double>("leadingTrackPt"); auto leadingTrackPt = Scalar<double>("leadingTrackPt");
for (const auto trk : *offlineTrkHandle) for (const auto trk : *offlineTrkHandle)
{ {
const double pt = std::fabs(trk->pt()) * 1e-3; // fabs used in case the charge is encoded in pt ( i.e. it is really q * pt) if (m_trackSelectionTool->accept(*trk) and std::fabs(trk->pt()) > m_minPt) {
if (m_trackSelectionTool->accept(*trk)) { const double pt = std::fabs(trk->pt()) * 1e-3; // fabs used in case the charge is encoded in pt ( i.e. it is really q * pt)
++countPassing; ++countPassing;
if (pt > 2.) if (pt > 2.)
++countPassing_pt2; ++countPassing_pt2;
......
...@@ -40,6 +40,8 @@ private: ...@@ -40,6 +40,8 @@ private:
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_offlineTrkKey{this, "OfflineTrkKey", "InDetTrackParticles", "Name of Offline track counts info object produced by the HLT track counting FEX algorithm"};
ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelectionTool{this, "TrackSelectionTool", "InDetTrackSelectionTool", "Tool for selecting tracks"}; ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelectionTool{this, "TrackSelectionTool", "InDetTrackSelectionTool", "Tool for selecting tracks"};
Gaudi::Property<float> m_minPt{ this, "minPt", 200.0, "Consider offline tracks only if above this threshold (in MeV)"};
}; };
#endif // TRIGMINBIASMONITORING_HLTEFFICIENCYMONITORINGALG_H #endif // TRIGMINBIASMONITORING_HLTEFFICIENCYMONITORINGALG_H
...@@ -110,7 +110,7 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext& context) co ...@@ -110,7 +110,7 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext& context) co
int countPassing = 0; int countPassing = 0;
for (const auto trk : *offlineTrkHandle) for (const auto trk : *offlineTrkHandle)
{ {
if (m_trackSelectionTool->accept(*trk)) if (m_trackSelectionTool->accept(*trk) and std::fabs(trk->pt()) > m_minPt )
++countPassing; ++countPassing;
} }
ATH_MSG_DEBUG("::monitorTrkCounts countPassing = " << countPassing); ATH_MSG_DEBUG("::monitorTrkCounts countPassing = " << countPassing);
......
...@@ -41,7 +41,8 @@ private: ...@@ -41,7 +41,8 @@ private:
Gaudi::Property<std::vector<std::string>> m_triggerList{this, "triggerList",{}, "Add triggers to this to be monitored"}; 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"}; ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelectionTool {this, "TrackSelectionTool", "InDetTrackSelectionTool", "Tool for selecting tracks"};
Gaudi::Property<float> m_minPt{ this, "minPt", 200.0, "Consider offline tracks only if above this threshold (in MeV)"};
StatusCode monitorPurities(const EventContext& context) const; StatusCode monitorPurities(const EventContext& context) const;
StatusCode monitorSPCounts(const EventContext& context) const; StatusCode monitorSPCounts(const EventContext& context) const;
StatusCode monitorTrkCounts(const EventContext& context) const; StatusCode monitorTrkCounts(const EventContext& context) const;
......
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