Commit cda52649 authored by Noemi Calace's avatar Noemi Calace Committed by Edward Moyse
Browse files

Updating code for ITk tracking geometry material map creation

parent 38db6913
......@@ -24,11 +24,9 @@ def _setupCondDB(flags, CoolDataBaseFolder, quiet=True):
if flags.Detector.GeometryITk:
AtlasMaterialTag = flags.ITk.trackingGeometry.materialTag+str(flags.ITk.trackingGeometry.version)+'_'
cfolder = CoolDataBaseFolder +'<tag>TagInfoMajor/'+AtlasMaterialTag+'/GeoAtlas</tag>'
if flags.Detector.GeometryITk and flags.ITk.trackingGeometry.loadLocalDbForMaterialMaps:
DataBaseName=flags.ITk.trackingGeometry.localDatabaseName
from IOVDbSvc.IOVDbSvcConfig import addFolders
result.merge(addFolders(flags,"/GLOBAL/TrackingGeo/LayerMaterialITK",detDb=DataBaseName, tag=AtlasMaterialTag))
cfolder = CoolDataBaseFolder +'<tag>TagInfoMajor/'+AtlasMaterialTag+'</tag>'
......
......@@ -15,4 +15,4 @@ atlas_add_component( TrkDetDescrAlgs
# Install files from the package:
atlas_install_headers( TrkDetDescrAlgs )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
//////////////////////////////////////////////////////////////////
// MaterialMapping.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef TRKDETDESCRALGS_MATERIALMAPPING_H
#define TRKDETDESCRALGS_MATERIALMAPPING_H
#define LEGACY_TRKGEOM
// Athena & Gaudi includes
#include "AthenaBaseComps/AthAlgorithm.h"
......@@ -19,8 +20,19 @@
#include <string>
#include <map>
#include "GeoPrimitives/GeoPrimitives.h"
#include "StoreGate/ReadHandleKey.h"
#include "TrkGeometry/MaterialStepCollection.h"
#include "StoreGate/ReadHandleKey.h"
#include "TrkGeometry/MaterialStepCollection.h"
//TrkDetDescr Algs, Interfaces, Utils
#include "TrkDetDescrInterfaces/IMaterialMapper.h"
#include "TrkDetDescrInterfaces/ILayerMaterialCreator.h"
#include "TrkDetDescrInterfaces/ILayerMaterialAnalyser.h"
// TrkExtrapolation
#include "TrkExInterfaces/IExtrapolationEngine.h"
// TrkGeometry
#include "TrkGeometry/TrackingGeometry.h"
#ifdef LEGACY_TRKGEOM
#include "TrkDetDescrInterfaces/ITrackingGeometrySvc.h"
#endif
#ifdef TRKDETDESCR_MEMUSAGE
#include "TrkDetDescrUtils/MemoryLogger.h"
......@@ -43,7 +55,6 @@ namespace Trk {
class Layer;
class TrackingVolume;
class TrackingGeometry;
class SurfaceMaterialRecord;
class LayerMaterialRecord;
class LayerMaterialMap;
......@@ -52,11 +63,6 @@ namespace Trk {
class BinnedLayerMaterial;
class CompressedLayerMaterial;
class ElementTable;
class IExtrapolationEngine;
class IMaterialMapper;
class ILayerMaterialAnalyser;
class ILayerMaterialCreator;
class ITrackingGeometrySvc;
/** @class MaterialMapping
......@@ -85,7 +91,7 @@ namespace Trk {
/** standard Athena-Algorithm method */
StatusCode finalize();
private:
/** Associate the Step to the Layer */
......@@ -104,15 +110,13 @@ namespace Trk {
//!< create the LayerMaterialRecord */
void insertLayerMaterialRecord(const Trk::Layer& lay);
/** Retrieve the TrackingGeometry */
StatusCode retrieveTrackingGeometry();
/** Tracking Geometry */
ServiceHandle<Trk::ITrackingGeometrySvc> m_trackingGeometrySvc; //!< Name of the TrackingGeometrySvc
mutable const TrackingGeometry* m_trackingGeometry; //!< The underlying TrackingGeometry
/** Retrieve the TrackingGeometry and its informations */
StatusCode handleTrackingGeometry();
const TrackingGeometry& trackingGeometry() const;
bool m_checkForEmptyHits; //!< use extrapoaltion engine to check for empty hits
ToolHandle<IExtrapolationEngine> m_extrapolationEngine; //!< cross-check for empty hit scaling
ToolHandle<IExtrapolationEngine> m_extrapolationEngine {this, "ExtrapolationEngine", "", "Extrapolation Engine"};
std::string m_mappingVolumeName;
const Trk::TrackingVolume* m_mappingVolume;
......@@ -127,13 +131,13 @@ namespace Trk {
bool m_useLayerThickness; //!< use the actual layer thickness
int m_associationType;
ToolHandle<ILayerMaterialAnalyser> m_layerMaterialRecordAnalyser; //!< the layer material analyser for the layer material record
ToolHandleArray<ILayerMaterialAnalyser> m_layerMaterialAnalysers; //!< the layer material analysers per creator (if wanted)
ToolHandleArray<ILayerMaterialCreator> m_layerMaterialCreators; //!< the layer material creators
ToolHandle<ILayerMaterialAnalyser> m_layerMaterialRecordAnalyser {this, "LayerMaterialRecordAnalyser", "", "Layer material analyser for the layer material record"};
ToolHandleArray<ILayerMaterialAnalyser> m_layerMaterialAnalysers {this, "LayerMaterialAnalysers", {}, "Layer material analysers per creator (if wanted)"};
ToolHandleArray<ILayerMaterialCreator> m_layerMaterialCreators {this, "LayerMaterialCreators", {}, "Layer material creators"};
/** Mapper and Inspector */
bool m_mapMaterial;
ToolHandle<IMaterialMapper> m_materialMapper; //!< Pointer to an IMaterialMapper algTool
ToolHandle<IMaterialMapper> m_materialMapper {this, "MaterialMapper", "" , "IMaterialMapper algTool"};
bool m_mapComposition; //!< map the composition of the material
double m_minCompositionFraction; //!< minimal fraction to be accounted for the composition recording
......@@ -154,12 +158,44 @@ namespace Trk {
int m_layerMaterialScreenOutput;
#ifdef LEGACY_TRKGEOM
ServiceHandle<ITrackingGeometrySvc> m_trackingGeometrySvc {this, "TrackingGeometrySvc", "",""};
#endif
void throwFailedToGetTrackingGeometry() const;
const TrackingGeometry* retrieveTrackingGeometry(const EventContext& ctx) const {
#ifdef LEGACY_TRKGEOM
if (m_trackingGeometryReadKey.key().empty()) {
return m_trackingGeometrySvc->trackingGeometry();
}
#endif
SG::ReadCondHandle<TrackingGeometry> handle(m_trackingGeometryReadKey,ctx);
if (!handle.isValid()) {
ATH_MSG_FATAL("Could not load TrackingGeometry with name '" << m_trackingGeometryReadKey.key() << "'. Aborting." );
throwFailedToGetTrackingGeometry();
}
return handle.cptr();
}
SG::ReadCondHandleKey<TrackingGeometry> m_trackingGeometryReadKey
{this, "TrackingGeometryReadKey", "", "Key of the TrackingGeometry conditions data."};
#ifdef TRKDETDESCR_MEMUSAGE
MemoryLogger m_memoryLogger; //!< in case the memory is logged
#endif
};
inline const Trk::TrackingGeometry& Trk::MaterialMapping::trackingGeometry() const {
const Trk::TrackingGeometry *tracking_geometry = retrieveTrackingGeometry(Gaudi::Hive::currentContext());
if (!tracking_geometry){
ATH_MSG_FATAL("Did not get valid TrackingGeometry. Aborting." );
throw GaudiException("MaterialMapping", "Problem with TrackingGeometry loading.", StatusCode::FAILURE);
}
return *tracking_geometry;
}
}
#endif
......@@ -8,6 +8,7 @@
#ifndef TRKDETDESCRALGS_MATERIALVALIDATION_H
#define TRKDETDESCRALGS_MATERIALVALIDATION_H
#define LEGACY_TRKGEOM
// Gaudi includes
#include "AthenaBaseComps/AthAlgorithm.h"
......@@ -16,12 +17,15 @@
#include "GaudiKernel/ToolHandle.h"
//Eigen
#include "GeoPrimitives/GeoPrimitives.h"
// TrkGeometry
#include "TrkGeometry/TrackingGeometry.h"
#ifdef LEGACY_TRKGEOM
#include "TrkDetDescrInterfaces/ITrackingGeometrySvc.h"
#endif
namespace Trk {
class ITrackingGeometrySvc;
class IMaterialMapper;
class TrackingGeometry;
class TrackingVolume;
class Surface;
......@@ -72,16 +76,32 @@ namespace Trk {
const Amg::Vector3D& position,
const Amg::Vector3D& direction);
/** Retrieve the TrackingGeometry */
StatusCode retrieveTrackingGeometry();
/** Tracking Geometry */
ServiceHandle<Trk::ITrackingGeometrySvc> m_trackingGeometrySvc; //!< Name of the TrackingGeometrySvc
mutable const TrackingGeometry* m_trackingGeometry; //!< The underlying TrackingGeometry
const TrackingGeometry& trackingGeometry() const;
#ifdef LEGACY_TRKGEOM
ServiceHandle<ITrackingGeometrySvc> m_trackingGeometrySvc {this, "TrackingGeometrySvc", "",""};
#endif
void throwFailedToGetTrackingGeometry() const;
const TrackingGeometry* retrieveTrackingGeometry(const EventContext& ctx) const {
#ifdef LEGACY_TRKGEOM
if (m_trackingGeometryReadKey.key().empty()) {
return m_trackingGeometrySvc->trackingGeometry();
}
#endif
SG::ReadCondHandle<TrackingGeometry> handle(m_trackingGeometryReadKey,ctx);
if (!handle.isValid()) {
ATH_MSG_FATAL("Could not load TrackingGeometry with name '" << m_trackingGeometryReadKey.key() << "'. Aborting." );
throwFailedToGetTrackingGeometry();
}
return handle.cptr();
}
SG::ReadCondHandleKey<TrackingGeometry> m_trackingGeometryReadKey
{this, "TrackingGeometryReadKey", "", "Key of the TrackingGeometry conditions data."};
/** Mapper and Inspector */
ToolHandle<IMaterialMapper> m_materialMapper; //!< Pointer to an IMaterialMapper algTool
int m_maxMaterialMappingEvents; //!< limit the number of validation records to avoid 2G files
int m_maxMaterialValidationEvents; //!< limit the number of validation records to avoid 2G files
Rndm::Numbers* m_flatDist; //!< Random generator for flat distribution
......@@ -91,9 +111,16 @@ namespace Trk {
double m_accTinX0; //!< accumulated t in X0
};
inline const Trk::TrackingGeometry& Trk::MaterialValidation::trackingGeometry() const {
const Trk::TrackingGeometry *tracking_geometry = retrieveTrackingGeometry(Gaudi::Hive::currentContext());
if (!tracking_geometry){
ATH_MSG_FATAL("Did not get valid TrackingGeometry. Aborting." );
throw GaudiException("MaterialValidation", "Problem with TrackingGeometry loading.", StatusCode::FAILURE);
}
return *tracking_geometry;
}
}
#endif
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""Define methods to configure TrkDetDescrAlgs"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def ITkMaterialMappingCfg(flags, name="ITkMaterialMapping", **kwargs):
"""Return configured ComponentAccumulator and tool for MaterialMapping"""
result=ComponentAccumulator()
LayerMaterialName = 'LayerMaterialITK'
LayerMaterialDirectory = '/GLOBAL/TrackingGeo/'
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelGeometryCfg
itkPixel = ITkPixelGeometryCfg(flags)
result.merge(itkPixel)
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
itkStrip = ITkStripGeometryCfg(flags)
result.merge(itkStrip)
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
result.merge(BeamPipeGeometryCfg(flags))
# get the correct TrackingGeometry setup
geom_svc=None
geom_cond_key=''
from InDetRecExample.TrackingCommon import use_tracking_geometry_cond_alg
if not use_tracking_geometry_cond_alg :
from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
acc = TrackingGeometrySvcCfg(flags)
geom_svc = acc.getPrimary()
result.merge(acc)
kwargs.setdefault("TrackingGeometrySvc", geom_svc)
else :
from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
result.merge( TrackingGeometryCondAlgCfg(flags) )
geom_cond_key = 'AtlasTrackingGeometry'
kwargs.setdefault("TrackingGeometryReadKey", geom_cond_key)
if 'MappingVolumeName' not in kwargs :
kwargs.setdefault("MappingVolumeName", 'InDet::Containers::InnerDetector')
if 'ExtrapolationEngine' not in kwargs :
from TrkConfig.AtlasExtrapolationEngineConfig import AtlasExtrapolationEngineCfg
kwargs.setdefault("ExtrapolationEngine", result.getPrimaryAndMerge(AtlasExtrapolationEngineCfg(flags)))
if 'MaterialMapper' not in kwargs :
MaterialMapper = CompFactory.Trk.MaterialMapper("MaterialMapper")
kwargs.setdefault("MaterialMapper", MaterialMapper)
if 'LayerMaterialRecordAnalyser' not in kwargs :
LayerMaterialAnalyser = CompFactory.Trk.LayerMaterialAnalyser(name="LayerMaterialRecordAnalyser")
kwargs.setdefault("LayerMaterialRecordAnalyser", LayerMaterialAnalyser)
if 'LayerMaterialCreators' not in kwargs :
BinnedLayerMaterialCreator = CompFactory.Trk.BinnedLayerMaterialCreator(name="BinnedLayerMaterialCreator")
BinnedLayerMaterialCreator.LayerMaterialName = LayerMaterialName
BinnedLayerMaterialCreator.LayerMaterialDirectory = LayerMaterialDirectory
LayerMaterialCreators = [BinnedLayerMaterialCreator]
kwargs.setdefault("LayerMaterialCreators", LayerMaterialCreators)
if 'LayerMaterialAnalysers' not in kwargs :
BinnedLayerMaterialAnalyser = CompFactory.Trk.LayerMaterialAnalyser(name="BinnedLayerMaterialAnalyser")
BinnedLayerMaterialAnalyser.LayerMaterialName = LayerMaterialName
BinnedLayerMaterialAnalyser.ValidationTreeName = 'BinnedLayerMaterialAnalyser'
BinnedLayerMaterialAnalyser.ValidationTreeDescription = 'Output of the BinnedLayerMaterialAnalyser'
BinnedLayerMaterialAnalyser.ValidationTreeFolder = '/val/BinnedLayerMaterialAnalyser'
LayerMaterialAnalysers = [ BinnedLayerMaterialAnalyser ]
kwargs.setdefault("LayerMaterialAnalysers", LayerMaterialAnalysers)
histSvc = CompFactory.THistSvc(Output = ["val DATAFILE='AtlasGeant4Geometry.root' TYPE='ROOT' OPT='RECREATE'"])
result.addService( histSvc )
algo = CompFactory.Trk.MaterialMapping(name=name, **kwargs)
result.addEventAlgo(algo, primary = True)
from RegistrationServices.OutputConditionsAlgConfig import OutputConditionsAlgCfg
result.merge(OutputConditionsAlgCfg(flags, name = "CondAlg_Material",
outputFile="AtlasLayerMaterial.pool.root",
ObjectList=['Trk::LayerMaterialMap#'+LayerMaterialDirectory+LayerMaterialName],
WriteIOV=True,IOVTagList=[flags.ITk.trackingGeometry.materialTag] ))
result.addService(CompFactory.IOVRegistrationSvc(RecreateFolders = True))
return result
def ITkMaterialValidationCfg(flags, name="MaterialValidation", **kwargs):
"""Return configured ComponentAccumulator and tool for MaterialMapping"""
result=ComponentAccumulator()
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelGeometryCfg
itkPixel = ITkPixelGeometryCfg(flags)
result.merge(itkPixel)
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
itkStrip = ITkStripGeometryCfg(flags)
result.merge(itkStrip)
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
result.merge(BeamPipeGeometryCfg(flags))
# get the correct TrackingGeometry setup
geom_svc=None
geom_cond_key=''
from InDetRecExample.TrackingCommon import use_tracking_geometry_cond_alg
if not use_tracking_geometry_cond_alg :
from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
acc = TrackingGeometrySvcCfg(flags)
geom_svc = acc.getPrimary()
result.merge(acc)
kwargs.setdefault("TrackingGeometrySvc", geom_svc)
else :
from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
result.merge( TrackingGeometryCondAlgCfg(flags) )
geom_cond_key = 'AtlasTrackingGeometry'
kwargs.setdefault("TrackingGeometryReadKey", geom_cond_key)
if 'MaterialMapper' not in kwargs :
MaterialMapper = CompFactory.Trk.MaterialMapper("MaterialMapper")
kwargs.setdefault("MaterialMapper", MaterialMapper)
if 'MinEta' not in kwargs :
minEta = -6.
kwargs.setdefault("MinEta", minEta)
if 'MaxEta' not in kwargs :
maxEta = 6.
kwargs.setdefault("MaxEta", maxEta)
histSvc = CompFactory.THistSvc(Output = ["val DATAFILE='AtlasTrackingGeometry.root' TYPE='ROOT' OPT='RECREATE'"])
result.addService( histSvc )
algo = CompFactory.Trk.MaterialValidation(name=name, **kwargs)
result.addEventAlgo(algo, primary = True)
return result
#!/usr/bin/env python
"""
Run material mapping for tracking geometry.
Uses as MaterialStepsCollections as input.
"""
from AthenaCommon.Configurable import Configurable
from AthenaCommon.Logging import log
from argparse import ArgumentParser
from AthenaConfiguration.AllConfigFlags import ConfigFlags
Configurable.configurableRun3Behavior = True
# Argument parsing
parser = ArgumentParser("RunMaterialMappingITk.py")
parser.add_argument("detectors", metavar="detectors", type=str, nargs="*",
help="Specify the list of detectors")
parser.add_argument("--localgeo", default=False, action="store_true",
help="Use local geometry Xml files")
parser.add_argument("-V", "--verboseAccumulators", default=False,
action="store_true",
help="Print full details of the AlgSequence")
parser.add_argument("-S", "--verboseStoreGate", default=False,
action="store_true",
help="Dump the StoreGate(s) each event iteration")
parser.add_argument("--maxEvents",default=10, type=int,
help="The number of events to run. 0 skips execution")
parser.add_argument("--geometrytag",default="ATLAS-P2-ITK-24-00-00", type=str,
help="The geometry tag to use")
parser.add_argument("--inputfile",
default="MaterialStepCollection.root",
help="The input material step file to use")
args = parser.parse_args()
# Some info about the job
print("----MaterialMapping for ITk geometry----")
print()
print("Using Geometry Tag: "+args.geometrytag)
if args.localgeo:
print("...overridden by local Geometry Xml files")
print("Input File:"+args.inputfile)
if not args.detectors:
print("Running complete detector")
else:
print("Running with: {}".format(", ".join(args.detectors)))
print()
LocalDataBaseName = ConfigFlags.ITk.trackingGeometry.localDatabaseName
ConfigFlags.IOVDb.DBConnection='sqlite://;schema='+LocalDataBaseName+';dbname=OFLP200'
# necessity to create a new PoolFileCatalog
import os
if os.path.exists('./PoolFileCatalog.xml') :
print('[!] PoolFileCatalog exists in the run directory (may use old PFN!)')
print('[>] Deleting it now !')
os.remove('./PoolFileCatalog.xml')
ConfigFlags.Input.isMC = True
if args.localgeo:
configFlags.GeoModel.useLocalGeometry = True
from AthenaConfiguration.DetectorConfigFlags import setupDetectorsFromList
detectors = args.detectors if 'detectors' in args and args.detectors else ['ITkPixel', 'ITkStrip']
detectors.append('Bpipe') # always run with beam pipe
setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True)
ConfigFlags.GeoModel.AtlasVersion = args.geometrytag
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-SIM-00-00-00"
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.TrackingGeometry.MaterialSource = "None"
ConfigFlags.Beam.Type =''
ConfigFlags.Detector.GeometryCalo = False
ConfigFlags.Detector.GeometryMuon = False
# This should run serially for the moment.
ConfigFlags.Concurrency.NumThreads = 1
ConfigFlags.Concurrency.NumConcurrentEvents = 1
import glob
FileList = glob.glob(args.inputfile)
ConfigFlags.Input.Files = FileList
log.debug('Lock config flags now.')
ConfigFlags.lock()
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
cfg=MainServicesCfg(ConfigFlags)
### setup dumping of additional information
if args.verboseAccumulators:
cfg.printConfig(withDetails=True)
if args.verboseStoreGate:
cfg.getService("StoreGateSvc").Dump = True
log.debug('Dumping of ConfigFlags now.')
ConfigFlags.dump()
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
cfg.merge(PoolReadCfg(ConfigFlags))
from TrkDetDescrAlgs.TrkDetDescrAlgsConfig import ITkMaterialMappingCfg
cfg.merge(ITkMaterialMappingCfg(ConfigFlags))
cfg.printConfig(withDetails = True, summariseProps = True)
events = args.maxEvents
if events<=0:
events = 10000000000
cfg.run(maxEvents=events)
f=open("MaterialMappingITk.pkl","wb")
cfg.store(f)
f.close()
#!/usr/bin/env python
"""
Run material validation to check material maps for tracking geometry.
"""
from AthenaCommon.Configurable import Configurable
from AthenaCommon.Logging import log
from argparse import ArgumentParser
from AthenaConfiguration.AllConfigFlags import ConfigFlags
Configurable.configurableRun3Behavior = True
# Argument parsing
parser = ArgumentParser("RunMaterialValidationITk.py")
parser.add_argument("detectors", metavar="detectors", type=str, nargs="*",
help="Specify the list of detectors")
parser.add_argument("--localgeo", default=False, action="store_true",
help="Use local geometry Xml files")
parser.add_argument("-V", "--verboseAccumulators", default=False,
action="store_true",
help="Print full details of the AlgSequence")
parser.add_argument("-S", "--verboseStoreGate", default=False,
action="store_true",
help="Dump the StoreGate(s) each event iteration")
parser.add_argument("--maxEvents",default=10, type=int,
help="The number of events to run. 0 skips execution")
parser.add_argument("--geometrytag",default="ATLAS-P2-ITK-24-00-00", type=str,
help="The geometry tag to use")
args = parser.parse_args()
# Some info about the job
print("----MaterialValidation for ITk geometry----")
print()
print("Using Geometry Tag: "+args.geometrytag)
if args.localgeo:
print("...overridden by local Geometry Xml files")
print()
ConfigFlags.Input.isMC = True
if args.localgeo:
configFlags.GeoModel.useLocalGeometry = True
from AthenaConfiguration.DetectorConfigFlags import setupDetectorsFromList
detectors = args.detectors if 'detectors' in args and args.detectors else ['ITkPixel', 'ITkStrip']
detectors.append('Bpipe') # always run with beam pipe
setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True)
ConfigFlags.GeoModel.AtlasVersion = args.geometrytag
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-SIM-00-00-00"
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.TrackingGeometry.MaterialSource = "COOL"
ConfigFlags.Beam.Type =''
ConfigFlags.Detector.GeometryCalo = False
ConfigFlags.Detector.GeometryMuon = False
# This should run serially for the moment.
ConfigFlags.Concurrency.NumThreads = 1
ConfigFlags.Concurrency.NumConcurrentEvents = 1