11 from argparse
import ArgumentParser
12 parser = ArgumentParser(description=
'Script to to the IDAlignment')
15 parser.add_argument(
"-a",
'--accumulate', action=
"store_true", help=
'Run accumulation step')
16 parser.add_argument(
"-s",
'--solve', action=
"store_true", help=
'Run solve step')
17 parser.add_argument(
"-d",
'--dryRun', action=
"store_true", help=
'Only configure, print and dont execute')
20 parser.add_argument(
"-i",
"--input", default = [
"/afs/cern.ch/user/a/atlidali/public/CA_hackathon/InitialDerivation/calibScripts/data23_13p6TeV.00456316.calibration_IDCalib.merge.RAW._lb0541._SFO-ALL._0001.1"], nargs =
"+", help=
'Input file(s)')
21 parser.add_argument(
"--maxEvents", default = -1, type = int, help=
'Number of maximal processed events')
22 parser.add_argument(
"-t",
"--inputTracksCollection", default =
"CombinedInDetTracks", type = str, help=
'Name of the track collection to use')
25 parser.add_argument(
"--globalTag", default =
"CONDBR2-BLKPA-2023-03", help=
'Global tag')
26 parser.add_argument(
"--atlasVersion", default =
"ATLAS-R3S-2021-03-00-00", help=
'Global tag')
27 parser.add_argument(
"--projectName", default =
"data23_13p6TeV", help=
'Global tag')
29 parser.add_argument(
"--isBFieldOn", action=
"store_true", default =
True, help=
'Check if Bfield is non-zero')
30 parser.add_argument(
"--isCosmics", action=
"store_true", default =
False, help=
'Check if cosmics run')
31 parser.add_argument(
"--isHeavyIon", action=
"store_true", default =
False, help=
'Check if heavy ion run')
33 return parser.parse_args()
38 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
39 from InDetAlignConfig.IDAlignFlags
import createInDetAlignFlags
42 flags.addFlagsCategory(
"InDet.Align", createInDetAlignFlags, prefix=
True)
43 if kwargs[
"accumulate"]
and not kwargs[
"solve"]:
44 flags = flags.cloneAndReplace(
45 "Tracking.ActiveConfig",
46 f
"Tracking.{flags.Tracking.PrimaryPassConfig.value}Pass")
50 from RecJobTransforms.RecoSteering
import RecoSteering
58 if kwargs[
"accumulate"]
and not kwargs[
"solve"]:
59 os.makedirs(
"Accumulate", exist_ok =
True)
60 os.chdir(
"Accumulate")
61 from InDetAlignConfig.AccumulateConfig
import AccumulateCfg
65 elif kwargs[
"solve"]
and not kwargs[
"accumulate"]:
66 os.makedirs(
"Solve", exist_ok =
True)
68 from InDetAlignConfig.SolveConfig
import SolveCfg
72 raise Exception(
"You can run either the acculumation step or the solve step, but not both at the same time!")