3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import BeamType
6 from ISF_Algorithms.CollectionMergerConfig
import CollectionMergerCfg
10 bare_collection_name =
"TileHitVec"
11 mergeable_collection_suffix =
"_G4"
12 merger_input_property =
"TileHits"
15 result, hits_collection_name =
CollectionMergerCfg(flags, bare_collection_name, mergeable_collection_suffix, merger_input_property, region)
16 kwargs.setdefault(
"LogicalVolumeNames", [
"Tile::Scintillator"])
17 kwargs.setdefault(
"OutputCollectionNames", [hits_collection_name])
19 kwargs.setdefault(
"TileCalculator", result.getPrimaryAndMerge(
TileGeoG4SDCalcCfg(flags, [hits_collection_name])) )
21 result.setPrivateTools(CompFactory.TileGeoG4SDTool(name, **kwargs))
26 kwargs.setdefault(
"LogicalVolumeNames", [
"Tile::Scintillator"])
27 hit_collection_name = [
"TileHitVec"]
28 kwargs.setdefault(
"OutputCollectionNames", hit_collection_name)
31 kwargs.setdefault(
"TileCalculator", result.getPrimaryAndMerge(
TileCTBGeoG4SDCalcCfg(flags, hit_collection_name)) )
33 result.setPrivateTools(CompFactory.TileGeoG4SDTool(name, **kwargs))
40 if flags.Beam.Type
is BeamType.Cosmics
or flags.Sim.ReadTR:
41 kwargs.setdefault(
"DeltaTHit", [1])
42 kwargs.setdefault(
"DoTOFCorrection",
False)
43 kwargs.setdefault(
"DoCalibHitParticleID", flags.Sim.ParticleID )
44 kwargs.setdefault(
"OutputCollectionNames", hit_collection_name)
46 result.addService(CompFactory.TileGeoG4SDCalc(name, **kwargs), primary=
True)
53 kwargs.setdefault(
"TileTB",
True)
54 kwargs.setdefault(
"DoCalibHitParticleID", flags.Sim.ParticleID )
55 kwargs.setdefault(
"OutputCollectionNames", hit_collection_name)
57 result.addService(CompFactory.TileGeoG4SDCalc(name, **kwargs), primary=
True)