3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
6 from ISF_HepMC_Tools.ISF_HepMC_ToolsConfig
import ParticleSimAcceptList_ExtraParticlesCfg, ParticleFinalStateFilterCfg, GenParticleInteractingFilterCfg, EtaPhiFilterCfg, ParticlePositionFilterDynamicCfg
7 AthSequencer=CompFactory.AthSequencer
9 def SimEventFilterCfg(flags, name="ISF_SimEventFilter", sequenceName='SimSequence', **kwargs):
11 result.addSequence(
AthSequencer(sequenceName), parentName=
'AthAlgSeq')
12 kwargs.setdefault(
"InputHardScatterCollection",
"BeamTruthEvent")
19 result.addEventAlgo(CompFactory.ISF.SimEventFilter(name, **kwargs), sequenceName)
23 kwargs.setdefault(
"FilterKey",
"ISF_InvertedSimEventFilter")
24 kwargs.setdefault(
"InvertFilter",
True)
29 result.addSequence(
AthSequencer(sequenceName), parentName=
'AthAlgSeq')
30 kwargs.setdefault(
"InputMcEventCollection",
"TruthEventOLD" )
31 kwargs.setdefault(
"OutputMcEventCollection",
"TruthEvent" )
32 kwargs.setdefault(
"InputCaloEntryLayer",
"CaloEntryLayerOLD" )
33 kwargs.setdefault(
"InputMuonEntryLayer",
"MuonEntryLayerOLD" )
34 kwargs.setdefault(
"InputMuonExitLayer",
"MuonExitLayerOLD" )
35 kwargs.setdefault(
"OutputCaloEntryLayer",
"CaloEntryLayer" )
36 kwargs.setdefault(
"OutputMuonEntryLayer",
"MuonEntryLayer" )
37 kwargs.setdefault(
"OutputMuonExitLayer",
"MuonExitLayer" )
39 if flags.Detector.EnableBCM:
40 kwargs.setdefault(
"InputBCMHits",
"BCMHitsOLD" )
41 kwargs.setdefault(
"InputBLMHits",
"BLMHitsOLD" )
42 kwargs.setdefault(
"OutputBCMHits",
"BCMHits" )
43 kwargs.setdefault(
"OutputBLMHits",
"BLMHits" )
44 if flags.Detector.EnablePixel:
45 kwargs.setdefault(
"InputPixelHits",
"PixelHitsOLD" )
46 kwargs.setdefault(
"OutputPixelHits",
"PixelHits" )
47 if flags.Detector.EnableSCT:
48 kwargs.setdefault(
"InputSCTHits",
"SCT_HitsOLD" )
49 kwargs.setdefault(
"OutputSCTHits",
"SCT_Hits" )
50 if flags.Detector.EnableTRT:
51 kwargs.setdefault(
"InputTRTUncompressedHits",
"TRTUncompressedHitsOLD" )
52 kwargs.setdefault(
"OutputTRTUncompressedHits",
"TRTUncompressedHits" )
53 if flags.Detector.EnableITkPixel:
54 kwargs.setdefault(
"InputITkPixelHits",
"ITkPixelHitsOLD" )
55 kwargs.setdefault(
"OutputITkPixelHits",
"ITkPixelHits" )
56 if flags.Detector.EnableITkStrip:
57 kwargs.setdefault(
"InputITkStripHits",
"ITkStripHitsOLD" )
58 kwargs.setdefault(
"OutputITkStripHits",
"ITkStripHits" )
60 if flags.Detector.EnableLAr:
61 kwargs.setdefault(
"InputLArEMBHits",
"LArHitEMBOLD" )
62 kwargs.setdefault(
"InputLArEMECHits",
"LArHitEMECOLD" )
63 kwargs.setdefault(
"InputLArFCALHits",
"LArHitFCALOLD" )
64 kwargs.setdefault(
"InputLArHECHits",
"LArHitHECOLD" )
65 kwargs.setdefault(
"OutputLArEMBHits",
"LArHitEMB" )
66 kwargs.setdefault(
"OutputLArEMECHits",
"LArHitEMEC" )
67 kwargs.setdefault(
"OutputLArFCALHits",
"LArHitFCAL" )
68 kwargs.setdefault(
"OutputLArHECHits",
"LArHitHEC" )
73 kwargs.setdefault(
"OutputLArActiveCalibHits",
"LArCalibrationHitActive")
74 kwargs.setdefault(
"OutputLArInactiveCalibHits",
"LArCalibrationHitInactive")
75 kwargs.setdefault(
"OutputLArDeadCalibHits",
"LArCalibrationHitDeadMaterial")
77 if flags.Detector.EnableTile:
78 kwargs.setdefault(
"InputTileHits",
"TileHitVecOLD" )
79 kwargs.setdefault(
"OutputTileHits",
"TileHitVec" )
84 kwargs.setdefault(
"OutputTileActiveCalibHits",
"TileCalibHitActiveCell")
85 kwargs.setdefault(
"OutputTileInactiveCalibHits",
"TileCalibHitInactiveCell")
86 kwargs.setdefault(
"OutputTileDeadCalibHits",
"TileCalibHitDeadMaterial")
87 if flags.Detector.EnableMBTS:
88 kwargs.setdefault(
"InputMBTSHits",
"MBTSHitsOLD" )
89 kwargs.setdefault(
"OutputMBTSHits",
"MBTSHits" )
90 if flags.Detector.EnableHGTD:
91 kwargs.setdefault(
"InputHGTDHits",
"HGTD_HitsOLD" )
92 kwargs.setdefault(
"OutputHGTDHits",
"HGTD_Hits" )
94 if flags.Detector.EnableCSC:
95 kwargs.setdefault(
"InputCSCHits",
"CSC_HitsOLD" )
96 kwargs.setdefault(
"OutputCSCHits",
"CSC_Hits" )
97 if flags.Detector.EnableMDT:
98 kwargs.setdefault(
"InputMDTHits",
"MDT_HitsOLD" )
99 kwargs.setdefault(
"OutputMDTHits",
"MDT_Hits" )
100 if flags.Detector.EnableRPC:
101 kwargs.setdefault(
"InputRPCHits",
"RPC_HitsOLD" )
102 kwargs.setdefault(
"OutputRPCHits",
"RPC_Hits" )
103 if flags.Detector.EnableTGC:
104 kwargs.setdefault(
"InputTGCHits",
"TGC_HitsOLD" )
105 kwargs.setdefault(
"OutputTGCHits",
"TGC_Hits" )
106 if flags.Detector.EnableMM:
107 kwargs.setdefault(
"InputMMHits",
"MM_HitsOLD" )
108 kwargs.setdefault(
"OutputMMHits",
"MM_Hits" )
109 if flags.Detector.EnablesTGC:
110 kwargs.setdefault(
"InputsTGCHits",
"sTGC_HitsOLD" )
111 kwargs.setdefault(
"OutputsTGCHits",
"sTGC_Hits" )
113 result.addEventAlgo(CompFactory.ISF.RenameHitCollectionsAlg(name, **kwargs), sequenceName)