diff --git a/Hlt/Hlt2Conf/options/hlt2_onia_test.py b/Hlt/Hlt2Conf/options/hlt2_onia_test.py new file mode 100644 index 0000000000000000000000000000000000000000..d26d9fa9de5c46b39d6bac6f39b2a7fd9bce79c5 --- /dev/null +++ b/Hlt/Hlt2Conf/options/hlt2_onia_test.py @@ -0,0 +1,308 @@ +############################################################################### +# (c) Copyright 2019 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. # +############################################################################### +"""Options for running HLT2 lines. + +Run like any other options file: + + ./Moore/run gaudirun.py Moore/Hlt/Hlt2Conf/options/Hlt2_onia_test.py +""" + +from Moore import options, run_moore +from RecoConf.reco_objects_from_file import stateProvider_with_simplified_geom +from Hlt2Conf.lines.onia import all_lines + +# When running from Upgrade MC, must use the post-juggling locations of the raw event +raw_event_format = 4.3 + +# a list of available samples for testing +#decay_descriptor = 30000000 # MinBias +#decay_descriptor = 18112001 # inclusive Upsilon +#decay_descriptor = 24142001 # inclusive Jpsi +#decay_descriptor = 28142001 # Psi2s --> mu mu +decay_descriptor = 12143001 # B --> Jpsi K +#decay_descriptor = 28144041 # Chic --> Jpsi mu mu +#decay_descriptor = 11114100 # B --> Ks mu mu +#decay_descriptor = 13144011 # Bs --> Jpsi phi + +# FT decoder version to use +ftdec_v = -1 + +# set the input files and the detector conditions +input_files = [] +DDDBTag = "" +CONDDBTag = "" + +# output file name +outputfile_name = "" + +if decay_descriptor == 30000000: + + #input_files = [ + # # MinBias 30000000 + # # sim+std://MC/Upgrade/Beam7000GeV-Upgrade-MagDown-Nu7.6-25ns-Pythia8/Sim09c-Up02/Reco-Up01/30000000/LDST + # 'root://xrootd.echo.stfc.ac.uk/lhcb:prod/lhcb/MC/Upgrade/LDST/00069155/0000/00069155_00000878_2.ldst' + #] + # + #ftdec_v = 4 + #DDDBTag = 'dddb-20171126' + #CONDDBTag = 'sim-20171127-vc-md100' + #inputFileType = 'ROOT' + #outputfile_name = "MinBias_30000000_HLT2.dst" + + # HLT1-filtered + input_files = [ + # MinBias 30000000 + # sim+std://MC/Upgrade/Beam7000GeV-Upgrade-MagDown-Nu7.6-25ns-Pythia8/Sim09c-Up02/Reco-Up01/Trig0x52000000/30000000/LDST + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000001_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000002_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000003_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000004_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000005_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000006_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000007_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000008_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000010_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000012_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000014_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000016_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000017_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000018_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000019_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000020_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000021_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000022_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000023_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000025_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000026_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000028_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000029_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000030_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000031_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000032_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000033_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000034_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000035_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000036_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000037_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000038_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000039_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000040_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000041_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000043_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000044_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000045_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000047_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000048_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000049_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000050_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000051_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000052_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000054_1.ldst', + 'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00075219/0000/00075219_00000055_1.ldst', + ] + + ftdec_v = 4 + DDDBTag = 'dddb-20171126' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = 'ROOT' + outputfile_name = "MinBias_30000000_HLT1filtered_HLT2.dst" + +elif decay_descriptor == 18112001: + input_files = [ + # inclusive Upsilon, 18112001 + # sim+std://MC/Upgrade/Beam7000GeV-Upgrade-MagDown-Nu7.6-25ns-Pythia8/Sim09c-Up02/Reco-Up01/18112001/LDST + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000016_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000017_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000020_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000024_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000026_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000027_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000028_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000029_2.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070550/0000/00070550_00000030_2.ldst", + ] + + # HLT1-filtered + #input_files = [ + # # inclusive Upsilon, 18112001 + # # sim+std://MC/Upgrade/Beam7000GeV-Upgrade-MagDown-Nu7.6-25ns-Pythia8/Sim09c-Up02/Reco-Up01/Trig0x52000000/18112001/LDST + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000001_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000002_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000003_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000004_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000005_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000006_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000007_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000008_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076733/0000/00076733_00000043_1.ldst", + #] + + ftdec_v = 2 + DDDBTag = 'dddb-20171126' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = 'ROOT' + outputfile_name = "inclUpsilon_18112001_HLT2.dst" + +elif decay_descriptor == 24142001: + + input_files = [ + "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/inclJpsi/inclJpsi_24142001_BrunelReco.ldst" + ] + + # HLT1-filtered + #input_files = [ + # "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/inclJpsi/inclJpsi_24142001_BrunelReco_HLT1filtered.dst" + #] + + ftdec_v = 2 + DDDBTag = 'dddb-20171122' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = "ROOT" + outputfile_name = "inclJpsi_24142001_HLT2.dst" + +elif decay_descriptor == 28142001: + + #input_files = [ + # "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/Psi2s/Psi2s_28142001_BrunelReco.ldst" + #] + + # HLT1-filtered + input_files = [ + "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/Psi2s/Psi2s_28142001_BrunelReco_HLT1filtered.dst" + ] + + ftdec_v = 2 + DDDBTag = 'dddb-20171122' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = "ROOT" + outputfile_name = "Psi2s_28142001_HLT2.dst" + +elif decay_descriptor == 12143001: + + input_files = [ + "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/B2JpsiK/B2JpsiK_12143001_BrunelReco_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/B2JpsiK/B2JpsiK_12143001_BrunelReco_2.ldst", + ] + + # HL1-filtered + #input_files = [ + # "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/B2JpsiK/B2JpsiK_12143001_BrunelReco_HLT1filtered.dst", + #] + + ftdec_v = 2 + DDDBTag = 'dddb-20171122' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = "ROOT" + outputfile_name = "B2JpsiK_12143001_HLT2.dst" + +elif decay_descriptor == 28144041: + + input_files = [ + "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/Chic2JpsiMuMu/Chic2JpsiMuMu_28144041_BrunelReco_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/Chic2JpsiMuMu/Chic2JpsiMuMu_28144041_BrunelReco_2.ldst", + ] + + # HLT1-filtered + #input_files = [ + # "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/Chic2JpsiMuMu/Chic2JpsiMuMu_28144041_BrunelReco_HLT1filtered.dst", + # ] + + ftdec_v = 2 + DDDBTag = 'dddb-20171122' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = "ROOT" + outputfile_name = "ChicJpsiDiMuMu_28144040_HLT2.dst" + +elif decay_descriptor == 11114100: + + #input_files = [ + # "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/B2KsMuMu/B2KsMuMu_11114100_BrunelReco_1.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/B2KsMuMu/B2KsMuMu_11114100_BrunelReco_2.ldst", + #] + + # HLT1-filtered + input_files = [ + "root://eoslhcb.cern.ch//eos/lhcb/wg/BandQ/trigger/Upgrade/MC_samples/B2KsMuMu/B2KsMuMu_11114100_BrunelReco_HLT1filtered.dst", + ] + + ftdec_v = 2 + DDDBTag = 'dddb-20171122' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = "ROOT" + outputfile_name = "B2KsMuMu_28144040_HLT2.dst" + +elif decay_descriptor == 13144011: + + #input_files = [ + # # Bs2JpsiPhi, 13144011 + # # sim+std://MC/Upgrade/Beam7000GeV-Upgrade-MagDown-Nu7.6-25ns-Pythia8/Sim09c-Up02/Reco-Up01/13144011/LDST + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000011_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000019_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000024_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000035_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000046_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000054_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000068_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000072_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000087_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000093_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000109_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000110_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000111_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000112_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000122_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000125_2.ldst", + # "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00070705/0000/00070705_00000126_2.ldst", + # ] + + # HLT1-filtered + input_files = [ + # Bs2JpsiPhi, 13144011 + # sim+std://MC/Upgrade/Beam7000GeV-Upgrade-MagDown-Nu7.6-25ns-Pythia8/Sim09c-Up02/Reco-Up01/Trig0x52000000/13144011/LDST + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000001_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000002_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000003_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000004_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000005_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000006_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000007_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000064_1.ldst", + "root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/Upgrade/LDST/00076706/0000/00076706_00000068_1.ldst", + ] + + ftdec_v = 4 + DDDBTag = 'dddb-20171126' + CONDDBTag = 'sim-20171127-vc-md100' + inputFileType = 'ROOT' + outputfile_name = "" + +# set the options +options.evt_max = 5000 +options.input_files = input_files +options.data_type = 'Upgrade' +options.dddb_tag = DDDBTag +options.conddb_tag = CONDDBTag +options.simulation = True +options.input_type = inputFileType +options.input_raw_format = raw_event_format + + +def make_lines(): + return [builder() for builder in all_lines.values()] + + +public_tools = [stateProvider_with_simplified_geom()] +run_moore(options, make_lines, public_tools) + +# setup the output file +#from PyConf.environment import setupOutput +# +#setupOutput(outputfile_name, 'ROOT') diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/__init__.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/__init__.py index ff66e2d8bfa34502d41f7cdec5f873acb1aa2048..818926c804f7b3160cf69f569ad1127af18d171b 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/__init__.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/__init__.py @@ -29,6 +29,7 @@ from . import ( B2KsMuMu, InclusiveDetachedDilepton, inclusive_radiative_b, + onia, ) from jets import Hlt2Run2Jets @@ -67,6 +68,7 @@ modules = [ B2KsMuMu, InclusiveDetachedDilepton, inclusive_radiative_b, + onia, ] all_lines = _get_all_lines(modules) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/BcToX.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/BcToX.py new file mode 100644 index 0000000000000000000000000000000000000000..60e6538ae1423d09f43c570a146bc2ef7944d8f2 --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/BcToX.py @@ -0,0 +1,32 @@ +############################################################################### +# (c) Copyright 2019 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. # +############################################################################### +""" +Registration of Bc+ lines +""" + +from Moore.config import HltLine, register_line_builder + +# get the prefilters +from Hlt2Conf.lines.onia.builders.prefilters import make_prefilters + +# get the combination +from Hlt2Conf.lines.onia.builders.standard_combinations import make_BcToJpsiPi + +all_lines = {} + + +@register_line_builder(all_lines) +def Bc2ToJpsiPi_line(name='Hlt2BcpToJpsiPipLine', prescale=1): + """[B_c+ --> Jpsi pi+]CC line""" + return HltLine( + name=name, + algs=make_prefilters() + [make_BcToJpsiPi()], + prescale=prescale) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/__init__.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ef82745d13f0257e98da4b65eb50f5343356c73a --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/__init__.py @@ -0,0 +1,18 @@ +# (c) Copyright 2019 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. # +############################################################################### +""" +Submodule that defines the B&Q HLT2 lines +""" + +from . import BcToX + +# provide "all_lines" for correct registration by the overall HLT2 lines module +all_lines = {} +all_lines.update(BcToX.all_lines) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/__init__.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/charged_hadrons.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/charged_hadrons.py new file mode 100644 index 0000000000000000000000000000000000000000..336549e72a060aafc42ab6016aaae2db29d0712a --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/charged_hadrons.py @@ -0,0 +1,157 @@ +############################################################################### +# (c) Copyright 2019 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. # +############################################################################### +""" +Definition of B&Q charged hadrons taking into account RICHes acceptance and radiator thresholds. +Use track reduced chi square and ghost probability used in Run 2 +Separate detached and prompt categories. Prompt to be cheched for rate. +Use DLL so far for PID response. +""" +from GaudiKernel.SystemOfUnits import GeV, MeV + +from RecoConf.reco_objects_from_file import make_pvs + +from Hlt2Conf.algorithms import require_all, ParticleFilterWithPVs +from Hlt2Conf.framework import configurable + +from Hlt2Conf.standard_particles import (make_has_rich_long_pions, + make_has_rich_long_kaons, + make_has_rich_long_protons) + +#################################### +# Charged hadron selections # +#################################### + + +@configurable +def make_charged_hadrons( + make_particles=make_has_rich_long_pions, + make_pvs=make_pvs, + name="onia_has_rich_long_pions", + pt_min=250. * MeV, #TBC with Reco + p_min=2.5 * GeV, + p_max=150. * GeV, + eta_min=2., + eta_max=5., + trchi2dof_max=4, #TBC with Reco + trghostprob_max=0.4, #TBC with Reco + mipchi2dvprimary_min=None, + pid=None): + + code = require_all('PT > {pt_min}', 'in_range({p_min}, P, {p_max})', + 'in_range({eta_min}, ETA, {eta_max})', + 'TRCHI2DOF < {trchi2dof_max}', + 'TRGHOSTPROB < {trghostprob_max}').format( + pt_min=pt_min, + p_min=p_min, + p_max=p_max, + eta_min=eta_min, + eta_max=eta_max, + trchi2dof_max=trchi2dof_max, + trghostprob_max=trghostprob_max) + + if pid is not None: + code += ' & ({})'.format(pid) + + if mipchi2dvprimary_min is not None: + code += '& (MIPCHI2DV(PRIMARY) > {mipchi2dvprimary_min})'.format( + mipchi2dvprimary_min=mipchi2dvprimary_min) + + return ParticleFilterWithPVs( + make_particles(), make_pvs(), name=name, Code=code) + + +#################################### +# Detached # +#################################### + + +@configurable +def make_detached_pions( + name="onia_detached_pions", + mipchi2dvprimary_min=3., #TBC + pid='PIDK < 0.'): + """ + Return B&Q detached pions. + """ + return make_charged_hadrons( + name=name, + make_particles=make_has_rich_long_pions, + mipchi2dvprimary_min=mipchi2dvprimary_min, + pid=pid) + + +@configurable +def make_detached_kaons( + name="onia_detached_kaons", + mipchi2dvprimary_min=3., #TBC + pid='PIDK > 0.'): + """ + Return B&Q detached kaons. + """ + return make_charged_hadrons( + make_particles=make_has_rich_long_kaons, + name=name, + mipchi2dvprimary_min=mipchi2dvprimary_min, + pid=pid) + + +@configurable +def make_detached_protons( + name="onia_detached_protons", + p_min=10. * GeV, + mipchi2dvprimary_min=3., #TBC + pid='PIDp > 0.'): + """ + Return B&Q detached protons. + """ + return make_charged_hadrons( + make_particles=make_has_rich_long_protons, + name=name, + p_min=p_min, + mipchi2dvprimary_min=mipchi2dvprimary_min, + pid=pid) + + +#################################### +# Prompt # +#################################### + + +@configurable +def make_prompt_pions(name="onia_prompt_pions", pid='PIDK < 0.'): + """ + Return B&Q prompt pions. + """ + return make_charged_hadrons( + make_particles=make_has_rich_long_pions, name=name, pid=pid) + + +@configurable +def make_prompt_kaons(name="onia_prompt_kaons", pid='PIDK > 0.'): + """ + Return B&Q prompt kaons. + """ + return make_charged_hadrons( + make_particles=make_has_rich_long_kaons, name=name, pid=pid) + + +@configurable +def make_prompt_protons(name="onia_prompt_protons", + p_min=10. * GeV, + pid='PIDp > 0.'): + """ + Return B&Q prompt protons. + """ + return make_charged_hadrons( + make_particles=make_has_rich_long_protons, + name=name, + p_min=p_min, + pid=pid) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/dimuon.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/dimuon.py new file mode 100644 index 0000000000000000000000000000000000000000..05d326fa06f98b9766cca74340207aa8c95d8f01 --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/dimuon.py @@ -0,0 +1,103 @@ +############################################################################### +# (c) Copyright 2019 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. # +############################################################################### +""" +Make B&Q dimuon combinations. +""" + +from GaudiKernel.SystemOfUnits import MeV + +from RecoConf.reco_objects_from_file import make_pvs + +from Hlt2Conf.algorithms import require_all, ParticleFilterWithPVs +from Hlt2Conf.framework import configurable + +from Hlt2Conf.standard_particles import make_dimuon_base + +# mass window [MeV] around the Jpsi and Psi2s, +# applied to Jpsi and Psi2s lines [2018: 120 MeV] +_MASSWINDOW_JPSI = 120 * MeV +_MASSWINDOW_PSI2S = 120 * MeV + +# ProbNNmu requirements on the muons +# of the Jpsi and Psi2s lines [2018: 0.1] +_PROBNNMU_JPSI = 0.1 +_PROBNNMU_PSI2S = 0.1 + + +@configurable +def make_dimuon( + make_particles=make_dimuon_base, + make_pvs=make_pvs, + name="onia_prompt_dimuon", + minMass_dimuon=0 * MeV, + minPt_dimuon=600 * MeV, + minPt_muon=300 * MeV, + maxVertexChi2=25, + #maxTrackChi2_muon=10, # to be decided if we want to keep TrackChi2 cuts in the trigger + maxTrackGhostProb_muon=0.4, # this has to be reoptimised for the Upgrade + minProbNN_muon=0.1, + bpvdls_min=None): + + code = require_all( + 'MM > {minMass_dimuon}', + 'PT > {minPt_dimuon}', + 'MINTREE("mu-" == ABSID, PT) > {minPt_muon}', + 'VFASPF(VCHI2PDOF) < {maxVertexChi2}', + # to be decided if we want to keep TrackChi2 cuts in the trigger + #'MAXTREE("mu-" == ABSID, TRCHI2DOF) < {maxTrackChi2_muon}', + 'CHILDCUT((TRGHOSTPROB < {maxTrackGhostProb_muon}),1)', + 'CHILDCUT((TRGHOSTPROB < {maxTrackGhostProb_muon}),2)', + 'MINTREE("mu-" == ABSID, PROBNNmu) > {minProbNN_muon}' + ).format( + minMass_dimuon=minMass_dimuon, + minPt_dimuon=minPt_dimuon, + minPt_muon=minPt_muon, + maxVertexChi2=maxVertexChi2, + # to be decided if we want to keep TrackChi2 cuts in the trigger + #maxTrackChi2_muon=maxTrackChi2_muon, + maxTrackGhostProb_muon=maxTrackGhostProb_muon, + minProbNN_muon=minProbNN_muon) + + if bpvdls_min is not None: + code += '& (BPVDLS() > {bpvdls_min})'.format(bpvdls_min=bpvdls_min) + + return ParticleFilterWithPVs( + make_particles(), make_pvs(), name=name, Code=code) + + +@configurable +def make_detached_dimuon(name="onia_detached_dimuon", + minProbNN_muon=0.1, + bpvdls_min=3.): + """ + Make the detached dimuon. + Used in Run 1-2 by many dimuon exclusive lines, previously named DetachedCommonFilter + """ + + return make_dimuon( + name=name, minProbNN_muon=minProbNN_muon, bpvdls_min=bpvdls_min) + + +@configurable +def make_detached_jpsi(name="onia_detached_jpsi", + massWind_Jpsi=_MASSWINDOW_JPSI, + minPt_Jpsi=0 * MeV): + """ + Build the Jpsi + """ + + code = require_all('ADMASS("J/psi(1S)") < {massWind_Jpsi}', + 'PT > {minPt_Jpsi}').format( + massWind_Jpsi=massWind_Jpsi, minPt_Jpsi=minPt_Jpsi) + + dimuon = make_detached_dimuon(minProbNN_muon=_PROBNNMU_JPSI) + + return ParticleFilterWithPVs(dimuon, make_pvs(), name=name, Code=code) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/prefilters.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/prefilters.py new file mode 100644 index 0000000000000000000000000000000000000000..51c9dc80b2711318e70fb9899eb24cc9fe1d7fac --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/prefilters.py @@ -0,0 +1,20 @@ +############################################################################### +# (c) Copyright 2019 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. # +############################################################################### +""" +Prefilters used by all lines: require at least one PV, GEC not used here. Upfront reco will be removed. +""" + +from RecoConf.hlt1_tracking import require_pvs +from RecoConf.reco_objects_from_file import (make_pvs, upfront_reconstruction) + + +def make_prefilters(): + return upfront_reconstruction() + [require_pvs(make_pvs())] diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/standard_combinations.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/standard_combinations.py new file mode 100644 index 0000000000000000000000000000000000000000..72aa90c4195bb640b151ae97438a43caddc2cc3f --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/onia/builders/standard_combinations.py @@ -0,0 +1,89 @@ +############################################################################### +# (c) Copyright 2019 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. # +############################################################################### +""" +Definition of B&Q standard combinations as defined in Table 2 of the B&Q physics requirements document. +""" +from GaudiKernel.SystemOfUnits import MeV, picosecond + +from RecoConf.reco_objects_from_file import make_pvs + +from Hlt2Conf.algorithms import require_all, ParticleCombinerWithPVs +from Hlt2Conf.framework import configurable + +from Hlt2Conf.lines.onia.builders.charged_hadrons import make_detached_pions, make_detached_kaons +from Hlt2Conf.lines.onia.builders.dimuon import make_detached_jpsi + + +@configurable +def make_BpToJpsiKp(make_detached_jpsi=make_detached_jpsi, + make_detached_kaons=make_detached_kaons, + make_pvs=make_pvs, + adamass=200 * MeV, + vfaspf_max=25, + bpvltime_max=0.3 * picosecond): + """ + Make the B&Q [B+ --> Jpsi K+]cc candidate. + """ + jpsi = make_detached_jpsi() + kaons = make_detached_kaons() + pvs = make_pvs() + + combination_cut = require_all("ADAMASS('B+') < {adamass}").format( + adamass=adamass) + + mother_cut = require_all("VFASPF(VCHI2PDOF) < {vfaspf_max}", + "BPVLTIME() < {bpvltime_max}").format( + vfaspf_max=vfaspf_max, + bpvltime_max=bpvltime_max) + + return ParticleCombinerWithPVs( + particles=[jpsi, kaons], + pvs=pvs, + DecayDescriptors=["[B+ -> J/psi(1S) K+]cc"], + CombinationCut=combination_cut, + MotherCut=mother_cut) + + +@configurable +def make_BcToJpsiPi(make_detached_jpsi=make_detached_jpsi, + make_detached_pions=make_detached_pions, + make_pvs=make_pvs, + amass_min=5800 * MeV, + amass_max=7000 * MeV, + mass_min=6000 * MeV, + mass_max=6750 * MeV, + vfaspf_max=16, + bpvipchi2_max=25): + """ + Make the [Bc+ --> Jpsi pi+]cc candidate. Combination and mother cuts from S34 Bc2JpsiHBDTLine. + """ + jpsi = make_detached_jpsi() + pions = make_detached_pions() + pvs = make_pvs() + + combination_cut = require_all( + "in_range({amass_min}, AM, {amass_max})").format( + amass_min=amass_min, amass_max=amass_max) + + mother_cut = require_all("in_range({mass_min}, M, {mass_max})", + "VFASPF(VCHI2PDOF) < {vfaspf_max}", + "BPVIPCHI2() < {bpvipchi2_max}").format( + mass_min=mass_min, + mass_max=mass_max, + vfaspf_max=vfaspf_max, + bpvipchi2_max=bpvipchi2_max) + + return ParticleCombinerWithPVs( + particles=[jpsi, pions], + pvs=pvs, + DecayDescriptors=["[B_c+ -> J/psi(1S) pi+]cc"], + CombinationCut=combination_cut, + MotherCut=mother_cut)