ATLAS Offline Software
TrigVrtSecInclusiveConfig.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.ComponentFactory import CompFactory
4 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 
8 
9  def addTrackPairHistograms(montool):
10  montool.defineHistogram('pair_dphi', path='EXPERT',type='TH1F',title="Delta phi of track pair", xbins = 132, xmin=-0.1, xmax=3.2)
11  montool.defineHistogram('pair_dr', path='EXPERT',type='TH1F',title="Delta r of track pair", xbins = 132, xmin=-0.1, xmax=3.2)
12  montool.defineHistogram('intersect_r', path='EXPERT',type='TH1F',title="R of two circles intersections (mm)", xbins = 200, xmin=0, xmax=600)
13  montool.defineHistogram('init_r', path='EXPERT',type='TH1F',title="R of initial vertex (mm)", xbins = 200, xmin=0, xmax=600)
14  montool.defineHistogram('init_trkd0', path='EXPERT',type='TH1F',title="Trk d0 wrt initial vertex", xbins = 200, xmin=0, xmax=200)
15  montool.defineHistogram('init_trkz0', path='EXPERT',type='TH1F',title="Trk z0 wrt initial vertex", xbins = 100, xmin=0, xmax=100)
16  montool.defineHistogram('vtxfit_chi2', path='EXPERT',type='TH1F',title="Chi2 of fitted vertex", xbins = 100, xmin=0, xmax=5)
17  montool.defineHistogram('vtxfit_r', path='EXPERT',type='TH1F',title="R of fitted vertex (mm)", xbins = 200, xmin=0, xmax=600)
18  montool.defineHistogram('vtx_chi2', path='EXPERT',type='TH1F',title="Chi2 of vertex", xbins = 100, xmin=0, xmax=5)
19  montool.defineHistogram('vtx_mass', path='EXPERT',type='TH1F',title="Mass of vertex (GeV)", xbins = 200, xmin=0, xmax=5)
20  montool.defineHistogram('vtx_mass_high', path='EXPERT',type='TH1F',title="Mass of vertex (GeV, high)", xbins = 200, xmin=0, xmax=100)
21  montool.defineHistogram('vtx_pt', path='EXPERT',type='TH1F',title="Pt of vertex (GeV)", xbins = 100, xmin=0, xmax=100)
22  montool.defineHistogram('vtx_charge', path='EXPERT',type='TH1F',title="Charge of vertex", xbins = 5, xmin=-2.5,xmax=2.5)
23  montool.defineHistogram('vtx_r', path='EXPERT',type='TH1F',title="R of vertex (mm)", xbins = 200, xmin=0, xmax=600)
24 
25  def addTimingHistograms(montool):
26  montool.defineHistogram('TIME_TrackSel', path='EXPERT',type='TH1F',title="Track selection time (ns)", xbins = 200, xmin=0.0, xmax=1000.0)
27  montool.defineHistogram('TIME_TwoTrackVertex', path='EXPERT',type='TH1F',title="Two track vertexing time (ms)", xbins = 200, xmin=0.0, xmax=1000.0)
28  montool.defineHistogram('TIME_MapClustering', path='EXPERT',type='TH1F',title="Time spent in vertex map clustering (us)", xbins = 200, xmin=0.0, xmax=10000.0)
29  montool.defineHistogram('TIME_NTrackVertex', path='EXPERT',type='TH1F',title="Time spent in Ntrack vertexing (ms)", xbins = 200, xmin=0.0, xmax=50.0)
30  montool.defineHistogram('TIME_NTrackVtxOffVSI',path='EXPERT',type='TH1F',title="Time spent in Ntrack vertexing (ms)", xbins = 200, xmin=0.0, xmax=1000.0)
31  montool.defineHistogram('TIME_CleanUp', path='EXPERT',type='TH1F',title="Time spent in vertex cleaning (ns)", xbins = 200, xmin=0.0, xmax=10000.0)
32  montool.defineHistogram('TIME_WriteVertices', path='EXPERT',type='TH1F',title="Time spent in writing vertex out (us)", xbins = 200, xmin=0.0, xmax=100.0)
33  montool.defineHistogram('TIME_Overall', path='EXPERT',type='TH1F',title="Time spent over all vertexing (ms)", xbins = 200, xmin=0.0, xmax=1000.0)
34 
35  montool.defineHistogram('TIME_TwoCircIntsect', path='EXPERT',type='TH1F',title="Two circles intersection time (ns) / Di-track vertexing", xbins = 200, xmin=0.0, xmax=1000.0)
36  montool.defineHistogram('TIME_VrtFitFast', path='EXPERT',type='TH1F',title="Two track vertexing fast time (ns) / Di-track vertexing", xbins = 200, xmin=0.0, xmax=10000.0)
37  montool.defineHistogram('TIME_VrtFit', path='EXPERT',type='TH1F',title="Two track vertexing time (us) / Di-track vertexing", xbins = 200, xmin=0.0, xmax=2000.0)
38 
39  montool.defineHistogram('TIME_RetrvFromMap', path='EXPERT',type='TH1F',title="Time spent in track list retrieving from the map (ns) / N-track vertexing", xbins = 200, xmin=0.0, xmax=10000.0)
40  montool.defineHistogram('TIME_MergeParGraph', path='EXPERT',type='TH1F',title="Time spent in vertex merging using partial graph (us) / N-track vertexing", xbins = 200, xmin=0.0, xmax=1000.0)
41  montool.defineHistogram('TIME_MergeSimple', path='EXPERT',type='TH1F',title="Time spent in simple vertex merging (us) / N-track vertexing", xbins = 200, xmin=0.0, xmax=1000.0)
42 
43 
44  montool = GenericMonitoringTool(flags, HistPath = f"TrigVrtSecInclusive_{name}")
45  addTrackPairHistograms(montool)
46  addTimingHistograms(montool)
47 
48  return montool
49 
51 
52  def addTrackPairHistograms(montool):
53  montool.defineHistogram('pair_dphi', path='EXPERT',type='TH1F',title="Delta phi of track pair", xbins = 132, xmin=-0.1, xmax=3.2)
54  montool.defineHistogram('pair_dr', path='EXPERT',type='TH1F',title="Delta r of track pair", xbins = 132, xmin=-0.1, xmax=3.2)
55  montool.defineHistogram('intersect_r', path='EXPERT',type='TH1F',title="R of two circles intersections (mm)", xbins = 200, xmin=0, xmax=600)
56  montool.defineHistogram('init_r', path='EXPERT',type='TH1F',title="R of initial vertex (mm)", xbins = 200, xmin=0, xmax=600)
57  montool.defineHistogram('init_trkd0', path='EXPERT',type='TH1F',title="Trk d0 wrt initial vertex", xbins = 200, xmin=0, xmax=200)
58  montool.defineHistogram('init_trkz0', path='EXPERT',type='TH1F',title="Trk z0 wrt initial vertex", xbins = 100, xmin=0, xmax=100)
59  montool.defineHistogram('vtxfit_chi2', path='EXPERT',type='TH1F',title="Chi2 of fitted vertex", xbins = 100, xmin=0, xmax=5)
60  montool.defineHistogram('vtxfit_r', path='EXPERT',type='TH1F',title="R of fitted vertex (mm)", xbins = 200, xmin=0, xmax=600)
61  montool.defineHistogram('vtx_chi2', path='EXPERT',type='TH1F',title="Chi2 of vertex", xbins = 100, xmin=0, xmax=5)
62  montool.defineHistogram('vtx_mass', path='EXPERT',type='TH1F',title="Mass of vertex (GeV)", xbins = 200, xmin=0, xmax=5)
63  montool.defineHistogram('vtx_mass_high', path='EXPERT',type='TH1F',title="Mass of vertex (GeV, high)", xbins = 200, xmin=0, xmax=100)
64  montool.defineHistogram('vtx_pt', path='EXPERT',type='TH1F',title="Pt of vertex (GeV)", xbins = 100, xmin=0, xmax=100)
65  montool.defineHistogram('vtx_charge', path='EXPERT',type='TH1F',title="Charge of vertex", xbins = 5, xmin=-2.5,xmax=2.5)
66  montool.defineHistogram('vtx_r', path='EXPERT',type='TH1F',title="R of vertex (mm)", xbins = 200, xmin=0, xmax=600)
67 
68  def addTimingHistograms(montool):
69  montool.defineHistogram('TIME_TrackSel', path='EXPERT',type='TH1F',title="Track selection time (ns)", xbins = 200, xmin=0.0, xmax=1000.0)
70  montool.defineHistogram('TIME_TwoTrackVertex', path='EXPERT',type='TH1F',title="Two track vertexing time (ms)", xbins = 200, xmin=0.0, xmax=10000.0)
71  montool.defineHistogram('TIME_MapClustering', path='EXPERT',type='TH1F',title="Time spent in vertex map clustering (us)", xbins = 200, xmin=0.0, xmax=10000.0)
72  montool.defineHistogram('TIME_NTrackVertex', path='EXPERT',type='TH1F',title="Time spent in Ntrack vertexing (ms)", xbins = 200, xmin=0.0, xmax=500.0)
73  montool.defineHistogram('TIME_NTrackVtxOffVSI',path='EXPERT',type='TH1F',title="Time spent in Ntrack vertexing (ms)", xbins = 200, xmin=0.0, xmax=1000.0)
74  montool.defineHistogram('TIME_CleanUp', path='EXPERT',type='TH1F',title="Time spent in vertex cleaning (ns)", xbins = 200, xmin=0.0, xmax=10000.0)
75  montool.defineHistogram('TIME_WriteVertices', path='EXPERT',type='TH1F',title="Time spent in writing vertex out (us)", xbins = 200, xmin=0.0, xmax=100.0)
76  montool.defineHistogram('TIME_Overall', path='EXPERT',type='TH1F',title="Time spent over all vertexing (ms)", xbins = 200, xmin=0.0, xmax=10000.0)
77 
78  montool.defineHistogram('TIME_TwoCircIntsect', path='EXPERT',type='TH1F',title="Two circles intersection time (ns) / Di-track vertexing", xbins = 200, xmin=0.0, xmax=1000.0)
79  montool.defineHistogram('TIME_VrtFitFast', path='EXPERT',type='TH1F',title="Two track vertexing fast time (ns) / Di-track vertexing", xbins = 200, xmin=0.0, xmax=10000.0)
80  montool.defineHistogram('TIME_VrtFit', path='EXPERT',type='TH1F',title="Two track vertexing time (us) / Di-track vertexing", xbins = 200, xmin=0.0, xmax=2000.0)
81 
82  montool.defineHistogram('TIME_RetrvFromMap', path='EXPERT',type='TH1F',title="Time spent in track list retrieving from the map (ns) / N-track vertexing", xbins = 200, xmin=0.0, xmax=10000.0)
83  montool.defineHistogram('TIME_MergeParGraph', path='EXPERT',type='TH1F',title="Time spent in vertex merging using partial graph (us) / N-track vertexing", xbins = 200, xmin=0.0, xmax=1000.0)
84  montool.defineHistogram('TIME_MergeSimple', path='EXPERT',type='TH1F',title="Time spent in simple vertex merging (us) / N-track vertexing", xbins = 200, xmin=0.0, xmax=1000.0)
85 
86 
87  montool = GenericMonitoringTool(flags, HistPath = f"TrigVrtSecInclusive_{name}")
88  addTrackPairHistograms(montool)
89  addTimingHistograms(montool)
90 
91  return montool
92 
93 
94 def TrigVrtSecInclusiveCfg(flags, name, FirstPassTracksName, SecondPassTracksName, PrimaryVertexInputName, VxCandidatesOutputName, TrkPairOutputName, recordTrkPair=True):
95 
96  acc = ComponentAccumulator()
97 
98  from TrkConfig.TrkVKalVrtFitterConfig import TrigVKalVrtFitterCfg
99  VertexFitter = acc.popToolsAndMerge(
100  TrigVKalVrtFitterCfg(flags, name = 'VKalVrtFitter_'+name))
101 
102  from InDetConfig.InDetConversionFinderToolsConfig import BPHY_VertexPointEstimatorCfg
103  VertexPointEstimator = acc.popToolsAndMerge(
104  BPHY_VertexPointEstimatorCfg(flags, name = 'VertexPointEstimator_'+name))
105 
106  alg = CompFactory.TrigVSI.TrigVrtSecInclusive(
107  name = name,
108  FirstPassTracksName = FirstPassTracksName,
109  SecondPassTracksName = SecondPassTracksName,
110  PrimaryVertexInputName = PrimaryVertexInputName,
111  VxCandidatesOutputName = VxCandidatesOutputName,
112  TrkPairOutputName = TrkPairOutputName,
113  VertexFitter = VertexFitter,
114  VertexPointEstimator = VertexPointEstimator,
115  recordTrkPair = recordTrkPair,
116  )
117 
118  # monitoring
119  alg.MonTool = TrigVrtSecInclusive_VSIMonitoring(flags, 'jet')
120 
121  acc.addEventAlgo(alg)
122  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrigVrtSecInclusiveConfig.TrigVrtSecInclusiveMonitoring
def TrigVrtSecInclusiveMonitoring(flags, name)
Definition: TrigVrtSecInclusiveConfig.py:7
python.TrkVKalVrtFitterConfig.TrigVKalVrtFitterCfg
def TrigVKalVrtFitterCfg(flags, name="TrigVKalVrtFitter", **kwargs)
Definition: TrkVKalVrtFitterConfig.py:49
GenericMonitoringTool
Definition: GenericMonitoringTool.py:1
python.InDetConversionFinderToolsConfig.BPHY_VertexPointEstimatorCfg
def BPHY_VertexPointEstimatorCfg(flags, name="BPHY_VertexPointEstimator", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:69
TrigVrtSecInclusiveConfig.TrigVrtSecInclusiveCfg
def TrigVrtSecInclusiveCfg(flags, name, FirstPassTracksName, SecondPassTracksName, PrimaryVertexInputName, VxCandidatesOutputName, TrkPairOutputName, recordTrkPair=True)
Definition: TrigVrtSecInclusiveConfig.py:94
TrigVrtSecInclusiveConfig.TrigVrtSecInclusive_VSIMonitoring
def TrigVrtSecInclusive_VSIMonitoring(flags, name)
Definition: TrigVrtSecInclusiveConfig.py:50