5 from AthenaConfiguration.AccumulatorCache
import AccumulatorCache
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from TriggerMenuMT.HLT.Config.MenuComponents
import InEventRecoCA, SelectionCA, MenuSequence
13 recoAcc = InEventRecoCA(name=
'AFPTrackingFS')
15 if not flags.Input.isMC:
19 AFP_Raw = CompFactory.AFP_RawDataProvider(
"AFP_RawDataProvider")
20 acc.addEventAlgo(AFP_Raw)
23 AFP_R2D = CompFactory.AFP_Raw2Digi(
"AFP_Raw2Digi")
24 acc.addEventAlgo(AFP_R2D)
26 recoAcc.mergeReco(acc)
29 from AFP_SiClusterTools.AFP_SiClusterTools
import AFP_SiClusterTools_HLT
31 recoAcc.mergeReco(AFP_SiCl)
34 from AFP_LocReco.AFP_LocReco
import AFP_LocReco_SiD_HLT
36 recoAcc.mergeReco(AFP_SID)
43 def trigStreamerAFPHypoTool(chainDict):
44 return CompFactory.TrigStreamerHypoTool(chainDict[
'chainName'])
48 hypo = CompFactory.TrigStreamerHypoAlg(
'AFPPassThroughHypo')
50 selAcc = SelectionCA(
'AFPPassThroughSequence')
51 selAcc.mergeReco(recoAcc)
52 selAcc.addHypoAlgo(hypo)
54 return MenuSequence(flags, selAcc, HypoToolGen=trigStreamerAFPHypoTool)
58 name = chainDict[
'chainName']
59 tool = CompFactory.TrigAFPDijetComboHypoTool(name)
61 tool.maxProtonDiff_x = 2.5
62 tool.maxProtonDiff_y = 100.0
63 tool.maxProtonDist = 100.0
65 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
67 monTool.defineHistogram(
'DijetMass', type=
'TH1F', path=
'EXPERT', title=
"Dijet mass", xbins=100, xmin=0, xmax=2000)
68 monTool.defineHistogram(
'DijetRapidity', type=
'TH1F', path=
'EXPERT', title=
"Dijet rapidity", xbins=100, xmin=-5, xmax=5)
70 monTool.defineHistogram(
'XiJet1', type=
'TH1F', path=
'EXPERT', title=
"Jet 1 xi", xbins=100, xmin=0, xmax=1)
71 monTool.defineHistogram(
'XiJet2', type=
'TH1F', path=
'EXPERT', title=
"Jet 2 x1", xbins=100, xmin=0, xmax=1)
73 monTool.defineHistogram(
'PredictProtonAEnergy', type=
'TH1F', path=
'EXPERT', title=
"Predicted proton energy A", xbins=100, xmin=0, xmax=10000)
74 monTool.defineHistogram(
'PredictProtonCEnergy', type=
'TH1F', path=
'EXPERT', title=
"Predicted proton energy C", xbins=100, xmin=0, xmax=10000)
76 monTool.defineHistogram(
'SideA_predictX', type=
'TH1F', path=
'EXPERT', title=
"Predicted X side A", xbins=100, xmin=-100, xmax=100)
77 monTool.defineHistogram(
'SideA_predictY', type=
'TH1F', path=
'EXPERT', title=
"Predicted Y side A", xbins=100, xmin=-100, xmax=100)
78 monTool.defineHistogram(
'SideC_predictX', type=
'TH1F', path=
'EXPERT', title=
"Predicted X side C", xbins=100, xmin=-100, xmax=100)
79 monTool.defineHistogram(
'SideC_predictY', type=
'TH1F', path=
'EXPERT', title=
"Predicted Y side C", xbins=100, xmin=-100, xmax=100)
81 monTool.defineHistogram(
'XDiff', type=
'TH1F', path=
'EXPERT', title=
"X difference", xbins=100, xmin=-100, xmax=100)
82 monTool.defineHistogram(
'YDiff', type=
'TH1F', path=
'EXPERT', title=
"Y difference", xbins=100, xmin=-100, xmax=100)
83 monTool.defineHistogram(
'distance', type=
'TH1F', path=
'EXPERT', title=
"distance", xbins=100, xmin=0, xmax=50)
85 monTool.defineHistogram(
'SideA_trackX', type=
'TH1F', path=
'EXPERT', title=
"Track X side A", xbins=100, xmin=-100, xmax=100)
86 monTool.defineHistogram(
'SideA_trackY', type=
'TH1F', path=
'EXPERT', title=
"Track Y side A", xbins=100, xmin=-100, xmax=100)
87 monTool.defineHistogram(
'SideA_diffX', type=
'TH1F', path=
'EXPERT', title=
"Track X diff side A", xbins=100, xmin=-50, xmax=50)
88 monTool.defineHistogram(
'SideA_diffY', type=
'TH1F', path=
'EXPERT', title=
"Track Y diff side A", xbins=100, xmin=-50, xmax=50)
90 monTool.defineHistogram(
'SideC_trackX', type=
'TH1F', path=
'EXPERT', title=
"Track X side C", xbins=100, xmin=-100, xmax=100)
91 monTool.defineHistogram(
'SideC_trackY', type=
'TH1F', path=
'EXPERT', title=
"Track Y side C", xbins=100, xmin=-100, xmax=100)
92 monTool.defineHistogram(
'SideC_diffX', type=
'TH1F', path=
'EXPERT', title=
"Track X diff side C", xbins=100, xmin=-50, xmax=50)
93 monTool.defineHistogram(
'SideC_diffY', type=
'TH1F', path=
'EXPERT', title=
"Track Y diff side C", xbins=100, xmin=-50, xmax=50)
95 tool.MonTool = monTool
102 recoAcc = InEventRecoCA(name=
'AFPGlobalFS')
105 from AFP_LocReco.AFP_LocReco
import AFP_LocReco_TD_HLT
107 recoAcc.mergeReco(AFP_TD)
110 from AFP_GlobReco.AFP_GlobReco
import AFP_GlobReco_HLT
112 recoAcc.mergeReco(AFP_Pr)
115 from AFP_VertexReco.AFP_VertexReco
import AFP_VertexReco_HLT
117 recoAcc.mergeReco(AFP_Vtx)
124 def trigStreamerAFPToFHypoTool(chainDict):
125 return CompFactory.TrigStreamerHypoTool(chainDict[
'chainName'])
129 hypo = CompFactory.TrigStreamerHypoAlg(
'AFPToFPassThroughHypo')
131 selAcc = SelectionCA(
'AFPGlobalSequence')
132 selAcc.mergeReco(recoAcc)
133 selAcc.addHypoAlgo(hypo)
135 return MenuSequence(flags, selAcc, HypoToolGen=trigStreamerAFPToFHypoTool)
138 hypotool = CompFactory.TrigAFPToFHypoTool(chainDict[
'chainName'])
139 if "afpdz5" in chainDict[
"chainName"]:
140 hypotool.deltaZCut = 5.0
141 elif "afpdz10" in chainDict[
"chainName"]:
142 hypotool.deltaZCut = 10.0
150 hypo = CompFactory.TrigAFPToFHypoAlg(
'TrigAFPToFHypoAlg', AFPVertexContainer=
'HLT_AFPVertexContainer', VertexContainer=
'HLT_IDVertex_FS')
153 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
155 monTool.defineHistogram(
'afp_vtx_count', path=
'EXPERT', type=
'TH1F', title=
'AFP Vertex Counts',
156 xbins=6, xmin=-0.5, xmax=5.5 )
157 monTool.defineHistogram(
'id_vtx_count', path=
'EXPERT', type=
'TH1F', title=
'ID Vertex Counts',
158 xbins=6, xmin=-0.5, xmax=5.5 )
159 monTool.defineHistogram(
'skipHypoTool', path=
'EXPERT', type=
'TH1F', title=
'Reason of skipping the trigger',
160 xbins=6, xmin=-0.5, xmax=5.5 )
161 monTool.defineHistogram(
'afp_vtx_z', path=
'EXPERT', type=
'TH1F', title=
'AFP Vertex X',
162 xbins=401, xmin=-200, xmax=200 )
163 monTool.defineHistogram(
'id_vtx_z', path=
'EXPERT', type=
'TH1F', title=
'ID Vertex Z',
164 xbins=401, xmin=-200, xmax=200 )
165 monTool.defineHistogram(
'delta_z', path=
'EXPERT', type=
'TH1F', title=
'Delta Z',
166 xbins=201, xmin=-100, xmax=100 )
167 hypo.MonTool = monTool
169 selAcc = SelectionCA(
'AFPToFDeltaZSequence')
170 selAcc.mergeReco(recoAcc)
171 selAcc.addHypoAlgo(hypo)
173 return MenuSequence(flags, selAcc, HypoToolGen=AFPToFDeltaZToolGen)
176 if __name__ ==
'__main__':
177 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
178 from AthenaConfiguration.TestDefaults
import defaultTestFiles
180 flags.Input.Files = defaultTestFiles.AOD_RUN3_MC
185 afp_trk.ca.printConfig(withDetails=
True)
188 afp_glob.ca.printConfig(withDetails=
True)