Skip to content
Snippets Groups Projects
Commit 8e7b1874 authored by Lorenzo Paolucci's avatar Lorenzo Paolucci Committed by Christina Agapopoulou
Browse files

WIP: Muon chamber monitor (depends on Rec!3765)

parent e264305d
No related branches found
No related tags found
2 merge requests!4232Run5: rebase, restructure run5 code, add back examples,!3265WIP: Muon chamber monitor (depends on Rec!3765)
###############################################################################
# (c) Copyright 2024 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 GaudiKernel.SystemOfUnits import GeV
import Functors as F
from PyConf.Algorithms import MuonChamberMonitor
from RecoConf.reconstruction_objects import make_pvs, reconstruction
from RecoConf.global_tools import stateProvider_with_simplified_geom
from Hlt2Conf.standard_particles import make_long_muons, make_ismuon_long_muon
from Hlt2Conf.algorithms_thor import ParticleFilter
from Moore import options
from Moore.config import Reconstruction, run_reconstruction
from RecoConf.muonid import make_muon_hits
def muonchamber_mon():
pvs = make_pvs()
mus_tag = ParticleFilter(
make_ismuon_long_muon(),
F.FILTER(
F.require_all(F.P > 3 * GeV, F.PT > 1.2 * GeV,
F.MINIPCHI2(pvs) > 9)))
mus_probe = ParticleFilter(
make_long_muons(),
F.FILTER(
F.require_all(F.INMUON, F.P > 3 * GeV,
F.MINIPCHI2(pvs) > 20)))
mups_tag = ParticleFilter(mus_tag, Cut=F.FILTER(F.CHARGE > 0))
mups_probe = ParticleFilter(mus_probe, Cut=F.FILTER(F.CHARGE > 0))
mums_tag = ParticleFilter(mus_tag, Cut=F.FILTER(F.CHARGE < 0))
mums_probe = ParticleFilter(mus_probe, Cut=F.FILTER(F.CHARGE < 0))
hits = make_muon_hits()
muon_chamber_mon_mums_tagged = MuonChamberMonitor(
Probes=mups_probe,
Tags=mums_tag,
MuonHits=hits,
name="MuonChamberMonitor_MumTagged")
muon_chamber_mon_mups_tagged = MuonChamberMonitor(
Probes=mums_probe,
Tags=mups_tag,
MuonHits=hits,
name="MuonChamberMonitor_MupTagged")
return Reconstruction(
'muonchamber_mon',
[muon_chamber_mon_mums_tagged, muon_chamber_mon_mups_tagged])
options.histo_file = 'histo.root'
public_tools = [stateProvider_with_simplified_geom()]
with reconstruction.bind(from_file=False):
run_reconstruction(options, muonchamber_mon, public_tools)
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<!--
(c) Copyright 2024 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.
-->
<!--
Test for the Muon Chamber Monitor
-->
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>gaudirun.py</text></argument>
<argument name="timeout"><integer>2400</integer></argument>
<argument name="args"><set>
<text>$MOOREROOT/tests/options/default_input_and_conds_hlt2.py</text>
<text>$RECOCONFROOT/options/muon_chamber_monitor.py</text>
</set></argument>
<argument name="use_temp_dir"><enumeral>true</enumeral></argument>
<argument name="validator"><text>
from Moore.qmtest.exclusions import remove_known_warnings
countErrorLines({"FATAL": 0, "ERROR": 0, "WARNING": 0},
stdout=remove_known_warnings(stdout))
</text></argument>
</extension>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment