Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Alignment
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
Alignment
Merge requests
!331
changes for running online
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
changes for running online
rm-align-online
into
master
Overview
18
Commits
6
Pipelines
36
Changes
16
Merged
Rosen Matev
requested to merge
rm-align-online
into
master
2 years ago
Overview
17
Commits
6
Pipelines
36
Changes
16
Expand
remove
AlignIterator
remove
gaudiupdate.py
update
AlignOnlineIterator
to work with DD4hep both in 'offline' and 'online' use case
update Analyzer and Iterator options files
required for
MooreOnline!207 (merged)
Edited
1 year ago
by
Florian Reiss
0
0
Merge request reports
Compare
master
version 35
049d1198
1 year ago
version 34
0806a58b
1 year ago
version 33
a03316bc
1 year ago
version 32
3e87ac62
1 year ago
version 31
0c01f8af
1 year ago
version 30
6b7ee4c4
1 year ago
version 29
026f780a
1 year ago
version 28
c2765f3d
1 year ago
version 27
729e48e2
1 year ago
version 26
aa10cb61
1 year ago
version 25
359b397b
1 year ago
version 24
6172acf4
1 year ago
version 23
cf57dd2e
1 year ago
version 22
afe06e49
1 year ago
version 21
45d1cf6b
1 year ago
version 20
26238928
1 year ago
version 19
ce10b75a
1 year ago
version 18
c88797c0
1 year ago
version 17
c9fb57b9
1 year ago
version 16
74162e6d
1 year ago
version 15
4c60565b
1 year ago
version 14
9701af2c
1 year ago
version 13
4fc8e006
1 year ago
version 12
c6fa8dee
1 year ago
version 11
2f91962d
2 years ago
version 10
8e1bdd71
2 years ago
version 9
22cd8388
2 years ago
version 8
a50d576b
2 years ago
version 7
a50d576b
2 years ago
version 6
e4b37e8b
2 years ago
version 5
26768f7a
2 years ago
version 4
64669101
2 years ago
version 3
be105f5a
2 years ago
version 2
1a2bff16
2 years ago
version 1
5d000e54
2 years ago
master (base)
and
version 32
latest version
499a9fd0
6 commits,
1 year ago
version 35
049d1198
7 commits,
1 year ago
version 34
0806a58b
21 commits,
1 year ago
version 33
a03316bc
20 commits,
1 year ago
version 32
3e87ac62
19 commits,
1 year ago
version 31
0c01f8af
23 commits,
1 year ago
version 30
6b7ee4c4
22 commits,
1 year ago
version 29
026f780a
21 commits,
1 year ago
version 28
c2765f3d
19 commits,
1 year ago
version 27
729e48e2
18 commits,
1 year ago
version 26
aa10cb61
17 commits,
1 year ago
version 25
359b397b
16 commits,
1 year ago
version 24
6172acf4
15 commits,
1 year ago
version 23
cf57dd2e
15 commits,
1 year ago
version 22
afe06e49
14 commits,
1 year ago
version 21
45d1cf6b
13 commits,
1 year ago
version 20
26238928
12 commits,
1 year ago
version 19
ce10b75a
12 commits,
1 year ago
version 18
c88797c0
16 commits,
1 year ago
version 17
c9fb57b9
15 commits,
1 year ago
version 16
74162e6d
14 commits,
1 year ago
version 15
4c60565b
13 commits,
1 year ago
version 14
9701af2c
12 commits,
1 year ago
version 13
4fc8e006
11 commits,
1 year ago
version 12
c6fa8dee
14 commits,
1 year ago
version 11
2f91962d
8 commits,
2 years ago
version 10
8e1bdd71
7 commits,
2 years ago
version 9
22cd8388
4 commits,
2 years ago
version 8
a50d576b
6 commits,
2 years ago
version 7
a50d576b
31 commits,
2 years ago
version 6
e4b37e8b
19 commits,
2 years ago
version 5
26768f7a
16 commits,
2 years ago
version 4
64669101
15 commits,
2 years ago
version 3
be105f5a
14 commits,
2 years ago
version 2
1a2bff16
11 commits,
2 years ago
version 1
5d000e54
10 commits,
2 years ago
16 files
+
429
−
575
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
16
Search (e.g. *.vue) (Ctrl+P)
Alignment/Humboldt/options/AlignVPHalvesModules_Analyzer.py
+
54
−
110
Options
###############################################################################
# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration
#
# (c) Copyright 2021
-2023
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". #
@@ -8,127 +8,71 @@
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
from
Moore
import
options
from
PyConf.application
import
configure_input
from
Humboldt.utils
import
runAlignment
import
OnlineEnvBase
as
OnlineEnv
#TODO: get these from Online
runNumber
=
9999
workerNumber
=
0
runType
=
"
VELO
"
if
OnlineEnv
.
PartitionName
==
"
TEST
"
:
derivfile
=
"
humb-vp-halves-modules-derivs
"
histofile
=
"
testmonitoringhist.root
"
else
:
from
pathlib
import
Path
onlineprefix
=
'
/group/online/dataflow/cmtuser/alignonlinetest
'
Path
(
f
"
{
onlineprefix
}
/
{
runType
}
/
{
runNumber
}
/analyzerOutput/
"
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
derivfile
=
f
"
{
onlineprefix
}
/
{
runType
}
/
{
runNumber
}
/analyzerOutput/
{
workerNumber
}
_humb-vp-halves-modules-derivs
"
histofile
=
f
"
{
onlineprefix
}
/
{
runType
}
/
{
runNumber
}
/analyzerOutput/
{
workerNumber
}
_testmonitoringhist.root
"
from
Humboldt.utils
import
createAlignAlgorithm
,
runAlignment
from
DDDB.CheckDD4Hep
import
UseDD4Hep
if
UseDD4Hep
:
# overlay_path = "./OverlayRoot"
from
Configurables
import
LHCb__Det__LbDD4hep__DD4hepSvc
as
DD4hepSvc
DD4hepSvc
().
UseConditionsOverlay
=
True
# DD4hepSvc(ConditionsOverlayInitPath=overlay_path)
# try:
# shutil.rmtree(overlay_path)
# except FileNotFoundError:
# pass
# os.mkdir(overlay_path)
# global_yml = overlay_path + "/Conditions/VP/Alignment/Global.yml"
# os.makedirs(os.path.dirname(global_yml), exist_ok=True)
# with open(global_yml, "w") as f:
# f.write("""
# VPSystem: !<!alignment>
# position: [0.0, 0.0, 0.0]
# rotation: [0.0, 0.0, 0.0]
# VPLeft: !<!alignment>
# position: [0.5 * mm, 0.5 * mm, 0.0 * mm]
# rotation: [0.0 * rad, 0.0 * rad, 0.0 * rad]
# VPRight: !<!alignment>
# position: [0.0 * mm, 0.0 * mm, 0.0 * mm]
# rotation: [0.0 * rad, 0.0 * rad, 0.0 * rad]
# """.strip())
options
.
histo_file
=
"
testmonitoringhist.root
"
if
UseDD4Hep
:
options
.
simulation
=
False
if
options
.
getProp
(
"
input_type
"
)
!=
"
Online
"
:
options
.
set_input_and_conds_from_testfiledb
(
'
upgrade_Sept2022_minbias_0fb_md_mdf
'
)
options
.
evt_max
=
100
# options.n_event_slots = 10
# options.n_threads = 10
options
.
event_store
=
'
EvtStoreSvc
'
# options.ntuple_file = "testmonitoring.root"
# set options above this line!
options
.
histo_file
=
histofile
configure_input
(
options
)
# only configure data flow after this line !
# at the moment, define tracks and PVs by hand. Could be changed to centrally defined selection in the future
def
getAlignmentTracksAndPVs
():
from
RecoConf.reconstruction_objects
import
reconstruction
from
PyConf.Algorithms
import
VeloClusterTrackingSIMDFull
# note that the PVs reconstructed by TrackBeamLineVertexFinderSoA do not store the list of associated tracks. Use PatPV3DFuture instead
from
RecoConf.hlt1_tracking
import
make_reco_pvs
,
make_PatPV3DFuture_pvs
,
make_VeloClusterTrackingSIMD
from
RecoConf.hlt2_tracking
import
make_hlt2_tracks
#, make_reco_pvs.bind( make_pvs_from_velo_tracks=make_PatPV3DFuture_pvs)
#with reconstruction.bind(from_file=False), make_hlt2_tracks.bind(light_reco=True, use_pr_kf=True, fast_reco=False), make_reco_pvs.bind( make_pvs_from_velo_tracks=make_PatPV3DFuture_pvs):
from
RecoConf.hlt2_global_reco
import
make_legacy_reconstruction
,
reconstruction
as
reconstruction_from_reco
with
reconstruction
.
bind
(
from_file
=
False
),
\
reconstruction_from_reco
.
bind
(
make_reconstruction
=
make_legacy_reconstruction
),
\
make_hlt2_tracks
.
bind
(
light_reco
=
False
),
\
make_reco_pvs
.
bind
(
make_pvs_from_velo_tracks
=
make_PatPV3DFuture_pvs
),
\
make_VeloClusterTrackingSIMD
.
bind
(
algorithm
=
VeloClusterTrackingSIMDFull
):
#make tracks and PVs
# TODO: in principle the PVs should be an optional input for the alignment
reco
=
reconstruction
()
#hlt2_tracks = make_hlt2_tracks(light_reco=False)
#best_tracks = hlt2_tracks["Best"]['v1']
#pvs = make_pvs()
hlt2_tracks
=
reco
[
"
Tracks
"
]
best_tracks
=
hlt2_tracks
pvs
=
reco
[
"
PVs_v1
"
]
from
PyConf.application
import
make_odin
odin
=
make_odin
()
#select tracks and PVs
from
Humboldt.TrackSelections
import
VPBackwardsTracks
,
VPLongTracks
,
VPOverlapTracks
from
Humboldt.VertexSelections
import
VPPrimaryVertices
from
PyConf.Algorithms
import
TrackSelectionMerger
selected_LongTracks
=
VPLongTracks
(
best_tracks
)
selected_BackwardTracks
=
VPBackwardsTracks
(
best_tracks
)
selected_OverlapTracks
=
VPOverlapTracks
(
best_tracks
)
alignmentTracks
=
TrackSelectionMerger
(
InputLocations
=
[
selected_LongTracks
,
selected_BackwardTracks
,
selected_OverlapTracks
]).
OutputLocation
selected_pvs
=
VPPrimaryVertices
(
pvs
)
# add track and vertex monitoring
from
PyConf.Algorithms
import
TrackMonitor
,
TrackVertexMonitor
,
TrackVPOverlapMonitor
from
RecoConf.hlt1_tracking
import
make_VPClus_hits
myTrackMonitor
=
TrackMonitor
(
TracksInContainer
=
alignmentTracks
)
myTrackVertexMonitor
=
TrackVertexMonitor
(
TrackContainer
=
alignmentTracks
,
PVContainer
=
pvs
)
myTrackVPOverlapMonitor
=
TrackVPOverlapMonitor
(
TrackContainer
=
best_tracks
,
ClusterContainer
=
make_VPClus_hits
())
monitorlist
=
[
myTrackMonitor
,
myTrackVertexMonitor
,
myTrackVPOverlapMonitor
]
return
alignmentTracks
,
selected_pvs
,
odin
,
monitorlist
alignmentTracks
,
alignmentPVs
,
odin
,
monitors
=
getAlignmentTracksAndPVs
()
from
Humboldt.options
import
usePrKalman
from
Humboldt.alignment_tracking
import
make_align_vp_input
alignmentTracks
,
alignmentPVs
=
make_align_vp_input
(
usePrKalman
=
usePrKalman
)
#define elements and degrees of freedom to be aligned
from
TAlignment.Alignables
import
Alignables
elements
=
Alignables
()
dofs
=
"
TxTyTzRxRyRz
"
dofsmodules
=
"
TxTyTzRxRyRz
"
elements
.
VPModules
(
dofsmodules
)
# add survey constraints
from
Configurables
import
SurveyConstraints
surveyconstraints
=
SurveyConstraints
()
surveyconstraints
.
VP
()
# define Lagrange constraints
constraints
=
[]
constraints
.
append
(
"
VPHalfAverage : VP/VP(Left|Right) : Tx Ty Tz Rx Ry Rz
"
)
constraints
.
append
(
"
VPInternalRight : VP/VPRight/Module..WithSupport: Tx Ty Tz Rx Ry Rz Szx Szy
"
)
constraints
.
append
(
"
VPInternalLeft : VP/VPLeft/Module..WithSupport: Tx Ty Tz Rx Ry Rz Szx Szy
"
)
from
Humboldt.AlignmentScenarios
import
configureVPModuleAlignment
,
configureVPHalfAlignment
config
=
configureVPHalfAlignment
()
from
Humboldt.utils
import
createAlignAlgorithm
with
createAlignAlgorithm
.
bind
(
onlineMode
=
True
,
histoPrint
=
True
,
outputDataFile
=
derivfile
,
updateInFinalize
=
False
):
outputDataFile
=
"
humb-vp-halves-modules-derivs
"
,
updateInFinalize
=
False
,
onlineMode
=
True
):
runAlignment
(
options
,
surveyConstraints
=
s
urvey
c
onstraints
,
lagrangeConstraints
=
constraints
,
surveyConstraints
=
config
.
S
urvey
C
onstraints
,
lagrangeConstraints
=
con
fig
.
LagrangeCon
straints
,
alignmentTracks
=
alignmentTracks
,
elementsToAlign
=
config
.
Elements
,
alignmentPVs
=
alignmentPVs
,
odin
=
odin
,
elementsToAlign
=
elements
,
monitorList
=
monitors
)
usePrKalman
=
usePrKalman
)
Loading