10def TRTPreProcessingCfg(flags):
11 acc = ComponentAccumulator()
12 if not flags.Detector.EnableTRT:
13 return acc
14
15 if (flags.Input.Format is Format.BS
16 or 'TRT_RDOs' in flags.Input.Collections
17 or f'{flags.Overlay.BkgPrefix}TRT_RDOs' in flags.Input.Collections):
18
19
20
21
22 if flags.Beam.Type is BeamType.Cosmics:
23 from InDetConfig.InDetPrepRawDataFormationConfig import (
24 InDetTRT_NoTime_RIO_MakerCfg)
25 acc.merge(InDetTRT_NoTime_RIO_MakerCfg(flags))
26 else:
27 from InDetConfig.InDetPrepRawDataFormationConfig import (
28 InDetTRT_RIO_MakerCfg)
29 acc.merge(InDetTRT_RIO_MakerCfg(flags))
30
31 if flags.InDet.doSplitReco:
32 from InDetConfig.InDetPrepRawDataFormationConfig import (
33 InDetTRT_RIO_MakerPUCfg)
34 acc.merge(InDetTRT_RIO_MakerPUCfg(flags))
35
36
37
38
39 if flags.InDet.doTRTGlobalOccupancy:
40 from InDetConfig.TRT_ElectronPidToolsConfig import (
41 TRTOccupancyIncludeCfg)
42 acc.merge(TRTOccupancyIncludeCfg(flags))
43
44
45
46
47 if flags.InDet.doTruth and (
48 flags.Beam.Type is not BeamType.Cosmics and
49 'PRD_MultiTruthTRT' not in flags.Input.Collections):
50 from InDetConfig.InDetTruthAlgsConfig import (
51 InDetPRD_MultiTruthMakerTRTCfg)
52 acc.merge(InDetPRD_MultiTruthMakerTRTCfg(flags))
53 if flags.InDet.doSplitReco:
54 from InDetConfig.InDetTruthAlgsConfig import (
55 InDetPRD_MultiTruthMakerTRTPUCfg)
56 acc.merge(InDetPRD_MultiTruthMakerTRTPUCfg(flags))
57 return acc
58
59