ATLAS Offline Software
InDetGlobalPrimaryVertexMonAlgCfg.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 """
6 @file InDetGlobalPrimaryVertexMonAlgCfg.py
7 @author Leonid Serkin and Per Johansson
8 @date April 2020
9 @brief Configuration for Run 3 based on InDetGlobalPrimaryVertexMonTool.cxx
10 """
11 
12 from AthenaConfiguration.ComponentFactory import CompFactory
13 
15 
16  # this creates a "pvGroup" called "alg" which will put its histograms into the subdirectory "PrimaryVertex"
17  pvGroup = helper.addGroup(alg, 'PrimaryVertex')
18  pathpv = '/InDetGlobal/PrimaryVertex'
19 
20  # begin histogram definitions
21  varName = 'm_PvX;pvX' #done
22  title = 'Primary vertex: x;x (mm);Events'
23  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=500, xmin=-1.0, xmax=1.0)
24 
25  varName = 'm_PvY;pvY' #done
26  title = 'Primary vertex: y;y (mm);Events'
27  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=500, xmin=-1.0, xmax=1.0)
28 
29  varName = 'm_PvZ;pvZ' #done
30  title = 'Primary vertex: z;z (mm);Events'
31  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=100, xmin=-200., xmax=200.)
32 
33  varName = 'm_PvN;pvN' #done
34  title = 'Total number of vertices (primary and pile up);Total number of vertices;Events'
35  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=60, xmin=-0.5, xmax=59.5)
36 
37  varName = 'm_nPriVtx;pvNPriVtx' #done
38  title = 'Number of primary vertices;Number of primary vertices;Events'
39  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=3, xmin=-0.5, xmax=2.5)
40 
41  varName = 'm_nPileupVtx;pvNPileupVtx' #done
42  title = 'Number of pileup vertices;Number of pile up vertices;Events'
43  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=50, xmin=-0.5, xmax=49.5)
44 
45  varName = 'm_PvErrX;pvErrX' #done
46  title = 'Primary vertex: #sigma_{x}; #sigma_{x} (mm);Events'
47  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=200, xmin=0., xmax=0.03)
48 
49  varName = 'm_PvErrY;pvErrY' #done
50  title = 'Primary vertex: #sigma_{y}; #sigma_{y} (mm);Events'
51  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=200, xmin=0., xmax=0.03)
52 
53  varName = 'm_PvErrZ;pvErrZ' #done
54  title = 'Primary vertex: #sigma_{z}; #sigma_{z} (mm);Events'
55  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=100, xmin=0., xmax=0.1)
56 
57  varName = 'm_PvChiSqDoF;pvChiSqDof' #done
58  title = 'Primary vertex: #Chi^{2}/DoF of vertex fit;#Chi^{2}/DoF;Events'
59  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=100, xmin=0., xmax=5.)
60 
61  varName = 'm_PvN;pvNTracks' #done
62  title = 'Number of tracks in primary vertex;Number of tracks;Events'
63  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=300, xmin=0., xmax=300.)
64 
65  varName = 'm_PvTrackPt;pvTrackPt' #done
66  title = 'Primary vertex: original track p_{t};p_{t} (GeV);Events'
67  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=100, xmin=0., xmax=20.)
68 
69  varName = 'm_PvTrackEta;pvTrackEta' #done
70  title = 'Primary vertex: original track #eta; #eta;Events'
71  pvGroup.defineHistogram(varName, type='TH1F', path=pathpv, title=title, xbins=100, xmin=-3, xmax=3)
72 
73 # end histograms
74 
75 
77  flags, name="InDetGlobalPrimaryVertexMonAlg",
78  **kwargs):
79  kwargs.setdefault("doEnhancedMonitoring", True)
80 
81  from AthenaMonitoring.FilledBunchFilterToolConfig import FilledBunchFilterToolCfg
82  from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
83 
84  monAlg = helper.addAlgorithm(
85  CompFactory.InDetGlobalPrimaryVertexMonAlg, name,
86  addFilterTools = [FilledBunchFilterToolCfg(flags), AtlasReadyFilterCfg(flags)],
87  **kwargs)
88 
90  return
python.FilledBunchFilterToolConfig.FilledBunchFilterToolCfg
def FilledBunchFilterToolCfg(AthConfigFlags flags)
Definition: FilledBunchFilterToolConfig.py:9
InDetGlobalPrimaryVertexMonAlgCfg.HistoInDetGlobalPrimaryVertexMonAlgCfg
def HistoInDetGlobalPrimaryVertexMonAlgCfg(helper, alg)
Definition: InDetGlobalPrimaryVertexMonAlgCfg.py:14
InDetGlobalPrimaryVertexMonAlgCfg.InDetGlobalPrimaryVertexMonAlgCfg
def InDetGlobalPrimaryVertexMonAlgCfg(helper, acc, flags, name="InDetGlobalPrimaryVertexMonAlg", **kwargs)
Definition: InDetGlobalPrimaryVertexMonAlgCfg.py:76
python.AtlasReadyFilterConfig.AtlasReadyFilterCfg
def AtlasReadyFilterCfg(flags)
Definition: AtlasReadyFilterConfig.py:10