ATLAS Offline Software
InDetConfigFlags.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
4 from AthenaConfiguration.Enums import BeamType, ProductionStep
5 from Campaigns.Utils import Campaign
6 from TrkConfig.TrkConfigFlags import PrimaryPassConfig
7 
8 
10  icf = AthConfigFlags()
11 
12  # Detector flags
13  # Turn running of the truth seeded pseudo tracking only for pileup on and off.
14  # Only makes sense to run on RDO file where SplitDigi was used!
15  icf.addFlag("InDet.doSplitReco", False)
16  # Turn on running of PRD MultiTruthMaker
17  icf.addFlag("InDet.doTruth", lambda prevFlags:
18  prevFlags.Input.isMC or
19  (prevFlags.Overlay.DataOverlay and prevFlags.Common.ProductionStep is not ProductionStep.MinbiasPreprocessing))
20 
21  # defines if the X1X mode is used for the offline or not
22  icf.addFlag("InDet.selectSCTIntimeHits", lambda prevFlags: (
23  not(prevFlags.Beam.Type is BeamType.Cosmics or
24  prevFlags.Tracking.PrimaryPassConfig is PrimaryPassConfig.VtxBeamSpot)))
25  icf.addFlag("InDet.useDCS", True)
26  icf.addFlag("InDet.usePixelDCS", lambda prevFlags: (
27  prevFlags.InDet.useDCS and prevFlags.Detector.EnablePixel))
28  icf.addFlag("InDet.useSctDCS", lambda prevFlags: (
29  prevFlags.InDet.useDCS and prevFlags.Detector.EnableSCT))
30  # Use old (non CoolVectorPayload) SCT Conditions
31  icf.addFlag("InDet.ForceCoraCool", False)
32  # Use new (CoolVectorPayload) SCT Conditions
33  icf.addFlag("InDet.ForceCoolVectorPayload", False)
34  # Turn on SCT_ModuleVetoSvc, allowing it to be configured later
35  icf.addFlag("InDet.doSCTModuleVeto", False)
36  # Turn on SCT simple width calculation in clustering tool
37  icf.addFlag("InDet.doSCTSimpleWidth", True)
38  # Path to the JSON file to mask the modules for Pixel.
39  # A non-empty string activates the veto automatically
40  icf.addFlag("InDet.JsonPathPixelModuleVeto", "")
41 
42  # Enable check for dead modules and FEs
43  icf.addFlag("InDet.checkDeadElementsOnTrack", True)
44  # Turn running of Event Info TRT Occupancy Filling Alg on and off (also whether it is used in TRT PID calculation)
45  icf.addFlag("InDet.doTRTGlobalOccupancy", False)
46  icf.addFlag("InDet.noTRTTiming", lambda prevFlags:
47  prevFlags.Beam.Type is BeamType.SingleBeam and
48  prevFlags.Detector.EnableTRT)
49  icf.addFlag("InDet.doTRTPhase", lambda prevFlags:
50  prevFlags.Beam.Type is BeamType.Cosmics and
51  prevFlags.Detector.EnableTRT)
52  # Disabled for data-taking up to 2024 included and MC campaigns up to MC23e included
53  icf.addFlag("InDet.doTRTArToTCorr", lambda prevFlags: (
54  (not prevFlags.Input.isMC and prevFlags.Input.DataYear >= 2025) or
55  (prevFlags.Input.isMC and prevFlags.Input.MCCampaign >= Campaign.MC23g)
56  ))
57 
58  # Save cluster information to Derivation
59  icf.addFlag("InDet.DRAWZSelection", False)
60  icf.addFlag("InDet.DAODStorePixel", lambda prevFlags:
61  prevFlags.Detector.EnablePixel)
62  icf.addFlag("InDet.DAODStoreSCT", lambda prevFlags:
63  prevFlags.Detector.EnableSCT)
64  icf.addFlag("InDet.DAODStoreTRT", lambda prevFlags:
65  prevFlags.Detector.EnableTRT)
66  icf.addFlag("InDet.DAODStoreExtra", True)
67 
68  # Specific flags for pixel study
69  icf.addFlag("InDet.PixelDumpMode", 1)
70  icf.addFlag("InDet.PixelConfig.version", 'PixelConditionsAlgorithms/v1/')
71  icf.addFlag("InDet.PixelConfig.UserInputFileName", '')
72  icf.addFlag("InDet.doPixelFEcheckExpHits", True)
73 
74  # Save SiHitCollections to RDO
75  icf.addFlag("InDet.savePixelSiHits", lambda prevFlags:
76  prevFlags.BTagging.Trackless or
77  prevFlags.BTagging.savePixelHits)
78  icf.addFlag("InDet.saveSCTSiHits", lambda prevFlags:
79  prevFlags.BTagging.Trackless or
80  prevFlags.BTagging.saveSCTHits)
81 
82  # SCT prescale flags
83  icf.addFlag("InDet.SCTxAODPrescale",
84  lambda prevFlags: 50 if prevFlags.Input.TriggerStream == 'express' else (10 if prevFlags.Input.TriggerStream == 'IDprescaledL1' else 1))
85 
86  # SCT skimming flags
87  icf.addFlag("InDet.SCTxAODZmumuSkimming", False)
88  icf.addFlag("InDet.SCTxAODSaveOnlyAssociatedMSOS", False)
89 
90  # config flags for alignment configuration
91  from InDetAlignConfig.IDAlignFlags import createInDetAlignFlags
92  icf.addFlagsCategory("InDet.Align", createInDetAlignFlags, prefix=True)
93 
94 
95  return icf
python.InDetConfigFlags.createInDetConfigFlags
def createInDetConfigFlags()
Definition: InDetConfigFlags.py:9