Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Example_Analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
3pia
CMS Analyses
Example_Analysis
Compare revisions
73723aa3d9795cee448fd079e8588d122cedb8e7 to db1f054aef72e94a0188caf4a2441b630c246853
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
3pia/cms_analyses/example-analysis
Select target project
No results found
db1f054aef72e94a0188caf4a2441b630c246853
Select Git revision
Swap
Target
3pia/cms_analyses/example-analysis
Select target project
3pia/cms_analyses/example-analysis
Andrey.Pozdnyakov/example-analysis
2 results
73723aa3d9795cee448fd079e8588d122cedb8e7
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
black formatting
· 9b9dab3f
Niclas Steve Eich
authored
2 years ago
9b9dab3f
black formatting
· db1f054a
Niclas Steve Eich
authored
2 years ago
db1f054a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
config/analysis.py
+33
-33
33 additions, 33 deletions
config/analysis.py
config/constants.py
+2
-2
2 additions, 2 deletions
config/constants.py
models/example_model.py
+15
-14
15 additions, 14 deletions
models/example_model.py
recipes/selection.py
+7
-8
7 additions, 8 deletions
recipes/selection.py
with
57 additions
and
57 deletions
config/analysis.py
View file @
db1f054a
...
...
@@ -39,36 +39,36 @@ cfg.aux["stat_model"] = "example_model"
# process groups
#
cfg
.
aux
[
"
process_groups
"
]
=
{
"
default
"
:
[
# "data_dl",
"
dy
"
,
"
tt
"
,
"
ttV
"
,
"
ttVH
"
,
"
ttVV
"
,
# one file missing?
],
"
plotting
"
:
[
# "data_dl",
"
tt
"
,
"
dy
"
,
"
ttV
"
,
"
ttVH
"
,
"
ttVV
"
,
# "plot_other",
],
}
"
default
"
:
[
# "data_dl",
"
dy
"
,
"
tt
"
,
"
ttV
"
,
"
ttVH
"
,
"
ttVV
"
,
# one file missing?
],
"
plotting
"
:
[
# "data_dl",
"
tt
"
,
"
dy
"
,
"
ttV
"
,
"
ttVH
"
,
"
ttVV
"
,
# "plot_other",
],
}
cfg
.
aux
[
"
signal_prcess
"
]
=
"
dy
"
cfg
.
aux
[
"
btag_sf_shifts
"
]
=
[
"
lf
"
,
"
lfstats1
"
,
"
lfstats2
"
,
"
hf
"
,
"
hfstats1
"
,
"
hfstats2
"
,
"
cferr1
"
,
"
cferr2
"
,
]
"
lf
"
,
"
lfstats1
"
,
"
lfstats2
"
,
"
hf
"
,
"
hfstats1
"
,
"
hfstats2
"
,
"
cferr1
"
,
"
cferr2
"
,
]
processes
=
[
{
...
...
@@ -82,12 +82,12 @@ processes = [
get
(
"
ttVH
"
),
],
},
# {
# "name": "ttX",
# "idx": 999995,
# "label": r"ttX",
# "processes": [get("ttV"), get("ttVV"), get("ttVH")],
# },
# {
# "name": "ttX",
# "idx": 999995,
# "label": r"ttX",
# "processes": [get("ttV"), get("ttVV"), get("ttVH")],
# },
]
specific_processes
=
[]
...
...
This diff is collapsed.
Click to expand it.
config/constants.py
View file @
db1f054a
...
...
@@ -15,5 +15,5 @@ BR_H_WW = sn.Number(0.2137, {"br_hww": ("rel", 0.0154, 0.0153)})
BR_W_HAD
=
sn
.
Number
(
0.6741
,
{
"
br_whad
"
:
0.0027
})
BR_W_LEP
=
1
-
BR_W_HAD
BR_WW_SL
=
2
*
BR_W_HAD
.
mul
(
BR_W_LEP
,
rho
=-
1
,
inplace
=
False
)
BR_WW_DL
=
BR_W_LEP
**
2
BR_WW_FH
=
BR_W_HAD
**
2
BR_WW_DL
=
BR_W_LEP
**
2
BR_WW_FH
=
BR_W_HAD
**
2
This diff is collapsed.
Click to expand it.
models/example_model.py
View file @
db1f054a
...
...
@@ -3,7 +3,7 @@
import
os
import
numpy
as
np
import
hist
import
example_analysis.config.analysis
as
example_config
import
example_analysis.config.analysis
as
example_config
from
utils.datacard
import
Datacard
,
RDict
from
utils.util
import
reluncs
,
wquant
from
enum
import
IntEnum
,
unique
...
...
@@ -209,10 +209,11 @@ class StatModel(DataCardLogger):
]
self
.
add_systematics
(
names
=
self
.
config_inst
.
aux
[
"
jes_sources
"
]
+
[
"
jer
"
,
"
UnclustEn
"
],
type
=
"
shape
"
,
strength
=
1.0
,
processes
=
self
.
processes
,
suffix
=
(
"
_up
"
,
"
_down
"
),
names
=
self
.
config_inst
.
aux
[
"
jes_sources
"
]
+
[
"
jer
"
,
"
UnclustEn
"
],
type
=
"
shape
"
,
strength
=
1.0
,
processes
=
self
.
processes
,
suffix
=
(
"
_up
"
,
"
_down
"
),
)
# lepton efficiencies
...
...
@@ -223,15 +224,15 @@ class StatModel(DataCardLogger):
processes
=
self
.
processes
,
)
self
.
add_systematics
(
names
=
"
muon*
"
,
type
=
"
shape
"
,
strength
=
1.0
,
processes
=
self
.
processes
,
names
=
"
muon*
"
,
type
=
"
shape
"
,
strength
=
1.0
,
processes
=
self
.
processes
,
)
# trigger
self
.
add_systematics
(
names
=
"
trigger*
"
,
type
=
"
shape
"
,
strength
=
1.0
,
processes
=
self
.
processes
,
)
\ No newline at end of file
names
=
"
trigger*
"
,
type
=
"
shape
"
,
strength
=
1.0
,
processes
=
self
.
processes
,
)
This diff is collapsed.
Click to expand it.
recipes/selection.py
View file @
db1f054a
...
...
@@ -233,7 +233,6 @@ class BaseSelection:
"
PtEtaPhiMCandidate
"
,
)
# select at least one bjet
passbtag
=
clean_good_jets
.
btagDeepFlavB
>=
btag_wp
[
"
2017
"
][
"
tight
"
]
one_bjets
=
ak
.
num
(
clean_good_jets
[
passbtag
])
>=
1
...
...
@@ -333,7 +332,7 @@ class BaseSelection:
weights
.
add
(
"
top_pT_reweighting
"
,
w_toppt
,
weightUp
=
w_toppt
**
2
,
# w**2
weightUp
=
w_toppt
**
2
,
# w**2
weightDown
=
ak
.
ones_like
(
w_toppt
),
# w = 1.
)
...
...
@@ -371,9 +370,9 @@ class BaseSelection:
),
]:
args
=
lep_pt
[:,
0
],
lep_pt
[:,
1
]
trigger_sf
=
Ctrig
[
f
"
ttHbb_dilepton_trigger_
{
trigger_hist
}
"
](
*
args
)
trigger_sf
=
Ctrig
[
f
"
ttHbb_dilepton_trigger_
{
trigger_hist
}
"
](
*
args
)
trigger_sf_error
=
Ctrig
[
f
"
ttHbb_dilepton_trigger_
{
trigger_hist
}
_error
"
](
*
args
)
...
...
@@ -441,7 +440,6 @@ class BaseSelection:
btagnorm
=
self
.
corrections
[
"
btagnorm
"
][
dataset_inst
.
name
]
weights
.
add
(
"
btagNorm
"
,
btagnorm
(
ak
.
num
(
clean_good_jets
)))
# n build categories
eventnr
=
ak
.
flatten
(
events
.
event
,
axis
=-
1
)
common_filter
=
[
"
met_filter
"
]
...
...
@@ -459,13 +457,14 @@ class BaseSelection:
(
process
,)
=
dataset_inst
.
processes
.
values
procid
=
np
.
full
(
n_events
,
process
.
id
)
else
:
raise
NotImplementedError
(
"
There was an old Pget import, which is not anymore available. please check the comment under this error!
"
)
raise
NotImplementedError
(
"
There was an old Pget import, which is not anymore available. please check the comment under this error!
"
)
# procid = np.full(n_events, Pget("data").id)
yield
locals
()
class
Processor
(
BaseSelection
,
Histogramer
):
jes_shifts
=
False
pass
...
...
This diff is collapsed.
Click to expand it.