Merge lp:~ma5dev/madanalysis5/pyhf_update into lp:~ma5dev/madanalysis5/v1.9_beta

Proposed by Jack Y. Araz
Status: Merged
Approved by: Benjamin Fuks
Approved revision: 190
Merged at revision: 191
Proposed branch: lp:~ma5dev/madanalysis5/pyhf_update
Merge into: lp:~ma5dev/madanalysis5/v1.9_beta
Diff against target: 221 lines (+96/-15)
5 files modified
doc/expert_mode/main_expert.tex (+19/-9)
doc/normal_mode/main_normal.tex (+26/-3)
madanalysis/configuration/clustering_configuration.py (+2/-2)
madanalysis/interpreter/cmd_define.py (+1/-1)
madanalysis/observable/observable_list.py (+48/-0)
To merge this branch: bzr merge lp:~ma5dev/madanalysis5/pyhf_update
Reviewer Review Type Date Requested Status
Benjamin Fuks Pending
Review via email: mp+411807@code.launchpad.net

Commit message

remove autocomplete for currently unused variables

To post a comment you must log in.
lp:~ma5dev/madanalysis5/pyhf_update updated
189. By Jack Y. Araz

add d0 dz approx to obs list

190. By Jack Y. Araz

expand docs and fix autocomplete for energy scaling

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/expert_mode/main_expert.tex'
2--- doc/expert_mode/main_expert.tex 2020-07-02 06:49:41 +0000
3+++ doc/expert_mode/main_expert.tex 2021-11-13 13:44:51 +0000
4@@ -7,6 +7,13 @@
5 \usepackage{url,slashed,multirow,cite,verbdef}
6 \usepackage{hyperref}
7
8+\hypersetup{bookmarks=true,unicode=true,pdftoolbar=false,pdfmenubar=true,
9+ pdffitwindow=false,pdfstartview={FitH},pdftitle={MA5 Expert Mode Reference Card},
10+ pdfauthor={J.~Araz, E.~Conte, B.~Fuks}, pdfsubject={MA5 Normal Reference Card},
11+ pdfcreator={J.~Araz, E.~Conte, B.~Fuks},pdfproducer={PDFLaTeX}, pdfkeywords={MA5expert-mode},
12+ pdfnewwindow=true,colorlinks=true,
13+ linkcolor=blue,citecolor=magenta,filecolor=magenta,urlcolor=cyan}
14+
15 %% Sets page size and margins
16 \usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
17
18@@ -369,7 +376,10 @@
19 \color{ao}\verb+const MAfloat32 pz() const+ & $z$-component of the momentum.\\
20 \color{ao}\verb+const MAfloat32 r() const+ & Position in the $\eta-\phi$ plane.\\
21 \color{ao}\verb+const MAfloat32 theta() const+ & Polar angle.\\
22-\color{ao}\verb+const MAfloat32 y() const+ & Rapidity.\\
23+\color{ao}\verb+const MAdouble64 d0() const+ & Transverse impact parameter.\\
24+\color{ao}\verb+const MAdouble64 dz() const+ & Longitudinal impact parameter.\\
25+\color{ao}\verb+const MAdouble64 d0_approx() const+ & Transverse impact parameter with straight line approximation.\\
26+\color{ao}\verb+const MAdouble64 dz_approx() const+ & Longitudinal impact parameter with straight line approximation.\\
27 \hline
28 \end{tabular}
29 \end{center}
30@@ -456,18 +466,18 @@
31 \multicolumn{2}{l}{\color{ao}\expccb}\\ & Reconstructed electrons.\\
32 \multicolumn{2}{l}{\color{ao}\expccc}\\ & Reconstructed muons.\\
33 \multicolumn{2}{l}{\color{ao}\expccd}\\ & Reconstructed hadronic taus.\\
34-\multicolumn{2}{l}{\color{ao}\expcce}\\ & Reconstructed fat jets.\\
35+\multicolumn{2}{l}{\color{ao}\expcce}\\ & Reconstructed fat jets.(Only with Delphes)\\
36 \multicolumn{2}{l}{\color{ao}\expccf}\\ & Reconstructed jets.\\
37-\multicolumn{2}{l}{\color{ao}\expccg}\\ & Parton-level jets.\\
38+\multicolumn{2}{l}{\color{ao}\expccg}\\ & Parton-level jets. (Only with Delphes)\\
39 \multicolumn{2}{l}{\color{ao}\expcch}\\ & Tracks left in a detector.\\
40 \multicolumn{2}{l}{\color{ao}\expcch}\\ & Vertices left in a detector.\\
41-\multicolumn{2}{l}{\color{ao}\expcci}\\ & Calorimetric deposits left in a detector.\\
42+\multicolumn{2}{l}{\color{ao}\expcci}\\ & Calorimetric deposits left in a detector. (Only with Delphes)\\
43 \multicolumn{2}{l}{\color{ao}\expccj}\\ & Tracks left in a detector, reconstructed from
44- the particle flow information.\\
45+ the particle flow information. (Only with Delphes)\\
46 \multicolumn{2}{l}{\color{ao}\expcck}\\ & Photons, reconstructed from the particle flow
47- information.\\
48+ information.(Only with Delphes)\\
49 \multicolumn{2}{l}{\color{ao}\expccl}\\ & Neutral hadrons, reconstructed from the
50- particle flow information.\\
51+ particle flow information.(Only with Delphes)\\
52 \multicolumn{2}{l}{\color{ao}\expccm}\\ & Missing transverse energy.\\
53 \multicolumn{2}{l}{\color{ao}\expccn}\\ & Missing hadronic energy.\\
54 \multicolumn{2}{l}{\color{ao}\expcco}\\ & Visible transverse energy.\\
55@@ -515,9 +525,9 @@
56 \begin{center}\begin{tabular}{p{2.7cm} p{9.0cm}}
57 \hline
58 \multicolumn{2}{l}{\color{ao}\expddb}\\ & Ratio of the electromagnetic to
59- hadronic calorimetric energy associated with the object.\\
60+ hadronic calorimetric energy associated with the object.(Only with Delphes)\\
61 \multicolumn{2}{l}{\color{ao}\expdda}\\ & Ratio of the hadronic to
62- electromagnetic calorimetric energy associated with the object.\\
63+ electromagnetic calorimetric energy associated with the object.(Only with Delphes)\\
64 \multicolumn{2}{l}{\color{ao}\expddn}\\ & Identifier of the decay mode of a
65 \verb+RecTauFormat+ object. The available choices are 1 ($\tau\to e \nu \nu$),
66 2 ($\tau \to \mu \nu \nu$), 3 ($\tau \to K \nu$), 4 ($\tau \to K^* \nu$),
67
68=== modified file 'doc/normal_mode/main_normal.tex'
69--- doc/normal_mode/main_normal.tex 2021-10-25 15:09:10 +0000
70+++ doc/normal_mode/main_normal.tex 2021-11-13 13:44:51 +0000
71@@ -367,6 +367,13 @@
72 \color{ao} \verb?PZ? & $z$-component of the momentum.\\
73 \color{ao} \verb?R? & Position in the $(\eta, \phi)$ plane.\\
74 \color{ao} \verb?Y? & Rapidity.\\
75+\color{ao} \verb?D0? & Transverse impact parameter.\\
76+\color{ao} \verb?DZ? & Longitudinal impact parameter.\\
77+\color{ao} \verb?D0APPROX? & Transverse impact parameter with straight line trajectory.\\
78+\color{ao} \verb?DZAPPROX? & Longitudinal impact parameter with straight line trajectory.\\
79+\color{ao} \verb?XD? & $ x $-axis of the closest approach.\\
80+\color{ao} \verb?YD? & $ y $-axis of the closest approach.\\
81+\color{ao} \verb?ZD? & $ z $-axis of the closest approach.\\
82 \hline
83 \end{tabular}
84 \end{center}
85@@ -688,7 +695,7 @@
86 process identifier, and the second one setting up the maximum number of extra
87 jets to consider.
88
89-\vspace{2cm}
90+\vspace{.8cm}
91 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92 \begin{shaded}
93 \section{\Large Simplified-fast detector simulation with \MAnorm}
94@@ -746,7 +753,9 @@
95 \color{ao} \verb?tagger? & Generates a probability distribution relying on a
96 user-defined piecewise function describing the probabily to (mis)tag an
97 object. \\
98- \hline
99+ \color{ao} \verb?jes? & Generates a function to scale reconstructed jet energy. \\
100+ \color{ao} \verb?energy_scaling? & Generates a function to scale reconstructed object energy. \\
101+ \hline
102 \end{tabular}
103 \end{center}
104 \noindent The syntax to be employed to make use of the \verb+reco_efficiency+
105@@ -830,7 +839,21 @@
106 \hline
107 \end{tabular}
108 \end{center}
109-\vspace{3cm}
110+
111+\noindent The \verb+jes+ submodule can be used following the syntax
112+{\color{ao} \begin{verbatim}
113+ define jes <function> [<domain>]
114+\end{verbatim}}
115+Define the Jet Energy Scale (JES) corrections to apply to clustered jets. The corresponding JES function is given by {\tt <function>}. The bounds correspond to the domain that JES applies ({\tt PT > ..., ETA < ...,} etc.).
116+
117+\noindent The \verb+energy_scaling+ submodule can be used following the syntax
118+{\color{ao} \begin{verbatim}
119+ define energy_scaling <p1> <function> [<domain>]
120+\end{verbatim}}
121+Define the rescaling corrections to apply to the energy of a reconstructed object {\tt <p1>}.
122+The corresponding energy scaling function is given by {\tt <function>}.
123+The bounds correspond to the domain that scaling function applies ({\tt PT > ..., ETA < ...}, etc.).
124+%\vspace{3cm}
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126 \begin{shaded}
127 \section{\Large Recasting LHC analyses with \MA}
128
129=== modified file 'madanalysis/configuration/clustering_configuration.py'
130--- madanalysis/configuration/clustering_configuration.py 2021-09-15 14:19:55 +0000
131+++ madanalysis/configuration/clustering_configuration.py 2021-11-13 13:44:51 +0000
132@@ -46,8 +46,8 @@
133 "exclusive_id" : ["true","false"],
134 "jetrecomode" : ["jets","constituents"],
135 "magneticfield" : ["3.8"],
136- "tracker_radius" : ["1.29"],
137- "half_length" : ["3.0"],
138+ # "tracker_radius" : ["1.29"],
139+ # "half_length" : ["3.0"],
140 "particle_propagator" : ["on","off"],
141 "track_isocone_radius" : ["0.5"],
142 "electron_isocone_radius" : ["0.5"],
143
144=== modified file 'madanalysis/interpreter/cmd_define.py'
145--- madanalysis/interpreter/cmd_define.py 2020-12-10 22:10:48 +0000
146+++ madanalysis/interpreter/cmd_define.py 2021-11-13 13:44:51 +0000
147@@ -150,7 +150,7 @@
148 nargs += 1
149
150 if nargs==2:
151- output=['tagger', 'smearer', 'reco_efficiency']
152+ output=['tagger', 'smearer', 'reco_efficiency', "jes", "energy_scaling"]
153 return self.finalize_complete(text,output)
154
155 elif nargs==3 or (nargs==5 and args[1] == 'tagger'):
156
157=== modified file 'madanalysis/observable/observable_list.py'
158--- madanalysis/observable/observable_list.py 2021-07-15 14:42:44 +0000
159+++ madanalysis/observable/observable_list.py 2021-11-13 13:44:51 +0000
160@@ -890,6 +890,28 @@
161 dD0 = dvD0 = vdD0 = ObservableBase.Clone(D0, name='dD0', combination=CombinationType.DIFFVECTOR, tlatex='dd_{0}', latex='$dd_{0}$')
162 rD0 = ObservableBase.Clone(D0, name='rD0', combination=CombinationType.RATIO, tlatex='rd_{0}', latex='$rd_{0}$')
163
164+D0APPROX = ObservableBase( name = 'D0APPROX',
165+ args = [ArgumentType.COMBINATION],
166+ combination = CombinationType.DEFAULT,
167+ plot_auto = False,
168+ plot_nbins = 100,
169+ plot_xmin = -20.,
170+ plot_xmax = 20.,
171+ plot_unitX_tlatex = 'mm',
172+ plot_unitX_latex = 'mm',
173+ code_parton = 'd0_approx()',
174+ code_hadron = 'd0_approx()',
175+ code_reco = 'd0_approx()',
176+ cut_event = True,
177+ cut_candidate = True,
178+ tlatex = '#d_{0}^{approx.}',
179+ latex = '$d_0^{\\rm approx.}$')
180+vD0APPROX = D0APPROX
181+sD0APPROX = ObservableBase.Clone(D0APPROX, name='sD0APPROX', combination=CombinationType.SUMSCALAR, tlatex='sd_{0}^{approx.}', latex='$sd_{0}^{\\rm approx.}$')
182+sdD0APPROX = dsD0APPROX = ObservableBase.Clone(D0APPROX, name='sdD0APPROX', combination=CombinationType.DIFFSCALAR, tlatex='sdd_{0}^{approx.}', latex='$sdd_{0}^{\\rm approx.}$')
183+dD0APPROX = dvD0APPROX = vdD0APPROX = ObservableBase.Clone(D0APPROX, name='dD0APPROX', combination=CombinationType.DIFFVECTOR, tlatex='dd_{0}^{approx.}', latex='$dd_{0}^{\\rm approx.}$')
184+rD0APPROX = ObservableBase.Clone(D0APPROX, name='rD0APPROX', combination=CombinationType.RATIO, tlatex='rd_{0}^{approx.}', latex='$rd_{0}^{\\rm approx.}$')
185+
186 DZ = ObservableBase( name = 'DZ',
187 args = [ArgumentType.COMBINATION],
188 combination = CombinationType.DEFAULT,
189@@ -913,6 +935,32 @@
190 dDZ = dvDZ = vdDZ = ObservableBase.Clone(DZ, name='dDZ', combination=CombinationType.DIFFVECTOR, tlatex='dd_{z}', latex='$dd_{z}$')
191 rDZ = ObservableBase.Clone(DZ, name='rDZ', combination=CombinationType.RATIO, tlatex='rd_{z}', latex='$rd_{z}$')
192
193+
194+DZAPPROX = ObservableBase( name = 'DZAPPROX',
195+ args = [ArgumentType.COMBINATION],
196+ combination = CombinationType.DEFAULT,
197+ plot_auto = False,
198+ plot_nbins = 100,
199+ plot_xmin = -20.,
200+ plot_xmax = 20.,
201+ plot_unitX_tlatex = 'mm',
202+ plot_unitX_latex = 'mm',
203+ code_parton = 'dz_approx()',
204+ code_hadron = 'dz_approx()',
205+ code_reco = 'dz_approx()',
206+ cut_event = True,
207+ cut_candidate = True,
208+ tlatex = '#d_{z}^{approx.}',
209+ latex = '$d_z^{\\rm approx.}$'
210+ )
211+vDZAPPROX = DZAPPROX
212+sDZAPPROX = ObservableBase.Clone(DZAPPROX, name='sDZAPPROX', combination=CombinationType.SUMSCALAR, tlatex='sd_{z}^{approx.}', latex='$sd_{z}^{\\rm approx.}$')
213+sdDZAPPROX = dsDZAPPROX = ObservableBase.Clone(DZAPPROX, name='sdDZAPPROX', combination=CombinationType.DIFFSCALAR, tlatex='sdd_{z}^{approx.}', latex='$sdd_{z}^{\\rm approx.}$')
214+dDZAPPROX = dvDZAPPROX = vdDZAPPROX = ObservableBase.Clone(DZAPPROX, name='dDZAPPROX', combination=CombinationType.DIFFVECTOR, tlatex='dd_{z}^{approx.}', latex='$dd_{z}^{\\rm approx.}$')
215+rDZAPPROX = ObservableBase.Clone(DZAPPROX, name='rDZAPPROX', combination=CombinationType.RATIO, tlatex='rd_{z}^{approx.}', latex='$rd_{z}^{\\rm approx.}$')
216+
217+
218+
219 XD = ObservableBase( name = 'XD',
220 args = [ArgumentType.COMBINATION],
221 combination = CombinationType.SUMVECTOR,

Subscribers

People subscribed via source and target branches

to all changes: