ATLAS Offline Software
LArG4ECConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from LArG4EC import LArWheelCalculatorEnum
6 
7 
8 def CalibrationCalculatorCfg(name="CalibrationCalculator", **kwargs):
9  result = ComponentAccumulator()
10  result.addService(CompFactory.LArG4.EC.CalibrationCalculator(name, **kwargs), primary=True)
11  return result
12 
13 def EMECPosInnerWheelCalibrationCalculatorCfg(flags, name="EMECPosInnerWheelCalibrationCalculator", **kwargs):
14  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel)
15  kwargs.setdefault("zSide", 1)
16  result = ComponentAccumulator()
17  kwargs.setdefault("GeometryCalculator",result.getPrimaryAndMerge(EMECPosInnerWheelCorrOffCalculatorCfg(flags)).name)
18  result.addService(CompFactory.LArG4.EC.CalibrationCalculator(name, **kwargs), primary=True)
19  return result
20 
21 def EMECNegInnerWheelCalibrationCalculatorCfg(flags, name="EMECNegInnerWheelCalibrationCalculator", **kwargs):
22  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel)
23  kwargs.setdefault("zSide", -1)
24  result = ComponentAccumulator()
25  kwargs.setdefault("GeometryCalculator",result.getPrimaryAndMerge(EMECNegInnerWheelCorrOffCalculatorCfg(flags)).name)
26  result.addService(CompFactory.LArG4.EC.CalibrationCalculator(name, **kwargs), primary=True)
27  return result
28 
29 def EMECPosOuterWheelCalibrationCalculatorCfg(flags, name="EMECPosOuterWheelCalibrationCalculator", **kwargs):
30  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel)
31  kwargs.setdefault("zSide", 1)
32  result = ComponentAccumulator()
33  kwargs.setdefault("GeometryCalculator",result.getPrimaryAndMerge(EMECPosOuterWheelCorrOffCalculatorCfg(flags)).name)
34  result.addService(CompFactory.LArG4.EC.CalibrationCalculator(name, **kwargs), primary=True)
35  return result
36 
37 def EMECNegOuterWheelCalibrationCalculatorCfg(flags, name="EMECNegOuterWheelCalibrationCalculator", **kwargs):
38  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel)
39  kwargs.setdefault("zSide", -1)
40  result = ComponentAccumulator()
41  kwargs.setdefault("GeometryCalculator",result.getPrimaryAndMerge(EMECNegOuterWheelCorrOffCalculatorCfg(flags)).name)
42  result.addService(CompFactory.LArG4.EC.CalibrationCalculator(name, **kwargs), primary=True)
43  return result
44 
45 def EMECPosBackOuterBarretteCalibrationCalculatorCfg(flags, name="EMECPosBackOuterBarretteCalibrationCalculator", **kwargs):
46  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.BackOuterBarretteWheelCalib)
47  kwargs.setdefault("zSide", 1)
48  result = ComponentAccumulator()
49  kwargs.setdefault("GeometryCalculator",result.getPrimaryAndMerge(EMECPosBackOuterBarretteCorrOffCalculatorCfg(flags)).name)
50  result.addService(CompFactory.LArG4.EC.CalibrationCalculator(name, **kwargs), primary=True)
51  return result
52 
53 def EMECNegBackOuterBarretteCalibrationCalculatorCfg(flags, name="EMECNegBackOuterBarretteCalibrationCalculator", **kwargs):
54  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.BackOuterBarretteWheelCalib)
55  kwargs.setdefault("zSide", -1)
56  result = ComponentAccumulator()
57  kwargs.setdefault("GeometryCalculator",result.getPrimaryAndMerge(EMECNegBackOuterBarretteCorrOffCalculatorCfg(flags)).name)
58  result.addService(CompFactory.LArG4.EC.CalibrationCalculator(name, **kwargs), primary=True)
59  return result
60 
61 def EMECPresamplerCalibrationCalculatorCfg(flags, name="EMECPresamplerCalibrationCalculator", **kwargs):
62  result = ComponentAccumulator()
63  result.addService(CompFactory.LArG4.EC.PresamplerCalibrationCalculator(name, **kwargs), primary=True)
64  return result
65 
66 def EndcapCryostatCalibrationCalculatorCfg(flags, name="EndcapCryostatCalibrationCalculator", **kwargs):
67  result = ComponentAccumulator()
68  result.addService( CompFactory.LArG4.EndcapCryostat.CalibrationCalculator(name, **kwargs), primary=True)
69  return result
70 
71 def EndcapCryostatCalibrationLArCalculatorCfg(flags, name="EndcapCryostatCalibrationLArCalculator", **kwargs):
72  result = ComponentAccumulator()
73  from LArG4SD.LArG4SDToolConfig import CalibrationDefaultCalculatorCfg
74  kwargs.setdefault("CalibrationDefaultCalculator", result.getPrimaryAndMerge(CalibrationDefaultCalculatorCfg(flags)).name)
75  result.addService( CompFactory.LArG4.EndcapCryostat.CalibrationLArCalculator(name, **kwargs), primary=True)
76  return result
77 
78 def EndcapCryostatCalibrationMixedCalculatorCfg(flags, name="EndcapCryostatCalibrationMixedCalculator", **kwargs):
79  result = ComponentAccumulator()
80  result.addService( CompFactory.LArG4.EndcapCryostat.CalibrationMixedCalculator(name, **kwargs), primary=True)
81  return result
82 
83 def EMECSupportCalibrationCalculatorCfg(flags, name="EMECSupportCalibrationCalculator", **kwargs):
84  result = ComponentAccumulator()
85  kwargs.setdefault("BackupCalculator", result.getPrimaryAndMerge(EndcapCryostatCalibrationLArCalculatorCfg(flags)).name)
86  result.addService( CompFactory.LArG4.EMECSupportCalibrationCalculator(name, **kwargs), primary=True)
87  return result
88 
89 def EnergyCalculatorCfg(flags, name="EnergyCalculator", **kwargs):
90  result = ComponentAccumulator()
91  kwargs.setdefault("SupportCalculator", result.getPrimaryAndMerge(EMECSupportCalibrationCalculatorCfg(flags)).name)
92  from AthenaCommon.SystemOfUnits import ns
93  kwargs.setdefault("OOTcut", 300.0*ns)
94 
95  result.addService(CompFactory.LArG4.EC.EnergyCalculator(name, **kwargs), primary=True)
96  return result
97 
98 def EMECPosInnerWheelCalculatorCfg(flags, name="EMECPosInnerWheelCalculator", **kwargs):
99  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel)
100  #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1
101  kwargs.setdefault("zSide", 1)
102  return EnergyCalculatorCfg(flags, name, **kwargs)
103 
104 def EMECNegInnerWheelCalculatorCfg(flags, name="EMECNegInnerWheelCalculator", **kwargs):
105  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel)
106  #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1
107  kwargs.setdefault("zSide", -1)
108  return EnergyCalculatorCfg(flags, name, **kwargs)
109 
110 def EMECPosOuterWheelCalculatorCfg(flags, name="EMECPosOuterWheelCalculator", **kwargs):
111  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel)
112  #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1
113  kwargs.setdefault("zSide", 1)
114  return EnergyCalculatorCfg(flags, name, **kwargs)
115 
116 def EMECNegOuterWheelCalculatorCfg(flags, name="EMECNegOuterWheelCalculator", **kwargs):
117  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel)
118  #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1
119  kwargs.setdefault("zSide", -1)
120  return EnergyCalculatorCfg(flags, name, **kwargs)
121 
122 def EMECPosBackOuterBarretteCalculatorCfg(flags, name="EMECPosBackOuterBarretteCalculator", **kwargs):
123  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.BackOuterBarretteWheel)
124  #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1
125  return EnergyCalculatorCfg(flags, name, **kwargs)
126 
127 def EMECNegBackOuterBarretteCalculatorCfg(flags, name="EMECNegBackOuterBarretteCalculator", **kwargs):
128  kwargs.setdefault("WheelType", LArWheelCalculatorEnum.BackOuterBarretteWheel)
129  #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1
130  kwargs.setdefault("zSide", -1)
131  return EnergyCalculatorCfg(flags, name, **kwargs)
132 
133 def EMECPosInnerWheelCorrOffCalculatorCfg(flags, name="EMECPosInnerWheelCorrOffCalculator", **kwargs):
134  kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF
135  return EMECPosInnerWheelCalculatorCfg(flags, name, **kwargs)
136 
137 def EMECNegInnerWheelCorrOffCalculatorCfg(flags, name="EMECNegInnerWheelCorrOffCalculator", **kwargs):
138  kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF
139  return EMECNegInnerWheelCalculatorCfg(flags, name, **kwargs)
140 
141 def EMECPosOuterWheelCorrOffCalculatorCfg(flags, name="EMECPosOuterWheelCorrOffCalculator", **kwargs):
142  kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF
143  return EMECPosOuterWheelCalculatorCfg(flags, name, **kwargs)
144 
145 def EMECNegOuterWheelCorrOffCalculatorCfg(flags, name="EMECNegOuterWheelCorrOffCalculator", **kwargs):
146  kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF
147  return EMECNegOuterWheelCalculatorCfg(flags, name, **kwargs)
148 
149 def EMECPosBackOuterBarretteCorrOffCalculatorCfg(flags, name="EMECPosBackOuterBarretteCorrOffCalculator", **kwargs):
150  kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF
151  return EMECPosBackOuterBarretteCalculatorCfg(flags, name, **kwargs)
152 
153 def EMECNegBackOuterBarretteCorrOffCalculatorCfg(flags, name="EMECNegBackOuterBarretteCorrOffCalculator", **kwargs):
154  kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF
155  return EMECNegBackOuterBarretteCalculatorCfg(flags, name, **kwargs)
156 
157 def EMECPresamplerCalculatorCfg(flags, name="EMECPresamplerCalculator", **kwargs):
158  result = ComponentAccumulator()
159  kwargs.setdefault("GeometryCalculator",result.getPrimaryAndMerge(EMECPresamplerGeometryCfg(flags)).name)
160  result.addService(CompFactory.LArEndcapPresamplerCalculator(name, **kwargs), primary=True)
161  return result
162 
163 def EMECPresamplerGeometryCfg(flags, name="EMECPresamplerGeometry", **kwargs):
164  result = ComponentAccumulator()
165  result.addService(CompFactory.LArG4.EC.PresamplerGeometry(name, **kwargs), primary = True)
166  return result
LArG4ECConfig.EMECNegBackOuterBarretteCorrOffCalculatorCfg
def EMECNegBackOuterBarretteCorrOffCalculatorCfg(flags, name="EMECNegBackOuterBarretteCorrOffCalculator", **kwargs)
Definition: LArG4ECConfig.py:153
SystemOfUnits
LArG4ECConfig.EndcapCryostatCalibrationCalculatorCfg
def EndcapCryostatCalibrationCalculatorCfg(flags, name="EndcapCryostatCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:66
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArG4ECConfig.EMECPosBackOuterBarretteCalibrationCalculatorCfg
def EMECPosBackOuterBarretteCalibrationCalculatorCfg(flags, name="EMECPosBackOuterBarretteCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:45
LArG4ECConfig.EMECNegInnerWheelCalibrationCalculatorCfg
def EMECNegInnerWheelCalibrationCalculatorCfg(flags, name="EMECNegInnerWheelCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:21
LArG4ECConfig.EMECPosOuterWheelCalibrationCalculatorCfg
def EMECPosOuterWheelCalibrationCalculatorCfg(flags, name="EMECPosOuterWheelCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:29
LArG4ECConfig.EMECPresamplerCalibrationCalculatorCfg
def EMECPresamplerCalibrationCalculatorCfg(flags, name="EMECPresamplerCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:61
LArG4ECConfig.EMECNegBackOuterBarretteCalculatorCfg
def EMECNegBackOuterBarretteCalculatorCfg(flags, name="EMECNegBackOuterBarretteCalculator", **kwargs)
Definition: LArG4ECConfig.py:127
LArG4ECConfig.EMECPresamplerCalculatorCfg
def EMECPresamplerCalculatorCfg(flags, name="EMECPresamplerCalculator", **kwargs)
Definition: LArG4ECConfig.py:157
LArG4ECConfig.EMECPosOuterWheelCalculatorCfg
def EMECPosOuterWheelCalculatorCfg(flags, name="EMECPosOuterWheelCalculator", **kwargs)
Definition: LArG4ECConfig.py:110
LArG4ECConfig.EMECPosInnerWheelCalibrationCalculatorCfg
def EMECPosInnerWheelCalibrationCalculatorCfg(flags, name="EMECPosInnerWheelCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:13
LArG4ECConfig.EMECNegBackOuterBarretteCalibrationCalculatorCfg
def EMECNegBackOuterBarretteCalibrationCalculatorCfg(flags, name="EMECNegBackOuterBarretteCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:53
LArG4ECConfig.EMECPosBackOuterBarretteCorrOffCalculatorCfg
def EMECPosBackOuterBarretteCorrOffCalculatorCfg(flags, name="EMECPosBackOuterBarretteCorrOffCalculator", **kwargs)
Definition: LArG4ECConfig.py:149
LArG4ECConfig.CalibrationCalculatorCfg
def CalibrationCalculatorCfg(name="CalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:8
LArG4ECConfig.EMECSupportCalibrationCalculatorCfg
def EMECSupportCalibrationCalculatorCfg(flags, name="EMECSupportCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:83
LArG4ECConfig.EndcapCryostatCalibrationLArCalculatorCfg
def EndcapCryostatCalibrationLArCalculatorCfg(flags, name="EndcapCryostatCalibrationLArCalculator", **kwargs)
Definition: LArG4ECConfig.py:71
LArG4ECConfig.EMECPosInnerWheelCorrOffCalculatorCfg
def EMECPosInnerWheelCorrOffCalculatorCfg(flags, name="EMECPosInnerWheelCorrOffCalculator", **kwargs)
Definition: LArG4ECConfig.py:133
LArG4ECConfig.EMECPosOuterWheelCorrOffCalculatorCfg
def EMECPosOuterWheelCorrOffCalculatorCfg(flags, name="EMECPosOuterWheelCorrOffCalculator", **kwargs)
Definition: LArG4ECConfig.py:141
LArG4ECConfig.EMECPosBackOuterBarretteCalculatorCfg
def EMECPosBackOuterBarretteCalculatorCfg(flags, name="EMECPosBackOuterBarretteCalculator", **kwargs)
Definition: LArG4ECConfig.py:122
LArG4SDToolConfig.CalibrationDefaultCalculatorCfg
def CalibrationDefaultCalculatorCfg(flags, name="CalibrationDefaultCalculator", **kwargs)
Definition: LArG4SDToolConfig.py:425
LArG4ECConfig.EMECPosInnerWheelCalculatorCfg
def EMECPosInnerWheelCalculatorCfg(flags, name="EMECPosInnerWheelCalculator", **kwargs)
Definition: LArG4ECConfig.py:98
LArG4ECConfig.EnergyCalculatorCfg
def EnergyCalculatorCfg(flags, name="EnergyCalculator", **kwargs)
Definition: LArG4ECConfig.py:89
LArG4ECConfig.EMECNegOuterWheelCorrOffCalculatorCfg
def EMECNegOuterWheelCorrOffCalculatorCfg(flags, name="EMECNegOuterWheelCorrOffCalculator", **kwargs)
Definition: LArG4ECConfig.py:145
LArG4ECConfig.EMECNegInnerWheelCorrOffCalculatorCfg
def EMECNegInnerWheelCorrOffCalculatorCfg(flags, name="EMECNegInnerWheelCorrOffCalculator", **kwargs)
Definition: LArG4ECConfig.py:137
LArG4ECConfig.EMECPresamplerGeometryCfg
def EMECPresamplerGeometryCfg(flags, name="EMECPresamplerGeometry", **kwargs)
Definition: LArG4ECConfig.py:163
LArG4ECConfig.EMECNegOuterWheelCalibrationCalculatorCfg
def EMECNegOuterWheelCalibrationCalculatorCfg(flags, name="EMECNegOuterWheelCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:37
LArG4ECConfig.EMECNegOuterWheelCalculatorCfg
def EMECNegOuterWheelCalculatorCfg(flags, name="EMECNegOuterWheelCalculator", **kwargs)
Definition: LArG4ECConfig.py:116
LArG4ECConfig.EMECNegInnerWheelCalculatorCfg
def EMECNegInnerWheelCalculatorCfg(flags, name="EMECNegInnerWheelCalculator", **kwargs)
Definition: LArG4ECConfig.py:104
LArG4ECConfig.EndcapCryostatCalibrationMixedCalculatorCfg
def EndcapCryostatCalibrationMixedCalculatorCfg(flags, name="EndcapCryostatCalibrationMixedCalculator", **kwargs)
Definition: LArG4ECConfig.py:78