ATLAS Offline Software
LArG4SDToolConfig.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.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from SimulationConfig.SimEnums import CalibrationRun, LArParameterization
6 from ISF_Algorithms.CollectionMergerConfig import CollectionMergerCfg
7 
8 #to be migrated: getCalibrationDefaultCalculator, getDeadMaterialCalibrationHitMerger
9 
10 def LArActiveSensitiveDetectorToolCfg(flags, name="LArActiveSensitiveDetector", **kwargs):
11  result = ComponentAccumulator()
12 
13 
14  if flags.GeoModel.AtlasVersion not in ["tb_LArH6_2003","tb_LArH6_2002"]:
15  kwargs.setdefault("StacVolumes",["LArMgr::LAr::EMB::STAC"])
16  kwargs.setdefault("PresamplerVolumes",["LArMgr::LAr::Barrel::Presampler::Module"])
17  kwargs.setdefault("NegIWVolumes",["LArMgr::LAr::EMEC::Neg::InnerWheel"])
18  kwargs.setdefault("NegOWVolumes",["LArMgr::LAr::EMEC::Neg::OuterWheel"])
19  kwargs.setdefault("NegBOBarretteVolumes",["LArMgr::LAr::EMEC::Neg::BackOuterBarrette::Module::Phidiv"])
20  if flags.GeoModel.AtlasVersion!="tb_LArH6_2003":
21  kwargs.setdefault("PosIWVolumes",["LArMgr::LAr::EMEC::Pos::InnerWheel"])
22  kwargs.setdefault("PosOWVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel"])
23  kwargs.setdefault("PosBOBarretteVolumes",["LArMgr::LAr::EMEC::Pos::BackOuterBarrette::Module::Phidiv"])
24  kwargs.setdefault("PresVolumes", ["LArMgr::LAr::Endcap::Presampler::LiquidArgon"])
25  kwargs.setdefault("SliceVolumes",["LArMgr::LAr::HEC::Module::Depth::Slice"])
26  if flags.GeoModel.AtlasVersion not in ["tb_LArH6_2002"]:
27  kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"])
28  kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::Gap"])
29  kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::Gap"])
30  # Running PID calibration hits?
31  kwargs.setdefault("ParticleID",flags.Sim.ParticleID)
32  # No effect currently
33  kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitActive"])
34 
35  from LArG4Barrel.LArG4BarrelConfig import BarrelCalibrationCalculatorCfg, BarrelPresamplerCalibrationCalculatorCfg
36  kwargs.setdefault("EMBPSCalibrationCalculator",
37  result.getPrimaryAndMerge(BarrelPresamplerCalibrationCalculatorCfg(flags)))
38  kwargs.setdefault("EMBCalibrationCalculator",
39  result.getPrimaryAndMerge(BarrelCalibrationCalculatorCfg(flags)))
40 
41  from LArG4EC.LArG4ECConfig import EMECPosInnerWheelCalibrationCalculatorCfg, EMECNegInnerWheelCalibrationCalculatorCfg, EMECPosOuterWheelCalibrationCalculatorCfg, EMECNegOuterWheelCalibrationCalculatorCfg, EMECPosBackOuterBarretteCalibrationCalculatorCfg, EMECNegBackOuterBarretteCalibrationCalculatorCfg, EMECPresamplerCalibrationCalculatorCfg
42  kwargs.setdefault("EMECPosIWCalibrationCalculator",
43  result.getPrimaryAndMerge(EMECPosInnerWheelCalibrationCalculatorCfg(flags)))
44  kwargs.setdefault("EMECNegIWCalibrationCalculator",
45  result.getPrimaryAndMerge(EMECNegInnerWheelCalibrationCalculatorCfg(flags)))
46  kwargs.setdefault("EMECPosOWCalibrationCalculator",
47  result.getPrimaryAndMerge(EMECPosOuterWheelCalibrationCalculatorCfg(flags)))
48  kwargs.setdefault("EMECNegOWCalibrationCalculator",
49  result.getPrimaryAndMerge(EMECNegOuterWheelCalibrationCalculatorCfg(flags)))
50  kwargs.setdefault("EMECPSCalibrationCalculator",
51  result.getPrimaryAndMerge(EMECPresamplerCalibrationCalculatorCfg(flags)))
52  kwargs.setdefault("EMECPosBOBCalibrationCalculator",
53  result.getPrimaryAndMerge(EMECPosBackOuterBarretteCalibrationCalculatorCfg(flags)))
54  kwargs.setdefault("EMECNegBOBCalibrationCalculator",
55  result.getPrimaryAndMerge(EMECNegBackOuterBarretteCalibrationCalculatorCfg(flags)))
56 
57  from LArG4HEC.LArG4HECConfig import HECCalibrationWheelActiveCalculatorCfg
58  kwargs.setdefault("HECWActiveCalculator",
59  result.getPrimaryAndMerge(HECCalibrationWheelActiveCalculatorCfg(flags)))
60 
61  from LArG4FCAL.LArG4FCALConfig import FCAL1CalibCalculatorCfg, FCAL2CalibCalculatorCfg, FCAL3CalibCalculatorCfg
62  kwargs.setdefault("FCAL1CalibCalculator",
63  result.getPrimaryAndMerge(FCAL1CalibCalculatorCfg(flags)))
64  kwargs.setdefault("FCAL2CalibCalculator",
65  result.getPrimaryAndMerge(FCAL2CalibCalculatorCfg(flags)))
66  kwargs.setdefault("FCAL3CalibCalculator",
67  result.getPrimaryAndMerge(FCAL3CalibCalculatorCfg(flags)))
68 
69 
70  result.setPrivateTools( CompFactory.LArG4.ActiveSDTool(name, **kwargs))
71  return result
72 
73 
74 def LArDeadSensitiveDetectorToolCfg(flags, name="LArDeadSensitiveDetector", **kwargs):
75 
76  kwargs.setdefault("BarrelCryVolumes", ["LArMgr::LAr::Barrel::Cryostat::InnerWall::Vis",
77  "LArMgr::LAr::Barrel::Cryostat::Sector::*",
78  "LArMgr::LAr::Barrel::Cryostat::InnerWall",
79  "LArMgr::LAr::Barrel::Cryostat::Cylinder::*"])
80  kwargs.setdefault("BarrelCryLArVolumes",["LArMgr::LAr::Barrel::Cryostat::ExtraMat*",
81  "LArMgr::LAr::Barrel::Cryostat::HalfLAr*",
82  "LArMgr::LAr::Barrel::Cryostat::TotalLAr",
83  "LArMgr::LAr::Barrel::Cryostat::MotherVolume"])
84  kwargs.setdefault("BarrelCryMixVolumes",["LArMgr::LAr::Barrel::Cryostat::InnerEndWall",
85  "LArMgr::LAr::Barrel::Cryostat::OuterWall",
86  "LArMgr::LAr::Barrel::Cryostat::Mixed::Cylinder::*"])
87  kwargs.setdefault("DeadMaterialVolumes",["LArMgr::LAr::DM::*"])
88  kwargs.setdefault("BarrelPresVolumes", ["LArMgr::LAr::Barrel::Presampler",
89  "LArMgr::LAr::Barrel::Presampler::Sector",
90  "LArMgr::LAr::Barrel::Presampler::ProtectionShell",
91  "LArMgr::LAr::Barrel::Presampler::MotherBoard",
92  "LArMgr::LAr::Barrel::Presampler::Connectics",
93  "LArMgr::LAr::Barrel::Presampler::Rail",
94  "LArMgr::LAr::Barrel::Presampler::ProtectionPlate"])
95  kwargs.setdefault("BarrelVolumes", ["LArMgr::LAr::EMB::ExtraMat*",
96  "LArMgr::LAr::EMB::FrontBack::Absorber",
97  "LArMgr::LAr::EMB::FrontBack::Absorber2",
98  "LArMgr::LAr::EMB::FrontBack::Steel",
99  "LArMgr::LAr::EMB::FrontBack::G10",
100  "LArMgr::LAr::EMB::FrontBack::Electrode",
101  "LArMgr::LAr::EMB::GTENB",
102  "LArMgr::LAr::EMB::GTENF",
103  "LArMgr::LAr::EMB::SUMB",
104  "LArMgr::LAr::EMB::CAAC",
105  "LArMgr::LAr::EMB::MOAC",
106  "LArMgr::LAr::EMB::TELB",
107  "LArMgr::LAr::EMB::TELF",
108  "LArMgr::LAr::EMB::ECAM"])
109  kwargs.setdefault("ECCryVolumes", ["LArMgr::LAr::Endcap::Cryostat::FcalLAr::Cylinder",
110  "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr::Sector",
111  "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr::Cylinder",
112  "LArMgr::LAr::Endcap::Cryostat::Sector",
113  "LArMgr::LAr::Endcap::Cryostat::Cone",
114  "LArMgr::LAr::Endcap::Cryostat::Cylinder"])
115  kwargs.setdefault("ECCryLArVolumes", ["LArMgr::Moderator*",
116  "LArMgr::LAr::Endcap::Cryostat::FcalLAr",
117  "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr",
118  "LArMgr::LAr::Endcap::Cryostat::MotherVolume"])
119  kwargs.setdefault("ECCryMixVolumes", ["LArMgr::LAr::FCAL::LiquidArgonC",
120  "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr::Sector::Mixed",
121  "LArMgr::LAr::Endcap::Cryostat::Sector::Mixed",
122  "LArMgr::LAr::Endcap::Cryostat::Cone::Mixed",
123  "LArMgr::LAr::Endcap::Cryostat::ExtraCyl_beforePS",
124  "LArMgr::LAr::Endcap::Cryostat::Cylinder::Mixed"])
125  kwargs.setdefault("ECSupportVolumes", ["LArMgr::LAr::EMEC::ExtraCyl_afterPS",
126  "LArMgr::LAr::EMEC::InnerTransversalBars",
127  "LArMgr::LAr::EMEC::InnerAluCone::*",
128  "LArMgr::LAr::EMEC::OuterTransversalBars",
129  "LArMgr::LAr::EMEC::OuterSupportMother",
130  "LArMgr::LAr::EMEC::*Stretchers",
131  "LArMgr::LAr::EMEC::Top*",
132  "LArMgr::LAr::EMEC::Back*GTen",
133  "LArMgr::LAr::EMEC::Back*Hole",
134  "LArMgr::LAr::EMEC::Back*Bar",
135  "LArMgr::LAr::EMEC::Back*Ring",
136  "LArMgr::LAr::EMEC::Back*Ele",
137  "LArMgr::LAr::EMEC::Back*Abs",
138  "LArMgr::LAr::EMEC::BackInnerBarrette::Module::Phidiv",
139  "LArMgr::LAr::EMEC::Back*Barrette::Module",
140  "LArMgr::LAr::EMEC::Back*Barrettes",
141  "LArMgr::LAr::EMEC::BackSupport*",
142  "LArMgr::LAr::EMEC::Front*",
143  "LArMgr::LAr::EMEC::Mother*"])
144  kwargs.setdefault("HECWheelVolumes", ["LArMgr::LAr::HEC::Mother",
145  "LArMgr::LAr::HEC::LiquidArgon",
146  "LArMgr::LAr::HEC::Clamp",
147  "LArMgr::LAr::HEC::Clamp::LiquidArgon",
148  "LArMgr::LAr::HEC::Module",
149  "LArMgr::LAr::HEC::FrontModule",
150  "LArMgr::LAr::HEC::RearModule",
151  "LArMgr::LAr::HEC::Module::Depth",
152  "LArMgr::LAr::HEC::Module::Depth::FirstAbsorber",
153  "LArMgr::LAr::HEC::Module::Depth::FirstAbsorber::TieRod"])
154  # Running PID calibration hits?
155  kwargs.setdefault("ParticleID", flags.Sim.ParticleID)
156  kwargs.setdefault("doEscapedEnergy", flags.Sim.CalibrationRun is not CalibrationRun.DeadLAr)
157  # No effect currently
158  outputCollectionName = "LArCalibrationHitDeadMaterial"
159  if flags.Sim.CalibrationRun in [CalibrationRun.LAr, CalibrationRun.LArTile, CalibrationRun.LArTileZDC]:
160  outputCollectionName = "LArCalibrationHitDeadMaterial_DEAD"
161  kwargs.setdefault("HitCollectionName", outputCollectionName)
162 
163  result = ComponentAccumulator()
164 
165  from LArG4Barrel.LArG4BarrelConfig import BarrelCryostatCalibrationCalculatorCfg, BarrelCryostatCalibrationLArCalculatorCfg, BarrelCryostatCalibrationMixedCalculatorCfg, DMCalibrationCalculatorCfg, BarrelCalibrationCalculatorCfg, BarrelPresamplerCalibrationCalculatorCfg
166  kwargs.setdefault("EMBCryoCalibrationCalculator", result.getPrimaryAndMerge(BarrelCryostatCalibrationCalculatorCfg(flags)))
167  kwargs.setdefault("EMBCryoLArCalibrationCalculator", result.getPrimaryAndMerge(BarrelCryostatCalibrationLArCalculatorCfg(flags)))
168  kwargs.setdefault("DefaultCalibrationCalculator", result.getPrimaryAndMerge(CalibrationDefaultCalculatorCfg(flags)))
169  kwargs.setdefault("EMBCryoMixCalibrationCalculator", result.getPrimaryAndMerge(BarrelCryostatCalibrationMixedCalculatorCfg(flags)))
170  kwargs.setdefault("DMCalibrationCalculator", result.getPrimaryAndMerge(DMCalibrationCalculatorCfg(flags)))
171  kwargs.setdefault("EMBPSCalibrationCalculator", result.getPrimaryAndMerge(BarrelPresamplerCalibrationCalculatorCfg(flags)))
172  kwargs.setdefault("EMBCalibrationCalculator", result.getPrimaryAndMerge(BarrelCalibrationCalculatorCfg(flags)))
173 
174  from LArG4EC.LArG4ECConfig import EndcapCryostatCalibrationCalculatorCfg, EndcapCryostatCalibrationLArCalculatorCfg, EndcapCryostatCalibrationMixedCalculatorCfg, EMECSupportCalibrationCalculatorCfg
175  kwargs.setdefault("ECCryoCalibrationCalculator", result.getPrimaryAndMerge(EndcapCryostatCalibrationCalculatorCfg(flags)))
176  kwargs.setdefault("ECCryoLArCalibrationCalculator", result.getPrimaryAndMerge(EndcapCryostatCalibrationLArCalculatorCfg(flags)))
177  kwargs.setdefault("ECCryoMixCalibrationCalculator", result.getPrimaryAndMerge(EndcapCryostatCalibrationMixedCalculatorCfg(flags)))
178  kwargs.setdefault("EMECSuppCalibrationCalculator", result.getPrimaryAndMerge(EMECSupportCalibrationCalculatorCfg(flags)))
179 
180  from LArG4HEC.LArG4HECConfig import HECCalibrationWheelDeadCalculatorCfg
181  kwargs.setdefault("HECWheelDeadCalculator", result.getPrimaryAndMerge(HECCalibrationWheelDeadCalculatorCfg(flags)))
182 
183  result.setPrivateTools(CompFactory.LArG4.DeadSDTool(name, **kwargs))
184  return result
185 
186 
187 def LArEMBSensitiveDetectorCfg(flags,name="LArEMBSensitiveDetector", **kwargs):
188  result = ComponentAccumulator()
189  bare_collection_name = "LArHitEMB"
190  mergeable_collection_suffix = "_G4"
191  merger_input_property = "LArEMBHits"
192  region = "CALO"
193  acc, hits_collection_name = CollectionMergerCfg(flags,
194  bare_collection_name,
195  mergeable_collection_suffix,
196  merger_input_property,
197  region)
198 
199  result.merge(acc)
200 
201  kwargs.setdefault("StacVolumes",["LArMgr::LAr::EMB::STAC"])
202  kwargs.setdefault("PresamplerVolumes",["LArMgr::LAr::Barrel::Presampler::Module"])
203  kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
204 
205  # Hook for fast simulation
206  kwargs.setdefault("UseFrozenShowers", flags.Sim.LArParameterization is LArParameterization.FrozenShowers)
207 
208  from LArG4Barrel.LArG4BarrelConfig import EMBPresamplerCalculatorCfg, EMBCalculatorCfg
209  kwargs.setdefault("EMBPSCalculator", result.getPrimaryAndMerge(EMBPresamplerCalculatorCfg(flags)))
210  kwargs.setdefault("EMBCalculator", result.getPrimaryAndMerge(EMBCalculatorCfg(flags)))
211 
212  result.setPrivateTools( CompFactory.LArG4.EMBSDTool(name, **kwargs) )
213  return result
214 
215 
216 def LArEMECSensitiveDetectorCfg(flags, name="LArEMECSensitiveDetector", **kwargs):
217  result = ComponentAccumulator()
218  bare_collection_name = "LArHitEMEC"
219  mergeable_collection_suffix = "_G4"
220  merger_input_property = "LArEMECHits"
221  region = "CALO"
222  acc, hits_collection_name = CollectionMergerCfg(flags,
223  bare_collection_name,
224  mergeable_collection_suffix,
225  merger_input_property,
226  region)
227  result.merge(acc)
228  # Configuration when the EMEC is described with the custom solid implementation
229  if flags.GeoModel.AtlasVersion not in ["tb_LArH6_2002","tb_LArH6EC_2002"] and not flags.GeoModel.EMECStandard :
230  kwargs.setdefault("NegIWVolumes",["LArMgr::LAr::EMEC::Neg::InnerWheel"])
231  kwargs.setdefault("NegOWVolumes",["LArMgr::LAr::EMEC::Neg::OuterWheel"])
232  kwargs.setdefault("NegBOBarretteVolumes",["LArMgr::LAr::EMEC::Neg::BackOuterBarrette::Module::Phidiv"])
233  if flags.GeoModel.AtlasVersion !="tb_LArH6EC_2002" and not flags.GeoModel.EMECStandard :
234  kwargs.setdefault("PosIWVolumes",["LArMgr::LAr::EMEC::Pos::InnerWheel"])
235  kwargs.setdefault("PosOWVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel"])
236  kwargs.setdefault("PosBOBarretteVolumes",["LArMgr::LAr::EMEC::Pos::BackOuterBarrette::Module::Phidiv"])
237 
238  # If the EMEC is described with standard G4 shapes (G4GenericTrap) add the corresponding Slices volumes to the SD definition
239  if flags.GeoModel.AtlasVersion not in ["tb_LArH6_2002","tb_LArH6EC_2002"] and flags.GeoModel.EMECStandard :
240  kwargs.setdefault("NegIWVolumes",["LArMgr::LAr::EMEC::Neg::InnerWheel",
241  "LArMgr::LAr::EMEC::Neg::InnerWheel::Slice*"])
242  kwargs.setdefault("NegOWVolumes",["LArMgr::LAr::EMEC::Neg::OuterWheel",
243  "LArMgr::LAr::EMEC::Neg::OuterWheel::Slice*"])
244  kwargs.setdefault("NegBOBarretteVolumes",["LArMgr::LAr::EMEC::Neg::BackOuterBarrette::Module::Phidiv"])
245  if flags.GeoModel.AtlasVersion !="tb_LArH6EC_2002" and flags.GeoModel.EMECStandard:
246  kwargs.setdefault("PosIWVolumes",["LArMgr::LAr::EMEC::Pos::InnerWheel",
247  "LArMgr::LAr::EMEC::Pos::InnerWheel::Slice*"])
248  kwargs.setdefault("PosOWVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel",
249  "LArMgr::LAr::EMEC::Pos::OuterWheel::Slice*"])
250  kwargs.setdefault("PosBOBarretteVolumes",["LArMgr::LAr::EMEC::Pos::BackOuterBarrette::Module::Phidiv"])
251 
252  kwargs.setdefault("PresVolumes", ["LArMgr::LAr::Endcap::Presampler::LiquidArgon"])
253  kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
254 
255 
256 
257  # Hook for fast simulation
258  kwargs.setdefault("UseFrozenShowers", flags.Sim.LArParameterization is LArParameterization.FrozenShowers)
259 
260  from LArG4EC.LArG4ECConfig import EMECPosInnerWheelCalculatorCfg, EMECNegInnerWheelCalculatorCfg, EMECPosOuterWheelCalculatorCfg, EMECNegOuterWheelCalculatorCfg, EMECPresamplerCalculatorCfg, EMECPosBackOuterBarretteCalculatorCfg, EMECNegBackOuterBarretteCalculatorCfg
261  kwargs.setdefault("EMECPosIWCalculator", result.getPrimaryAndMerge(EMECPosInnerWheelCalculatorCfg(flags)))
262  kwargs.setdefault("EMECNegIWCalculator", result.getPrimaryAndMerge(EMECNegInnerWheelCalculatorCfg(flags)))
263  kwargs.setdefault("EMECPosOWCalculator", result.getPrimaryAndMerge(EMECPosOuterWheelCalculatorCfg(flags)))
264  kwargs.setdefault("EMECNegOWCalculator", result.getPrimaryAndMerge(EMECNegOuterWheelCalculatorCfg(flags)))
265  kwargs.setdefault("EMECPSCalculator", result.getPrimaryAndMerge(EMECPresamplerCalculatorCfg(flags)))
266  kwargs.setdefault("EMECPosBOBCalculator", result.getPrimaryAndMerge(EMECPosBackOuterBarretteCalculatorCfg(flags)))
267  kwargs.setdefault("EMECNegBOBCalculator", result.getPrimaryAndMerge(EMECNegBackOuterBarretteCalculatorCfg(flags)))
268 
269  result.setPrivateTools( CompFactory.LArG4.EMECSDTool(name, **kwargs) )
270  return result
271 
272 
273 def LArFCALSensitiveDetectorCfg(flags, name="LArFCALSensitiveDetector", **kwargs):
274  result = ComponentAccumulator()
275  bare_collection_name = "LArHitFCAL"
276  mergeable_collection_suffix = "_G4"
277  merger_input_property = "LArFCALHits"
278  region = "CALO"
279  acc, hits_collection_name = CollectionMergerCfg(flags,
280  bare_collection_name,
281  mergeable_collection_suffix,
282  merger_input_property,
283  region)
284  result.merge(acc)
285 
286  kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"])
287  kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::Gap"])
288  kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::Gap"])
289  # No effect currently
290  kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
291 
292  # Hook for fast simulation
293  kwargs.setdefault("UseFrozenShowers", flags.Sim.LArParameterization is not LArParameterization.NoFrozenShowers)
294 
295  from LArG4FCAL.LArG4FCALConfig import FCAL1CalculatorCfg, FCAL2CalculatorCfg, FCAL3CalculatorCfg
296  kwargs.setdefault("FCAL1Calculator", result.getPrimaryAndMerge(FCAL1CalculatorCfg(flags)))
297  kwargs.setdefault("FCAL2Calculator", result.getPrimaryAndMerge(FCAL2CalculatorCfg(flags)))
298  kwargs.setdefault("FCAL3Calculator", result.getPrimaryAndMerge(FCAL3CalculatorCfg(flags)))
299 
300  result.setPrivateTools( CompFactory.LArG4.FCALSDTool(name, **kwargs) )
301  return result
302 
303 
304 def LArHECSensitiveDetectorCfg(flags, name="LArHECSensitiveDetector", **kwargs):
305  result = ComponentAccumulator()
306  bare_collection_name = "LArHitHEC"
307  mergeable_collection_suffix = "_G4"
308  merger_input_property = "LArHECHits"
309  region = "CALO"
310  acc, hits_collection_name = CollectionMergerCfg(flags,
311  bare_collection_name,
312  mergeable_collection_suffix,
313  merger_input_property,
314  region)
315  result.merge(acc)
316 
317  kwargs.setdefault("WheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Slice"])
318  #kwargs.setdefault("SliceVolumes",["LAr::HEC::Module::Depth::Slice"])
319  #kwargs.setdefault("LocalVolumes",["LAr::HEC::Module::Depth::Slice::Local"])
320  # You might think this should go here, but we don't think so! LAr::HEC::Module::Depth::Slice::Wheel"])
321  # No effect currently
322  kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
323 
324  from LArG4HEC.LArG4HECConfig import HECWheelCalculatorCfg
325  kwargs.setdefault("HECWheelCalculator", result.getPrimaryAndMerge(HECWheelCalculatorCfg(flags)))
326 
327  result.setPrivateTools( CompFactory.LArG4.HECSDTool(name, **kwargs) )
328  return result
329 
330 
331 def LArInactiveSensitiveDetectorToolCfg(flags, name="LArInactiveSensitiveDetector", **kwargs):
332  result = ComponentAccumulator()
333 
334  if flags.GeoModel.AtlasVersion not in ["tb_LArH6_2003","tb_LArH6_2002"]:
335  kwargs.setdefault("BarrelPreVolumes",["LArMgr::LAr::Barrel::Presampler::Cathode*",
336  "LArMgr::LAr::Barrel::Presampler::Anode*",
337  "LArMgr::LAr::Barrel::Presampler::Prep*"])
338  kwargs.setdefault("BarrelVolumes",["LArMgr::LAr::EMB::*::Straight",
339  "LArMgr::LAr::EMB::*::*Fold"])
340  kwargs.setdefault("ECPosInVolumes", ["LArMgr::LAr::EMEC::Pos::InnerWheel::Absorber",
341  "LArMgr::LAr::EMEC::Pos::InnerWheel::Electrode",
342  "LArMgr::LAr::EMEC::Pos::InnerWheel::Glue",
343  "LArMgr::LAr::EMEC::Pos::InnerWheel::Lead",
344  "LArMgr::LAr::EMEC::Pos::InnerCone::Absorber",
345  "LArMgr::LAr::EMEC::Pos::InnerCone::Electrode",
346  "LArMgr::LAr::EMEC::Pos::InnerCone::Glue",
347  "LArMgr::LAr::EMEC::Pos::InnerCone::Lead",
348  "LArMgr::LAr::EMEC::Pos::InnerSlice*::Absorber",
349  "LArMgr::LAr::EMEC::Pos::InnerSlice*::Electrode",
350  "LArMgr::LAr::EMEC::Pos::InnerSlice*::Glue",
351  "LArMgr::LAr::EMEC::Pos::InnerSlice*::Lead"])
352  kwargs.setdefault("ECPosOutVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel::Lead",
353  "LArMgr::LAr::EMEC::Pos::OuterWheel::Glue",
354  "LArMgr::LAr::EMEC::Pos::OuterWheel::Electrode",
355  "LArMgr::LAr::EMEC::Pos::OuterWheel::Absorber",
356  "LArMgr::LAr::EMEC::Pos::Outer*Cone::Lead",
357  "LArMgr::LAr::EMEC::Pos::Outer*Cone::Glue",
358  "LArMgr::LAr::EMEC::Pos::Outer*Cone::Electrode",
359  "LArMgr::LAr::EMEC::Pos::Outer*Cone::Absorber",
360  "LArMgr::LAr::EMEC::Pos::OuterSlice*::Lead",
361  "LArMgr::LAr::EMEC::Pos::OuterSlice*::Glue",
362  "LArMgr::LAr::EMEC::Pos::OuterSlice*::Electrode",
363  "LArMgr::LAr::EMEC::Pos::OuterSlice*::Absorber"])
364  kwargs.setdefault("ECNegInVolumes", ["LArMgr::LAr::EMEC::Neg::InnerWheel::Absorber",
365  "LArMgr::LAr::EMEC::Neg::InnerWheel::Electrode",
366  "LArMgr::LAr::EMEC::Neg::InnerWheel::Glue",
367  "LArMgr::LAr::EMEC::Neg::InnerWheel::Lead",
368  "LArMgr::LAr::EMEC::Neg::InnerCone::Absorber",
369  "LArMgr::LAr::EMEC::Neg::InnerCone::Electrode",
370  "LArMgr::LAr::EMEC::Neg::InnerCone::Glue",
371  "LArMgr::LAr::EMEC::Neg::InnerCone::Lead",
372  "LArMgr::LAr::EMEC::Neg::InnerSlice*::Absorber",
373  "LArMgr::LAr::EMEC::Neg::InnerSlice*::Electrode",
374  "LArMgr::LAr::EMEC::Neg::InnerSlice*::Glue",
375  "LArMgr::LAr::EMEC::Neg::InnerSlice*::Lead"])
376  kwargs.setdefault("ECNegOutVolumes",["LArMgr::LAr::EMEC::Neg::OuterWheel::Lead",
377  "LArMgr::LAr::EMEC::Neg::OuterWheel::Glue",
378  "LArMgr::LAr::EMEC::Neg::OuterWheel::Electrode",
379  "LArMgr::LAr::EMEC::Neg::OuterWheel::Absorber",
380  "LArMgr::LAr::EMEC::Neg::Outer*Cone::Lead",
381  "LArMgr::LAr::EMEC::Neg::Outer*Cone::Glue",
382  "LArMgr::LAr::EMEC::Neg::Outer*Cone::Electrode",
383  "LArMgr::LAr::EMEC::Neg::Outer*Cone::Absorber",
384  "LArMgr::LAr::EMEC::Neg::OuterSlice*::Lead",
385  "LArMgr::LAr::EMEC::Neg::OuterSlice*::Glue",
386  "LArMgr::LAr::EMEC::Neg::OuterSlice*::Electrode",
387  "LArMgr::LAr::EMEC::Neg::OuterSlice*::Absorber"])
388  #kwargs.setdefault("HECVolumes",["LAr::HEC::Inactive"])
389  #kwargs.setdefault("HECLocalVolumes",["LAr::HEC::Local::Inactive"])
390  kwargs.setdefault("HECWheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Absorber::TieRod",
391  "LArMgr::LAr::HEC::Module::Depth::Slice::TieRodDead",
392  "LArMgr::LAr::HEC::Module::Depth::Absorber",
393  "LArMgr::LAr::HEC::Module::Depth::Slice::TieRod",
394  "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode::Copper",
395  "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode"])
396  if flags.GeoModel.AtlasVersion=="tb_LArH6_2002":
397  kwargs.setdefault("ECPosInVolumes", ["LArMgr::LAr::EMEC::Pos::InnerWheel::Absorber",
398  "LArMgr::LAr::EMEC::Pos::InnerWheel::Electrode"])
399  kwargs.setdefault("ECPosOutVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel::Electrode",
400  "LArMgr::LAr::EMEC::Pos::OuterWheel::Absorber"])
401  kwargs.setdefault("HECWheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Absorber",
402  "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode",
403  "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode::Copper",
404  "LArMgr::LAr::HEC::Module::Depth::Slice::TieRod"])
405  if flags.GeoModel.AtlasVersion!="tb_LArH6_2002":
406  kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::CableTrough",
407  "LArMgr::LAr::FCAL::Module1::Absorber"])
408  kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::CableTrough",
409  "LArMgr::LAr::FCAL::Module2::Absorber",
410  "LArMgr::LAr::FCAL::Module2::Rod"])
411  kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::CableTrough",
412  "LArMgr::LAr::FCAL::Module3::Absorber",
413  "LArMgr::LAr::FCAL::Module3::Rod"])
414  # Running PID calibration hits?
415  kwargs.setdefault("ParticleID",flags.Sim.ParticleID)
416  # No effect currently
417  kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitInactive"])
418 
419  from LArG4Barrel.LArG4BarrelConfig import BarrelCalibrationCalculatorCfg, BarrelPresamplerCalibrationCalculatorCfg
420  kwargs.setdefault("EMBPSCalibrationCalculator", result.getPrimaryAndMerge(BarrelPresamplerCalibrationCalculatorCfg(flags)))
421  kwargs.setdefault("EMBCalibrationCalculator", result.getPrimaryAndMerge(BarrelCalibrationCalculatorCfg(flags)))
422 
423  from LArG4EC.LArG4ECConfig import EMECPosInnerWheelCalibrationCalculatorCfg, EMECNegInnerWheelCalibrationCalculatorCfg, EMECPosOuterWheelCalibrationCalculatorCfg, EMECNegOuterWheelCalibrationCalculatorCfg
424  kwargs.setdefault("EMECPosIWCalibrationCalculator", result.getPrimaryAndMerge(EMECPosInnerWheelCalibrationCalculatorCfg(flags)))
425  kwargs.setdefault("EMECNegIWCalibrationCalculator", result.getPrimaryAndMerge(EMECNegInnerWheelCalibrationCalculatorCfg(flags)))
426  kwargs.setdefault("EMECPosOWCalibrationCalculator", result.getPrimaryAndMerge(EMECPosOuterWheelCalibrationCalculatorCfg(flags)))
427  kwargs.setdefault("EMECNegOWCalibrationCalculator", result.getPrimaryAndMerge(EMECNegOuterWheelCalibrationCalculatorCfg(flags)))
428 
429  from LArG4HEC.LArG4HECConfig import HECCalibrationWheelInactiveCalculatorCfg
430  kwargs.setdefault("HECWheelInactiveCalculator", result.getPrimaryAndMerge(HECCalibrationWheelInactiveCalculatorCfg(flags)))
431 
432  from LArG4FCAL.LArG4FCALConfig import FCAL1CalibCalculatorCfg, FCAL2CalibCalculatorCfg, FCAL3CalibCalculatorCfg
433  kwargs.setdefault("FCAL1CalibCalculator", result.getPrimaryAndMerge(FCAL1CalibCalculatorCfg(flags)))
434  kwargs.setdefault("FCAL2CalibCalculator", result.getPrimaryAndMerge(FCAL2CalibCalculatorCfg(flags)))
435  kwargs.setdefault("FCAL3CalibCalculator", result.getPrimaryAndMerge(FCAL3CalibCalculatorCfg(flags)))
436 
437 
438  result.setPrivateTools( CompFactory.LArG4.InactiveSDTool(name, **kwargs) )
439  return result
440 
441 
442 def CalibrationDefaultCalculatorCfg(flags, name="CalibrationDefaultCalculator", **kwargs):
443  result = ComponentAccumulator()
444  result.addService( CompFactory.LArG4.CalibrationDefaultCalculator(name, **kwargs), primary = True)
445  return result
446 
447 
448 def DeadMaterialCalibrationHitMergerCfg(flags, name="DeadMaterialCalibrationHitMerger", **kwargs):
449  result = ComponentAccumulator()
450  kwargs.setdefault("InputHits", ["LArCalibrationHitDeadMaterial_DEAD","LArCalibrationHitActive_DEAD","LArCalibrationHitInactive_DEAD"])
451  kwargs.setdefault("OutputHits", "LArCalibrationHitDeadMaterial")
452  result.addEventAlgo(CompFactory.LArG4.CalibrationHitMerger(name, **kwargs))
453  return result
LArG4HECConfig.HECCalibrationWheelActiveCalculatorCfg
def HECCalibrationWheelActiveCalculatorCfg(flags, name="HECCalibrationWheelActiveCalculator", **kwargs)
Definition: LArG4HECConfig.py:33
LArG4ECConfig.EndcapCryostatCalibrationCalculatorCfg
def EndcapCryostatCalibrationCalculatorCfg(flags, name="EndcapCryostatCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:66
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArG4SDToolConfig.LArEMBSensitiveDetectorCfg
def LArEMBSensitiveDetectorCfg(flags, name="LArEMBSensitiveDetector", **kwargs)
Definition: LArG4SDToolConfig.py:187
LArG4FCALConfig.FCAL1CalculatorCfg
def FCAL1CalculatorCfg(flags, name="FCAL1Calculator", **kwargs)
Definition: LArG4FCALConfig.py:15
LArG4ECConfig.EMECPosBackOuterBarretteCalibrationCalculatorCfg
def EMECPosBackOuterBarretteCalibrationCalculatorCfg(flags, name="EMECPosBackOuterBarretteCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:45
LArG4SDToolConfig.LArActiveSensitiveDetectorToolCfg
def LArActiveSensitiveDetectorToolCfg(flags, name="LArActiveSensitiveDetector", **kwargs)
Definition: LArG4SDToolConfig.py:10
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
LArG4FCALConfig.FCAL2CalibCalculatorCfg
def FCAL2CalibCalculatorCfg(flags, name="FCAL2CalibCalculator", **kwargs)
Definition: LArG4FCALConfig.py:39
LArG4ECConfig.EMECPresamplerCalculatorCfg
def EMECPresamplerCalculatorCfg(flags, name="EMECPresamplerCalculator", **kwargs)
Definition: LArG4ECConfig.py:157
LArG4HECConfig.HECCalibrationWheelDeadCalculatorCfg
def HECCalibrationWheelDeadCalculatorCfg(flags, name="HECCalibrationWheelDeadCalculator", **kwargs)
Definition: LArG4HECConfig.py:43
LArG4SDToolConfig.LArEMECSensitiveDetectorCfg
def LArEMECSensitiveDetectorCfg(flags, name="LArEMECSensitiveDetector", **kwargs)
Definition: LArG4SDToolConfig.py:216
LArG4ECConfig.EMECPosOuterWheelCalculatorCfg
def EMECPosOuterWheelCalculatorCfg(flags, name="EMECPosOuterWheelCalculator", **kwargs)
Definition: LArG4ECConfig.py:110
LArG4ECConfig.EMECPosInnerWheelCalibrationCalculatorCfg
def EMECPosInnerWheelCalibrationCalculatorCfg(flags, name="EMECPosInnerWheelCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:13
LArG4SDToolConfig.LArInactiveSensitiveDetectorToolCfg
def LArInactiveSensitiveDetectorToolCfg(flags, name="LArInactiveSensitiveDetector", **kwargs)
Definition: LArG4SDToolConfig.py:331
LArG4ECConfig.EMECNegBackOuterBarretteCalibrationCalculatorCfg
def EMECNegBackOuterBarretteCalibrationCalculatorCfg(flags, name="EMECNegBackOuterBarretteCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:53
LArG4BarrelConfig.EMBPresamplerCalculatorCfg
def EMBPresamplerCalculatorCfg(flags, name="EMBPresamplerCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:49
LArG4ECConfig.EMECSupportCalibrationCalculatorCfg
def EMECSupportCalibrationCalculatorCfg(flags, name="EMECSupportCalibrationCalculator", **kwargs)
Definition: LArG4ECConfig.py:83
LArG4BarrelConfig.BarrelCryostatCalibrationMixedCalculatorCfg
def BarrelCryostatCalibrationMixedCalculatorCfg(flags, name="BarrelCryostatCalibrationMixedCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:18
LArG4SDToolConfig.DeadMaterialCalibrationHitMergerCfg
def DeadMaterialCalibrationHitMergerCfg(flags, name="DeadMaterialCalibrationHitMerger", **kwargs)
Definition: LArG4SDToolConfig.py:448
LArG4BarrelConfig.EMBCalculatorCfg
def EMBCalculatorCfg(flags, name="EMBCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:42
LArG4ECConfig.EndcapCryostatCalibrationLArCalculatorCfg
def EndcapCryostatCalibrationLArCalculatorCfg(flags, name="EndcapCryostatCalibrationLArCalculator", **kwargs)
Definition: LArG4ECConfig.py:71
LArG4FCALConfig.FCAL1CalibCalculatorCfg
def FCAL1CalibCalculatorCfg(flags, name="FCAL1CalibCalculator", **kwargs)
Definition: LArG4FCALConfig.py:30
LArG4ECConfig.EMECPosBackOuterBarretteCalculatorCfg
def EMECPosBackOuterBarretteCalculatorCfg(flags, name="EMECPosBackOuterBarretteCalculator", **kwargs)
Definition: LArG4ECConfig.py:122
LArG4BarrelConfig.BarrelPresamplerCalibrationCalculatorCfg
def BarrelPresamplerCalibrationCalculatorCfg(flags, name="BarrelPresamplerCalibrationCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:36
LArG4SDToolConfig.CalibrationDefaultCalculatorCfg
def CalibrationDefaultCalculatorCfg(flags, name="CalibrationDefaultCalculator", **kwargs)
Definition: LArG4SDToolConfig.py:442
LArG4FCALConfig.FCAL3CalculatorCfg
def FCAL3CalculatorCfg(flags, name="FCAL3Calculator", **kwargs)
Definition: LArG4FCALConfig.py:25
LArG4ECConfig.EMECPosInnerWheelCalculatorCfg
def EMECPosInnerWheelCalculatorCfg(flags, name="EMECPosInnerWheelCalculator", **kwargs)
Definition: LArG4ECConfig.py:98
LArG4FCALConfig.FCAL3CalibCalculatorCfg
def FCAL3CalibCalculatorCfg(flags, name="FCAL3CalibCalculator", **kwargs)
Definition: LArG4FCALConfig.py:48
LArG4BarrelConfig.BarrelCryostatCalibrationCalculatorCfg
def BarrelCryostatCalibrationCalculatorCfg(flags, name="BarrelCryostatCalibrationCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:6
LArG4FCALConfig.FCAL2CalculatorCfg
def FCAL2CalculatorCfg(flags, name="FCAL2Calculator", **kwargs)
Definition: LArG4FCALConfig.py:20
LArG4HECConfig.HECCalibrationWheelInactiveCalculatorCfg
def HECCalibrationWheelInactiveCalculatorCfg(flags, name="HECCalibrationWheelInactiveCalculator", **kwargs)
Definition: LArG4HECConfig.py:38
LArG4BarrelConfig.DMCalibrationCalculatorCfg
def DMCalibrationCalculatorCfg(flags, name="DMCalibrationCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:24
LArG4BarrelConfig.BarrelCryostatCalibrationLArCalculatorCfg
def BarrelCryostatCalibrationLArCalculatorCfg(flags, name="BarrelCryostatCalibrationLArCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:12
LArG4HECConfig.HECWheelCalculatorCfg
def HECWheelCalculatorCfg(flags, name="HECWheelCalculator", **kwargs)
Definition: LArG4HECConfig.py:20
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
LArG4SDToolConfig.LArFCALSensitiveDetectorCfg
def LArFCALSensitiveDetectorCfg(flags, name="LArFCALSensitiveDetector", **kwargs)
Definition: LArG4SDToolConfig.py:273
LArG4SDToolConfig.LArDeadSensitiveDetectorToolCfg
def LArDeadSensitiveDetectorToolCfg(flags, name="LArDeadSensitiveDetector", **kwargs)
Definition: LArG4SDToolConfig.py:74
LArG4ECConfig.EndcapCryostatCalibrationMixedCalculatorCfg
def EndcapCryostatCalibrationMixedCalculatorCfg(flags, name="EndcapCryostatCalibrationMixedCalculator", **kwargs)
Definition: LArG4ECConfig.py:78
LArG4SDToolConfig.LArHECSensitiveDetectorCfg
def LArHECSensitiveDetectorCfg(flags, name="LArHECSensitiveDetector", **kwargs)
Definition: LArG4SDToolConfig.py:304
CollectionMergerConfig.CollectionMergerCfg
def CollectionMergerCfg(flags, bare_collection_name, mergeable_collection_suffix, merger_input_property, region)
Definition: CollectionMergerConfig.py:66
LArG4BarrelConfig.BarrelCalibrationCalculatorCfg
def BarrelCalibrationCalculatorCfg(flags, name="BarrelCalibrationCalculator", **kwargs)
Definition: LArG4BarrelConfig.py:30