Skip to content
Snippets Groups Projects

Prototype of new alignment configuration

Merged Florian Reiss requested to merge pyconf into master
1 file
+ 14
11
Compare changes
  • Side-by-side
  • Inline
@@ -15,7 +15,6 @@ from PyConf.tonic import configurable
from RecoConf.hlt2_tracking import make_hlt2_tracks
from RecoConf.hlt1_tracking import make_pvs, all_velo_track_types
from Moore import options
from PyConf.Tools import AlignUpdateTool
options.set_input_and_conds_from_testfiledb('MiniBrunel_2018_MinBias_FTv4_MDF')
options.input_files = list(set(options.input_files)) # remove dups
@@ -97,12 +96,16 @@ def createAlignUpdateTool(surveyconstraintTool=AlignChisqConstraintTool(),
# 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
with reconstruction.bind(from_file=False), make_reco_pvs.bind( make_pvs_from_velo_tracks=make_PatPV3DFuture_pvs):
with reconstruction.bind(from_file=False), make_reco_pvs.bind( make_pvs_from_velo_tracks=make_PatPV3DFuture_pvs), make_hlt2_tracks.bind(light_reco=False):
#make tracks and PVs
# TODO: in principle the PVs should be an optional input for the alignment
hlt2_tracks = make_hlt2_tracks(light_reco=False)
best_tracks = hlt2_tracks["Best"]['v1']
pvs = make_pvs()
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"]
#select tracks and PVs
from PyConf.Tools import VPTrackSelector
@@ -123,11 +126,11 @@ with reconstruction.bind(from_file=False), make_reco_pvs.bind( make_pvs_from_vel
InputLocations=[selected_tracks, selected_BackwardTracks
]).OutputLocation
#need to convert PVs first
converted_pvs = fromLHCbRecVertices(
InputVerticesName=pvs,
InputTracksName=all_velo_track_types()["v1"]).OutputVerticesName
#converted_pvs = fromLHCbRecVertices(
# InputVerticesName=pvs,
# InputTracksName=all_velo_track_types()["v1"]).OutputVerticesName
selected_pvs = VertexListRefiner(
InputLocation=converted_pvs).OutputLocation
InputLocation=pvs).OutputLocation
#create ODIN
from PyConf.application import default_raw_event, createODIN
@@ -171,12 +174,12 @@ with reconstruction.bind(from_file=False), make_reco_pvs.bind( make_pvs_from_vel
from PyConf.Algorithms import TrackMonitor, TrackFitMatchMonitor, TrackVertexMonitor
# TODO: should only use selected PVs
myTrackMonitor = TrackMonitor(
TracksInContainer=alignmentTracks, PrimaryVertices=converted_pvs)
TracksInContainer=alignmentTracks, PrimaryVertices=pvs)
myTrackFitMatchMonitor = TrackFitMatchMonitor(
TrackContainer=alignmentTracks)
# TODO: check vertices
myTrackVertexMonitor = TrackVertexMonitor(
TrackContainer=alignmentTracks, PVContainer=converted_pvs)
TrackContainer=alignmentTracks, PVContainer=pvs)
top_node = CompositeNode(
"alignment", [
alignment, myTrackMonitor, myTrackFitMatchMonitor,
Loading