Skip to content
Snippets Groups Projects
Commit 1cc2c6b2 authored by Sarah Louise Williams's avatar Sarah Louise Williams
Browse files

Attempting Configuration Migration

parent bd07695f
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!35036METReconstruction: First attempt at preparing the MET Reconstruction code for the run III configuration system
......@@ -65,6 +65,7 @@ namespace met {
METSoftTermsTool::METSoftTermsTool(const std::string& name) :
AsgTool(name),
METBuilderTool(name),
m_pfotool(this,""),
m_st_objtype(0),
m_pv_inputkey("PrimaryVertices"),
m_caloClusterKey(""),
......
......@@ -61,6 +61,14 @@ namespace met {
////////////////
METTrackFilterTool::METTrackFilterTool(const std::string& name) :
AsgTool(name),
m_trkseltool(this,""),
m_trkToVertexTool(this,""),
m_trkIsolationTool(this,""),
m_caloIsolationTool(this,""),
m_mu_inputkey(""),
m_el_inputkey(""),
m_pv_input(""),
m_cl_inputkey(""),
METRefinerTool(name)
{
declareProperty( "DoPVSel", m_trk_doPVsel = true );
......
......@@ -46,6 +46,12 @@ namespace met {
////////////////
METTruthAssociator::METTruthAssociator(const std::string& name) :
AsgTool(name),
m_recoElKey(""),
m_recoJetKey(""),
m_recoMuKey(""),
m_recoGamKey(""),
m_recoTauKey(""),
m_truthEventKey(""),
METAssociator(name)
{
......
from AthenaCommon import Loggingfrom AthenaConfiguration.ComponentAccumulator import ComponentAccumulator if __name__=="__main__": # Setting needed for the ComponentAccumulator to do its thing from AthenaCommon.Configurable import Configurable Configurable.configurableRun3Behavior=True # Set message levels from AthenaCommon import Constants msgLvl = "INFO" from AthenaCommon.Logging import log log.setLevel(msgLvl) # Config flags steer the job at various levels from AthenaConfiguration.AllConfigFlags import ConfigFlags ConfigFlags.Input.isMC = True ConfigFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ASG/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.AOD.e5458_s3126_r9364_r9315/AOD.11182705._000001.pool.root.1"] # Flags relating to multithreaded execution nthreads=0 ConfigFlags.Concurrency.NumThreads =nthreads if nthreads>0: ConfigFlags.Concurrency.NumThreads = 1 ConfigFlags.Concurrency.NumConcurrentEvents = 1 ConfigFlags.lock() # Get a ComponentAccumulator setting up the fundamental Athena job from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg cfg=MainServicesThreadedCfg(ConfigFlags) # Add the components for reading in pool files from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg cfg.merge(PoolReadCfg(ConfigFlags)) # Get Jet Inputs from JetRecConfig.StandardJetDefs import EMTopoOrigin, LCTopoOrigin, CHSPFlow from JetRecConfig import JetRecConfig jetcomps=ComponentAccumulator() cfg.merge( JetRecConfig.JetInputCfg( [EMTopoOrigin], ConfigFlags, "EMtopoConstituents")) cfg.merge( JetRecConfig.JetInputCfg( [LCTopoOrigin], ConfigFlags, "LCTopoConstituents")) cfg.merge( JetRecConfig.JetInputCfg( [CHSPFlow], ConfigFlags, "PFlowConstituents")) # Start by just trying to add in MET Reconstruction based on METReconstruction_jobOptions.py from METReconstruction.METRecoFlags import metFlags from AthenaCommon.BeamFlags import jobproperties from RecExConfig.RecFlags import rec if jobproperties.Beam.beamType == 'cosmics' or jobproperties.Beam.beamType == 'singlebeam' or not rec.doInDet(): metFlags.UseTracks.set_Value(False) metFlags.DoPFlow.set_Value(False) print "METReconstruction_jobOptions: detected cosmics/single-beam configuration -- switch off track-based MET reco" """ import METReconstruction.METConfig_Calo import METReconstruction.METConfig_Track if rec.doTruth(): import METReconstruction.METConfig_Truth from METReconstruction.METRecoConfig import getMETRecoAlg print "PICKING UP CHANGES" metAlg = getMETRecoAlg('METReconstruction') components_metAlg = ComponentAccumulator() from AthenaCommon.AlgSequence import AthSequencer components_metAlg.addSequence( AthSequencer('METReconstruction') ) #technically don't need a new sequence name for it components_metAlg.addEventAlgo(metAlg,'METReconstruction') cfg.merge(components_metAlg) # Set up default configurations import METReconstruction.METConfig_Associator from METReconstruction.METAssocConfig import getMETAssocAlg # Get the configuration directly from METRecoFlags # Can also provide a dict of configurations or list of RecoTools or both assocAlg = getMETAssocAlg('METAssociation') components_assocAlg = ComponentAccumulator() components_assocAlg.addSequence(AthSequencer('METAssociation') ) components_assocAlg.addEventAlgo(assocAlg,'METAssociation') cfg.merge(components_assocAlg) from METUtilities.METMakerConfig import getMETMakerAlg for key,conf in metFlags.METAssocConfigs().iteritems(): if not conf.doTruth: makerAlg = getMETMakerAlg(conf.suffix) components_makerAlg=ComponentAccumulator() components_makerAlg.addSequence(AthSequencer(conf.suffix) ) components_makerAlg.addEventAlgo(makerAlg,conf.suffix) cfg.merge(components_makerAlg) """ cfg.run(maxEvents=10) """ from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from METReconstruction.METRecoFlags import metFlags from AthenaCommon.BeamFlags import jobproperties from RecExConfig.RecFlags import rec if jobproperties.Beam.beamType == 'cosmics' or jobproperties.Beam.beamType == 'singlebeam' or not rec.doInDet(): metFlags.UseTracks.set_Value(False) metFlags.DoPFlow.set_Value(False) print "METReconstruction_jobOptions: detected cosmics/single-beam configuration -- switch off track-based MET reco" import METReconstruction.METConfig_Calo import METReconstruction.METConfig_Track if rec.doTruth(): import METReconstruction.METConfig_Truth from METReconstruction.METRecoConfig import getMETRecoAlg metAlg = getMETRecoAlg('METReconstruction') topSequence += metAlg # Set up default configurations import METReconstruction.METConfig_Associator from METReconstruction.METAssocConfig import getMETAssocAlg # Get the configuration directly from METRecoFlags # Can also provide a dict of configurations or list of RecoTools or both assocAlg = getMETAssocAlg('METAssociation') from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence += assocAlg from METUtilities.METMakerConfig import getMETMakerAlg for key,conf in metFlags.METAssocConfigs().iteritems(): if not conf.doTruth: makerAlg = getMETMakerAlg(conf.suffix) topSequence += makerAlg """
\ No newline at end of file
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