1 """Define methods to construct configured CSC Digitization tools and algorithms
3 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.Enums
import ProductionStep
8 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
9 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
10 from MuonConfig.MuonCondAlgConfig
import CscCondDbAlgCfg
11 from MuonConfig.MuonByteStreamCnvTestConfig
import CscDigitToCscRDOCfg
12 from MuonConfig.MuonCablingConfig
import CSCCablingConfigCfg
13 from DigitizationConfig.TruthDigitizationOutputConfig
import TruthDigitizationOutputCfg
14 from DigitizationConfig.PileUpToolsConfig
import PileUpToolsCfg
15 from DigitizationConfig.PileUpMergeSvcConfig
import PileUpMergeSvcCfg, PileUpXingFolderCfg
29 """Return a PileUpXingFolder tool configured for CSC"""
32 kwargs.setdefault(
"CacheRefreshFrequency", 1.0)
33 kwargs.setdefault(
"ItemList", [
"CSCSimHitCollection#CSC_Hits"])
38 """Return a ComponentAccumulator with configured CscDigitizationTool"""
40 if flags.Digitization.PileUp
and not flags.Common.isOverlay:
42 if not flags.Digitization.DoXingByXingPileUp:
44 kwargs.setdefault(
"OnlyUseContainerName",
True)
45 kwargs.setdefault(
"PileUpMergeSvc", acc.getPrimaryAndMerge(
PileUpMergeSvcCfg(flags, Intervals=intervals)).name)
47 kwargs.setdefault(
"OnlyUseContainerName",
False)
48 kwargs.setdefault(
"PileUpMergeSvc",
'')
49 if flags.Digitization.DoXingByXingPileUp:
52 kwargs.setdefault(
"pedestal", 0.0)
53 kwargs.setdefault(
"WindowLowerOffset", -25.0)
54 kwargs.setdefault(
"WindowUpperOffset", 25.0)
55 kwargs.setdefault(
"isPileUp",
False)
56 kwargs.setdefault(
"amplification", 0.43e5)
57 kwargs.setdefault(
"NewDigitEDM",
True)
58 kwargs.setdefault(
"DriftVelocity", 39)
59 kwargs.setdefault(
"ElectronEnergy", 66)
61 from MuonConfig.MuonCalibrationConfig
import CscCalibToolCfg
62 kwargs.setdefault(
"cscCalibTool", acc.popToolsAndMerge(
CscCalibToolCfg(flags)))
64 CscDigitizationTool = CompFactory.CscDigitizationTool
70 """Return a ComponentAccumulator with configured CscDigitizationTool"""
72 kwargs.setdefault(
"InputObjectName",
"CSC_Hits")
73 kwargs.setdefault(
"OutputObjectName",
"CSC_DIGITS")
74 if flags.Common.ProductionStep == ProductionStep.PileUpPresampling:
75 kwargs.setdefault(
"CSCSimDataCollectionOutputName", flags.Overlay.BkgPrefix +
"CSC_SDO")
77 kwargs.setdefault(
"CSCSimDataCollectionOutputName",
"CSC_SDO")
79 acc.setPrivateTools(tool)
84 """Return a ComponentAccumulator with CscDigitizationTool configured for Overlay"""
85 kwargs.setdefault(
"OnlyUseContainerName",
False)
86 kwargs.setdefault(
"OutputObjectName", flags.Overlay.SigPrefix +
"CSC_DIGITS")
87 kwargs.setdefault(
"CSCSimDataCollectionOutputName", flags.Overlay.SigPrefix +
"CSC_SDO")
88 kwargs.setdefault(
"PileUpMergeSvc",
'')
93 """Return ComponentAccumulator with Output for CSC. Not standalone."""
95 if flags.Output.doWriteRDO:
96 ItemList = [
"CscRawDataContainer#*"]
97 if flags.Digitization.EnableTruth:
98 ItemList += [
"CscSimDataCollection#*CSC_SDO"]
105 """Return ComponentAccumulator for CSC digitization"""
108 if "PileUpTools" not in kwargs:
110 kwargs[
"PileUpTools"] = PileUpTools
116 """Return ComponentAccumulator with CSC Overlay digitization"""
120 if flags.Common.ProductionStep != ProductionStep.FastChain:
121 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
124 if "DigitizationTool" not in kwargs:
126 kwargs[
"DigitizationTool"] = tool
128 if flags.Concurrency.NumThreads > 0:
129 kwargs.setdefault(
"Cardinality", flags.Concurrency.NumThreads)
132 kwargs.setdefault(
"ExtraInputs", flags.Overlay.ExtraInputs)
134 CscDigitBuilder = CompFactory.CscDigitBuilder
135 acc.addEventAlgo(
CscDigitBuilder(name=
"CscOverlayDigitBuilder", **kwargs))
141 """Return ComponentAccumulator for CSC digitization and Output"""
148 """Return ComponentAccumulator with CSC Digitization and Digit to CSCRDO"""