Skip to content
Snippets Groups Projects
Commit 9385cd55 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'master-npetters-fixIDPVMErrorMsg' into 'master'

Change default truth option for IDPVM plotting to HardScatter only

See merge request atlas/athena!32441
parents 360c0fbb 527584b1
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,11 @@ class doExpertOutput(InDetPhysValFlagsJobProperty) :
allowedTypes = ['bool']
StoredValue = False
class setTruthStrategy(InDetPhysValFlagsJobProperty) :
statusOn = True
allowedTypes = ['string']
StoredValue = 'HardScatter'
from InDetRecExample.InDetJobProperties import Enabled
##-----------------------------------------------------------------------------
......@@ -146,7 +151,8 @@ _list_InDetPhysValJobProperties = [
doValidateTracksInJets,
validateExtraTrackCollections,
doPhysValOutput,
doExpertOutput
doExpertOutput,
setTruthStrategy
]
for j in _list_InDetPhysValJobProperties:
......
......@@ -63,6 +63,21 @@ def getInDetPhysValMonitoringTool(**kwargs) :
kwargs=setDefaults(kwargs,
useVertexTruthMatchTool = True,
VertexTruthMatchTool = toolFactory(InDetVertexTruthMatchTool) )
#Options for Truth Strategy : Requires full pile-up truth containers for some
if InDetPhysValFlags.setTruthStrategy() == 'All' or InDetPhysValFlags.setTruthStrategy() == 'PileUp' :
from RecExConfig.AutoConfiguration import IsInInputFile
if IsInInputFile('xAOD::TruthPileupEventContainer','TruthPileupEvents') :
kwargs=setDefaults(kwargs,
PileupSwitch = InDetPhysValFlags.setTruthStrategy())
else :
print ('WARNING Truth Strategy for InDetPhysValMonitoring set to %s but TruthPileupEvents are missing in the input; resetting to HardScatter only' % (InDetPhysValFlags.setTruthStrategy()))
elif InDetPhysValFlags.setTruthStrategy() != 'HardScatter' :
print ('WARNING Truth Strategy for for InDetPhysValMonitoring set to invalid option %s; valid flags are ["HardScatter", "All", "PileUp"]' % (InDetPhysValFlags.setTruthStrategy()))
else :
# disable truth monitoring for data
......
......@@ -78,7 +78,7 @@ namespace { // utility functions used here
bool
passJetCuts(const xAOD::Jet& jet) {
const float absEtaMax = 2.5;
const float jetPtMin = 10.0; // in GeV
const float jetPtMin = 100.0; // in GeV
const float jetPtMax = 1000.0; // in GeV
const float jetPt = jet.pt() / Gaudi::Units::GeV; // GeV
const float jetEta = jet.eta();
......@@ -137,7 +137,7 @@ InDetPhysValMonitoringTool::InDetPhysValMonitoringTool(const std::string& type,
declareProperty("maxTrkJetDR", m_maxTrkJetDR = 0.4);
declareProperty("DirName", m_dirName = "SquirrelPlots/");
declareProperty("SubFolder", m_folder);
declareProperty("PileupSwitch", m_pileupSwitch = "All");
declareProperty("PileupSwitch", m_pileupSwitch = "HardScatter");
declareProperty("LowProb", m_lowProb=0.50);
declareProperty("HighProb", m_highProb=0.80);
declareProperty("SkillLevel", m_detailLevel=10);
......
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