ATLAS Offline Software
Functions
python.TIDAMonTool Namespace Reference

Functions

def createMonTool (flags, slicetag, chain)
 
def monGroup (analysis_chain)
 
def defineHisto (montool, name, **args)
 

Function Documentation

◆ createMonTool()

def python.TIDAMonTool.createMonTool (   flags,
  slicetag,
  chain 
)

Definition at line 12 of file TIDAMonTool.py.

12 def createMonTool( flags, slicetag, chain ) :
13 
14  from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
15  monTool = GenericMonitoringTool( flags, chain )
16 
17  histpath = slicetag + monGroup(chain)
18 
19  from TrigInDetAnalysisExample.chainString import chainString
20  cs = chainString( chain )
21 
22  # monTool.HistPath would this be better set in the c++ code ?
23 
24  if flags is None:
25  mypath = "EXPERT"
26  monTool.HistPath = histpath
27  else:
28  # mypath = flags.DQ.FileKey
29  # can't set the "path" in the histograms as that gets apended
30  # to the histogram name when using the official monitoring
31  # framework and we absolutely don't want that
32  mypath = ""
33  monTool.HistPath = "/" + flags.DQ.FileKey + "/" + histpath
34 
35 # do we need this ?
36 # monTool.UseCache = True
37 
38  monTool.convention = 'OFFLINE'
39  monTool.defaultDuration = 'run'
40 
41  # print( "TIDAMonTool.py CreateMonTool ", chain, " path:", monTool.HistPath )
42 
43  if "mb" in chain :
44  ptbins = [ 0.2, 0.4, 0.6, 0.8,
45  1, 1.20226, 1.44544, 1.7378, 2.0893, 2.51189, 3.01995, 3.63078, 4.36516, 5.24807, 6.30957,
46  7.58578, 9.12011, 10.9648, 13.1826, 15.8489, 19.0546, 22.9087, 27.5423, 33.1131, 39.8107,
47  47.863, 57.544, 69.1831, 83.1764, 100 ]
48  else:
49  ptbins = [ 1, 1.20226, 1.44544, 1.7378, 2.0893, 2.51189, 3.01995, 3.63078, 4.36516, 5.24807, 6.30957,
50  7.58578, 9.12011, 10.9648, 13.1826, 15.8489, 19.0546, 22.9087, 27.5423, 33.1131, 39.8107,
51  47.863, 57.544, 69.1831, 83.1764, 100 ]
52 
53 
54  vnbins = [
55  -0.5,
56  0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5,
57  13.5, 14.5, 15.5, 17.5, 18.5, 19.5, 21.5, 23.5, 24.5, 26.5, 28.5, 30.5, 32.5,
58  35.5, 37.5, 40.5, 43.5, 46.5, 50.5, 53.5, 57.5, 61.5, 66.5, 71.5, 76.5, 81.5,
59  87.5, 93.5, 100.5, 107.5, 114.5, 123.5, 131.5, 141.5, 150.5, 161.5, 172.5, 185.5, 198.5,
60  211.5, 226.5, 242.5, 259.5, 277.5, 297.5,
61  317.5, 340.5, 363.5, 389.5, 416.5, 445.5, 476.5, 509.5,
62  544.5, 582.5, 623.5, 666.5, 713.5, 762.5, 815.5, 872.5, 933.5, 998.5, 1067.5,
63  1141.5, 1221.5, 1305.5, 1396.5, 1493.5, 1597.5,
64  1708.5, 1827.5, 1953.5, 2089.5 ]
65 
66 # 2234.5, 2389.5, 2555.5,
67 # 2733.5, 2923.5, 3125.5,
68 # 3342.5, 3574.5,
69 # 3823.5, 4088.5,
70 # 4372.5, 4675.5,
71 # 5000.5
72 # ]
73 
74  d0bins = [ -5.0, -4.0, -3.0, -2.5,
75  -2.0, -1.8, -1.6, -1.4, -1.2,
76  -1.05, -0.95, -0.85, -0.75, -0.65, -0.55, -0.45, -0.35, -0.25, -0.15, -0.05,
77  0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95, 1.05,
78  1.2, 1.4, 1.6, 1.8, 2.0,
79  2.5, 3.0, 4.0, 5.0 ]
80 
81  if "LRT" in chain :
82  d0bins = [ -100.5, -97.5, -93.5, -90.5,
83  -86.5, -83.5, -80.5,
84  -77.5, -74.5, -71.5,
85  -69.5, -66.5, -63.5, -61.5,
86  -59.5, -57.5, -54.5, -52.5, -50.5,
87  -49.5, -47.5, -45.5, -43.5, -42.5, -40.5,
88  -39.5, -37.5, -36.5, -34.5, -33.5, -32.5, -31.5,
89  -29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, -20.5,
90  -19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5,
91  -9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5,
92  0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
93  10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5,
94  20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5,
95  31.5, 32.5, 33.5, 34.5, 36.5, 37.5, 39.5,
96  40.5, 42.5, 43.5, 45.5, 47.5, 49.5,
97  50.5, 52.5, 54.5, 57.5, 59.5,
98  61.5, 63.5, 66.5, 69.5,
99  71.5, 74.5, 77.5,
100  80.5, 83.5, 86.5,
101  90.5, 93.5, 97.5,
102  100.5 ]
103 
104 # use a rounded up float(M_PI) values to overcome edge effects of using float
105 # values - will math.pi be appropriate ? double(float(M_PI)) > M_PI so it would
106 # depend on whether floats or double are used for the histogram limits in the
107 # histograms in defineHistogram
108 # pi = 3.14159265359
109  pi = 3.14159275
110 
111  binlabels = [ "Nrois", "Nevents", "N ref tracks", "N matched tracks", "N total test tracks" ]
112 
113 
114  defineHisto( monTool, "Chain", weight="Chain_weight", path=mypath, type="TH1F", title=chain, xlabels=binlabels, xbins=5, xmin=0, xmax=5 )
115 
116 
117  defineHisto( monTool, "roi_eta", path=mypath, type="TH1F", title="Roi eta", xbins=25, xmin=-2.5, xmax=2.5 )
118 
119  if ( "FS_FTF" in cs.tail or "JetSuper_FTF" in cs.tail or "mb" in chain ):
120  defineHisto( monTool, "reftrk_N", path=mypath, type="TH1F", title="Reference tracks", xbins=vnbins )
121  else:
122  defineHisto( monTool, "reftrk_N", path=mypath, type="TH1F", title="Reference tracks", xbins=61, xmin=-0.5, xmax=60.5 )
123 
124  defineHisto( monTool, "reftrk_pT", path=mypath, type="TH1F", title="Reference track pT", xbins=ptbins )
125  defineHisto( monTool, "reftrk_phi", path=mypath, type="TH1F", title="Reference track Phi", xbins=25, xmin=-pi, xmax=pi )
126  defineHisto( monTool, "reftrk_eta", path=mypath, type="TH1F", title="Reference track Eta", xbins=25, xmin=-2.5, xmax=2.5 )
127 
128  if "LRT" in chain:
129  defineHisto( monTool, "reftrk_d0", path=mypath, type="TH1F", title="Reference track d0", xbins=201, xmin=-100.0, xmax=100.0 )
130  else:
131  defineHisto( monTool, "reftrk_d0", path=mypath, type="TH1F", title="Reference track d0", xbins=201, xmin=-0.5, xmax=0.5 )
132 
133  defineHisto( monTool, "reftrk_z0", path=mypath, type="TH1F", title="Reference track z0", xbins=50, xmin=-225., xmax=225. )
134  defineHisto( monTool, "reftrk_dd0", path=mypath, type="TH1F", title="Reference track sigma(d0)", xbins=50, xmin=0, xmax=0.5 )
135  defineHisto( monTool, "reftrk_dz0", path=mypath, type="TH1F", title="Reference track sigma(z0)", xbins=50, xmin=0, xmax=2.5 )
136  defineHisto( monTool, "reftrk_d0sig", path=mypath, type="TH1F", title="Reference track d0 significance", xbins= 101, xmin=-5., xmax=5. )
137 
138  if ( "FS_FTF" in cs.tail or "JetSuper_FTF" in cs.tail or "mb" in chain ):
139  defineHisto( monTool, "testtrk_N", path=mypath, type="TH1F", title="Test tracks", xbins=vnbins )
140  else:
141  defineHisto( monTool, "testtrk_N", path=mypath, type="TH1F", title="Test tracks", xbins=61, xmin=-0.5, xmax=60.5 )
142 
143  defineHisto( monTool, "testtrk_pT", path=mypath, type="TH1F", title="Test track pT", xbins=ptbins )
144  defineHisto( monTool, "testtrk_phi", path=mypath, type="TH1F", title="Test track Phi", xbins=25, xmin=-pi, xmax=pi )
145  defineHisto( monTool, "testtrk_eta", path=mypath, type="TH1F", title="Test track Eta", xbins=25, xmin=-2.5, xmax=2.5 )
146 
147  if "LRT" in chain:
148  defineHisto( monTool, "testtrk_d0", path=mypath, type="TH1F", title="Test track d0", xbins=201, xmin=-100.0, xmax=100.0 )
149  defineHisto( monTool, "reftrk_d0sig", path=mypath, type="TH1F", title="Reference track d0 significance", xbins= 101, xmin=-100., xmax=100. )
150  else:
151  defineHisto( monTool, "testtrk_d0", path=mypath, type="TH1F", title="Test track d0", xbins=201, xmin=-0.5, xmax=0.5 )
152  defineHisto( monTool, "reftrk_d0sig", path=mypath, type="TH1F", title="Reference track d0 significance", xbins= 101, xmin=-5., xmax=5. )
153 
154  defineHisto( monTool, "testtrk_z0", path=mypath, type="TH1F", title="Test track z0", xbins=50, xmin=-225., xmax=225. )
155  defineHisto( monTool, "testtrk_dd0", path=mypath, type="TH1F", title="Test track sigma(d0)", xbins=50, xmin=0, xmax=0.5 )
156  defineHisto( monTool, "testtrk_dz0", path=mypath, type="TH1F", title="Test track sigma(z0)", xbins=50, xmin=0, xmax=2.5 )
157  defineHisto( monTool, "testtrk_d0sig", path=mypath, type="TH1F", title="Test track d0 significance", xbins=101, xmin=-5.0, xmax=5.0 )
158 
159  defineHisto( monTool, "layer_rec", path=mypath, type="TH1F", title="hit layers", xbins=32, xmin=-0.5, xmax=31.5 )
160  defineHisto( monTool, "layer", path=mypath, type="TH1F", title="hit layers", xbins=32, xmin=-0.5, xmax=31.5 )
161 
162  defineHisto( monTool, "residual_pT", path=mypath, type="TH1F", title="track pT residual", xbins=201, xmin=-50.0, xmax=50.0 )
163  defineHisto( monTool, "residual_ipT", path=mypath, type="TH1F", title="track ipT residual", xbins=55, xmin=-1.5, xmax=1.5 )
164 
165  if "LRT" in chain:
166  defineHisto( monTool, "residual_phi", path=mypath, type="TH1F", title="track Phi residual", xbins=50, xmin=-0.02, xmax=0.02 )
167  defineHisto( monTool, "residual_eta", path=mypath, type="TH1F", title="track Eta residual", xbins=50, xmin=-0.02, xmax=0.02 )
168  defineHisto( monTool, "residual_d0", path=mypath, type="TH1F", title="track d0 residual ", xbins=251, xmin=-1.0, xmax=1.0 )
169  defineHisto( monTool, "residual_z0", path=mypath, type="TH1F", title="track z0 residual", xbins=401, xmin=-2.5, xmax=2.5 )
170  defineHisto( monTool, "residual_dd0", path=mypath, type="TH1F", title="track sigma d0 residual ", xbins=251, xmin=-0.5, xmax=0.5 )
171  defineHisto( monTool, "residual_dz0", path=mypath, type="TH1F", title="track sigma z0 residual", xbins=401, xmin=-1.0, xmax=1.0 )
172  else:
173  defineHisto( monTool, "residual_phi", path=mypath, type="TH1F", title="track Phi residual", xbins=50, xmin=-0.01, xmax=0.01 )
174  defineHisto( monTool, "residual_eta", path=mypath, type="TH1F", title="track Eta residual", xbins=50, xmin=-0.01, xmax=0.01 )
175  defineHisto( monTool, "residual_d0", path=mypath, type="TH1F", title="track d0 residual ", xbins=251, xmin=-0.6, xmax=0.6 )
176  defineHisto( monTool, "residual_z0", path=mypath, type="TH1F", title="track z0 residual", xbins=401, xmin=-2.0, xmax=2.0 )
177  defineHisto( monTool, "residual_dd0", path=mypath, type="TH1F", title="track sigma d0 residual ", xbins=251, xmin=-0.25, xmax=0.25 )
178  defineHisto( monTool, "residual_dz0", path=mypath, type="TH1F", title="track sigma z0 residual", xbins=401, xmin=-0.5, xmax=0.5 )
179 
180  defineHisto( monTool, "npix", path=mypath, type="TH1F", title="npix", xbins=26, xmin=-0.5, xmax=25.5 )
181  defineHisto( monTool, "npix_rec", path=mypath, type="TH1F", title="npix_rec", xbins=26, xmin=-0.5, xmax=25.5 )
182 
183  defineHisto( monTool, "nsct", path=mypath, type="TH1F", title="nsct", xbins=31, xmin=-0.5, xmax=30.5 )
184  defineHisto( monTool, "nsct_rec", path=mypath, type="TH1F", title="nsct_rec", xbins=31, xmin=-0.5, xmax=30.5 )
185 
186  defineHisto( monTool, "nsiHits", path=mypath, type="TH1F", title="nsiHits", xbins=41, xmin=-0.5, xmax=40.5 )
187  defineHisto( monTool, "nsiHits_rec", path=mypath, type="TH1F", title="nsiHits_rec", xbins=41, xmin=-0.5, xmax=40.5 )
188 
189  defineHisto( monTool, "ntrt", path=mypath, type="TH1F", title="ntrt", xbins=91, xmin=-0.5, xmax=91.5 )
190  defineHisto( monTool, "ntrt_rec", path=mypath, type="TH1F", title="ntrt_rec", xbins=91, xmin=-0.5, xmax=91.5 )
191 
192  defineHisto( monTool, "chi2dof", path=mypath, type="TH1F", title="chi2dof", xbins=75, xmin=-0, xmax=15 )
193  defineHisto( monTool, "chi2dof_rec", path=mypath, type="TH1F", title="chi2dof_rec", xbins=75, xmin=-0, xmax=15 )
194 
195  defineHisto( monTool, "mu", path=mypath, type="TH1F", title="mu;#mu;Entries", xbins=80, xmin=0, xmax=80 )
196 
197  defineHisto( monTool, "Eff_overall", path=mypath, type="TProfile", title="total efficiency", xbins=1, xmin=0., xmax=1. )
198 
199  defineHisto( monTool, "Eff_pT", path=mypath, type="TProfile", title="pT efficiency", xbins=ptbins )
200  defineHisto( monTool, "Eff_Eta", path=mypath, type="TProfile", title="eta efficiency", xbins=25, xmin=-2.5, xmax=2.5 )
201  defineHisto( monTool, "Eff_Phi", path=mypath, type="TProfile", title="phi efficiency", xbins=25, xmin=-pi, xmax=pi )
202  defineHisto( monTool, "Eff_d0", path=mypath, type="TProfile", title="d0 efficiency", xbins=d0bins )
203  defineHisto( monTool, "Eff_z0", path=mypath, type="TProfile", title="z0 efficiency", xbins=50, xmin=-225., xmax=225. )
204  defineHisto( monTool, "Eff_nVtx", path=mypath, type="TProfile", title="nVtx efficiency", xbins=101, xmin=-0.5, xmax=100.5 )
205  defineHisto( monTool, "Eff_lb", path=mypath, type="TProfile", title="efficiency vs lumiblock", xbins=301, xmin=-0.5, xmax=3009.5 )
206 
207  if ( "FS_FTF" in cs.tail or "JetSuper_FTF" in cs.tail or "mb" in chain ):
208  defineHisto( monTool, "Eff_ntrax", path=mypath, type="TProfile", title="ntrack efficiency", xbins=vnbins )
209  else:
210  defineHisto( monTool, "Eff_ntrax", path=mypath, type="TProfile", title="ntrack efficiency", xbins=61, xmin=-0.5, xmax=60.5 )
211 
212  defineHisto( monTool, "trkvtx_x_vs_lb", path=mypath, type="TProfile", title="track vertex x vs lumiblock", xbins=301, xmin=-0.5, xmax=3009.5 )
213  defineHisto( monTool, "trkvtx_y_vs_lb", path=mypath, type="TProfile", title="track vertex y vs lumiblock", xbins=301, xmin=-0.5, xmax=3009.5 )
214  defineHisto( monTool, "trkvtx_z_vs_lb", path=mypath, type="TProfile", title="track vertex z vs lumiblock", xbins=3010, xmin=-0.5, xmax=3009.5 )
215 
216  defineHisto( monTool, "npix_vs_eta", path=mypath, type="TProfile", title="offline npix vs eta;offline #eta; mean number of offline pixel hits", xbins=30, xmin=-2.5, xmax=2.5 )
217  defineHisto( monTool, "npix_vs_eta_rec", path=mypath, type="TProfile", title="trigger npix vs eta;offline #eta; mean number of trigger pixel hits", xbins=30, xmin=-2.5, xmax=2.5 )
218  defineHisto( monTool, "nsct_vs_eta", path=mypath, type="TProfile", title="offline nsct vs eta;offline #eta; mean number of offline sct hits", xbins=30, xmin=-2.5, xmax=2.5 )
219  defineHisto( monTool, "nsct_vs_eta_rec", path=mypath, type="TProfile", title="trigger nsct vs eta;offline #eta; mean number of trigger sct hits", xbins=30, xmin=-2.5, xmax=2.5 )
220  defineHisto( monTool, "ntrt_vs_eta", path=mypath, type="TProfile", title="offline ntrt vs eta;offline #eta; mean number of offline trt hits", xbins=30, xmin=-2.5, xmax=2.5 )
221  defineHisto( monTool, "ntrt_vs_eta_rec", path=mypath, type="TProfile", title="trigger ntrt vs eta;offline #eta; mean number of trigger trt hits", xbins=30, xmin=-2.5, xmax=2.5 )
222 
223  defineHisto( monTool, "npix_vs_phi", path=mypath, type="TProfile", title="offline npix vs phi;offline #phi; mean number of offline pixel hits", xbins=30, xmin=-pi, xmax=pi )
224  defineHisto( monTool, "npix_vs_phi_rec", path=mypath, type="TProfile", title="trigger npix vs phi;offline #phi; mean number of trigger pixel hits", xbins=30, xmin=-pi, xmax=pi )
225  defineHisto( monTool, "nsct_vs_phi", path=mypath, type="TProfile", title="offline nsct vs phi;offline #phi; mean number of offline sct hits", xbins=30, xmin=-pi, xmax=pi )
226  defineHisto( monTool, "nsct_vs_phi_rec", path=mypath, type="TProfile", title="trigger nsct vs phi;offline #phi; mean number of trigger sct hits", xbins=30, xmin=-pi, xmax=pi )
227  defineHisto( monTool, "ntrt_vs_phi", path=mypath, type="TProfile", title="offline ntrt vs phi;offline #phi; mean number of offline trt hits", xbins=30, xmin=-pi, xmax=pi )
228  defineHisto( monTool, "ntrt_vs_phi_rec", path=mypath, type="TProfile", title="trigger ntrt vs phi;offline #phi; mean number of trigger trt hits", xbins=30, xmin=-pi, xmax=pi )
229 
230  defineHisto( monTool, "npix_vs_d0", path=mypath, type="TProfile", title="offline npix vs d0;offline #d0; mean number of offline pixel hits", xbins=d0bins )
231  defineHisto( monTool, "npix_vs_d0_rec", path=mypath, type="TProfile", title="trigger npix vs d0;offline #d0; mean number of trigger pixel hits", xbins=d0bins )
232  defineHisto( monTool, "nsct_vs_d0", path=mypath, type="TProfile", title="offline nsct vs d0;offline #d0; mean number of offline sct hits", xbins=d0bins )
233  defineHisto( monTool, "nsct_vs_d0_rec", path=mypath, type="TProfile", title="trigger nsct vs d0;offline #d0; mean number of trigger sct hits", xbins=d0bins )
234  defineHisto( monTool, "npix_vs_pT", path=mypath, type="TProfile", title="offline npix vs pT;offline #p_{T}; mean number of offline pixel hits", xbins=ptbins )
235  defineHisto( monTool, "npix_vs_pT_rec", path=mypath, type="TProfile", title="trigger npix vs pT;offline #p_{T}; mean number of trigger pixel hits", xbins=ptbins )
236  defineHisto( monTool, "nsct_vs_pT", path=mypath, type="TProfile", title="offline nsct vs pT;offline #p_{T} [GeV]; mean number of offline pixel hits", xbins=ptbins )
237  defineHisto( monTool, "nsct_vs_pT_rec", path=mypath, type="TProfile", title="trigger nsct vs pT;offline #p_{T} [GeV]; mean number of trigger pixel hits", xbins=ptbins )
238  defineHisto( monTool, "nsihits_lb", path=mypath, type="TProfile", title="offline n sihits vs lumiblock", xbins=301, xmin=-0.5, xmax=3009.5 )
239  defineHisto( monTool, "nsihits_lb_rec", path=mypath, type="TProfile", title="trigger n sihits vs lumiblock", xbins=301, xmin=-0.5, xmax=3009.5 )
240 
241  defineHisto( monTool, "Res_pT", path=mypath, type="TProfile", title="mean pT residual;#eta_{ref};pT_{trig}-pT_{ref} [GeV]", xbins=25, xmin=-2.5, xmax=2.5 )
242  defineHisto( monTool, "Res_ipT", path=mypath, type="TProfile", title="mean ipT residual;#eta_{ref};1/pT_{trig}-1/pT_{ref} [GeV^{-1}]", xbins=25, xmin=-2.5, xmax=2.5 )
243  defineHisto( monTool, "Res_eta", path=mypath, type="TProfile", title="mean Eta residual;#eta_{ref};eta_{trig}-#eta_{ref}", xbins=25, xmin=-2.5, xmax=2.5 )
244  defineHisto( monTool, "Res_phi", path=mypath, type="TProfile", title="mean Phi residual;#eta_{ref};phi_{trig}-#phi_{ref}", xbins=25, xmin=-2.5, xmax=2.5 )
245  defineHisto( monTool, "Res_d0", path=mypath, type="TProfile", title="mean d0 residual;#eta_{ref};Delta d0 [mm]", xbins=25, xmin=-2.5, xmax=2.5 )
246  defineHisto( monTool, "Res_z0", path=mypath, type="TProfile", title="mean z0 residual;#eta_{ref};Delta z0 [mm]", xbins=25, xmin=-2.5, xmax=2.5 )
247 
248 
249  defineHisto( monTool, "d0_vs_phi_prof", path=mypath, type="TProfile", title="d0 vs phi_prof;#phi;d0 [mm]", xbins=25, xmin=-pi, xmax=pi )
250  defineHisto( monTool, "d0_vs_phi_rec_prof", path=mypath, type="TProfile", title="d0 vs phi_rec_prof;#phi; do [mm]", xbins=25, xmin=-pi, xmax=pi )
251 
252  if "probe" in cs.extra:
253  if "Jpsi" in chain:
254  defineHisto( monTool, "invmass", path=mypath, type="TH1F", title="invariant mass;mass [GeV]", xbins=50, xmin=0, xmax=10 )
255  defineHisto( monTool, "invmass_obj", path=mypath, type="TH1F", title="invariant mass;mass [GeV]", xbins=50, xmin=0, xmax=10 )
256  else:
257  defineHisto( monTool, "invmass", path=mypath, type="TH1F", title="invariant mass;mass [GeV]", xbins=320, xmin=0, xmax=200 )
258  defineHisto( monTool, "invmass_obj", path=mypath, type="TH1F", title="invariant mass;mass [GeV]", xbins=320, xmin=0, xmax=200 )
259 
260 
261  if cs.vtx != "" :
262 
263  vnbins_short = [
264  -0.5,
265  0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
266  10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 17.5, 18.5, 19.5,
267  21.5, 23.5, 24.5, 26.5, 28.5,
268  30.5, 32.5, 35.5, 37.5,
269  40.5, 43.5, 46.5,
270  50.5, 53.5, 57.5,
271  61.5, 66.5,
272  71.5, 76.5,
273  81.5, 87.5,
274  93.5,
275  100.5, 107.5, 114.5, 123.5, 131.5, 141.5, 150.5, 161.5, 172.5, 185.5, 198.5,
276  211.5, 226.5, 242.5, 259.5, 277.5, 297.5,
277  317.5, 340.5, 363.5, 389.5,
278  416.5, 445.5, 476.5,
279  509.5, 544.5, 582.5,
280  623.5, 666.5,
281  713.5, 762.5,
282  815.5, 872.5,
283  933.5, 998.5,
284  1067.5
285  ]
286 
287  defineHisto( monTool, "vx_nvtx", path=mypath, type="TH1F", title="Offline vertex multiplicity;number of vertices", xbins=101, xmin=-0.5, xmax=100.5 )
288  defineHisto( monTool, "vx_zed", path=mypath, type="TH1F", title="Offline vertex z;vtx z [mm]", xbins=100, xmin=-250, xmax=250 )
289  defineHisto( monTool, "vx_x", path=mypath, type="TH1F", title="Offline vertex x;vtx x [mm]", xbins=200, xmin=-1.2, xmax=1.2 )
290  defineHisto( monTool, "vx_y", path=mypath, type="TH1F", title="Offline vertex y;vtx y [mm]", xbins=200, xmin=-1.2, xmax=1.2 )
291  defineHisto( monTool, "vx_ntrax", path=mypath, type="TH1F", title="Offline vertex track multiplicity;number of tracks", xbins=vnbins )
292 
293  defineHisto( monTool, "vx_nvtx_rec", path=mypath, type="TH1F", title="Trigger vertex multiplicity;number of vertices", xbins=101, xmin=-0.5, xmax=100.5 )
294  defineHisto( monTool, "vx_zed_rec", path=mypath, type="TH1F", title="Trigger vertex Z;vtx z [mm]", xbins=100, xmin=-250, xmax=250 )
295  defineHisto( monTool, "vx_x_rec", path=mypath, type="TH1F", title="Trigger vertex X;vtx x [mm]", xbins=200, xmin=-1.2, xmax=1.2 )
296  defineHisto( monTool, "vx_y_rec", path=mypath, type="TH1F", title="Trigger vertex Y;vtx y [mm]", xbins=200, xmin=-1.2, xmax=1.2 )
297  defineHisto( monTool, "vx_ntrax_rec", path=mypath, type="TH1F", title="Trigger vertex track multiplicity;number of tracks", xbins=vnbins )
298 
299  defineHisto( monTool, "vx_zed_res", path=mypath, type="TH1F", title="Delta z [mm]", xbins=400, xmin=-1.0, xmax=1.0 )
300  defineHisto( monTool, "vx_x_res", path=mypath, type="TH1F", title="Delta x [mm]", xbins=400, xmin=-0.1, xmax=0.1 )
301  defineHisto( monTool, "vx_y_res", path=mypath, type="TH1F", title="Delta y [mm]", xbins=400, xmin=-0.1, xmax=0.1 )
302 
303 
304  defineHisto( monTool, "vx_rdz_vs_zed", path=mypath, type="TProfile", title="rdz_vs_zed; vtx z [mm];mean z residual [mm]", xbins=100, xmin=-250, xmax=250 )
305  defineHisto( monTool, "vx_rdz_vs_ntrax", path=mypath, type="TProfile", title="rdz_vs_ntrax;number of tracks;mean z residual [mm]", xbins=vnbins_short )
306  defineHisto( monTool, "vx_rdz_vs_nvtx", path=mypath, type="TProfile", title="rdz_vs_nvtx;number of vertices;mean z residual [mm]", xbins=51, xmin=-0.125, xmax=50.125 )
307 
308  # defineHistogram( monTool, "rdz_vs_mu", 30, 0, 30, 400, -20, 20 );
309 
310  defineHisto( monTool, "vx_zed_eff", path=mypath, type="TProfile", title="Vertex efficicy vs z;efficiency;offline vtx z [mm]", xbins=50, xmin=-250, xmax=250 )
311  defineHisto( monTool, "vx_ntrax_eff", path=mypath, type="TProfile", title="Vertex efficiency vs N tracks;number of tracks;efficiency", xbins=vnbins )
312  defineHisto( monTool, "vx_nvtx_eff", path=mypath, type="TProfile", title="Vertex efficincy vs N vertices;number of vertices;efficiency", xbins=101, xmin=-0.5, xmax=100.5 )
313  defineHisto( monTool, "vx_mu_eff", path=mypath, type="TProfile", title="Vertex efficiency vs mu;<#mu>;efficiency", xbins=101, xmin=-0.5, xmax=100.5 )
314  defineHisto( monTool, "vx_lb_eff", path=mypath, type="TProfile", title="Vertex efficiency vs lumiblock;lumi block;efficiency", xbins=151, xmin=-0.5, xmax=3019.5 )
315 
316 
317 
318  return monTool
319 
320 
321 
322 # generate the mongroup hist path from the analysis string
323 

