diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h index ac15802a4f0cc4ee0454bb81412b04150d20c2aa..c54673837797757f5693ff4149a1a5217c2b0c08 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h @@ -429,7 +429,7 @@ inline bool valid_beam_particles(const GenEvent* e) { return true; } -template <class T> bool suggest_barcode(T p, int i) { +template <class T> bool suggest_barcode(T& p, int i) { if (!p->parent_event()) return false; auto barcodes = p->parent_event()->template attribute<GenEventBarcodes> ("barcodes"); if (!barcodes) { diff --git a/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py b/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py index 33850c2da68be378134d6c4727eb5d24c3b4008b..8414cfb8574f12bad42d429ff230b3bea5c21bd7 100644 --- a/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py +++ b/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py @@ -26,7 +26,7 @@ def SCT_SiPropertiesCondAlgCfg(flags, name="SCTSiPropertiesCondAlg", **kwargs): return acc -def SCT_SiPropertiesToolCfg(flags, name="SCTSiPropertiesTool", **kwargs): +def SCT_SiPropertiesToolCfg(flags, name="SCT_SiPropertiesTool", **kwargs): """Return configured ComponentAccumulator and tool for SCT_SiProperties SiConditionsTool and/or DCSConditionsTool may be provided in kwargs diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigLegacy.py b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigLegacy.py index 42b52805530ba35a66e35ee3d49cc05156c6d900..ecfeeecc2f75f3fad05d66cdce8580ae69e4a213 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigLegacy.py +++ b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigLegacy.py @@ -80,7 +80,7 @@ def getSCT_SurfaceChargesGenerator(name="SCT_SurfaceChargesGenerator", **kwargs) return SCT_DetailedSurfaceChargesGenerator(name, **kwargs) else: from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_RadDamageSummaryTool - kwargs.setdefault("RadDamageSummaryTool", SCT_RadDamageSummaryTool(name = "InDetSCT_RadDamageSummaryTool")) + kwargs.setdefault("RadDamageSummaryTool", SCT_RadDamageSummaryTool(name = "SCT_RadDamageSummaryTool")) from SCT_Digitization.SCT_DigitizationConf import SCT_SurfaceChargesGenerator return SCT_SurfaceChargesGenerator(name, **kwargs) diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx index a4ace917d41d3f355f03eba3f4256fedabf69fd2..c911b463b1826cf31536819427055277ea88a503 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -46,9 +46,6 @@ namespace { return {static_cast<int>(d), d != v}; } - - - } @@ -791,17 +788,19 @@ namespace InDet { SG::ReadCondHandle<PixelChargeCalibCondData> calibDataHandle(m_chargeDataKey); const PixelChargeCalibCondData *calibData = *calibDataHandle; const std::vector<Identifier>& rdos = pCluster.rdoList(); - ATH_MSG_VERBOSE(" Number of RDOs: " << rdos.size() ); + const size_t rdoSize = rdos.size(); + ATH_MSG_VERBOSE(" Number of RDOs: " << rdoSize ); const std::vector<float>& chList = pCluster.chargeList(); const std::vector<int>& totList = pCluster.totList(); std::vector<float> chListRecreated{}; + chListRecreated.reserve(rdoSize); ATH_MSG_VERBOSE(" Number of charges: " << chList.size() ); std::vector<int>::const_iterator tot = totList.begin(); std::vector<Identifier>::const_iterator rdosBegin = rdos.begin(); std::vector<Identifier>::const_iterator rdosEnd = rdos.end(); std::vector<int> totListRecreated{}; + totListRecreated.reserve(rdoSize); std::vector<int>::const_iterator totRecreated = totListRecreated.begin(); - // // Recreate both charge list and ToT list to correct for the IBL ToT overflow (and later for small hits): ATH_MSG_VERBOSE("Charge list is not filled ... re-creating it."); for ( ; rdosBegin!= rdosEnd and tot != totList.end(); ++tot, ++rdosBegin, ++totRecreated ){ @@ -837,13 +836,6 @@ namespace InDet { Identifier rId = *rdosBegin; int row = pixelID.phi_index(rId); int col = pixelID.eta_index(rId); - if(msgLvl(MSG::VERBOSE)){ - if (!m_useToT){ - ATH_MSG_VERBOSE(" Adding pixel row: " << row << " col: " << col << " charge: " << *charge << " tot " << *tot ); - } else { - ATH_MSG_VERBOSE(" Adding pixel row: " << row << " col: " << col << " tot " << *tot ); - } - } InDetDD::SiLocalPosition siLocalPosition (design->positionFromColumnRow(col,row)); if (not m_useToT){ sumOfWeightedPositions += (*charge)*siLocalPosition; @@ -899,13 +891,6 @@ namespace InDet { Identifier rId = *rdosBegin; unsigned int absrow = pixelID.phi_index(rId)-rowWeightedPosition+centralIndexX; unsigned int abscol = pixelID.eta_index(rId)-columnWeightedPosition+centralIndexY; - if(msgLvl(MSG::VERBOSE)){ - if (not m_useToT){ - ATH_MSG_VERBOSE(" phi Index: " << pixelID.phi_index(rId) << " absrow: " << absrow << " eta Idx: " << pixelID.eta_index(rId) << " abscol: " << abscol << " charge " << *charge ); - } else { - ATH_MSG_VERBOSE(" phi Index: " << pixelID.phi_index(rId) << " absrow: " << absrow << " eta Idx: " << pixelID.eta_index(rId) << " abscol: " << abscol << " tot " << *tot ); - } - } if (absrow > m_sizeX){ ATH_MSG_WARNING(" problem with index: " << absrow << " min: " << 0 << " max: " << m_sizeX); return input; @@ -917,7 +902,6 @@ namespace InDet { InDetDD::SiCellId cellId = element->cellIdFromIdentifier(*rdosBegin); InDetDD::SiDiodesParameters diodeParameters = design->parameters(cellId); double pitchY = diodeParameters.width().xEta(); - ATH_MSG_VERBOSE(" PitchY: " << pitchY ); if (not m_useToT) { input.matrixOfToT[absrow][abscol]=*charge; } else { diff --git a/InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigLegacy.py b/InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigLegacy.py index 77fcb68beca52e8b21e04c9c3b41e928113206f9..14119168ff84436676068d9d0d3cde0d755b6c20 100644 --- a/InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigLegacy.py +++ b/InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigLegacy.py @@ -1,8 +1,9 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration from TRT_PAI_Process.TRT_PAI_ProcessConf import TRT_PAI_Process def getTRT_PAI_Process_Xe(name="TRT_PAI_Process_Xe", **kwargs): + kwargs.setdefault("GasType", "Xenon") return TRT_PAI_Process(name, **kwargs) diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArADC2MeV2Ntuple.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArADC2MeV2Ntuple.h new file mode 100644 index 0000000000000000000000000000000000000000..890d71b6af41a68bac100b967cf8d37377983dee --- /dev/null +++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArADC2MeV2Ntuple.h @@ -0,0 +1,32 @@ +//Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +*/ + + +#ifndef LARCALIBTOOLS_ADC2MEV2NTUPLE +#define LARCALIBTOOLS_ADC2MEV2NTUPLE +#include "LArCalibTools/LArCond2NtupleBase.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "LArRawConditions/LArADC2MeV.h" +#include "CxxUtils/checker_macros.h" + +class ATLAS_NOT_THREAD_SAFE LArADC2MeV2Ntuple : public LArCond2NtupleBase +{ + public: + + using LArCond2NtupleBase::LArCond2NtupleBase; + + //standard algorithm methods + StatusCode initialize(); + virtual StatusCode stop(); + StatusCode finalize(){return StatusCode::SUCCESS;} + + private: + SG::ReadCondHandleKey<LArADC2MeV> m_adc2MeVKey{this,"LArADC2MeVKey","LArADC2MeV","SG key of the resulting LArADC2MeV object"}; + std::string m_ntName; + +}; + +#endif diff --git a/LArCalorimeter/LArCalibTools/src/LArADC2MeV2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArADC2MeV2Ntuple.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2ea84fd1e0403691eac37fe13d3b6a3c0d53c0aa --- /dev/null +++ b/LArCalorimeter/LArCalibTools/src/LArADC2MeV2Ntuple.cxx @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArCalibTools/LArADC2MeV2Ntuple.h" + +StatusCode LArADC2MeV2Ntuple::initialize() { + m_ntTitle="ADC2MeV"; + m_ntName="ADC2MeV"; + m_ntpath=std::string("/NTUPLES/FILE1/")+m_ntName; + + ATH_CHECK(m_adc2MeVKey.initialize()); + return LArCond2NtupleBase::initialize(); +} + + + +StatusCode LArADC2MeV2Ntuple::stop() { + + NTuple::Array<float> coeffs; + NTuple::Item<unsigned long> coeffIndex; + NTuple::Item<unsigned long> gain; + SG::ReadCondHandle<LArADC2MeV> adc2MeVHdl{m_adc2MeVKey}; + const LArADC2MeV* adc2MEV{*adc2MeVHdl}; + + ATH_CHECK(m_nt->addItem("Xi",coeffIndex,0,3)); + ATH_CHECK(m_nt->addItem("X",coeffIndex,coeffs)); + ATH_CHECK(m_nt->addItem("gain",gain,0,3)); + for(long igain=CaloGain::LARHIGHGAIN; igain<CaloGain::LARNGAIN; igain++) { + for (const HWIdentifier hwid: m_onlineId->channel_range()) { + auto adc2mevCoeff=adc2MEV->ADC2MEV(hwid,igain); + if (adc2mevCoeff.size()>0) { + fillFromIdentifier(hwid); + gain=igain; + for (coeffIndex=0;coeffIndex<adc2mevCoeff.size();coeffIndex++) { + coeffs[coeffIndex]=adc2mevCoeff[coeffIndex]; + } + ATH_CHECK(ntupleSvc()->writeRecord(m_nt)); + } //end if have ADC2MeV values for this cell and gain + }//end loop over cells + }//end loop over gians + + ATH_MSG_INFO( "LArADC2MeV2Ntuple has finished." ); + return StatusCode::SUCCESS; + +} diff --git a/LArCalorimeter/LArCalibTools/src/components/LArCalibTools_entries.cxx b/LArCalorimeter/LArCalibTools/src/components/LArCalibTools_entries.cxx index 39896ccca7222291294a385f2621b81c1a952a0e..a1b760519a4e2755546c9d02625d6a9d271a5dbf 100644 --- a/LArCalorimeter/LArCalibTools/src/components/LArCalibTools_entries.cxx +++ b/LArCalorimeter/LArCalibTools/src/components/LArCalibTools_entries.cxx @@ -42,7 +42,7 @@ #include "LArCalibTools/LArSC2Ntuple.h" #include "LArCalibTools/LArRinj2Ntuple.h" #include "LArCalibTools/LArOFCBin2Ntuple.h" - +#include "LArCalibTools/LArADC2MeV2Ntuple.h" typedef LArReadParamsFromFile<LArCaliPulseParamsComplete> LArReadCaliPulseParams ; typedef LArReadParamsFromFile<LArDetCellParamsComplete> LArReadDetCellParams ; @@ -113,3 +113,4 @@ DECLARE_COMPONENT( LArMinBias2Ntuple ) DECLARE_COMPONENT( LArSC2Ntuple ) DECLARE_COMPONENT( LArRinj2Ntuple ) DECLARE_COMPONENT( LArOFCBin2Ntuple ) +DECLARE_COMPONENT( LArADC2MeV2Ntuple ) diff --git a/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWPadTriggerL1a.cpp b/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWPadTriggerL1a.cpp index 14eb7372b419f2417934196bcf743c34cccc7000..663d6b1fe454b814b8ff61d2fc58d12414dcbb17 100644 --- a/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWPadTriggerL1a.cpp +++ b/MuonSpectrometer/MuonCnv/MuonNSWCommonDecode/src/NSWPadTriggerL1a.cpp @@ -65,7 +65,7 @@ Muon::nsw::NSWPadTriggerL1a::NSWPadTriggerL1a(const uint32_t* bs, const uint32_t getOneBcOfCompressedData(words, bitIndex, relbcid, mapPadTriggerToTds, numberOfChannels) ); } catch (const std::exception& ex) { - ERS_INFO(ex.what()); + ERS_DEBUG(1, ex.what()); m_decoded.data.clear(); break; } diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG1D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG1D1.py index 6eb2c8544909a0b523d3bc499bd417600a73b50b..1a1f381bc405dd01f23f6f6271c9b364e88c34bb 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG1D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG1D1.py @@ -425,6 +425,7 @@ def HIGG1D1Cfg(flags): # Output stream HIGG1D1ItemList = HIGG1D1SlimmingHelper.GetItemList() + acc.merge(OutputStreamCfg(flags, "DAOD_HIGG1D1", ItemList=HIGG1D1ItemList, AcceptAlgs=["HIGG1D1Kernel"])) acc.merge(InfileMetaDataCfg(flags, "DAOD_HIGG1D1", AcceptAlgs=["HIGG1D1Kernel"])) diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx index 51ec989b4a86a5243a13be32a699c1525f8602ff..044f99764c486e6218c4ab00063272812d9caaee 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DataPrepUtilities.cxx @@ -681,7 +681,7 @@ namespace FlavorTagDiscriminants { {"(rnnip|iprnn|dips[^_]*)(flip)?_p(b|c|u|tau)"_r, EDMType::FLOAT}, {"(JetFitter|SV1|JetFitterSecondaryVertex)(Flip)?_[Nn].*"_r, EDMType::INT}, {"(JetFitter|SV1|JetFitterSecondaryVertex).*"_r, EDMType::FLOAT}, - {"(log_)?pt|abs_eta|eta|phi|energy"_r, EDMType::CUSTOM_GETTER}, + {"(log_)?pt|abs_eta|eta|phi|energy|mass"_r, EDMType::CUSTOM_GETTER}, {"softMuon_p[bcu]"_r, EDMType::FLOAT}, {"softMuon_.*"_r, EDMType::FLOAT}, }; @@ -703,7 +703,7 @@ namespace FlavorTagDiscriminants { {"iprnn_.*"_r, ""}, {"smt_.*"_r, "softMuon_isDefaults"}, {"softMuon_.*"_r, "softMuon_isDefaults"}, - {"((log_)?pt|abs_eta|eta|phi|energy)"_r, ""}}; // no default for custom cases + {"((log_)?pt|abs_eta|eta|phi|energy|mass)"_r, ""}}; // no default for custom cases std::vector<FTagInputConfig> input_config; for (auto& node: config.inputs){ diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/customGetter.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/customGetter.cxx index 1153e876286200d0137ff188ce7327af43642428..89bb546d4f48caa936eca6af62c078a1454ed444 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/customGetter.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/customGetter.cxx @@ -34,6 +34,9 @@ namespace { if (name == "energy") { return [](const xAOD::Jet& j) -> float {return j.e();}; } + if (name == "mass") { + return [](const xAOD::Jet& j) -> float {return j.m();}; + } throw std::logic_error("no match for custom getter " + name); } diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagConfig.py index ec66264a2064b8f444a2db5be07f184bfd56085b..0317f89db01ff4d1263b414be5b50369da4e3af3 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagConfig.py @@ -17,6 +17,7 @@ from JetTagCalibration.JetTagCalibConfig import JetTagCalibCfg from BTagging.BTaggingFlags import BTaggingFlags from BTagging.BTaggingConfiguration import getConfiguration from OutputStreamAthenaPool.OutputStreamConfig import addToESD, addToAOD +from JetHitAssociation.JetHitAssociationConfig import JetHitAssociationCfg # this is where you add the new trainings! def GetTaggerTrainingMap(inputFlags, jet_collection_list): @@ -151,27 +152,35 @@ def BTagRecoSplitCfg(inputFlags, JetCollection=['AntiKt4EMTopo','AntiKt4EMPFlow' # By default, in Run3 we don't write out BTagging containers in AOD or ESD # following allows to write them out when using Reco_tf.py --CA run 3 style configuration - + if inputFlags.Output.doWriteAOD and inputFlags.Jet.WriteToAOD: - result.merge(addBTagToOutput(inputFlags, JetCollection, toAOD=True, toESD=False)) - + result.merge(addBTagToOutput(inputFlags, JetCollection, toAOD=True, toESD=False)) + if inputFlags.Output.doWriteESD: result.merge(addBTagToOutput(inputFlags, JetCollection, toAOD=False, toESD=True)) - + # Invoking the alhorithm saving hits in the vicinity of jets, with proper flags if inputFlags.BTagging.Trackless: BTaggingFlags.DoJetHitAssociation=True - from JetHitAssociation.JetHitAssociationConfig import JetHitAssociationCfg result.merge(JetHitAssociationCfg(inputFlags)) - BTaggingAODList = ['xAOD::TrackMeasurementValidationContainer#JetAssociatedPixelClusters', - 'xAOD::TrackMeasurementValidationAuxContainer#JetAssociatedPixelClustersAux.'] - BTaggingAODList += ['xAOD::TrackMeasurementValidationContainer#JetAssociatedSCTClusters', - 'xAOD::TrackMeasurementValidationAuxContainer#JetAssociatedSCTClustersAux.'] + BTaggingAODList = _track_measurement_list('JetAssociatedPixelClusters') + BTaggingAODList += _track_measurement_list('JetAssociatedSCTClusters') result.merge(addToAOD(inputFlags, BTaggingAODList)) + if inputFlags.BTagging.savePixelHits: + result.merge(JetHitAssociationCfg(inputFlags)) + result.merge(addToAOD(inputFlags, _track_measurement_list("PixelClusters"))) + return result +def _track_measurement_list(container_name): + return [ + f'xAOD::TrackMeasurementValidationContainer#{container_name}', + f'xAOD::TrackMeasurementValidationAuxContainer#{container_name}Aux.' + ] + + def BTagAlgsCfg(inputFlags, JetCollection, nnList=[], @@ -293,7 +302,7 @@ def BTagAlgsCfg(inputFlags, TrackCollection=trackCollection, ) ) - + #add also Flip tagger information if inputFlags.BTagging.RunFlipTaggers: result.merge( @@ -304,9 +313,9 @@ def BTagAlgsCfg(inputFlags, TrackCollection=trackCollection, doFlipTagger=True, ) - ) + ) + - if muons: result.merge( BTagMuonAugmenterAlgCfg( diff --git a/PhysicsAnalysis/JetTagging/JetTagConfig/python/BTaggingConfigFlags.py b/PhysicsAnalysis/JetTagging/JetTagConfig/python/BTaggingConfigFlags.py index 33b17557c56b99e7f4feffa5f13a5ba7524eb80e..a60defe2c2427c8d898aae2617064c46dbb079c2 100644 --- a/PhysicsAnalysis/JetTagging/JetTagConfig/python/BTaggingConfigFlags.py +++ b/PhysicsAnalysis/JetTagging/JetTagConfig/python/BTaggingConfigFlags.py @@ -56,6 +56,20 @@ def calibrationTag(flags): return "" +def saveSv1(prevFlags): + return prevFlags.Common.ProductionStep is ProductionStep.Derivation or prevFlags.GeoModel.Run >= LHCPeriod.Run4 + + +def runOldSecVrtSecIncl(prevFlags): + return prevFlags.Common.ProductionStep is ProductionStep.Derivation + + +def runFlipTag(flags): + derivation = flags.Common.ProductionStep is ProductionStep.Derivation + before_the_future = flags.GeoModel.Run < LHCPeriod.Run4 + return derivation and before_the_future + + def createBTaggingConfigFlags(): btagcf = AthConfigFlags() @@ -80,13 +94,13 @@ def createBTaggingConfigFlags(): # Taggers for validation - btagcf.addFlag("BTagging.SaveSV1Probabilities", lambda prevFlags: prevFlags.Common.ProductionStep is ProductionStep.Derivation or prevFlags.GeoModel.Run >= LHCPeriod.Run4) + btagcf.addFlag("BTagging.SaveSV1Probabilities", saveSv1) #Do we really need this in AthConfigFlags? #Comments in BTaggingConfiguration.py btagcf.addFlag("BTagging.OutputFiles.Prefix", "BTagging_") btagcf.addFlag("BTagging.GeneralToolSuffix",'') #Not sure it will stay like that later on. Was '', 'Trig, or 'AODFix' # Run the flip taggers - btagcf.addFlag("BTagging.RunFlipTaggers", lambda prevFlags: prevFlags.Common.ProductionStep is ProductionStep.Derivation and prevFlags.GeoModel.Run < LHCPeriod.Run4) + btagcf.addFlag("BTagging.RunFlipTaggers", runFlipTag) # Trackless approach btagcf.addFlag("BTagging.Trackless", False) @@ -94,16 +108,19 @@ def createBTaggingConfigFlags(): btagcf.addFlag("BTagging.Trackless_JetPtMin", 300) #in GeV btagcf.addFlag("BTagging.Trackless_dR", 0.4) + # more aggressive trackless approach + btagcf.addFlag("BTagging.savePixelHits", False) + # experimental flags btagcf.addFlag("BTagging.Pseudotrack", False) #NewVrtSecInclusiveAlg - btagcf.addFlag("BTagging.RunNewVrtSecInclusive", lambda prevFlags: prevFlags.Common.ProductionStep is ProductionStep.Derivation) + btagcf.addFlag("BTagging.RunNewVrtSecInclusive", runOldSecVrtSecIncl) # track classification tool flags btagcf.addFlag("BTagging.TrkClassFiveBinMode",False) - - # a flag to add V0finder + + # a flag to add V0finder btagcf.addFlag("BTagging.AddV0Finder", False) return btagcf diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_MC20a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh b/Simulation/FastSimulation/FastChainPileup/test/test_MC20a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh index aaef737d1d3296b1be98b9d8c26ef3aa9e252730..763578a5a169cc003db2b090d831e6a0886fd09c 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_MC20a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_MC20a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh @@ -26,7 +26,6 @@ FastChain_tf.py \ --simulator 'ATLFAST3F_G4MS' \ --physicsList 'FTFP_BERT_ATL' \ --useISF True \ - --DataRunNumber 410000 \ --jobNumber 1 \ --randomSeed 123 \ --digiSteeringConf "StandardSignalOnlyTruth" \ @@ -40,8 +39,8 @@ FastChain_tf.py \ --digiSeedOffset2 '727' \ --geometryVersion default:ATLAS-R2-2016-01-00-01 \ --conditionsTag default:OFLCOND-MC16-SDR-RUN2-09 \ - --preInclude 'Campaigns.MC20a' \ - --postInclude='PyJobTransforms/UseFrontier.py' \ + --preInclude 'Campaigns.MC20a' 'Campaigns.MC16SimulationNoIoV' \ + --postInclude='PyJobTransforms.UseFrontier' \ --postExec 'from IOVDbSvc.CondDB import conddb;conddb.addOverride("/TILE/OFL02/CALIB/SFR","TileOfl02CalibSfr-SIM-05")' 'with open("ConfigCA.pkl", "wb") as f: cfg.store(f)' \ --imf False @@ -64,7 +63,6 @@ FastChain_tf.py \ --physicsList 'FTFP_BERT_ATL' \ --useISF True \ --jobNumber 1 \ - --DataRunNumber 410000 \ --randomSeed 123 \ --digiSteeringConf "StandardSignalOnlyTruth" \ --inputEVNTFile ${EVNT_File} \ @@ -77,7 +75,7 @@ FastChain_tf.py \ --digiSeedOffset2 '727' \ --geometryVersion default:ATLAS-R2-2016-01-00-01 \ --conditionsTag default:OFLCOND-MC16-SDR-RUN2-09 \ - --preSimInclude 'Campaigns/MC20a.py' 'Campaigns/PileUpMC20a.py' \ + --preSimInclude 'Campaigns/MC20a.py,Campaigns/PileUpMC20a.py,Campaigns/MC16SimulationNoIoV.py' \ --postInclude='PyJobTransforms/UseFrontier.py' \ --postExec 'from IOVDbSvc.CondDB import conddb;conddb.addOverride("/TILE/OFL02/CALIB/SFR","TileOfl02CalibSfr-SIM-05")' \ --athenaopts '"--config-only=ConfigCG.pkl"' \ @@ -97,7 +95,6 @@ FastChain_tf.py \ --physicsList 'FTFP_BERT_ATL' \ --useISF True \ --jobNumber 1 \ - --DataRunNumber 410000 \ --randomSeed 123 \ --digiSteeringConf "StandardSignalOnlyTruth" \ --inputEVNTFile ${EVNT_File} \ @@ -110,7 +107,7 @@ FastChain_tf.py \ --digiSeedOffset2 '727' \ --geometryVersion default:ATLAS-R2-2016-01-00-01 \ --conditionsTag default:OFLCOND-MC16-SDR-RUN2-09 \ - --preSimInclude 'Campaigns/MC20a.py' 'Campaigns/PileUpMC20a.py' \ + --preSimInclude 'Campaigns/MC20a.py,Campaigns/PileUpMC20a.py,Campaigns/MC16SimulationNoIoV.py' \ --postInclude='PyJobTransforms/UseFrontier.py' \ --postExec 'from IOVDbSvc.CondDB import conddb;conddb.addOverride("/TILE/OFL02/CALIB/SFR","TileOfl02CalibSfr-SIM-05")' \ --imf False diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_MC21a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh b/Simulation/FastSimulation/FastChainPileup/test/test_MC21a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh index 23e951357d05481691b875dc56a8716a4fdbc97c..5cdba3372534325f16c1c44858a6688e01f28b35 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_MC21a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_MC21a_ATLFAST3F_G4MS_pileup_ttbar_CAvsCG.sh @@ -28,7 +28,6 @@ FastChain_tf.py \ --physicsList 'FTFP_BERT_ATL' \ --useISF True \ --jobNumber 1 \ - --DataRunNumber 410000 \ --randomSeed 123 \ --digiSteeringConf "StandardSignalOnlyTruth" \ --inputEVNTFile ${EVNT_File} \ @@ -41,7 +40,7 @@ FastChain_tf.py \ --digiSeedOffset2 '727' \ --geometryVersion 'ATLAS-R3S-2021-03-00-00' \ --conditionsTag 'OFLCOND-MC21-SDR-RUN3-07' \ - --preInclude 'Campaigns.MC21a' \ + --preInclude 'Campaigns.MC21a' 'Campaigns.MC21SimulationNoIoV' \ --postInclude 'PyJobTransforms.UseFrontier' 'Digitization.DigitizationSteering.DigitizationTestingPostInclude' \ --postExec 'with open("ConfigCA.pkl", "wb") as f: cfg.store(f)' \ --imf False @@ -66,7 +65,6 @@ FastChain_tf.py \ --physicsList 'FTFP_BERT_ATL' \ --useISF True \ --jobNumber 1 \ - --DataRunNumber 410000 \ --randomSeed 123 \ --digiSteeringConf "StandardSignalOnlyTruth" \ --inputEVNTFile ${EVNT_File} \ @@ -79,7 +77,7 @@ FastChain_tf.py \ --digiSeedOffset2 '727' \ --geometryVersion default:ATLAS-R3S-2021-03-00-00 \ --conditionsTag default:OFLCOND-MC21-SDR-RUN3-07 \ - --preInclude 'all:Campaigns/MC21a.py,Campaigns/PileUpMC21a.py' \ + --preInclude 'all:Campaigns/MC21a.py,Campaigns/PileUpMC21a.py,Campaigns/MC21SimulationNoIoV.py' \ --postInclude='PyJobTransforms/UseFrontier.py' \ --postExec 'default:job+=CfgMgr.JobOptsDumperAlg(FileName="PileupLegacyConfig.txt");from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("LegacyConfig.txt")' \ --athenaopts '"--config-only=ConfigCG.pkl"'\ @@ -101,7 +99,6 @@ FastChain_tf.py \ --physicsList 'FTFP_BERT_ATL' \ --useISF True \ --jobNumber 1 \ - --DataRunNumber 410000 \ --randomSeed 123 \ --digiSteeringConf "StandardSignalOnlyTruth" \ --inputEVNTFile ${EVNT_File} \ diff --git a/Simulation/ISF/ISF_Config/python/FlagSetters.py b/Simulation/ISF/ISF_Config/python/FlagSetters.py index 5f15fe722abad683f2071d5ddd9f3d98d89c8e7f..bcd322f178f6474d2b68b1ed9a3f5fcded60118a 100644 --- a/Simulation/ISF/ISF_Config/python/FlagSetters.py +++ b/Simulation/ISF/ISF_Config/python/FlagSetters.py @@ -202,11 +202,15 @@ def configureFlagsATLFASTIIF(): # geometry task which is used to determine whether a detector has # been simulated (see ISF_Example/python/ISF_Output.py) DetFlags.geometry.BCM_setOff() + DetFlags.digitize.BCM_setOff() # For Fast Chain + DetFlags.BCM_setOff() # For Fast Chain from G4AtlasApps.SimFlags import simFlags simFlags.CalibrationRun.set_Off() # Switch off DeadMaterial Hits simFlags.SimulationFlavour = "ATLFASTIIF" from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags TrkDetFlags.MaterialVersion=21 + TrkDetFlags.TRT_EndcapLayerMaterialBinsR = 25 + TrkDetFlags.TRT_BarrelLayerMaterialBinsZ = 25 TrkDetFlags.TRT_BuildStrawLayers=True from ISF_Config.ISF_jobProperties import ISF_Flags mergeDict = {'ID':True, 'CALO':True, 'MUON':True} diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py index a0d53c2095eae84f880f231efc73ca4ff7ed4bfb..718b07ec311486438f66e4c3b3829e488f6c2d92 100644 --- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py +++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py @@ -144,6 +144,11 @@ else: # Need to be set up after globalflags.DetDescrVersion() are set from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags +if hasattr(runArgs, 'detectors'): + fastChainDetectors = runArgs.detectors +else: + fastChainDetectors = None + ## AthenaCommon flags # Jobs should stop if an include fails. if hasattr(runArgs, "IgnoreConfigError"): @@ -200,15 +205,15 @@ else: # Job Configuration parameters: #============================================================== ## Pre-exec -if hasattr(runArgs, "preSimExec"): +if hasattr(runArgs, "preExec"): fast_chain_log.info("transform pre-sim exec") - for cmd in runArgs.preSimExec: + for cmd in runArgs.preExec: fast_chain_log.info(cmd) exec(cmd) ## Pre-include -if hasattr(runArgs, "preSimInclude"): - for fragment in runArgs.preSimInclude: +if hasattr(runArgs, "preInclude"): + for fragment in runArgs.preInclude: include(fragment) if hasattr(runArgs, "inputEVNT_TRFile"): @@ -230,8 +235,16 @@ if jobproperties.Beam.beamType.get_Value() != 'cosmics': not (hasattr(simFlags,'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn and simFlags.StoppedParticleFile.get_Value()!=''): include('SimulationJobOptions/preInclude.G4WriteCavern.py') +fast_chain_log.info("================ DetFlags ================ ") + from AthenaCommon.DetFlags import DetFlags +from OverlayConfiguration.OverlayHelpersLegacy import setupOverlayLegacyDetectorFlags +DetFlags = setupOverlayLegacyDetectorFlags(fastChainDetectors) + +DetFlags.Truth_setOn() +DetFlags.Forward_setOff() + #Trial block: Set off tasks at start ## Switch off tasks # DetFlags.pileup.all_setOff() @@ -255,40 +268,16 @@ from AthenaCommon.DetFlags import DetFlags #Tasks we want switched ON (write RDOPool) - want this for all detectors that we want ON: #DetFlags.writeRDOPool.all_setOn() -#### this flag turns all the detectors ON that we want for simulation. -try: - from ISF_Config import FlagSetters - FlagSetters.configureFlagsBase() - ## Check for any simulator-specific configuration - configureFlags = getattr(FlagSetters, ISF_Flags.Simulator.configFlagsMethodName(), None) - if configureFlags is not None: - configureFlags() - possibleSubDetectors=['pixel','SCT','TRT','BCM','Lucid','ZDC','ALFA','AFP','FwdRegion','LAr','HGTD','Tile','MDT','CSC','TGC','RPC','MM','sTGC','Truth'] - for subdet in possibleSubDetectors: - simattr = subdet+"_on" - simcheck = getattr(DetFlags.simulate, simattr, None) - if simcheck is not None and simcheck(): - attrname = subdet+"_setOn" - checkfn = getattr(DetFlags, attrname, None) - if checkfn is not None: - checkfn() - -except: - ## Select detectors - if 'DetFlags' not in dir(): - # from AthenaCommon.DetFlags import DetFlags - ## If you configure one det flag, you're responsible for configuring them all! - DetFlags.all_setOn() - - -#DetFlags.all_setOn() +# Check for any simulator-specific configuration +from ISF_Config import FlagSetters +configureFlags = getattr(FlagSetters, ISF_Flags.Simulator.configFlagsMethodName(), None) +if configureFlags is not None: + configureFlags() +if not DetFlags.simulate.BCM_on(): + DetFlags.digitize.BCM_setOff() + DetFlags.overlay.BCM_setOff() + DetFlags.LVL1_setOff() -DetFlags.Truth_setOn() -DetFlags.Forward_setOff() # Forward dets are off by default -DetFlags.FTK_setOff() -checkHGTDOff = getattr(DetFlags, 'HGTD_setOff', None) -if checkHGTDOff is not None: - checkHGTDOff() #Default for now # turn off DetFlags for muon detectors which are not part of the layout if not MuonGeometryFlags.hasCSC(): DetFlags.CSC_setOff() @@ -962,6 +951,7 @@ if hasattr(runArgs,"preDigiInclude"): # Add TruthJet containers if DetFlags.Truth_on(): + digitizationFlags.experimentalDigi += ['PileUpTruthParticles'] digitizationFlags.experimentalDigi += ['PileUpAntiKt4TruthJets'] digitizationFlags.experimentalDigi += ['PileUpAntiKt6TruthJets'] diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDOwOverlay.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDOwOverlay.py index 4c1c6da866b699a71c6459c629c454c48b2f935d..c6f4600aec7c92ab0336f6e35f626a547b9e3330 100644 --- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDOwOverlay.py +++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDOwOverlay.py @@ -351,6 +351,9 @@ from ISF_Config import FlagSetters configureFlags = getattr(FlagSetters, ISF_Flags.Simulator.configFlagsMethodName(), None) if configureFlags is not None: configureFlags() +if not DetFlags.simulate.BCM_on(): + DetFlags.digitize.BCM_setOff() + DetFlags.overlay.BCM_setOff() # DetFlags.makeRIO.all_setOff() # needed for MT TRT conditions DetFlags.pileup.all_setOff() diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/TrigHLTMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/TrigHLTMonitorAlgorithm.py index f7aae35052793c2718be1d0ee951665d22b84ad0..b2db758e4e8ed43427338cc0bbee3ed7abbc317d 100644 --- a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/TrigHLTMonitorAlgorithm.py +++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/TrigHLTMonitorAlgorithm.py @@ -1,11 +1,12 @@ # -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration # '''@file TrigHLTMonitorAlgorithm.py @date 2019-09-10 @date 2020-09-18 @date 2022-02-21 +@date 2023-03-17 @brief TrigHLTMonitoring top-level files ''' @@ -13,24 +14,20 @@ def createHLTDQConfigFlags(): from AthenaConfiguration.AthConfigFlags import AthConfigFlags acf=AthConfigFlags() - # need to (temporarily) block signature monitoring by default when it is - # running on bytestream. Remove when ATR-23720 is completed from AthenaConfiguration.Enums import Format from AthenaConfiguration.Enums import BeamType - acf.addFlag('DQ.Steering.HLT.doGeneral', True) - # b-jets disabled for cosmics following ATR-25036 - acf.addFlag('DQ.Steering.HLT.doBjet', lambda flags: flags.Input.Format is Format.POOL and flags.Beam.Type is BeamType.Collisions) - - acf.addFlag('DQ.Steering.HLT.doInDet', lambda flags: flags.Input.Format is Format.POOL) - acf.addFlag('DQ.Steering.HLT.doBphys', lambda flags: flags.Input.Format is Format.POOL) - acf.addFlag('DQ.Steering.HLT.doCalo', True) #Switched to true to enable monitoring - acf.addFlag('DQ.Steering.HLT.doEgamma', lambda flags: flags.Input.Format is Format.POOL) - acf.addFlag('DQ.Steering.HLT.doJet', lambda flags: flags.Input.Format is Format.POOL) - acf.addFlag('DQ.Steering.HLT.doMET', lambda flags: flags.Input.Format is Format.POOL) - acf.addFlag('DQ.Steering.HLT.doMinBias', lambda flags: flags.Input.Format is Format.POOL) - acf.addFlag('DQ.Steering.HLT.doMuon', lambda flags: flags.Input.Format is Format.POOL) - acf.addFlag('DQ.Steering.HLT.doTau', lambda flags: flags.Input.Format is Format.POOL) + acf.addFlag('DQ.Steering.HLT.doGeneral', True) + acf.addFlag('DQ.Steering.HLT.doBjet', lambda flags: flags.Beam.Type is BeamType.Collisions) # b-jets disabled for cosmics following ATR-25036 + acf.addFlag('DQ.Steering.HLT.doBphys', True) + acf.addFlag('DQ.Steering.HLT.doCalo', True) + acf.addFlag('DQ.Steering.HLT.doEgamma', True) + acf.addFlag('DQ.Steering.HLT.doInDet', lambda flags: flags.Input.Format is Format.POOL) #keep disabled until ATR-27005 is fixed + acf.addFlag('DQ.Steering.HLT.doJet', lambda flags: flags.Input.Format is Format.POOL) #keep disabled until ATLASRECTS-7168 is fixed + acf.addFlag('DQ.Steering.HLT.doMET', lambda flags: flags.Input.Format is Format.POOL) #keep disabled until ATR-27007 is fixed + acf.addFlag('DQ.Steering.HLT.doMinBias', True) + acf.addFlag('DQ.Steering.HLT.doMuon', True) + acf.addFlag('DQ.Steering.HLT.doTau', True) return acf