Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lhcb/MooreOnline
1 result
Show changes
Commits on Source (13)
Showing
with 722 additions and 390 deletions
This diff is collapsed.
......@@ -121,8 +121,8 @@ fit_v0_secondary_vertices INFO 1D histograms in directory "fit_v0_s
| number_of_svs | "NSVs" | 30000 | 0 | 0.0000 | 0 | 0 |
gather_selections INFO 1D histograms in directory "gather_selections" : 2
| ID | Title | # | Mean | RMS | Skewness | Kurtosis |
| line_passes | "line passes" | 25401 | 74.1 | 2.5472 | -7.5388 | 66.314 |
| line_rates | "line rates" | 745 | 60.854 | 6.3627 | -1.2341 | 2.6477 |
| line_passes | "line passes" | 25401 | 64.1 | 2.5472 | -7.5388 | 66.314 |
| line_rates | "line rates" | 745 | 50.854 | 6.3627 | -1.2341 | 2.6477 |
make_long_track_particles INFO 1D histograms in directory "make_long_track_particles" : 4
| ID | Title | # | Mean | RMS | Skewness | Kurtosis |
| number_of_trks | "NTrks" | 30000 | 3.3333e-05 | 0.0057734 | 173.2 | 29995 |
......
......@@ -121,8 +121,8 @@ fit_v0_secondary_vertices INFO 1D histograms in directory "fit_v0_s
| number_of_svs | "NSVs" | 30000 | 0 | 0.0000 | 0 | 0 |
gather_selections INFO 1D histograms in directory "gather_selections" : 2
| ID | Title | # | Mean | RMS | Skewness | Kurtosis |
| line_passes | "line passes" | 25401 | 74.1 | 2.5472 | -7.5388 | 66.314 |
| line_rates | "line rates" | 745 | 60.854 | 6.3627 | -1.2341 | 2.6477 |
| line_passes | "line passes" | 25401 | 64.1 | 2.5472 | -7.5388 | 66.314 |
| line_rates | "line rates" | 745 | 50.854 | 6.3627 | -1.2341 | 2.6477 |
make_long_track_particles INFO 1D histograms in directory "make_long_track_particles" : 4
| ID | Title | # | Mean | RMS | Skewness | Kurtosis |
| number_of_trks | "NTrks" | 30000 | 3.3333e-05 | 0.0057734 | 173.2 | 29995 |
......
......@@ -121,8 +121,8 @@ fit_v0_secondary_vertices INFO 1D histograms in directory "fit_v0_s
| number_of_svs | "NSVs" | 30000 | 0 | 0.0000 | 0 | 0 |
gather_selections INFO 1D histograms in directory "gather_selections" : 2
| ID | Title | # | Mean | RMS | Skewness | Kurtosis |
| line_passes | "line passes" | 25401 | 74.1 | 2.5472 | -7.5388 | 66.314 |
| line_rates | "line rates" | 745 | 60.854 | 6.3627 | -1.2341 | 2.6477 |
| line_passes | "line passes" | 25401 | 64.1 | 2.5472 | -7.5388 | 66.314 |
| line_rates | "line rates" | 745 | 50.854 | 6.3627 | -1.2341 | 2.6477 |
make_long_track_particles INFO 1D histograms in directory "make_long_track_particles" : 4
| ID | Title | # | Mean | RMS | Skewness | Kurtosis |
| number_of_trks | "NTrks" | 30000 | 3.3333e-05 | 0.0057734 | 173.2 | 29995 |
......
......@@ -51,7 +51,7 @@
|-root_ioalg_opts = {} (default: {})
|-scheduler_legacy_mode = True (default: True)
|-simulation = True (default: None)
|-write_decoding_keys_to_git = True (default: True)
|-write_decoding_keys_to_git = None
|-write_options_to_fsr = False (default: False)
|-write_streams_attributes_to_json = False (default: False)
|-xml_file_catalog = '' (default: '')
......
......@@ -51,7 +51,7 @@
|-root_ioalg_opts = {} (default: {})
|-scheduler_legacy_mode = True (default: True)
|-simulation = True (default: None)
|-write_decoding_keys_to_git = True (default: True)
|-write_decoding_keys_to_git = None
|-write_options_to_fsr = False (default: False)
|-write_streams_attributes_to_json = False (default: False)
|-xml_file_catalog = '' (default: '')
......
......@@ -51,7 +51,7 @@
|-root_ioalg_opts = {} (default: {})
|-scheduler_legacy_mode = True (default: True)
|-simulation = True (default: None)
|-write_decoding_keys_to_git = True (default: True)
|-write_decoding_keys_to_git = None
|-write_options_to_fsr = False (default: False)
|-write_streams_attributes_to_json = False (default: False)
|-xml_file_catalog = '' (default: '')
......
......@@ -13,8 +13,7 @@ import fifo_log
import GaudiOnline
import OnlineEnvBase as OnlineEnv
from Configurables import DummyRunable
from Configurables import Online__AlgFlowManager as AlgFlowManager
from Configurables import HLTControlFlowMgr, ExecutionReportsWriter, EventLoopMgr
from Configurables import EventLoopMgr
OnlineEnv.OutputLevel = 3
......@@ -31,19 +30,6 @@ fifo_log.logger_set_tag(OnlineEnv.PartitionName)
input_files = ['/scratch/shollitt/inputfiles/00146082_00000001_1.mdf']
application.setup_file_access(input_files)
# application.setup_hive(FlowManager("EventLoop"), 40) <- simple event loop
flow = AlgFlowManager("EventLoop")
application.setup_hive(flow, 44)
# HACK: transfer options from HLTControlFlowMgr
cfm = HLTControlFlowMgr('HLTControlFlowMgr')
flow.CompositeCFNodes = cfm.CompositeCFNodes
flow.BarrierAlgNames = cfm.BarrierAlgNames
# HACK: tell the HltDecReports creator to use the online scheduler
# only works because there is exactly one instance of ExecutionReportsWriter
ExecutionReportsWriter().Scheduler = flow
application.setup_monitoring()
application.monSvc.DimUpdateInterval = 1
......
......@@ -12,8 +12,7 @@ import os
import GaudiOnline
import OnlineEnvBase as OnlineEnv
from Configurables import DummyRunable
from Configurables import Online__AlgFlowManager as AlgFlowManager
from Configurables import HLTControlFlowMgr, EventLoopMgr
from Configurables import EventLoopMgr
from pathlib import Path
from MooreOnlineConf.utils import (
alignment_options,
......@@ -79,14 +78,6 @@ DD4hepSvc().UseConditionsOverlay = True
application.setup_file_access(input_files)
flow = AlgFlowManager("EventLoop")
application.app.EventLoop = flow
# HACK: transfer options from HLTControlFlowMgr
cfm = HLTControlFlowMgr('HLTControlFlowMgr')
flow.CompositeCFNodes = cfm.CompositeCFNodes
flow.BarrierAlgNames = cfm.BarrierAlgNames
application.setup_monitoring()
application.monSvc.DimUpdateInterval = 1
......
......@@ -12,8 +12,7 @@ import os
import GaudiOnline
import OnlineEnvBase as OnlineEnv
from Configurables import DummyRunable
from Configurables import Online__AlgFlowManager as AlgFlowManager
from Configurables import HLTControlFlowMgr, EventLoopMgr
from Configurables import EventLoopMgr
from pathlib import Path
from MooreOnlineConf.utils import (
alignment_options,
......@@ -71,16 +70,6 @@ DD4hepSvc().UseConditionsOverlay = True
application.setup_file_access(input_files)
# application.setup_hive(FlowManager("EventLoop"), 40) <- simple event loop
flow = AlgFlowManager("EventLoop")
application.app.EventLoop = flow
# application.setup_hive(flow, 44)
# HACK: transfer options from HLTControlFlowMgr
cfm = HLTControlFlowMgr('HLTControlFlowMgr')
flow.CompositeCFNodes = cfm.CompositeCFNodes
flow.BarrierAlgNames = cfm.BarrierAlgNames
application.setup_monitoring()
application.monSvc.DimUpdateInterval = 1
......
###############################################################################
# (c) Copyright 2025 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. #
###############################################################################
import Functors as F
from PyConf.Algorithms import (
FTHitEfficiencyMonitor,
PrKalmanFilter_noUT,
PrKalmanFilter_Seed,
PrKalmanFilter_Velo,
PrStoreSciFiHits,
TrackListMCTruthRefiner,
)
from PyConf.application import make_odin
from RecoConf import mc_checking
from RecoConf.config import Reconstruction, run_reconstruction
from RecoConf.hlt2_tracking import (
make_hlt2_tracks_without_UT,
make_PrStoreSciFiHits_hits,
)
from RecoConf.legacy_rec_hlt1_tracking import make_FTRawBankDecoder_clusters
from RecoConf.options import options
import logging
# save output file with histograms
options.histo_file = options.getProp(
"histo_file") or "hlt2_FT_hit_efficiency.root"
def hit_efficiency_sequence():
odin = make_odin()
data = [odin]
for layer_under_study in range(4): # histograms for the first station
with (
PrKalmanFilter_noUT.bind(FillFitResult=True),
PrKalmanFilter_Seed.bind(FillFitResult=True),
PrKalmanFilter_Velo.bind(FillFitResult=True),
make_PrStoreSciFiHits_hits.bind(
disabled_layers=[layer_under_study]),
):
hlt2_tracks = make_hlt2_tracks_without_UT(
light_reco=True, fast_reco=False, use_pr_kf=True)
my_enabled_layers = [
j not in [layer_under_study] for j in range(12)
]
all_FT_pr_hits = PrStoreSciFiHits(
HitsLocation=make_FTRawBankDecoder_clusters(),
LayerMasks=tuple(my_enabled_layers),
).Output
my_ft_efficiency_alg = FTHitEfficiencyMonitor(
name="FTHitEfficiencyLayer{}".format(layer_under_study),
TrackLocation=hlt2_tracks["BestLong"]["v1"],
PrFTHitsLocation=all_FT_pr_hits,
LayerUnderStudy=layer_under_study,
)
data += [my_ft_efficiency_alg]
# Add MC-only information, as illustration of
# debugging options
if options.simulation is True and options.python_logging_level is logging.DEBUG:
mc_particles = mc_checking.mc_unpacker("MCParticles")
links_to_lhcbids = (
mc_checking.
make_links_lhcbids_mcparticles_tracking_system())
links_to_mcp = mc_checking.make_links_tracks_mcparticles(
InputTracks=hlt2_tracks["BestLong"]["v1"],
LinksToLHCbIDs=links_to_lhcbids,
)
my_filtered_hlt2_tracks = TrackListMCTruthRefiner(
InputTracks=hlt2_tracks["BestLong"]["v1"],
TrackToMCPRelations=links_to_mcp,
MCParticles=mc_particles,
MCCut=F.ALL,
).OutputPassTracks
my_ft_efficiency_alg_no_ghosts = FTHitEfficiencyMonitor(
name="FTHitEfficiencyNoGhostsLayer{}".format(
layer_under_study),
TrackLocation=my_filtered_hlt2_tracks,
PrFTHitsLocation=all_FT_pr_hits,
LayerUnderStudy=layer_under_study,
)
data += [my_ft_efficiency_alg_no_ghosts]
return Reconstruction("hlt2_hit_eff_reco", data, [])
run_reconstruction(options, hit_efficiency_sequence)
###############################################################################
# (c) Copyright 2025 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. #
###############################################################################
from PyConf.Algorithms import (
FTPseudoHitEfficiencyMonitor,
PrKalmanFilter_noUT,
PrKalmanFilter_Seed,
PrKalmanFilter_Velo,
PrStoreSciFiHits,
)
from PyConf.application import make_odin
from RecoConf.config import Reconstruction, run_reconstruction
from RecoConf.decoders import default_VeloCluster_source
from RecoConf.hlt2_tracking import make_hlt2_tracks_without_UT
from RecoConf.legacy_rec_hlt1_tracking import make_FTRawBankDecoder_clusters
from RecoConf.options import options
# save output file with histograms
options.histo_file = (options.getProp("histo_file")
or "bias_hlt2_FT_pseudo_hit_efficiency.root")
def hit_efficiency_sequence():
odin = make_odin()
data = [odin]
with (
PrKalmanFilter_noUT.bind(FillFitResult=True),
PrKalmanFilter_Seed.bind(FillFitResult=True),
PrKalmanFilter_Velo.bind(FillFitResult=True),
):
hlt2_tracks = make_hlt2_tracks_without_UT(
light_reco=True, fast_reco=False, use_pr_kf=True)
all_FT_pr_hits = PrStoreSciFiHits(
HitsLocation=make_FTRawBankDecoder_clusters()).Output
my_ft_efficiency_alg = FTPseudoHitEfficiencyMonitor(
name="FTPseudoHitEfficiency",
TrackLocation=hlt2_tracks["BestLong"]["v1"],
PrFTHitsLocation=all_FT_pr_hits,
LayersUnderStudy=list(range(12)),
MaxDoca=2.0,
MinTrackP=3000,
MinTrackPT=300,
)
data += [my_ft_efficiency_alg]
return Reconstruction("hlt2_pseudo_hit_eff_reco", data, [])
with (default_VeloCluster_source.bind(bank_type="VPRetinaCluster"), ):
run_reconstruction(options, hit_efficiency_sequence)
###############################################################################
# (c) Copyright 2021 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. #
###############################################################################
import os
import GaudiOnline
import OnlineEnvBase as OnlineEnv
from Configurables import (
Online__OutputAlg as OutputAlg,
ApplicationMgr,
OnlMonitorSink,
HiveDataBrokerSvc,
HLTControlFlowMgr,
)
from Gaudi.Configuration import allConfigurables
task_type = os.getenv("TASK_TYPE", "GenericTask")
application = GaudiOnline.Passthrough(
outputLevel=OnlineEnv.OutputLevel,
partitionName=OnlineEnv.PartitionName,
partitionID=OnlineEnv.PartitionID,
classType=GaudiOnline.Class1)
application.setup_fifolog()
application.setup_mbm_access('Events', True)
for name, configurable in allConfigurables.items():
if isinstance(configurable, OutputAlg):
writer = application.setup_mbm_output(
'Output', name=configurable.name())
writer.MBM_maxConsumerWait = 10
writer.MBM_allocationSize = 1024 * 1024 # bytes
# Make sure we don't overwrite requests to publish histograms/counters
onl_sink = OnlMonitorSink()
# TODO make sure the default HistogramsToPublish=[] accepts everything and the lines below are not necessary
if not onl_sink.isPropertySet("HistogramsToPublish"):
onl_sink.HistogramsToPublish = [(".*", ".*")]
if not onl_sink.isPropertySet("CountersToPublish"):
onl_sink.CountersToPublish = [("Combiner", "# passed"),
("Prescaler", "#accept")]
if onl_sink not in ApplicationMgr().ExtSvc:
ApplicationMgr().ExtSvc.append(onl_sink)
application.setup_monitoring(task_type)
application.updateAndReset.saveHistograms = 1
application.updateAndReset.saveSetDir = "Savesets"
application.updateAndReset.saveSetFilePrefix = "PRMon"
# Never update the "bulk" DIM histogram service for HLT2 and monitoring tasks.
# (For HLT1 it has to be done since the adders rely on it)
application.monSvc.DimUpdateInterval = 1000000 # timer interval in seconds
application.monSvc.HistUpdateOnStop = False # do not update on stop
# prevent duplicated entries in the output...
application.monSvc.disableDeclareInfoHistos = True
application.updateAndReset.saverCycle = 300
# TODO we should remove update_and_reset from task python options
from MooreOnlineConf.utils import update_and_reset
uar_config = update_and_reset().configuration()
uar_algs = uar_config.apply()[0]
HiveDataBrokerSvc().DataProducers.extend(uar_algs)
HLTControlFlowMgr('HLTControlFlowMgr').PreambleAlgs = uar_algs
# TODO add histogram of number of executions and filter passed
n_instances = int(os.getenv("NBOFSLAVES", "0")) + 1
try:
n_threads = int(os.environ["NBOFTHREADS"])
# NBOFTHREADS is populated from the "-numthreads" argument in Arch.xml
except (KeyError, ValueError):
n_threads = 1
# Use execMode = 1 for multi-threaded (async_queued) mode and
# use 0 (default) for single-threaded (sync) mode, i.e. debugging.
application.config.execMode = 1
application.config.numEventThreads = n_threads
HLTControlFlowMgr().ThreadPoolSize = n_threads
# Enable controlling number of threads with a DIM command
application.config.numThreadSvcName = 'NumThreads'
event_store = allConfigurables["EventDataSvc"]
# Ensure enough event slots to "bridge" the short wait when
# switching event bursts.
event_store.EventSlots = max(
event_store.getProp("EventSlots"),
n_threads + max(int(0.25 * n_threads), 1))
# For monitoring tasks we use UserType=USER, i.e. the task may not see
# all events if it can't process fast enough. However, for testing we
# use "ONE" so that the reader does not keep on pumping events when
# they are not consumer (i.e. a debugger is attached).
input_mbm_user_type = "USER"
if OnlineEnv.PartitionName.startswith("TEST"):
input_mbm_user_type = "ONE"
application.config.MBM_numConnections = 1
application.config.MBM_numEventThreads = 1
# Special setting for PbPb:
# application.config.MBM_numEventThreads = 2
application.config.MBM_requests = [
'EvType=2;TriggerMask=0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;' +
f'VetoMask=0,0,0,0;MaskType=ANY;UserType={input_mbm_user_type};' +
'Frequency=PERC;Perc=100.0'
]
from Configurables import LHCb__DetDesc__ReserveDetDescForEvent as reserveIOV
reserveIOV("reserveIOV").PreloadGeometry = False
application.config.expandTAE = True
#!/bin/bash
###############################################################################
# (c) Copyright 2025 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. #
###############################################################################
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$DIR/setupTask.sh"
setup_options_path MONITORING
settings=$(python -c 'import OnlineEnvBase; print(OnlineEnvBase.HLTType)')
vp_options=$MOOREONLINECONFROOT/options/vp_retina_clusters.py
if [[ $settings == *"veloSP" ]]; then
echo "RecoMon: configuring VELO SP algorithms based on current trigger config $settings"
vp_options=
fi
exec_gaudirun \
$MOOREONLINECONFROOT/options/tags-master.py \
$MOOREONLINECONFROOT/options/verbosity.py \
$vp_options \
$MOOREONLINECONFROOT/options/ftHitEff.py \
$MOOREONLINECONFROOT/options/online.py
\ No newline at end of file
#!/bin/bash
###############################################################################
# (c) Copyright 2025 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. #
###############################################################################
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$DIR/setupTask.sh"
setup_options_path MONITORING
settings=$(python -c 'import OnlineEnvBase; print(OnlineEnvBase.HLTType)')
vp_options=$MOOREONLINECONFROOT/options/vp_retina_clusters.py
if [[ $settings == *"veloSP" ]]; then
echo "RecoMon: configuring VELO SP algorithms based on current trigger config $settings"
vp_options=
fi
exec_gaudirun \
$MOOREONLINECONFROOT/options/tags-master.py \
$MOOREONLINECONFROOT/options/verbosity.py \
$vp_options \
$MOOREONLINECONFROOT/options/ftPseudoHitEff \
$MOOREONLINECONFROOT/options/online.py
\ No newline at end of file
#!/bin/bash
###############################################################################
# (c) Copyright 2000-2021 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. #
###############################################################################
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$DIR/setupTask.sh"
setup_options_path MONITORING
settings=$(python -c 'import OnlineEnvBase; print(OnlineEnvBase.HLTType)')
vp_options=$MOOREONLINECONFROOT/options/vp_retina_clusters.py
if [[ $settings == *"veloSP" ]]; then
echo "RecoMon: configuring VELO SP algorithms based on current trigger config $settings"
vp_options=$MOOREONLINECONFROOT/options/vp_veloSP.py
fi
exec_gaudirun \
$MOOREONLINECONFROOT/options/tags-OnlineEnv.py \
$MOOREONLINECONFROOT/options/verbosity.py \
$vp_options \
$MOOREONLINECONFROOT/options/reco.py \
$MOOREONLINECONFROOT/options/prtest.py