ATLAS Offline Software
InDetGlobalLRTMonAlgCfg.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 InDetGlobalLRTMonAlgCfg.py
7 @author Leonid Serkin and Per Johansson
8 @date July 2021
9 @brief Configuration for Run 3 based on InDetGlobalLRTMonTool.cxx
10 """
11 
12 from math import pi as M_PI
13 from AthenaConfiguration.ComponentFactory import CompFactory
14 
16 
17  # values
18  m_nBinsEta = 50
19  m_nBinsPhi = 50
20  m_trackBin = 200
21  m_c_etaRange = 3
22  m_c_etaRangeTRT = 2.0
23  m_c_range_LB = 3000
24 
25  # this creates a "lrtGroup" called "alg" which will put its histograms into the subdirectory "Track"
26  lrtGroup = helper.addGroup(alg, 'LRT')
27  pathtrack = '/InDetGlobal/LRTTrack'
28  pathhits = '/InDetGlobal/LRTHits'
29 
30 
31  varName = 'm_nBase;nCOMBtrks'
32  title = 'Track multiplicity (baseline tracks);Track multiplicity;Events'
33  lrtGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_trackBin, xmin=0, xmax=200)
34 
35  varName = 'm_d0_perigee;trkD'
36  title = 'd_{0} ;d_{0} (mm)'
37  lrtGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=20, xmin=-325, xmax=325)
38 
39  varName = 'm_z0_perigee;trkZ'
40  title = 'z_{0} ;z_{0} (mm);'
41  lrtGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=20, xmin=-600, xmax=600)
42 
43 
44  varName = 'm_radius_perigee;trkR'
45  title = 'Radius of first hit ; R (m);'
46  lrtGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=20, xmin=-600, xmax=600)
47 
48 
49  varName = 'm_eta_perigee;trkEta'
50  title = '#eta of all tracks;#eta;'
51  lrtGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange)
52 
53 
54  varName = 'm_phi_perigee;trkPhi'
55  title = ' #varphi of all tracks; #varphi (rad);'
56  lrtGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_nBinsPhi, xmin=-3.2, xmax=3.2)
57 
58  varName = 'm_trkPt;trkPt'
59  title = 'Track Pt;p_{T} (GeV);'
60  lrtGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=100, xmin=-1, xmax=200)
61 
62 
63  # Eta-phi maps
64  varName = 'm_eta_perigee,m_phi_perigee;Trk_Base_eta_phi'
65  title = 'Distribution of eta vs phi for LRT tracks;#eta,#phi_{0}'
66  lrtGroup.defineHistogram(varName, type='TH2F', path=pathtrack, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
67 
68  varName = 'm_eta_perigee,m_phi_perigee,m_track_pass_tight;Trk_Tight_eta_phi_ratio'
69  title = 'Distribution of eta vs phi for combined tracks passing Tight selection;#eta;#phi_{0}'
70  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathtrack, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
71 
72  varName = 'm_eta_perigee,m_phi_perigee,m_noTRTHits;Trk_noTRText_eta_phi_ratio'
73  title = 'Distribution of eta vs phi for combined tracks passing with no TRT extension;#eta;#phi_{0}'
74  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathtrack, title=title, xbins=20, xmin=-m_c_etaRangeTRT, xmax=m_c_etaRangeTRT, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
75 
76  varName = 'm_eta_perigee,m_phi_perigee,m_NextToInnermostPixelLayerHit;Trk_noBLhit_eta_phi_ratio'
77  title = 'Eta-phi of tracks with no b-layer hit but a hit is expected, ratio to total tracks;#eta;#phi_{0}'
78  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathtrack, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
79 
80  varName = 'm_eta_perigee,m_phi_perigee,m_InnermostPixelLayerHit;Trk_noIBLhit_eta_phi_ratio'
81  title = 'Eta-phi of tracks with no IBL hit but a hit is expected, ratio to total tracks;#eta;#phi_{0}'
82  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathtrack, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
83 
84  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfInnermostPixelLayerHits;Trk_nIBLhits_eta_phi' # done
85  title = 'Number of IBL hits per track, eta-phi profile;#eta;#phi'
86  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
87 
88  varName = 'm_eta_perigee,m_phi_perigee,m_pixHits;Trk_nPIXhits_eta_phi'
89  title = 'Number of PIX hits per track, eta-phi profile;#eta;#phi'
90  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
91 
92  varName = 'm_eta_perigee,m_phi_perigee,m_sctHits;Trk_nSCThits_eta_phi'
93  title = 'Number of SCT hits per track, eta-phi profile;#eta;#phi'
94  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
95 
96  varName = 'm_eta_perigee,m_phi_perigee,m_trtHits;Trk_nTRThits_eta_phi'
97  title = 'Number of TRT hits per track, eta-phi profile;#eta;#phi'
98  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
99 
100  varName = 'm_lb,m_numberOfInnermostPixelLayerHits;trk_nIBLhits_LB'
101  title = 'Average number of IBL hits by LB;LB;Average number of hits in LB'
102  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
103 
104 
105  varName = 'm_lb,m_d0_perigee;trk_d0_LB'
106  title = 'D0'
107  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
108 
109  varName = 'm_lb,m_pixHits;trk_nPIXhits_LB'
110  title = 'Average number of PIX hits by LB;LB;Average number of hits in LB'
111  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
112 
113  varName = 'm_lb,m_sctHits;trk_nSCThits_LB'
114  title = 'Average number of SCT hits by LB;LB;Average number of hits in LB'
115  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
116 
117  varName = 'm_lb,m_trtHits;trk_nTRThits_LB'
118  title = 'Average number of TRT hits by LB;LB;Average number of hits in LB'
119  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
120 
121  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfPixelDeadSensors;Trk_nPIXdisabled_eta_phi' # done
122  title = 'Number of PIX disabled detector elements per track, eta-phi profile;#eta;#phi'
123  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
124 
125  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfSCTDeadSensors;Trk_nSCTdisabled_eta_phi'
126  title = 'Number of SCT disabled detector elements per track, eta-phi profile;#eta;#phi'
127  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
128 
129  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfTRTDeadStraws;Trk_nTRTdisabled_eta_phi'
130  title = 'Number of TRT disabled detector elements per track, eta-phi profile;#eta;#phi'
131  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
132 
133  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfPixelSharedHits;Trk_nPixShared_eta_phi'
134  title = 'Number of Pixel shared hits per track, eta-phi profile;#eta;#phi'
135  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
136 
137  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfPixelSplitHits;Trk_nPixSplit_eta_phi'
138  title = 'Number of Pixel split hits per track, eta-phi profile;#eta;#phi'
139  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
140 
141  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfSCTSharedHits;Trk_nSCTShared_eta_phi'
142  title = 'Number of SCT shared hits per track, eta-phi profile;#eta;#phi'
143  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
144 
145  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfPixelHoles;Trk_nPixHoles_eta_phi'
146  title = 'Number of Pixel holes per track, eta-phi profile;#eta;#phi'
147  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
148 
149  varName = 'm_eta_perigee,m_phi_perigee,m_numberOfSCTHoles;Trk_nSCTHoles_eta_phi'
150  title = 'Number of SCT holes per track, eta-phi profile;#eta;#phi'
151  lrtGroup.defineHistogram(varName, type='TProfile2D', path=pathhits, title=title, xbins=m_nBinsEta, xmin=-m_c_etaRange, xmax=m_c_etaRange, ybins=m_nBinsPhi, ymin=-M_PI, ymax=M_PI)
152 
153  varName = 'm_lb,m_nBase_LB;Trk_nBase_LB'
154  title = 'Average number of baseline tracks per event in LB;LB number;Average number of LRT tracks per event in LB'
155  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
156 
157 
158 
159  varName = 'm_lumiPerBCID,m_nBase_Lumi;Trk_nBase_Lumi'
160  title = 'Average number of baseline tracks per event in Pileup;#mu;Average number of loose primary tracks per event in Pileup'
161  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=40, xmin=0, xmax=80)
162 
163 
164  varName = 'm_lb,m_nTight_LB;Trk_nTight_LB'
165  title = 'Average number of tight tracks per event in LB;LB number;Average number of tight tracks per event in LB'
166  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
167 
168  varName = 'm_lb,m_nNoIBL_LB;Trk_noIBLhits_LB'
169  title = 'Average number of tracks with missing IBL hit per event in LB;LB number;Average number of tracks with missing IBL hit per event in LB'
170  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
171 
172  varName = 'm_lb,m_NoIBL_LB;Trk_noIBLhits_frac_LB'
173  title = 'Fraction of tracks with missing IBL hit per event in LB;LB number;Fraction of tracks with missing IBL hit per event in LB'
174  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
175 
176  varName = 'm_lb,m_nNoBL_LB;Trk_noBLhits_LB'
177  title = 'Average number of tracks with missing b-layer hit per event in LB;LB number;Average number of tracks with missing b-layer hit per event in LB'
178  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
179 
180  varName = 'm_lb,m_NoBL_LB;Trk_noBLhits_frac_LB'
181  title = 'Fraction of tracks with missing b-layer hit per event in LB;LB number;Fraction of tracks with missing b-layer hit per event in LB'
182  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
183 
184  varName = 'm_lb,m_nNoTRText_LB;Trk_noTRText_LB'
185  title = 'Average number of tracks without TRT extension per event in LB;LB number;Average number of tracks with without TRT extension per event in LB'
186  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
187 
188  varName = 'm_lb,m_NoTRText_LB;Trk_noTRText_frac_LB'
189  title = 'Fraction of tracks without TRT extension per event in LB;LB number;Fraction of tracks with without TRT extension per event in LB'
190  lrtGroup.defineHistogram(varName, type='TProfile', path=pathtrack, title=title, xbins=m_c_range_LB, xmin=0, xmax=m_c_range_LB)
191 
192 # end histograms
193 
194 
195 def InDetGlobalLRTMonAlgCfg(helper, acc,
196  flags, name="InDetGlobalLRTMonAlg", **kwargs):
197 
198  if "TrackSelectionTool" not in kwargs:
199  from InDetConfig.InDetTrackSelectionToolConfig import (
200  InDetGlobalLRTMonAlg_TrackSelectionToolCfg)
201  kwargs.setdefault("TrackSelectionTool", acc.popToolsAndMerge(
203 
204  from AthenaMonitoring.FilledBunchFilterToolConfig import FilledBunchFilterToolCfg
205  from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
206 
207  monAlg = helper.addAlgorithm(
208  CompFactory.InDetGlobalLRTMonAlg, name,
209  addFilterTools = [FilledBunchFilterToolCfg(flags), AtlasReadyFilterCfg(flags)],
210  **kwargs)
211 
212  HistoInDetGlobalLRTMonAlgCfg(helper, monAlg)
213  return
python.FilledBunchFilterToolConfig.FilledBunchFilterToolCfg
def FilledBunchFilterToolCfg(AthConfigFlags flags)
Definition: FilledBunchFilterToolConfig.py:9
InDetGlobalLRTMonAlgCfg.InDetGlobalLRTMonAlgCfg
def InDetGlobalLRTMonAlgCfg(helper, acc, flags, name="InDetGlobalLRTMonAlg", **kwargs)
Definition: InDetGlobalLRTMonAlgCfg.py:195
InDetGlobalLRTMonAlgCfg.HistoInDetGlobalLRTMonAlgCfg
def HistoInDetGlobalLRTMonAlgCfg(helper, alg)
Definition: InDetGlobalLRTMonAlgCfg.py:15
python.AtlasReadyFilterConfig.AtlasReadyFilterCfg
def AtlasReadyFilterCfg(flags)
Definition: AtlasReadyFilterConfig.py:10
python.InDetTrackSelectionToolConfig.InDetGlobalLRTMonAlg_TrackSelectionToolCfg
def InDetGlobalLRTMonAlg_TrackSelectionToolCfg(flags, name="InDetGlobalLRTMonAlg_TrackSelectionTool", **kwargs)
Definition: InDetTrackSelectionToolConfig.py:170