|
@ -1,20 +1,15 @@ |
|
|
# flake8: noqa |
|
|
# flake8: noqa |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""" |
|
|
|
|
|
This set of options is used for reconstruction development purposes, |
|
|
|
|
|
and assumes that the input contains MCHits (i.e. is of `Exended` |
|
|
|
|
|
DST/digi type). |
|
|
|
|
|
author: Furkan Cetin |
|
|
|
|
|
date: 10/2023 |
|
|
|
|
|
Moore/run gaudirun.py /work/cetin/LHCb/reco_tuner/moore_options/get_resolution_and_eff_data.py |
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
from Moore import options, run_reconstruction |
|
|
from Moore import options, run_reconstruction |
|
|
|
|
|
|
|
|
from Moore.config import Reconstruction |
|
|
from Moore.config import Reconstruction |
|
|
from PyConf.Algorithms import PrKalmanFilter |
|
|
|
|
|
from PyConf.Tools import TrackMasterExtrapolator |
|
|
|
|
|
|
|
|
from PyConf.Algorithms import PrKalmanFilter, PrMatchNN, fromPrMatchTracksV1Tracks |
|
|
|
|
|
from PyConf.Tools import TrackMasterExtrapolator, PrMCDebugMatchToolNN |
|
|
|
|
|
from PyConf.application import make_data_with_FetchDataFromFile |
|
|
|
|
|
from RecoConf.data_from_file import mc_unpackers |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import glob |
|
|
import glob |
|
|
|
|
|
|
|
|
from RecoConf.mc_checking import ( |
|
|
from RecoConf.mc_checking import ( |
|
@ -26,7 +21,7 @@ from RecoConf.mc_checking import ( |
|
|
make_links_tracks_mcparticles, |
|
|
make_links_tracks_mcparticles, |
|
|
) |
|
|
) |
|
|
from RecoConf.core_algorithms import make_unique_id_generator |
|
|
from RecoConf.core_algorithms import make_unique_id_generator |
|
|
from RecoConf.hlt2_tracking import make_hlt2_tracks |
|
|
|
|
|
|
|
|
from RecoConf.hlt2_tracking import make_hlt2_tracks, get_global_ut_hits_tool |
|
|
from RecoConf.hlt1_tracking import ( |
|
|
from RecoConf.hlt1_tracking import ( |
|
|
make_VeloClusterTrackingSIMD_hits, |
|
|
make_VeloClusterTrackingSIMD_hits, |
|
|
make_PrStorePrUTHits_hits, |
|
|
make_PrStorePrUTHits_hits, |
|
@ -34,11 +29,23 @@ from RecoConf.hlt1_tracking import ( |
|
|
get_global_materiallocator, |
|
|
get_global_materiallocator, |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
""" |
|
|
|
|
|
This set of options is used for reconstruction development purposes, |
|
|
|
|
|
and assumes that the input contains MCHits (i.e. is of `Exended` |
|
|
|
|
|
DST/digi type). |
|
|
|
|
|
|
|
|
|
|
|
author: Furkan Cetin |
|
|
|
|
|
date: 10/2023 |
|
|
|
|
|
|
|
|
|
|
|
Moore/run gaudirun.py /work/cetin/LHCb/reco_tuner/moore_options/get_resolution_and_eff_data.py |
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
decay = "test" |
|
|
decay = "test" |
|
|
|
|
|
|
|
|
options.evt_max = -1 |
|
|
options.evt_max = -1 |
|
|
|
|
|
|
|
|
options.ntuple_file = f"data/resolutions_and_effs_{decay}_thesis.root" |
|
|
|
|
|
|
|
|
options.ntuple_file = f"data/resolutions_and_effs_{decay}_only_electrons_as_seed.root" |
|
|
options.input_type = "ROOT" |
|
|
options.input_type = "ROOT" |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,6 +70,7 @@ options.output_level = 3 |
|
|
|
|
|
|
|
|
def run_tracking_resolution(): |
|
|
def run_tracking_resolution(): |
|
|
tracks = make_hlt2_tracks(light_reco=True, fast_reco=False, use_pr_kf=True) |
|
|
tracks = make_hlt2_tracks(light_reco=True, fast_reco=False, use_pr_kf=True) |
|
|
|
|
|
|
|
|
fitted_forward_tracks = PrKalmanFilter( |
|
|
fitted_forward_tracks = PrKalmanFilter( |
|
|
Input=tracks["Forward"]["Pr"], |
|
|
Input=tracks["Forward"]["Pr"], |
|
|
MaxChi2=2.8, |
|
|
MaxChi2=2.8, |
|
@ -77,24 +85,60 @@ def run_tracking_resolution(): |
|
|
).OutputTracks |
|
|
).OutputTracks |
|
|
|
|
|
|
|
|
links_to_lhcbids = make_links_lhcbids_mcparticles_tracking_system() |
|
|
links_to_lhcbids = make_links_lhcbids_mcparticles_tracking_system() |
|
|
links_to_forward = make_links_tracks_mcparticles( |
|
|
|
|
|
InputTracks=tracks["Forward"], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
links_to_best = make_links_tracks_mcparticles( |
|
|
|
|
|
InputTracks=tracks["BestLong"], |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
) |
|
|
) |
|
|
links_to_match = make_links_tracks_mcparticles( |
|
|
|
|
|
InputTracks=tracks["Match"], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
links_to_forward = make_links_tracks_mcparticles( |
|
|
|
|
|
InputTracks=tracks["Forward"], |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
) |
|
|
) |
|
|
links_to_best = make_links_tracks_mcparticles( |
|
|
|
|
|
InputTracks=tracks["BestLong"], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
links_to_velo = make_links_tracks_mcparticles( |
|
|
|
|
|
InputTracks=tracks["Velo"], |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
links_to_seed = make_links_tracks_mcparticles( |
|
|
links_to_seed = make_links_tracks_mcparticles( |
|
|
InputTracks=tracks["Seed"], |
|
|
InputTracks=tracks["Seed"], |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
res_checker_forward = check_track_resolution(tracks["Forward"], suffix="Forward") |
|
|
|
|
|
|
|
|
match_debug = PrMatchNN( |
|
|
|
|
|
VeloInput=tracks["Velo"]["Pr"], |
|
|
|
|
|
SeedInput=tracks["Seed"]["Pr"], |
|
|
|
|
|
MatchDebugToolName=PrMCDebugMatchToolNN( |
|
|
|
|
|
VeloTracks=tracks["Velo"]["v1"], |
|
|
|
|
|
SeedTracks=tracks["Seed"]["v1"], |
|
|
|
|
|
VeloTrackLinks=links_to_velo, |
|
|
|
|
|
SeedTrackLinks=links_to_seed, |
|
|
|
|
|
TrackInfo=make_data_with_FetchDataFromFile( |
|
|
|
|
|
"/Event/MC/TrackInfo", "LHCb::MCProperty" |
|
|
|
|
|
), |
|
|
|
|
|
MCParticles=mc_unpackers()["MCParticles"], |
|
|
|
|
|
), |
|
|
|
|
|
AddUTHitsToolName=get_global_ut_hits_tool(enable=True), |
|
|
|
|
|
).MatchOutput |
|
|
|
|
|
|
|
|
|
|
|
match_tracks = {} |
|
|
|
|
|
match_tracks["Pr"] = match_debug |
|
|
|
|
|
match_tracks["v1"] = fromPrMatchTracksV1Tracks( |
|
|
|
|
|
InputTracksLocation=match_debug, |
|
|
|
|
|
VeloTracksLocation=tracks["Velo"]["v1"], |
|
|
|
|
|
SeedTracksLocation=tracks["Seed"]["v1"], |
|
|
|
|
|
).OutputTracksLocation |
|
|
|
|
|
|
|
|
|
|
|
links_to_match = make_links_tracks_mcparticles( |
|
|
|
|
|
InputTracks=match_tracks, |
|
|
|
|
|
LinksToLHCbIDs=links_to_lhcbids, |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
res_checker_forward = check_track_resolution( |
|
|
|
|
|
tracks["Forward"], |
|
|
|
|
|
suffix="Forward", |
|
|
|
|
|
) |
|
|
res_checker_best_long = check_track_resolution( |
|
|
res_checker_best_long = check_track_resolution( |
|
|
tracks["BestLong"], |
|
|
tracks["BestLong"], |
|
|
suffix="BestLong", |
|
|
suffix="BestLong", |
|
@ -118,7 +162,7 @@ def run_tracking_resolution(): |
|
|
) |
|
|
) |
|
|
eff_checker_match = check_tracking_efficiency( |
|
|
eff_checker_match = check_tracking_efficiency( |
|
|
"Match", |
|
|
"Match", |
|
|
tracks["Match"], |
|
|
|
|
|
|
|
|
match_tracks, |
|
|
links_to_match, |
|
|
links_to_match, |
|
|
links_to_lhcbids, |
|
|
links_to_lhcbids, |
|
|
get_mc_categories("Match"), |
|
|
get_mc_categories("Match"), |