◆ defineHisto()

def python.TIDAMonTool.defineHisto (   montool,
  name,
**  args 
)

Definition at line 361 of file TIDAMonTool.py.

361 def defineHisto( montool, name, **args ) :
362 
363  if "type" in args and args["type"] == "TProfile" :
364  name = name + "," + name + "_weight;" + name
365 
366  # make sure that the histogram is created, even it is is never filled
367  args['opt'] = 'kAlwaysCreate'
368 
369  montool.defineHistogram( name, **args )
370 
371 

◆ monGroup()

def python.TIDAMonTool.monGroup (   analysis_chain)

Definition at line 324 of file TIDAMonTool.py.

324 def monGroup( analysis_chain ) :
325 
326  from TrigInDetAnalysisExample.chainString import chainString
327 
328  chain = chainString( analysis_chain )
329 
330  mg = ""
331 
332  if chain.head == "" :
333  mg = "/Fullscan"
334  else :
335  mg = "/"+chain.head
336 
337  mg += "/"+chain.tail
338 
339  if chain.roi != "" :
340  mg += "_"+chain.roi
341 
342  if chain.vtx != "" :
343  mg += "_"+chain.vtx
344 
345  if chain.element != "" :
346  mg += "_" + chain.element
347 
348  if chain.extra != "" :
349  mg += "_" + chain.extra
350 
351  if chain.passed :
352  mg += "/DTE"
353 
354  return mg
355 
356 
357 # wrapper around montool.defineHistogram to simplify the required histogram names
358 # eg for a TProfile, automatically add the second variable, and create the histogram
359 # alias to avoid having to write pages of tedious boiler plate functions
360 
python.TIDAMonTool.monGroup
def monGroup(analysis_chain)
Definition: TIDAMonTool.py:324
GenericMonitoringTool
Definition: GenericMonitoringTool.h:51
python.TIDAMonTool.defineHisto
def defineHisto(montool, name, **args)
Definition: TIDAMonTool.py:361
python.TIDAMonTool.createMonTool
def createMonTool(flags, slicetag, chain)
Definition: TIDAMonTool.py:12