Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Panoptes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
Panoptes
Merge requests
!171
Draft: Store Panel Alignment scripts (
RICH-57
)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Draft: Store Panel Alignment scripts (
RICH-57
)
mirr_scripts
into
master
Overview
4
Commits
7
Pipelines
9
Changes
13
1 unresolved thread
Hide all comments
Closed
Paras Naik
requested to merge
mirr_scripts
into
master
2 years ago
Overview
4
Commits
7
Pipelines
9
Changes
13
1 unresolved thread
Hide all comments
Expand
Store Panel Alignment scripts
Edited
2 years ago
by
Paras Naik
1
0
Merge request reports
Viewing commit
5950a24d
Prev
Next
Show latest version
13 files
+
1561
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
5950a24d
Added all relavant panel alignment scripts to the repo, as well as a small amount of documentation
· 5950a24d
Jake Lewis Amey
authored
2 years ago
Rich/RichMirrorAlignmentOnline/files/OfflineScripts/PanelAlignment/surveys/hlt2_reco_rich1_opt.py
0 → 100644
+
133
−
0
Options
###############################################################################
# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
# yapf: disable
import
glob
import
csv
import
math
from
GaudiKernel.SystemOfUnits
import
(
GeV
,
)
from
Moore
import
(
options
,
run_reconstruction
,
)
from
RecoConf.rich_add_reconstruction_monitoring_checking
import
(
add_hlt2_rich
,
)
from
RecoConf.rich_data_monitoring
import
(
default_rich_monitoring_options
,
alignment_rich_monitoring_options
,
)
from
RecoConf.rich_reconstruction
import
default_rich_reco_options
from
RecoConf.standalone
import
(
standalone_hlt2_light_reco_without_UT
,
)
from
PyConf.tonic
import
configurable
from
Configurables
import
(
CondDB
,
UpdateManagerSvc
)
"""
Options for running over data with FT raw bank version 6.
"""
from
RecoConf.decoders
import
(
default_ft_decoding_version
,
)
from
RecoConf.hlt2_tracking
import
(
make_hlt2_tracks_without_UT
,
)
options
.
n_threads
=
10
options
.
evt_max
=
10000
options
.
input_files
=
sorted
([
'
mdf:root://eoslhcb.cern.ch/%s
'
%
f
for
f
in
glob
.
glob
(
r
'
/eos/lhcb/grid/prod/lhcb/MC/Upgrade/MDF/00146082/000*/00146082_*
'
)])
options
.
input_type
=
'
MDF
'
options
.
dddb_tag
=
'
upgrade/bmalecki-rich-alignmentParameters
'
options
.
conddb_tag
=
'
upgrade/bmalecki-rich-alignmentParameters
'
rich
=
'
rich1
'
radiator
=
"
Rich1Gas
"
track_types
=
[
'
Long
'
,
#'Upstream',
#'Downstream',
]
# Import alignment parameters from csv file and apply
param_list
=
[
'
p0_x
'
,
'
p1_x
'
,
'
p0_y
'
,
'
p1_y
'
,
'
p0_z
'
,
'
p1_z
'
]
param_dict
=
dict
.
fromkeys
(
param_list
)
# Change file name if running elsewhere
file_name
=
'
/afs/cern.ch/work/j/jamey/public/rich_align/rich_align_upgrade/optimisation/rich1_params.csv
'
f
=
open
(
file_name
,
'
r
'
)
reader
=
csv
.
reader
(
f
)
for
row
,
param
in
zip
(
reader
,
param_dict
.
keys
()):
param_dict
[
param
]
=
float
(
row
[
0
])
f
.
close
()
UpdateManagerSvc
().
ConditionsOverride
+=
[
f
"
Conditions/Alignment/Rich1/PDPanel0_Align := double_v dPosXYZ =
{
param_dict
[
'
p0_x
'
]
}
{
param_dict
[
'
p0_y
'
]
}
{
param_dict
[
'
p0_z
'
]
}
;
"
,
f
"
Conditions/Alignment/Rich1/PDPanel1_Align := double_v dPosXYZ =
{
param_dict
[
'
p1_x
'
]
}
{
param_dict
[
'
p1_y
'
]
}
{
param_dict
[
'
p1_z
'
]
}
;
"
,
]
default_opts
=
{}
default_reco_opts
=
{}
# Reco opts
wider_bkg
=
{
"
PhotonSelection
"
:
'
None
'
}
default_reco_opts
.
update
(
wider_bkg
)
panel_select
=
{
"
ActivatePanel
"
:
(
True
,
True
)}
default_reco_opts
.
update
(
panel_select
)
# Monitoring opts
tighter_minp
=
{
"
TightTrackSelection
"
:
{
"
MinP
"
:
30.
*
GeV
,
"
MinPt
"
:
0.5
*
GeV
,
"
MaxChi2
"
:
2.
,
"
MaxGhostProb
"
:
0.1
,
}}
default_opts
.
update
(
tighter_minp
)
wider_histo
=
{
'
CKResHistoRange
'
:
(
0.025
,
0.008
,
0.004
)}
default_opts
.
update
(
wider_histo
)
align_tasks
=
[
'
Produce
'
,
# fill the production set of histograms
'
Monitor
'
,
# add various checking histograms
#'Map', # add counters for creation of the HLT1 pre-selection line "map"
#'Optimize', # add counters for optimization of the RICH2 mirror combinations subset
#'Select', # check filling the rest of RICH2 mirror combinations along with 8 poorest
#'Calibrate', # check filling all RICH2 mirror combinations with elimination when filled
#'Explore', # explore influence of RICH1 coordinate systems on distribution shapes
]
task
=
align_tasks
[
0
]
nkevts
=
str
(
math
.
trunc
(
options
.
evt_max
/
1000
))
# save output file with histograms
options
.
histo_file
=
'
rich1_opt.root
'
moni_set
=
"
PhotonCherenkovAngles
"
with
add_hlt2_rich
.
bind
(
do_data_monitoring_rich
=
True
,
moni_set
=
moni_set
,
radiator
=
radiator
,
align_tasks
=
align_tasks
,
track_types
=
track_types
),
\
default_ft_decoding_version
.
bind
(
value
=
6
),
\
make_hlt2_tracks_without_UT
.
bind
(
use_pr_kf
=
True
,
light_reco
=
True
,
fast_reco
=
True
),
\
default_rich_reco_options
.
bind
(
default_rich_reco_opts_level2_modify
=
default_reco_opts
),
\
default_rich_monitoring_options
.
bind
(
default_rich_moni_opts_level2_modify
=
default_opts
):
run_reconstruction
(
options
,
standalone_hlt2_light_reco_without_UT
)
# yapf: enable
Loading